nodelist: fix calculation of negative uptime

This commit is contained in:
Nils Schneider 2015-04-19 13:35:49 +02:00
parent b3c49d01a0
commit 3a6d4855a9

View file

@ -3,7 +3,7 @@ define(["sorttable", "virtual-dom", "numeral"], function (SortTable, V, numeral)
if (d.flags.online && "uptime" in d.statistics)
return Math.round(d.statistics.uptime)
else if (!d.flags.online && "lastseen" in d)
return Math.round(-(now - d.lastseen) / 3600)
return Math.round(-(now.unix() - d.lastseen.unix()))
}
function showUptime(uptime) {