mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
UI: Deal with crosssite api call after login (#10533)
This commit is contained in:
parent
314c4591ec
commit
270d3f9a2d
3
ui/public/config.json
vendored
3
ui/public/config.json
vendored
@ -97,5 +97,6 @@
|
||||
"basicZoneEnabled": true,
|
||||
"multipleServer": false,
|
||||
"allowSettingTheme": true,
|
||||
"docHelpMappings": {}
|
||||
"docHelpMappings": {},
|
||||
"notifyLatestCSVersion": true
|
||||
}
|
||||
|
||||
@ -317,7 +317,6 @@ const user = {
|
||||
const result = response.listusersresponse.user[0]
|
||||
commit('SET_INFO', result)
|
||||
commit('SET_NAME', result.firstname + ' ' + result.lastname)
|
||||
store.dispatch('SetCsLatestVersion', result.rolename)
|
||||
resolve(cachedApis)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -564,6 +563,9 @@ const user = {
|
||||
commit('SET_DOMAIN_STORE', domainStore)
|
||||
},
|
||||
SetCsLatestVersion ({ commit }, rolename) {
|
||||
if (!vueProps.$config.notifyLatestCSVersion) {
|
||||
return
|
||||
}
|
||||
const lastFetchTs = store.getters.latestVersion?.fetchedTs ? store.getters.latestVersion.fetchedTs : 0
|
||||
if (rolename === 'Root Admin' && (+new Date() - lastFetchTs) > 24 * 60 * 60 * 1000) {
|
||||
axios.get(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user