From a2d6d6002c3f281c26fda80d0b322f29f24564a0 Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:11:44 +1300 Subject: [PATCH] fix(app): update sliders when limits are known [EE-5933] (#10768) Co-authored-by: testa113 --- .../applications/create/createApplicationController.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index 06902d791..884f85f35 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -1120,10 +1120,10 @@ class KubernetesCreateApplicationController { }); if (this.resourcePools.length) { - const namespaceWithQuota = await this.KubernetesResourcePoolService.get(this.resourcePools[0].Namespace.Name); - this.formValues.ResourcePool.Quota = namespaceWithQuota.Quota; - this.updateNamespaceLimits(namespaceWithQuota); - this.updateSliders(namespaceWithQuota); + this.namespaceWithQuota = await this.KubernetesResourcePoolService.get(this.resourcePools[0].Namespace.Name); + this.formValues.ResourcePool.Quota = this.namespaceWithQuota.Quota; + this.updateNamespaceLimits(this.namespaceWithQuota); + this.updateSliders(this.namespaceWithQuota); } this.formValues.ResourcePool = this.resourcePools[0]; if (!this.formValues.ResourcePool) { @@ -1168,6 +1168,8 @@ class KubernetesCreateApplicationController { this.formValues.OriginalIngresses = this.ingresses; this.formValues.ImageModel = await this.parseImageConfiguration(this.formValues.ImageModel); this.savedFormValues = angular.copy(this.formValues); + this.updateNamespaceLimits(this.namespaceWithQuota); + this.updateSliders(this.namespaceWithQuota); delete this.formValues.ApplicationType; if (this.application.ApplicationType !== KubernetesApplicationTypes.STATEFULSET) {