Added a status column to the server list.
This commit is contained in:
parent
6cf9d8d41c
commit
0fd24aa8de
@ -10,6 +10,7 @@
|
|||||||
<table id="servers" class="table table-hover tablesorter">
|
<table id="servers" class="table table-hover tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th><span></span></th>
|
||||||
<th><span>Players</span></th>
|
<th><span>Players</span></th>
|
||||||
<th><span>Server</span></th>
|
<th><span>Server</span></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -19,10 +20,19 @@
|
|||||||
{% with delta_hours=server.last_updated|hours_since_now %}
|
{% with delta_hours=server.last_updated|hours_since_now %}
|
||||||
{% if delta_hours > 24 %}
|
{% if delta_hours > 24 %}
|
||||||
<tr class="danger">
|
<tr class="danger">
|
||||||
|
<th>
|
||||||
|
<span title="Offline: not seen since the last day." class="glyphicon glyphicon-remove-sign"></span>
|
||||||
|
</th>
|
||||||
{% elif delta_hours >= 1 %}
|
{% elif delta_hours >= 1 %}
|
||||||
<tr class="warning">
|
<tr class="warning">
|
||||||
|
<th>
|
||||||
|
<span title="Unknown: not seen since the last hour." class="glyphicon glyphicon-question-sign"></span>
|
||||||
|
</th>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>
|
||||||
|
<span title="Online" class="glyphicon glyphicon-ok-sign"></span>
|
||||||
|
</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
<th>{{server.players_current}}</th>
|
<th>{{server.players_current}}</th>
|
||||||
@ -49,6 +59,11 @@
|
|||||||
cssAsc: 'tablesorter-asc',
|
cssAsc: 'tablesorter-asc',
|
||||||
cssDesc: 'tablesorter-desc',
|
cssDesc: 'tablesorter-desc',
|
||||||
cssHeader: 'tablesorter-head',
|
cssHeader: 'tablesorter-head',
|
||||||
|
headers: {
|
||||||
|
0: {
|
||||||
|
sorter: false, // Don't sort the status column
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
$("#servers").tablesorter(settings);
|
$("#servers").tablesorter(settings);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user