From 509ae8ea6bfcc51980d421eca069a949a2db4b4d Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 9 Jun 2020 14:08:15 +0800 Subject: [PATCH 1/2] remove customSettings and get logo urls from publicSettings --- src/layout/components/NavBar/Logo.vue | 9 +-------- src/store/getters.js | 1 - src/store/modules/settings.js | 15 ++------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/layout/components/NavBar/Logo.vue b/src/layout/components/NavBar/Logo.vue index b00fea0be..868816095 100644 --- a/src/layout/components/NavBar/Logo.vue +++ b/src/layout/components/NavBar/Logo.vue @@ -34,18 +34,11 @@ export default { }, computed: { ...mapGetters([ - 'customSettings', 'publicSettings' ]), // eslint-disable-next-line vue/return-in-computed-property logoSrc() { - if (this.publicSettings.XPACK_LICENSE_IS_VALID) { - if (this.customSettings && this.customSettings.logo_index && this.customSettings.logo_index !== '/static/img/logo_text.png') { - console.log(this.customSettings.logo_index) - return this.customSettings.logo_index - } - } - return this.logoText + return this.publicSettings.LOGO_URLS.logo_index } }, created() { diff --git a/src/store/getters.js b/src/store/getters.js index 69ebc5d89..3be57ca3f 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -10,7 +10,6 @@ const getters = { visitedViews: state => state.tagsView.visitedViews, cachedViews: state => state.tagsView.cachedViews, publicSettings: state => state.settings.publicSettings, - customSettings: state => state.settings.customSettings, currentOrgRoles: state => state.users.roles, currentOrgPerms: state => state.users.perms, MFAVerifyAt: state => state.users.MFAVerifyAt diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index 44111aa58..6ba828ec7 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -1,5 +1,5 @@ import defaultSettings from '@/settings' -import { getPublicSettings, getLogo } from '@/api/settings' +import { getPublicSettings } from '@/api/settings' const { showSettings, fixedHeader, sidebarLogo, tagsView } = defaultSettings @@ -8,8 +8,7 @@ const state = { fixedHeader: fixedHeader, sidebarLogo: sidebarLogo, tagsView: tagsView, - publicSettings: null, - customSettings: null + publicSettings: null } const mutations = { @@ -20,9 +19,6 @@ const mutations = { }, SET_PUBLIC_SETTINGS: (state, settings) => { state.publicSettings = settings - }, - SET_CUSTOM_SETTINGS: (state, settings) => { - state.customSettings = settings } } @@ -35,13 +31,6 @@ const actions = { return new Promise((resolve, reject) => { getPublicSettings().then(response => { commit('SET_PUBLIC_SETTINGS', response.data) - if (response.data.XPACK_ENABLED) { - if (response.data.XPACK_LICENSE_IS_VALID) { - getLogo().then((res) => { - commit('SET_CUSTOM_SETTINGS', res) - }) - } - } resolve(response) }).catch(error => { reject(error) From 27fc745cf40f916870b0e792878eb1736807d48a Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 9 Jun 2020 14:20:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20=E4=BD=9C=E4=B8=9A=E4=B8=AD?= =?UTF-8?q?=E5=BF=83/=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8/=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=AF=A6=E6=83=85/=E6=89=A7=E8=A1=8C=E5=8E=86?= =?UTF-8?q?=E5=8F=B2/=E5=8E=86=E5=8F=B2=E4=B8=8D=E8=83=BD=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ops/TaskDetail/TaskHistory.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/ops/TaskDetail/TaskHistory.vue b/src/views/ops/TaskDetail/TaskHistory.vue index 4d86fa5e3..bbcae315c 100644 --- a/src/views/ops/TaskDetail/TaskHistory.vue +++ b/src/views/ops/TaskDetail/TaskHistory.vue @@ -4,6 +4,7 @@