Shorten device name in sidebar stats (#46)
This way, version codes on TP-Link devices and processor names are visible
This commit is contained in:
parent
8435885e5c
commit
1b332508a0
|
@ -128,7 +128,13 @@ define(["chroma-js", "virtual-dom", "numeral-intl", "filters/genericnode", "verc
|
|||
return d ? "online" : "offline"
|
||||
})
|
||||
var fwDict = count(nodes, ["nodeinfo", "software", "firmware", "release"])
|
||||
var hwDict = count(nodes, ["nodeinfo", "hardware", "model"])
|
||||
var hwDict = count(nodes, ["nodeinfo", "hardware", "model"], function (d) {
|
||||
if (d) {
|
||||
d = d.replace(/\(r\)|\(tm\)/gi, "").replace(/AMD |Intel |TP-Link | CPU| Processor/g, "")
|
||||
if (d.indexOf("@") > 0) d = d.substring(0, d.indexOf("@"))
|
||||
}
|
||||
return d
|
||||
})
|
||||
var geoDict = count(nodes, ["nodeinfo", "location"], function (d) {
|
||||
return d && d.longitude && d.latitude ? "ja" : "nein"
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue