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
|
@ -12,7 +12,7 @@ import {
|
|||
import { getPlatformType } from '@/react/portainer/environments/utils';
|
||||
import { useEnvironment } from '@/react/portainer/environments/queries/useEnvironment';
|
||||
import { useLocalStorage } from '@/portainer/hooks/useLocalStorage';
|
||||
import { EndpointProvider } from '@/portainer/services/types';
|
||||
import { EndpointProviderInterface } from '@/portainer/services/endpointProvider';
|
||||
|
||||
import { getPlatformIcon } from '../portainer/environments/utils/get-platform-icon';
|
||||
|
||||
|
@ -107,8 +107,8 @@ function useCurrentEnvironment() {
|
|||
function clearEnvironment() {
|
||||
const $injector = angular.element(document).injector();
|
||||
$injector.invoke(
|
||||
/* @ngInject */ (EndpointProvider: EndpointProvider) => {
|
||||
EndpointProvider.setCurrentEndpoint(undefined);
|
||||
/* @ngInject */ (EndpointProvider: EndpointProviderInterface) => {
|
||||
EndpointProvider.setCurrentEndpoint(null);
|
||||
if (!params.endpointId) {
|
||||
document.title = 'Portainer';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue