Retain tab when navigating back to server_details

This commit is contained in:
amcmanu3 2023-11-05 11:09:57 -05:00
parent ec4bcda31e
commit ecb40ee2ec
2 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class ServersController(metaclass=Singleton):
self.management_helper = management_helper
self.servers_list = []
self.stats = Stats(self.helper, self)
self.server_subpage = {}
# **********************************************************************************
# Generic Servers Methods

View File

@ -481,6 +481,12 @@ class PanelHandler(BaseHandler):
subpage = nh3.clean(self.get_argument("subpage", ""))
server_id = self.check_server_id()
# load page the user was on last
server_subpage = self.controller.servers.server_subpage.get(server_id, "")
if subpage == "" and server_subpage != "":
subpage = self.controller.servers.server_subpage.get(server_id, "")
else:
self.controller.servers.server_subpage[server_id] = subpage
if server_id is None:
return
if not self.failed_server: