nodelist: show number of neighbours

This commit is contained in:
Milan Pässler 2015-12-28 17:53:10 +01:00
commit c0ab7afa15
2 changed files with 14 additions and 2 deletions

View file

@ -102,6 +102,10 @@ 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 })
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
}
})
return { now: now,