infobox/node: handle unknown model when showing router img
This commit is contained in:
parent
5a5ce1d346
commit
7d145141c1
1 changed files with 2 additions and 2 deletions
|
@ -372,7 +372,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
||||||
|
|
||||||
function showNodeImg(o, model) {
|
function showNodeImg(o, model) {
|
||||||
if (!model)
|
if (!model)
|
||||||
return undefined
|
return document.createTextNode("Knotenname")
|
||||||
|
|
||||||
var content, caption
|
var content, caption
|
||||||
var modelhash = model.split("").reduce(function(a, b) {
|
var modelhash = model.split("").reduce(function(a, b) {
|
||||||
|
@ -418,7 +418,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
||||||
try {
|
try {
|
||||||
config.hwImg.forEach(function(hwImg) {
|
config.hwImg.forEach(function(hwImg) {
|
||||||
try {
|
try {
|
||||||
top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model))
|
top.appendChild(showNodeImg(hwImg, dictGet(d, ["nodeinfo", "hardware", "model"])))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.message)
|
console.log(err.message)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue