mirror of
https://github.com/FreifunkFranken/fff-monitoring.git
synced 2024-06-15 20:04:03 +02:00
router_list.html: Make uptime sortable
Offline routers are assumed to have uptime=0. Minor design changes included. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
bf4c7ca7fe
commit
b3a3666d6b
|
@ -29,7 +29,7 @@
|
|||
<table id="routerlist" class="table table-condensed table-striped table-bordered" style="margin-bottom: 8px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 1%; padding-right: 5px; min-width: 90px;">Hostname</th>
|
||||
<th style="width: 1%; padding-right: 5px; min-width: 240px;">Hostname</th>
|
||||
<th style="width: 45px; padding-right: 5px;">Status</th>
|
||||
<th style="padding-right: 5px;">Hood</th>
|
||||
<th style="padding-right: 5px;">User</th>
|
||||
|
@ -37,13 +37,13 @@
|
|||
<th style="padding-right: 5px;">Created</th>
|
||||
<th style="padding-right: 5px;">Uptime</th>
|
||||
<th style="padding-right: 5px;">Last contact</th>
|
||||
<th>Clients</th>
|
||||
<th>Users</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for router in routers %}
|
||||
<tr>
|
||||
<td class="text-nowrap-responsive"><a href="{{ url_for("router_info", dbid=router.id) }}">{{ router.hostname }}</a>
|
||||
<td class="text-responsive"><a href="{{ url_for("router_info", dbid=router.id) }}">{{ router.hostname }}</a>
|
||||
{%- if router.reset %} - <span style="color:#d90000">Reset!</span>{%- endif %}{%- if router.blocked and not router.v2 %} - <span style="color:#d90000">Blocked!</span>{%- endif %}
|
||||
</td>
|
||||
<td class="text-center"><span class="{{ router.status|status2css }}">{{ router.status }}</span></td>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<td>{{ router.nickname if router.nickname else "" }}</td>
|
||||
<td class="text-nowrap">{{ router.hardware }}</td>
|
||||
<td class="text-nowrap">{{ router.created|utc2local|format_dt_date }}</td>
|
||||
<td class="text-nowrap">{{ router.sys_uptime|format_ts_diff }}</td>
|
||||
<td class="text-nowrap" data-order="{{ router.sys_uptime if router.status == "online" else 0 }}">{{ router.sys_uptime|format_ts_diff }}</td>
|
||||
<td class="text-nowrap">{{ router.last_contact|utc2local|format_dt_date }}</td>
|
||||
<td>{{ router.clients }}</td>
|
||||
</tr>
|
||||
|
@ -73,7 +73,6 @@
|
|||
},*/
|
||||
"columnDefs": [
|
||||
{"orderable": false, "targets": 1},
|
||||
{"orderable": false, "targets": -3},
|
||||
]
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user