From 619c75490353809d158f87af9b4d3b2e5117165b Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 14 Jan 2022 17:50:56 +0700 Subject: [PATCH 1/5] Clear cache APIs when the switch domain with SAML user (#5855) --- ui/src/components/header/SamlDomainSwitcher.vue | 2 +- ui/src/store/modules/user.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/components/header/SamlDomainSwitcher.vue b/ui/src/components/header/SamlDomainSwitcher.vue index 30c15833719..8760aec3769 100644 --- a/ui/src/components/header/SamlDomainSwitcher.vue +++ b/ui/src/components/header/SamlDomainSwitcher.vue @@ -103,7 +103,7 @@ export default { userid: account.userId, domainid: account.domainId }).then(response => { - store.dispatch('GetInfo').then(() => { + store.dispatch('GetInfo', true).then(() => { this.$message.success(`Switched to "${account.accountName} (${account.domainPath})"`) this.$router.go() }) diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js index 6b05fe9927f..1ecf61f462f 100644 --- a/ui/src/store/modules/user.js +++ b/ui/src/store/modules/user.js @@ -175,9 +175,9 @@ const user = { }) }, - GetInfo ({ commit }) { + GetInfo ({ commit }, switchDomain) { return new Promise((resolve, reject) => { - const cachedApis = Vue.ls.get(APIS, {}) + const cachedApis = switchDomain ? {} : Vue.ls.get(APIS, {}) const cachedZones = Vue.ls.get(ZONES, []) const cachedTimezoneOffset = Vue.ls.get(TIMEZONE_OFFSET, 0.0) const cachedUseBrowserTimezone = Vue.ls.get(USE_BROWSER_TIMEZONE, false) From 59a615cf215323fbf6a5fc6cb93a425662337f5c Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 14 Jan 2022 16:29:35 +0530 Subject: [PATCH 2/5] ui: fix deploy vm in basic zone (#5856) * ui: fix deploy vm in basic zone Signed-off-by: Abhishek Kumar --- ui/src/views/compute/DeployVM.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index dc76351cbd3..2d942115a2b 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1542,7 +1542,7 @@ export default { return key.split('.').join('\\002E') }, updateSecurityGroups (securitygroupids) { - this.securitygroupids = securitygroupids + this.securitygroupids = securitygroupids || [] }, getText (option) { return _.get(option, 'displaytext', _.get(option, 'name')) From a42ed1fb89e49e75159f370ce33d01516869ccc7 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Mon, 17 Jan 2022 13:00:56 +0700 Subject: [PATCH 3/5] add a setting to config.json that allows users to set theme (#5584) --- ui/public/config.json | 1 + ui/src/components/page/GlobalLayout.vue | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/public/config.json b/ui/public/config.json index e9994804568..859f15d0bc6 100644 --- a/ui/public/config.json +++ b/ui/public/config.json @@ -57,5 +57,6 @@ "plugins": [], "basicZoneEnabled": true, "multipleServer": false, + "allowSettingTheme": true, "docHelpMappings": {} } diff --git a/ui/src/components/page/GlobalLayout.vue b/ui/src/components/page/GlobalLayout.vue index 87c5ef8ebfb..d31123fc686 100644 --- a/ui/src/components/page/GlobalLayout.vue +++ b/ui/src/components/page/GlobalLayout.vue @@ -65,7 +65,7 @@ -