Skip to content

Commit 1d10189

Browse files
author
Daan Hoogland
committed
refresh zones in the client view
1 parent 6136ac9 commit 1d10189

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

ui/src/store/modules/user.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,24 @@ const user = {
529529
})
530530
})
531531
},
532+
RefreshZones ({ commit }) {
533+
return new Promise((resolve, reject) => {
534+
api('listZones').then(json => {
535+
const zones = json.listzonesresponse.zone || []
536+
commit('SET_ZONES', zones)
537+
resolve(zones)
538+
}).catch(error => {
539+
reject(error)
540+
})
541+
api(
542+
'listNetworkServiceProviders',
543+
{ name: 'SecurityGroupProvider', state: 'Enabled' }
544+
).then(response => {
545+
const showSecurityGroups = response.listnetworkserviceprovidersresponse.count > 0
546+
commit('SET_SHOW_SECURITY_GROUPS', showSecurityGroups)
547+
}).catch(ignored => {})
548+
})
549+
},
532550
RefreshFeatures ({ commit }) {
533551
return new Promise((resolve, reject) => {
534552
api('listCapabilities').then(response => {

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,6 +1733,7 @@ export default {
17331733
17341734
try {
17351735
await this.enableZone(params)
1736+
await this.$store.dispatch('RefreshZones').catch(() => {})
17361737
await this.$message.success('Success')
17371738
this.loading = false
17381739
this.steps = []

0 commit comments

Comments
 (0)