infobox/node: always show lastseen

also change loadavg name
This commit is contained in:
Milan Pässler 2016-02-25 21:00:05 +01:00
parent cec0775423
commit 8758c04a29

View file

@ -39,7 +39,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
function showStatus(d) {
return function (el) {
el.classList.add(d.flags.online ? "online" : "offline")
el.textContent = d.flags.online ? "online" : "offline, " + d.lastseen.fromNow(true) + " " + d.lastseen.format("(DD.MM.YYYY, H:mm:ss)")
el.textContent = (d.flags.online ? "online " : "offline, " + d.lastseen.fromNow(true)) + " (Stand " + d.lastseen.format("DD.MM.YYYY, H:mm:ss)")
}
}
@ -159,7 +159,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
return span
}
function showLOAD(d) {
function showLoad(d) {
if (!("loadavg" in d.statistics))
return undefined
@ -271,7 +271,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
attributeEntry(attributes, "Site", showSite(d, config))
attributeEntry(attributes, "Uptime", showUptime(d))
attributeEntry(attributes, "Teil des Netzes", showFirstseen(d))
attributeEntry(attributes, "Load - avg", showLOAD(d))
attributeEntry(attributes, "Systemlast", showLoad(d))
attributeEntry(attributes, "Arbeitsspeicher", showRAM(d))
attributeEntry(attributes, "IP Adressen", showIPs(d))
attributeEntry(attributes, "Webseite", showPages(d))