From 08e00d4b91adbcc6a6498da0518a80002258f9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Mon, 28 Mar 2016 22:58:45 +0200 Subject: [PATCH] infobox/node: nodeinfos {NODE_NAME} support --- lib/infobox/node.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 0a262cb..a9fecca 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -219,9 +219,10 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], return au.enabled ? "aktiviert (" + au.branch + ")" : "deaktiviert" } - function showStatImg(o, nodeId) { + function showStatImg(o, d) { var subst = {} - subst["{NODE_ID}"] = nodeId + subst["{NODE_ID}"] = d.nodeinfo.node_id ? d.nodeinfo.node_id : "unknown" + subst["{NODE_NAME}"] = d.nodeinfo.hostname ? d.nodeinfo.hostname : "unknown" return showStat(o, subst) } @@ -263,7 +264,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], var h4 = document.createElement("h4") h4.textContent = nodeInfo.name el.appendChild(h4) - el.appendChild(showStatImg(nodeInfo, d.nodeinfo.node_id)) + el.appendChild(showStatImg(nodeInfo, d)) }) if (d.neighbours.length > 0) {