1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 06:19:41 +02:00

fix(cluster): make angular refresh env [EE-5524] (#10315)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-09-20 09:33:43 +02:00 committed by GitHub
parent 25d5e62f5c
commit c18504d6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 11 deletions

View file

@ -7,7 +7,7 @@ import { getMetricsForAllNodes } from '@/react/kubernetes/services/service.ts';
class KubernetesClusterController {
/* @ngInject */
constructor($async, $state, Notifications, LocalStorage, Authentication, KubernetesNodeService, KubernetesApplicationService, KubernetesEndpointService) {
constructor($async, $state, Notifications, LocalStorage, Authentication, KubernetesNodeService, KubernetesApplicationService, KubernetesEndpointService, EndpointService) {
this.$async = $async;
this.$state = $state;
this.Authentication = Authentication;
@ -16,6 +16,7 @@ class KubernetesClusterController {
this.KubernetesNodeService = KubernetesNodeService;
this.KubernetesApplicationService = KubernetesApplicationService;
this.KubernetesEndpointService = KubernetesEndpointService;
this.EndpointService = EndpointService;
this.onInit = this.onInit.bind(this);
this.getNodes = this.getNodes.bind(this);
@ -120,6 +121,7 @@ class KubernetesClusterController {
}
async onInit() {
this.endpoint = await this.EndpointService.endpoint(this.endpoint.Id);
this.isAdmin = this.Authentication.isAdmin();
const useServerMetrics = this.endpoint.Kubernetes.Configuration.UseServerMetrics;