diff --git a/app/classes/web/status_handler.py b/app/classes/web/status_handler.py index ace2103a..07a488ca 100644 --- a/app/classes/web/status_handler.py +++ b/app/classes/web/status_handler.py @@ -11,13 +11,18 @@ class StatusHandler(BaseHandler): page_data['lang'] = helper.get_setting('language') page_data['lang_page'] = helper.getLangPage(helper.get_setting('language')) page_data['servers'] = self.controller.servers.get_all_servers_stats() + running = 0 for srv in page_data['servers']: + if srv['stats']['running']: + running += 1 server_data = srv.get('server_data', False) server_id = server_data.get('server_id', False) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) if 'icon' not in srv['raw_ping_result']: srv['raw_ping_result']['icon'] = False + page_data['running'] = running + template = 'public/status.html' self.render( diff --git a/app/frontend/templates/public/status.html b/app/frontend/templates/public/status.html index 2fc04e4c..2d445f66 100644 --- a/app/frontend/templates/public/status.html +++ b/app/frontend/templates/public/status.html @@ -21,6 +21,9 @@
+ {% if data['running'] != 0 %} + + {% end %} {% for server in data['servers'] %}