main: fix meshlinks counter
This commit is contained in:
parent
92de127bed
commit
6aab7aec7d
|
@ -102,10 +102,8 @@ function (moment, Router, L, GUI, numeral) {
|
||||||
links.forEach( function (d) {
|
links.forEach( function (d) {
|
||||||
d.source.node.neighbours.push({ node: d.target.node, link: d, incoming: false })
|
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 })
|
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.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")
|
if (d.type === "tunnel")
|
||||||
d.type = "VPN"
|
d.type = "VPN"
|
||||||
else if (d.type === "wireless")
|
else if (d.type === "wireless")
|
||||||
|
@ -113,7 +111,7 @@ function (moment, Router, L, GUI, numeral) {
|
||||||
else if (d.type === "other")
|
else if (d.type === "other")
|
||||||
d.type = "Kabel"
|
d.type = "Kabel"
|
||||||
else
|
else
|
||||||
d.type = "NaN"
|
d.type = "N/A"
|
||||||
})
|
})
|
||||||
|
|
||||||
links.sort( function (a, b) {
|
links.sort( function (a, b) {
|
||||||
|
|
Loading…
Reference in a new issue