main: fix meshlinks counter

This commit is contained in:
Milan Pässler 2016-02-20 02:44:49 +01:00
parent 92de127bed
commit 6aab7aec7d
1 changed files with 2 additions and 4 deletions

View File

@ -102,10 +102,8 @@ function (moment, Router, L, GUI, numeral) {
links.forEach( function (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.type === "tunnel") {
if (d.type !== "tunnel")
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
}
if (d.type === "tunnel")
d.type = "VPN"
else if (d.type === "wireless")
@ -113,7 +111,7 @@ function (moment, Router, L, GUI, numeral) {
else if (d.type === "other")
d.type = "Kabel"
else
d.type = "NaN"
d.type = "N/A"
})
links.sort( function (a, b) {