diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index a06fc02a..f8451522 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -483,6 +483,14 @@ class PanelHandler(BaseHandler): if str(server_id) not in server_ids[:]: user_order.remove(server_id) page_data["servers"] = page_servers + for server in page_data["servers"]: + server_obj = self.controller.servers.get_server_instance_by_id( + server["server_data"]["server_id"] + ) + alert = False + if server_obj.last_backup_status(): + alert = True + server["alert"] = alert # num players is set to zero here. If we poll all servers while # dashboard is loading it takes FOREVER. We leave this to the diff --git a/app/frontend/templates/panel/dashboard.html b/app/frontend/templates/panel/dashboard.html index 0d081a68..b6eb09a2 100644 --- a/app/frontend/templates/panel/dashboard.html +++ b/app/frontend/templates/panel/dashboard.html @@ -60,12 +60,12 @@

+ title="{% raw translate('dashboard', 'cpuCores', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cores') }}
{% raw translate('dashboard', 'cpuCurFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_cur_freq') }}
{% raw translate('dashboard', 'cpuMaxFreq', data['lang']) %}: {{ data.get('hosts_data').get('cpu_max_freq') }}"> {{ translate('dashboard', 'cpuUsage', data['lang']) }}: {{ data.get('hosts_data').get('cpu_usage') }}

+ title="{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_usage') }}"> {{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_percent') }}%

@@ -116,8 +116,8 @@ {% if len(data['servers']) > 0 %} {% if data['user_data']['hints'] %} + data-content="{{ translate('dashboard', 'cannotSeeOnMobile2', data['lang']) }}" , + data-placement="top"> {% end %} {% end %}
  {{ @@ -154,26 +154,33 @@ + {% if server['alert'] %} + + {{ server['server_data']['server_name'] }}  + + {% else %} {{ server['server_data']['server_name'] }} + {% end %} {% if server['user_command_permission'] %} {% if server['stats']['running'] %} + title="{{ translate('dashboard', 'stop' , data['lang']) }}">   + title="{{ translate('dashboard', 'restart' , data['lang']) }}">   + title="{{ translate('dashboard', 'kill' , data['lang']) }}">   @@ -192,15 +199,15 @@ data['lang']) }} {% else %} + title="{{ translate('dashboard', 'start' , data['lang']) }}">   + title="{{ translate('dashboard', 'clone' , data['lang']) }}">   + title="{{ translate('dashboard', 'kill' , data['lang']) }}">   {% end %} @@ -209,7 +216,7 @@
+ title="{{server['stats']['cpu']}}">
+ aria-valuemin="0" aria-valuemax="100">
{{server['stats']['cpu']}}%
+ title="{{server['stats']['mem']}}">
+ aria-valuemin="0" aria-valuemax="100">
{{server['stats']['mem_percent']}}% - @@ -256,7 +263,7 @@ {% if server['stats']['desc'] != 'False' %}
{{ + style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;">{{ server['stats']['desc'] }}

{% end %} @@ -280,7 +287,7 @@ {% end %} + data-players="{{ server['stats']['online']}}" data-max="{{ server['stats']['max'] }}"> {% end %} @@ -297,23 +304,35 @@

-
+
{{ translate('dashboard', 'cpuUsage', data['lang']) }}
+ title="{{server['stats']['cpu']}}">
+ " role="progressbar" style="width: {{server['stats']['cpu']}}%" aria-valuenow="0" aria-valuemin="0" + aria-valuemax="100">
{{server['stats']['cpu']}}%
@@ -424,7 +452,7 @@
{{ translate('dashboard', 'memUsage', data['lang']) }}
+ title="{{server['stats']['mem']}}">
+ aria-valuemin="0" aria-valuemax="100">
{{server['stats']['mem_percent']}}% - @@ -464,7 +492,7 @@ {% if server['stats']['desc'] != 'False' %}
+ style="overflow-wrap: break-word !important; max-width: 85px !important; overflow: scroll;"> {{ server['stats']['desc'] }}

{% end %} diff --git a/app/frontend/templates/panel/parts/m_server_controls_list.html b/app/frontend/templates/panel/parts/m_server_controls_list.html index a82d02ff..4a114b52 100644 --- a/app/frontend/templates/panel/parts/m_server_controls_list.html +++ b/app/frontend/templates/panel/parts/m_server_controls_list.html @@ -15,8 +15,12 @@ {{ translate('serverDetails', 'schedule', data['lang']) }} {% end %} {% if data['permissions']['Backup'] in data['user_permissions'] %} + {% if data['backup_failed'] %} + {{ translate('serverDetails', 'backup', data['lang']) }}  + {% else %} {{ translate('serverDetails', 'backup', data['lang']) }} {% end %} + {% end %} {% if data['permissions']['Files'] in data['user_permissions'] %} {{ translate('serverDetails', 'files', data['lang']) }} {% end %}