mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Add sync symbol to status page
This commit is contained in:
parent
ff3da27333
commit
f2cc0e89fb
@ -10,13 +10,18 @@ class StatusHandler(BaseHandler):
|
||||
page_data = {}
|
||||
page_data['lang'] = 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(
|
||||
|
@ -21,6 +21,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if data['running'] != 0 %}
|
||||
<span id="sync" style="margin-left: 5px;"><i class="fas fa-sync fa-spin"></i></span></h4>
|
||||
{% end %}
|
||||
{% for server in data['servers'] %}
|
||||
<tr>
|
||||
<td id="server_name_{{ server['stats']['server_id']['server_id'] }}">
|
||||
@ -94,7 +97,7 @@
|
||||
|
||||
/* TODO Update each element */
|
||||
if (server.int_ping_results) {
|
||||
|
||||
document.getElementById('sync').innerHTML='';
|
||||
/* Update Players */
|
||||
if (server.players)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user