From 0171ebe7e1910baf6bdb98522dd7af6c74766b4d Mon Sep 17 00:00:00 2001 From: Milan Paessler Date: Sat, 19 Nov 2016 02:27:21 +0100 Subject: [PATCH] infobox/node: non-clickable mac adresses should be black --- lib/infobox/node.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 4ce939e..9e1f623 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -299,16 +299,18 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], } function createLink(target, router) { - var link = document.createElement("a") - if (!target) return link + if (!target) return document.createTextNode("unknown") var unknown = !(target.node) - link.classList.add("hostname") - link.textContent = unknown ? (target.id ? target.id : target) : target.node.nodeinfo.hostname + var text = unknown ? (target.id ? target.id : target) : target.node.nodeinfo.hostname if (!unknown) { + var link = document.createElement("a") + link.classList.add("hostname-link") link.href = "#" link.onclick = router.node(target.node) + link.textContent = text + return link } - return link + return document.createTextNode(text) } function lookupNode(d, nodeDict) {