infobox/node: handle unknown model when showing router img

This commit is contained in:
Milan Paessler 2016-11-19 01:59:44 +01:00
parent 5a5ce1d346
commit 7d145141c1

View file

@ -372,7 +372,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
function showNodeImg(o, model) {
if (!model)
return undefined
return document.createTextNode("Knotenname")
var content, caption
var modelhash = model.split("").reduce(function(a, b) {
@ -418,7 +418,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
try {
config.hwImg.forEach(function(hwImg) {
try {
top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model))
top.appendChild(showNodeImg(hwImg, dictGet(d, ["nodeinfo", "hardware", "model"])))
} catch (err) {
console.log(err.message)
}