statistics: site code statistics

configurable and documented!
This commit is contained in:
PetaByteBoy 2015-07-18 16:28:07 +02:00 committed by Milan Pässler
parent c0ab7afa15
commit 80967c6259
4 changed files with 62 additions and 0 deletions
lib/infobox

View file

@ -53,6 +53,17 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
return release + " / " + base
}
function showSite(d, config) {
var site = dictGet(d.nodeinfo, ["system", "site_code"])
var rt = site
if (config.siteNames)
config.siteNames.forEach( function (t) {
if(site === t.site)
rt = t.name
})
return rt
}
function showUptime(d) {
if (!("uptime" in d.statistics))
return undefined
@ -192,6 +203,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
attributeEntry(attributes, "Primäre MAC", dictGet(d.nodeinfo, ["network", "mac"]))
attributeEntry(attributes, "Node ID", dictGet(d.nodeinfo, ["node_id"]))
attributeEntry(attributes, "Firmware", showFirmware(d))
attributeEntry(attributes, "Site", showSite(d, config))
attributeEntry(attributes, "Uptime", showUptime(d))
attributeEntry(attributes, "Teil des Netzes", showFirstseen(d))
attributeEntry(attributes, "Arbeitsspeicher", showRAM(d))