From 0f81a142a64808f259293eed1a5c6e0a1fd09136 Mon Sep 17 00:00:00 2001 From: Harikrishna Patnala Date: Tue, 10 Oct 2023 14:15:58 +0530 Subject: [PATCH 1/2] Don't fetch data during logout --- ui/src/views/dashboard/UsageDashboard.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/views/dashboard/UsageDashboard.vue b/ui/src/views/dashboard/UsageDashboard.vue index 4264a90f9259..a2cc1c4c4859 100644 --- a/ui/src/views/dashboard/UsageDashboard.vue +++ b/ui/src/views/dashboard/UsageDashboard.vue @@ -143,7 +143,9 @@ export default { if (newValue && newValue.id && (!oldValue || newValue.id !== oldValue.id)) { this.fetchData() } else if (store.getters.userInfo.roletype !== 'Admin') { - this.fetchData() + if (!store.getters.logoutFlag) { + this.fetchData() + } } } ) From 2c62676beefad103a36d02019d52111a212b562f Mon Sep 17 00:00:00 2001 From: Harikrishna Patnala Date: Wed, 11 Oct 2023 09:39:21 +0530 Subject: [PATCH 2/2] Clubbed the conditions --- ui/src/views/dashboard/UsageDashboard.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/src/views/dashboard/UsageDashboard.vue b/ui/src/views/dashboard/UsageDashboard.vue index a2cc1c4c4859..a6983300cb91 100644 --- a/ui/src/views/dashboard/UsageDashboard.vue +++ b/ui/src/views/dashboard/UsageDashboard.vue @@ -142,10 +142,8 @@ export default { (newValue, oldValue) => { if (newValue && newValue.id && (!oldValue || newValue.id !== oldValue.id)) { this.fetchData() - } else if (store.getters.userInfo.roletype !== 'Admin') { - if (!store.getters.logoutFlag) { - this.fetchData() - } + } else if (store.getters.userInfo.roletype !== 'Admin' && !store.getters.logoutFlag) { + this.fetchData() } } )