From e78d10b70ddb009393f038e8602c470b4c1655ca Mon Sep 17 00:00:00 2001 From: kirankumarb07 Date: Fri, 3 Mar 2023 12:10:29 +0530 Subject: After the session expired redirect to login page If the user switches pages between the KVM and Virtual Media pages after the session has expired, it won't redirect to the login page. So I have added the system redfish API call in the create method to check the session timeout status. If the session is expired, the API call will get a 401 status, and WEBUI will be redirected to the login page. Change-Id: I069768ee0cef41afb4e6aa770bb8bec6565a16bd Signed-off-by: Kirankumarb07 Ballapalli --- src/views/Operations/Kvm/KvmConsole.vue | 3 +++ src/views/Operations/VirtualMedia/VirtualMedia.vue | 1 + 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/views/Operations/Kvm/KvmConsole.vue b/src/views/Operations/Kvm/KvmConsole.vue index 4f24db24..212514d1 100644 --- a/src/views/Operations/Kvm/KvmConsole.vue +++ b/src/views/Operations/Kvm/KvmConsole.vue @@ -97,6 +97,9 @@ export default { if (this.consoleWindow == false) this.isConsoleWindow.close(); }, }, + created() { + this.$store.dispatch('global/getSystemInfo'); + }, mounted() { this.openTerminal(); }, diff --git a/src/views/Operations/VirtualMedia/VirtualMedia.vue b/src/views/Operations/VirtualMedia/VirtualMedia.vue index 8a3d5add..80dff5b0 100644 --- a/src/views/Operations/VirtualMedia/VirtualMedia.vue +++ b/src/views/Operations/VirtualMedia/VirtualMedia.vue @@ -127,6 +127,7 @@ export default { }, }, created() { + this.$store.dispatch('global/getSystemInfo'); if (this.proxyDevices.length > 0 || this.legacyDevices.length > 0) return; this.startLoader(); this.$store -- cgit v1.2.3