infobox/node: non-clickable mac adresses should be black

This commit is contained in:
Milan Paessler 2016-11-19 02:27:21 +01:00
parent 9e7049c9e3
commit 0171ebe7e1

View file

@ -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) {