From ffaaf9ec182717592b47d5d61461f7d40a65688a Mon Sep 17 00:00:00 2001 From: = Date: Sat, 18 Jan 2025 19:11:19 -0500 Subject: [PATCH] Fix welcome message --- app/frontend/templates/panel/dashboard.html | 137 ++++++++++++++------ 1 file changed, 94 insertions(+), 43 deletions(-) diff --git a/app/frontend/templates/panel/dashboard.html b/app/frontend/templates/panel/dashboard.html index b7ee46f0..0e9bf530 100644 --- a/app/frontend/templates/panel/dashboard.html +++ b/app/frontend/templates/panel/dashboard.html @@ -58,11 +58,13 @@
-

+

{{ translate('dashboard', 'cpuUsage', data['lang']) }}: {{ data.get('hosts_data').get('cpu_usage') }}

-

+

{{ translate('dashboard', 'memUsage', data['lang']) }}: {{ data.get('hosts_data').get('mem_percent') }}%

@@ -112,7 +114,9 @@ {% for item in data['hosts_data']['disk_json'] %} {% if item["mount"] in data["monitored"] %}
-

+

{{item["mount"]}}

{{item["used"]}} / + " role="progressbar" style="width: {{item['percent_used']}}%" + aria-valuenow="{{item['percent_used']}}" aria-valuemin="0" aria-valuemax="100"> + {{item["used"]}} / {{item["total"]}}
@@ -150,7 +156,9 @@ data['lang']) }} {% if len(data['servers']) > 0 %} {% if data['user_data']['hints'] %} - + {% end %} {% end %}
  {{ @@ -159,7 +167,7 @@
{% if len(data['servers']) == 0 and len(data['failed_servers']) == 0 %} -
+

{{ translate('dashboard', 'welcome', data['lang']) }}


{{ translate('dashboard', 'no-servers', data['lang']) }} {{ translate('dashboard', 'newServer', @@ -188,7 +196,8 @@ {% if server['alert'] %} -
+ {{ server['server_data']['server_name'] }}  {% else %} @@ -201,11 +210,13 @@ {% if server['user_command_permission'] %} {% if server['stats']['importing'] and server['stats']['running'] %} -  {{ translate('serverTerm', 'installing', +  {{ translate('serverTerm', 'installing', data['lang']) }} {% elif server['stats']['updating']%} -  {{ translate('serverTerm', 'updating', +  {{ translate('serverTerm', 'updating', data['lang']) }} {% elif server['stats']['waiting_start']%} @@ -217,32 +228,39 @@ {{ translate('serverTerm', 'importing', data['lang']) }} {% elif server['stats']['running'] %} - +   - +   - +   {% else %} - +   - +   - +   {% end %} {% end %} -
+
+ " role="progressbar" style="width: {{server['stats']['cpu']}}%" + aria-valuenow="{{server['stats']['cpu']}}" aria-valuemin="0" aria-valuemax="100">
{{server['stats']['cpu']}}% -
+
+ " role="progressbar" style="width: {{server['stats']['mem_percent']}}%" + aria-valuenow="{{server['stats']['mem_percent']}}" aria-valuemin="0" aria-valuemax="100">
{{server['stats']['mem_percent']}}% - @@ -283,7 +304,10 @@ {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max', data['lang']) }} {% end %} - +
-  {{server['server_name']}} +  {{server['server_name']}} @@ -330,22 +355,28 @@
- + {% if server['stats']['running'] %} {{ translate('dashboard', 'online', data['lang']) }} @@ -366,17 +397,23 @@ {% if server['stats']['running'] %}
@@ -402,24 +439,31 @@ {% elif server['stats']['importing']%} {% else %} @@ -431,13 +475,15 @@
-
+
{{ translate('dashboard', 'cpuUsage', data['lang']) }}
-
+
+ " role="progressbar" style="width: {{server['stats']['cpu']}}%" + aria-valuenow="{{server['stats']['cpu']}}" aria-valuemin="0" aria-valuemax="100">
{{server['stats']['cpu']}}%
@@ -454,7 +501,8 @@
{{ translate('dashboard', 'memUsage', data['lang']) }}
-
+
+ " role="progressbar" style="width: {{server['stats']['mem_percent']}}%" + aria-valuenow="{{server['stats']['mem_percent']}}" aria-valuemin="0" aria-valuemax="100"> +
{{server['stats']['mem_percent']}}% - @@ -487,7 +537,8 @@
{{ translate('dashboard', 'players', data['lang']) }}
{% if server['stats']['int_ping_results'] %} - {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max', data['lang']) }} + {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max', + data['lang']) }} {% end %}
@@ -565,10 +616,10 @@ } else { setTimeout(function () { $('.modal').modal('hide'); - bootbox.alert({ - title: responseData.error, - message: responseData.error_data - }); + bootbox.alert({ + title: responseData.error, + message: responseData.error_data + }); }, 2000) } }