diff --git a/app/classes/web/ajax_handler.py b/app/classes/web/ajax_handler.py index ddaa3dcc..c3539bb1 100644 --- a/app/classes/web/ajax_handler.py +++ b/app/classes/web/ajax_handler.py @@ -40,6 +40,7 @@ class AjaxHandler(BaseHandler): elif page == 'server_log': server_id = self.get_argument('id', None) + full_log = self.get_argument('full', False) if server_id is None: logger.warning("Server ID not found in server_log ajax call") @@ -56,7 +57,12 @@ class AjaxHandler(BaseHandler): if server_data['log_path']: logger.warning("Server ID not found in server_log ajax call") - log_lines = helper.get_setting('virtual_terminal_lines') + if full_log: + log_lines = helper.get_setting('max_log_lines') + else: + log_lines = helper.get_setting('virtual_terminal_lines') + + print(log_lines) data = helper.tail_file(server_data['log_path'], log_lines) for d in data: diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 18442c30..e8c949f8 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -84,7 +84,7 @@ class PanelHandler(BaseHandler): self.redirect("/panel/error?error=Invalid Server ID") return False - valid_subpages = ['term'] + valid_subpages = ['term', 'logs'] if subpage not in valid_subpages: subpage = 'term' diff --git a/app/config/serverjars.json b/app/config/serverjars.json index 6c62cdec..e3c0fb5e 100644 --- a/app/config/serverjars.json +++ b/app/config/serverjars.json @@ -1,5 +1,5 @@ { - "last_refreshed": "09/01/2020, 12:53:08", + "last_refreshed": "09/03/2020, 22:13:41", "servers": { "nukkitx": [ "1.14" diff --git a/app/frontend/templates/panel/parts/details_stats.html b/app/frontend/templates/panel/parts/details_stats.html new file mode 100644 index 00000000..d7074cca --- /dev/null +++ b/app/frontend/templates/panel/parts/details_stats.html @@ -0,0 +1,43 @@ +