infobox/node: non-clickable mac adresses should be black
This commit is contained in:
parent
9e7049c9e3
commit
0171ebe7e1
|
@ -299,17 +299,19 @@ 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 document.createTextNode(text)
|
||||
}
|
||||
|
||||
function lookupNode(d, nodeDict) {
|
||||
if (!d)
|
||||
|
|
Loading…
Reference in a new issue