Implement yellow orbs in JS

This commit is contained in:
Kumi 2019-01-13 18:14:15 +01:00
parent af3df21777
commit 67e58caec7

View file

@ -22,7 +22,7 @@ function styleStatus(msg, device) {
device_name = $("#" + device + "-name");
device_id = $("#" + device + "-id");
device_status.css("color", msg.status == 1 ? "green" : (msg.status == 0 ? ((new Date(msg.lastbeat) < new Date(msg.time) && (new Date() - new Date(msg.lastbeat) < 60)) ? "yellow" : "red") : "grey"));
device_status.css("color", msg.status == 1 ? "green" : (msg.status == 2 ? "yellow" : (msg.status == 0 ? "red" : "grey")));
if (msg.hasOwnProperty("ip")) {
device_ip.text(msg.ip + (msg.status == 1 ? "" :" (" + timeSince(msg.time) + ")"));