Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ui/src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const user = {
headerNotices: [],
isLdapEnabled: false,
cloudian: {},
zones: {},
zones: [],
timezoneoffset: 0.0,
usebrowsertimezone: false,
domainStore: {},
Expand Down Expand Up @@ -380,7 +380,8 @@ const user = {
})
} else if (store.getters.loginFlag) {
const hide = message.loading(i18n.global.t('message.discovering.feature'), 0)
getAPI('listZones').then(json => {
// The menu depends on the zones, so the routes are generated only once the zones are known
const zonesLoaded = getAPI('listZones').then(json => {
const zones = json.listzonesresponse.zone || []
commit('SET_ZONES', zones)
}).catch(error => {
Expand All @@ -401,7 +402,7 @@ const user = {
}
}
commit('SET_APIS', apis)
loadFeatures(apis).then(() => {
Promise.all([loadFeatures(apis), zonesLoaded]).then(() => {
resolve(apis)
store.dispatch('GenerateRoutes', { apis }).then(() => {
store.getters.addRouters.map(route => {
Expand Down
Loading