This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 45ea764374 UI: Fix template is deselected if other zone is selected 
(#6415)
45ea764374 is described below

commit 45ea76437437e6426300dc138cd5f8e77c31cdc0
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Tue May 31 09:45:09 2022 -0300

    UI: Fix template is deselected if other zone is selected (#6415)
---
 ui/src/views/compute/DeployVM.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ui/src/views/compute/DeployVM.vue 
b/ui/src/views/compute/DeployVM.vue
index 796dc11674..2fe7c5599a 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -146,6 +146,7 @@
                           :selected="tabKey"
                           :loading="loading.templates"
                           :preFillContent="dataPreFill"
+                          :key="templateKey"
                           @handle-search-filter="($event) => 
fetchAllTemplates($event)"
                           @update-template-iso="updateFieldValue" />
                          <div>
@@ -736,6 +737,7 @@ export default {
       clusterId: null,
       zoneSelected: false,
       dynamicscalingenabled: true,
+      templateKey: 0,
       vm: {
         name: null,
         zoneid: null,
@@ -1285,6 +1287,9 @@ export default {
     }
   },
   methods: {
+    updateTemplateKey () {
+      this.templateKey += 1
+    },
     initForm () {
       this.formRef = ref()
       this.form = reactive({})
@@ -1463,7 +1468,6 @@ export default {
           }
         })
       }
-
       this.fetchBootTypes()
       this.fetchBootModes()
       this.fetchInstaceGroups()
@@ -2117,6 +2121,7 @@ export default {
       } else {
         this.fetchAllIsos()
       }
+      this.updateTemplateKey()
       this.formModel = toRaw(this.form)
     },
     onSelectPodId (value) {

Reply via email to