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

DaanHoogland pushed a commit to branch ghi9853-updateStoreZones
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 1d101898ca6944dce06b71f1e33bee88d5513605
Author: Daan Hoogland <[email protected]>
AuthorDate: Tue Aug 25 20:48:37 2026 +0200

    refresh zones in the client view
---
 ui/src/store/modules/user.js                     | 18 ++++++++++++++++++
 ui/src/views/infra/zone/ZoneWizardLaunchZone.vue |  1 +
 2 files changed, 19 insertions(+)

diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js
index 21cd603e378..1ffd79ab294 100644
--- a/ui/src/store/modules/user.js
+++ b/ui/src/store/modules/user.js
@@ -529,6 +529,24 @@ const user = {
         })
       })
     },
+    RefreshZones ({ commit }) {
+      return new Promise((resolve, reject) => {
+        api('listZones').then(json => {
+          const zones = json.listzonesresponse.zone || []
+          commit('SET_ZONES', zones)
+          resolve(zones)
+        }).catch(error => {
+          reject(error)
+        })
+        api(
+          'listNetworkServiceProviders',
+          { name: 'SecurityGroupProvider', state: 'Enabled' }
+        ).then(response => {
+          const showSecurityGroups = 
response.listnetworkserviceprovidersresponse.count > 0
+          commit('SET_SHOW_SECURITY_GROUPS', showSecurityGroups)
+        }).catch(ignored => {})
+      })
+    },
     RefreshFeatures ({ commit }) {
       return new Promise((resolve, reject) => {
         api('listCapabilities').then(response => {
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue 
b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index fbf5e6f5c20..b54edf5e0b4 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -1733,6 +1733,7 @@ export default {
 
       try {
         await this.enableZone(params)
+        await this.$store.dispatch('RefreshZones').catch(() => {})
         await this.$message.success('Success')
         this.loading = false
         this.steps = []

Reply via email to