diff options
author | kirankumarb07 <kirankumarb@ami.com> | 2023-03-03 09:40:29 +0300 |
---|---|---|
committer | Sandeepa Singh <sandeepa.singh@ibm.com> | 2023-03-27 11:40:00 +0300 |
commit | e78d10b70ddb009393f038e8602c470b4c1655ca (patch) | |
tree | 66645f515f117a23147a5e4fd50f243702e3bb67 /src/views/Operations | |
parent | e4d54c6c6cb6c6574628d7d7bd72f9c6a5830d9b (diff) | |
download | webui-vue-e78d10b70ddb009393f038e8602c470b4c1655ca.tar.xz |
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 <kirankumarb@ami.com>
Diffstat (limited to 'src/views/Operations')
-rw-r--r-- | src/views/Operations/Kvm/KvmConsole.vue | 3 | ||||
-rw-r--r-- | src/views/Operations/VirtualMedia/VirtualMedia.vue | 1 |
2 files changed, 4 insertions, 0 deletions
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 |