Add tooltips for orbs

This commit is contained in:
Kumi 2019-01-13 18:28:59 +01:00
parent 67e58caec7
commit 363035af1a
2 changed files with 2 additions and 1 deletions

View file

@ -24,7 +24,7 @@
{% for device in devices %}
<tr>
<td><div style="display: inline; color: grey; font-weight: bold;" id="{{ device.id }}-indicator">&#11044;</div>&nbsp;<div style="display: inline;" id="{{ device.id }}-id">{{ device.serial }}</div></td>
<td><div style="display: inline; color: grey; font-weight: bold;" title="No information available" id="{{ device.id }}-indicator">&#11044;</div>&nbsp;<div style="display: inline;" id="{{ device.id }}-id">{{ device.serial }}</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>

View file

@ -23,6 +23,7 @@ function styleStatus(msg, device) {
device_id = $("#" + device + "-id");
device_status.css("color", msg.status == 1 ? "green" : (msg.status == 2 ? "yellow" : (msg.status == 0 ? "red" : "grey")));
device_status.prop("title", msg.status == 1 ? "Online and in VPN mode" : (msg.status == 2 ? "Online and in local mode" : (msg.status == 0 ? "Offline" : "No information available")));
if (msg.hasOwnProperty("ip")) {
device_ip.text(msg.ip + (msg.status == 1 ? "" :" (" + timeSince(msg.time) + ")"));