Use Font Awesome for device status indication

This commit is contained in:
Kumi 2019-04-16 09:02:39 +00:00
parent df941650dd
commit b91dcb755c
2 changed files with 2 additions and 2 deletions

View file

@ -217,7 +217,7 @@ else showdevices();
filtertables();
$("div[id$='-indicator']").each(function() {
$("i[id$='-indicator']").each(function() {
device_id = this.id.split("-")[0];
updateStatus(device_id);
setInterval(updateStatus, 10000, device_id);

View file

@ -36,7 +36,7 @@
{% userDevices as devices %}
{% for device in devices %}
<tr data-orga="[{{ device.organization.id }}]">
<td><div style="display: inline; color: grey; font-weight: bold;" title="No information available" id="{{ device.id }}-indicator">&#11044;</div>{% if device.model.deprecated %}&nbsp;<i style="color: red;" title="Device outdated{% if not user.is_superuser %} please contact us to replace it with a new one{% endif %}" class="fas fa-exclamation-triangle"></i>{% elif user.is_superuser and device.upgrade_available %}&nbsp;<i style="color: green;" title="Firmware upgrade available" class="fas fa-upload"></i>{% endif %}&nbsp;<div style="display: inline;" {% if user.is_superuser %}title="{{ device.organization.name }}"{% endif %} id="{{ device.id }}-id">{{ device.serial }}{% if device.ssid %}<br><small>SSID: {{ device.ssid }}</small>{% endif %}</div></td>
<td><i class="fas fa-circle" style="color: grey;" title="No information available" id="{{ device.id }}-indicator"></i>{% if device.model.deprecated %}&nbsp;<i style="color: red;" title="Device outdated{% if not user.is_superuser %} please contact us to replace it with a new one{% endif %}" class="fas fa-exclamation-triangle"></i>{% elif user.is_superuser and device.upgrade_available %}&nbsp;<i style="color: green;" title="Firmware upgrade available" class="fas fa-upload"></i>{% endif %}&nbsp;<div style="display: inline;" {% if user.is_superuser %}title="{{ device.organization.name }}"{% endif %} id="{{ device.id }}-id">{{ device.serial }}{% if device.ssid %}<br><small>SSID: {{ device.ssid }}</small>{% endif %}</div></td>
<td id="{{ device.id }}-name">{% if device.name %}{{ device.name }}{% endif %}</td>
<td id="{{ device.id }}-network">{{ device.network }}</td>
<td><div style="display:inline;" id="{{ device.id }}-ip">{% if device.curip %}{{ device.curip }} (at {{ device.lasttime }}){% endif %}</div></td>