mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'sync-symbol' into 'dev'
Add sync symbol to status page See merge request crafty-controller/crafty-commander!196
This commit is contained in:
commit
344348fafc
@ -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(
|
||||
|
@ -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…
Reference in New Issue
Block a user