redo link type handling
This commit is contained in:
parent
3a7cc2bbc5
commit
f77aabd37d
8 changed files with 67 additions and 33 deletions
10
lib/main.js
10
lib/main.js
|
|
@ -102,10 +102,18 @@ 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.vpn) {
|
||||
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")
|
||||
d.type = "Wifi"
|
||||
else if (d.type === "other")
|
||||
d.type = "Kabel"
|
||||
else
|
||||
d.type = "NaN"
|
||||
})
|
||||
|
||||
links.sort( function (a, b) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue