diff --git a/lib/infobox/link.js b/lib/infobox/link.js index 109240b..15bff1f 100644 --- a/lib/infobox/link.js +++ b/lib/infobox/link.js @@ -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")) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 2e5b2d6..31415c7 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -259,10 +259,13 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], a1.textContent = d.node.nodeinfo.hostname a1.href = "#" a1.onclick = router.node(d.node) + td1.appendChild(document.createTextNode(d.incoming ? " ← " : " → ")) td1.appendChild(a1) if (d.link.vpn) td1.appendChild(document.createTextNode(" (VPN)")) + if (d.link.cable) + td1.appendChild(document.createTextNode(" (Kabel)")) if (has_location(d.node)) { var span = document.createElement("span") diff --git a/lib/main.js b/lib/main.js index e06f000..53953a9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -100,8 +100,8 @@ function (moment, Router, L, GUI, numeral) { }) links.forEach( function (d) { - d.source.node.neighbours.push({ node: d.target.node, link: d }) - d.target.node.neighbours.push({ node: d.source.node, link: d }) + d.source.node.neighbours.push({ node: d.target.node, link: d, incoming: false }) + d.target.node.neighbours.push({ node: d.source.node, link: d, incoming: true }) if (!d.vpn) { d.source.node.meshlinks = d.source.node.meshlinks ? d.source.node.meshlinks + 1 : 1 d.target.node.meshlinks = d.target.node.meshlinks ? d.target.node.meshlinks + 1 : 1