mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +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
|
@ -3,7 +3,7 @@ import { StateRegistry, StateService } from '@uirouter/angularjs';
|
|||
|
||||
import { Environment } from '@/react/portainer/environments/types';
|
||||
import { notifyError } from '@/portainer/services/notifications';
|
||||
import { EndpointProvider, StateManager } from '@/portainer/services/types';
|
||||
import { StateManager } from '@/portainer/services/types';
|
||||
|
||||
import { reactModule } from './react';
|
||||
|
||||
|
@ -22,7 +22,6 @@ function config($stateRegistryProvider: StateRegistry) {
|
|||
$async: (fn: () => Promise<void>) => Promise<void>,
|
||||
$state: StateService,
|
||||
endpoint: Environment,
|
||||
EndpointProvider: EndpointProvider,
|
||||
StateManager: StateManager
|
||||
) {
|
||||
return $async(async () => {
|
||||
|
@ -31,9 +30,6 @@ function config($stateRegistryProvider: StateRegistry) {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
EndpointProvider.setEndpointID(endpoint.Id);
|
||||
EndpointProvider.setEndpointPublicURL(endpoint.PublicURL);
|
||||
EndpointProvider.setOfflineModeFromStatus(endpoint.Status);
|
||||
await StateManager.updateEndpointState(endpoint);
|
||||
} catch (e) {
|
||||
notifyError('Failed loading environment', e as Error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue