From d0b9e3a732d2a6330fc51c46c62a8e82a09ec3f9 Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-org@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:14:23 +1300 Subject: [PATCH] fix(UI): app summary on forvalues update [EE-6515] (#10932) * app summary on forvalues update * comment added --- .../create/createApplication.html | 54 ++++++++++++++----- .../create/createApplicationController.js | 19 +++++++ 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index 6fdd2cf9d..48668b06b 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -103,13 +103,26 @@ > + - + +
+ +
+
+ +
Actions
@@ -504,12 +517,29 @@ > - + + + +
+ + +
+
+ + +
+
Actions
diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index e9801cc59..1f7b05ffd 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -37,6 +37,7 @@ class KubernetesCreateApplicationController { $scope, $async, $state, + $timeout, Notifications, Authentication, KubernetesResourcePoolService, @@ -54,6 +55,7 @@ class KubernetesCreateApplicationController { this.$scope = $scope; this.$async = $async; this.$state = $state; + this.$timeout = $timeout; this.Notifications = Notifications; this.Authentication = Authentication; this.KubernetesResourcePoolService = KubernetesResourcePoolService; @@ -148,9 +150,26 @@ class KubernetesCreateApplicationController { this.updateApplicationType = this.updateApplicationType.bind(this); this.getAppType = this.getAppType.bind(this); this.showDataAccessPolicySection = this.showDataAccessPolicySection.bind(this); + this.refreshReactComponent = this.refreshReactComponent.bind(this); + + this.$scope.$watch( + () => this.formValues, + () => { + this.refreshReactComponent(); + }, + _.isEqual + ); } /* #endregion */ + refreshReactComponent() { + this.isTemporaryRefresh = true; + + this.$timeout(() => { + this.isTemporaryRefresh = false; + }, 10); + } + onChangePlacements(values) { return this.$async(async () => { this.formValues.Placements = values.placements;