fix edit namespace resource quota issue (#10063)

pull/10067/head
Prabhat Khera 1 year ago committed by GitHub
parent 3ea6d2b9d9
commit 360969c93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,7 @@ import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { updateIngressControllerClassMap, getIngressControllerClassMap } from '@/react/kubernetes/cluster/ingressClass/utils'; import { updateIngressControllerClassMap, getIngressControllerClassMap } from '@/react/kubernetes/cluster/ingressClass/utils';
import { confirmUpdate } from '@@/modals/confirm'; import { confirmUpdate } from '@@/modals/confirm';
import { confirmUpdateNamespace } from '@/react/kubernetes/namespaces/ItemView/ConfirmUpdateNamespace'; 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 { class KubernetesResourcePoolController {
/* #region CONSTRUCTOR */ /* #region CONSTRUCTOR */
@ -36,7 +36,8 @@ class KubernetesResourcePoolController {
KubernetesApplicationService, KubernetesApplicationService,
KubernetesIngressService, KubernetesIngressService,
KubernetesVolumeService, KubernetesVolumeService,
KubernetesNamespaceService KubernetesNamespaceService,
KubernetesNodeService
) { ) {
Object.assign(this, { Object.assign(this, {
$async, $async,
@ -54,6 +55,7 @@ class KubernetesResourcePoolController {
KubernetesIngressService, KubernetesIngressService,
KubernetesVolumeService, KubernetesVolumeService,
KubernetesNamespaceService, KubernetesNamespaceService,
KubernetesNodeService,
}); });
this.IngressClassTypes = KubernetesIngressClassTypes; this.IngressClassTypes = KubernetesIngressClassTypes;
@ -366,7 +368,7 @@ class KubernetesResourcePoolController {
const name = this.$state.params.id; 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 = []; this.ingressControllers = [];
if (this.state.ingressAvailabilityPerNamespace) { if (this.state.ingressAvailabilityPerNamespace) {

Loading…
Cancel
Save