mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(environments): remove endpoints cache [DTD-100] (#6408)
This commit is contained in:
parent
9ef2e27aae
commit
37d4a80769
51 changed files with 155 additions and 353 deletions
|
@ -14,7 +14,7 @@ angular.module('portainer.docker', ['portainer.app', reactModule]).config([
|
|||
parent: 'endpoint',
|
||||
url: '/docker',
|
||||
abstract: true,
|
||||
onEnter: /* @ngInject */ function onEnter(endpoint, $async, $state, EndpointService, EndpointProvider, Notifications, StateManager, SystemService) {
|
||||
onEnter: /* @ngInject */ function onEnter(endpoint, $async, $state, EndpointService, Notifications, StateManager, SystemService) {
|
||||
return $async(async () => {
|
||||
if (![1, 2, 4].includes(endpoint.Type)) {
|
||||
$state.go('portainer.home');
|
||||
|
@ -32,10 +32,6 @@ angular.module('portainer.docker', ['portainer.app', reactModule]).config([
|
|||
throw new Error('Environment is unreachable.');
|
||||
}
|
||||
|
||||
EndpointProvider.setEndpointID(endpoint.Id);
|
||||
EndpointProvider.setEndpointPublicURL(endpoint.PublicURL);
|
||||
EndpointProvider.setOfflineModeFromStatus(endpoint.Status);
|
||||
|
||||
await StateManager.updateEndpointState(endpoint);
|
||||
} catch (e) {
|
||||
Notifications.error('Failed loading environment', e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue