Add tooltips for orbs
This commit is contained in:
parent
67e58caec7
commit
363035af1a
2 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
{% for device in devices %}
|
{% for device in devices %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><div style="display: inline; color: grey; font-weight: bold;" id="{{ device.id }}-indicator">⬤</div> <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">⬤</div> <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 }}-name">{% if device.name %}{{ device.name }}{% endif %}</td>
|
||||||
<td id="{{ device.id }}-network">{{ device.network }}</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>
|
<td><div style="display:inline" id="{{ device.id }}-ip">{% if device.curip %}{{ device.curip }} (at {{ device.lasttime }}){% endif %}</div></td>
|
||||||
|
|
|
@ -23,6 +23,7 @@ function styleStatus(msg, device) {
|
||||||
device_id = $("#" + device + "-id");
|
device_id = $("#" + device + "-id");
|
||||||
|
|
||||||
device_status.css("color", msg.status == 1 ? "green" : (msg.status == 2 ? "yellow" : (msg.status == 0 ? "red" : "grey")));
|
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")) {
|
if (msg.hasOwnProperty("ip")) {
|
||||||
device_ip.text(msg.ip + (msg.status == 1 ? "" :" (" + timeSince(msg.time) + ")"));
|
device_ip.text(msg.ip + (msg.status == 1 ? "" :" (" + timeSince(msg.time) + ")"));
|
||||||
|
|
Loading…
Reference in a new issue