infobox/node: non-clickable mac adresses should be black
This commit is contained in:
parent
9e7049c9e3
commit
0171ebe7e1
|
@ -299,16 +299,18 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
|
||||||
}
|
}
|
||||||
|
|
||||||
function createLink(target, router) {
|
function createLink(target, router) {
|
||||||
var link = document.createElement("a")
|
if (!target) return document.createTextNode("unknown")
|
||||||
if (!target) return link
|
|
||||||
var unknown = !(target.node)
|
var unknown = !(target.node)
|
||||||
link.classList.add("hostname")
|
var text = unknown ? (target.id ? target.id : target) : target.node.nodeinfo.hostname
|
||||||
link.textContent = unknown ? (target.id ? target.id : target) : target.node.nodeinfo.hostname
|
|
||||||
if (!unknown) {
|
if (!unknown) {
|
||||||
|
var link = document.createElement("a")
|
||||||
|
link.classList.add("hostname-link")
|
||||||
link.href = "#"
|
link.href = "#"
|
||||||
link.onclick = router.node(target.node)
|
link.onclick = router.node(target.node)
|
||||||
|
link.textContent = text
|
||||||
|
return link
|
||||||
}
|
}
|
||||||
return link
|
return document.createTextNode(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
function lookupNode(d, nodeDict) {
|
function lookupNode(d, nodeDict) {
|
||||||
|
|
Loading…
Reference in a new issue