infobox: handle directional links

This commit is contained in:
Milan Pässler 2016-02-18 16:38:36 +00:00
parent d13b032b61
commit f354a6fbc7
3 changed files with 7 additions and 4 deletions
lib/infobox

View file

@ -6,7 +6,7 @@ define(function () {
a1.onclick = router.node(d.source.node)
a1.textContent = d.source.node.nodeinfo.hostname
h2.appendChild(a1)
h2.appendChild(document.createTextNode(" "))
h2.appendChild(document.createTextNode(" "))
var a2 = document.createElement("a")
a2.href = "#"
a2.onclick = router.node(d.target.node)
@ -19,7 +19,7 @@ define(function () {
attributeEntry(attributes, "TQ", showTq(d))
attributeEntry(attributes, "Entfernung", showDistance(d))
attributeEntry(attributes, "VPN", d.vpn ? "ja" : "nein")
attributeEntry(attributes, "VPN", d.vpn ? "ja" : null)
var hw1 = dictGet(d.source.node.nodeinfo, ["hardware", "model"])
var hw2 = dictGet(d.target.node.nodeinfo, ["hardware", "model"])
attributeEntry(attributes, "Hardware", (hw1 != null ? hw1 : "unbekannt") + " " + (hw2 != null ? hw2 : "unbekannt"))