From 360969c93e64fd93eb9cf22cd9a7dcbdcd94731c Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-org@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:24:55 +1200 Subject: [PATCH] fix edit namespace resource quota issue (#10063) --- .../views/resource-pools/edit/resourcePoolController.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js index 43ead5e22..2a27cf788 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js +++ b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js @@ -16,7 +16,7 @@ import { FeatureId } from '@/react/portainer/feature-flags/enums'; import { updateIngressControllerClassMap, getIngressControllerClassMap } from '@/react/kubernetes/cluster/ingressClass/utils'; import { confirmUpdate } from '@@/modals/confirm'; import { confirmUpdateNamespace } from '@/react/kubernetes/namespaces/ItemView/ConfirmUpdateNamespace'; -import { getMetricsForAllNodes, getMetricsForAllPods } from '@/react/kubernetes/services/service.ts'; +import { getMetricsForAllPods } from '@/react/kubernetes/services/service.ts'; class KubernetesResourcePoolController { /* #region CONSTRUCTOR */ @@ -36,7 +36,8 @@ class KubernetesResourcePoolController { KubernetesApplicationService, KubernetesIngressService, KubernetesVolumeService, - KubernetesNamespaceService + KubernetesNamespaceService, + KubernetesNodeService ) { Object.assign(this, { $async, @@ -54,6 +55,7 @@ class KubernetesResourcePoolController { KubernetesIngressService, KubernetesVolumeService, KubernetesNamespaceService, + KubernetesNodeService, }); this.IngressClassTypes = KubernetesIngressClassTypes; @@ -366,7 +368,7 @@ class KubernetesResourcePoolController { const name = this.$state.params.id; - const [nodes, pools] = await Promise.all([getMetricsForAllNodes, this.KubernetesResourcePoolService.get('', { getQuota: true })]); + const [nodes, pools] = await Promise.all([this.KubernetesNodeService.get(), this.KubernetesResourcePoolService.get('', { getQuota: true })]); this.ingressControllers = []; if (this.state.ingressAvailabilityPerNamespace) {