Fully resolve gateway names in hopglass (#57)
Depends on hopglass/hopglass-server#56
This commit is contained in:
parent
bf2e858c24
commit
cb065d8d07
4 changed files with 48 additions and 23 deletions
|
|
@ -123,6 +123,15 @@ function (moment, Router, L, GUI, numeral) {
|
|||
|
||||
nodes.forEach( function (d) {
|
||||
d.neighbours = []
|
||||
if (d.statistics) {
|
||||
/*eslint camelcase:0*/
|
||||
if ("gateway" in d.statistics && d.statistics.gateway in graphnodes)
|
||||
d.statistics.gateway = {"node": graphnodes[d.statistics.gateway], "id": d.statistics.gateway}
|
||||
if ("nexthop" in d.statistics && d.statistics.nexthop in graphnodes)
|
||||
d.statistics.nexthop = {"node": graphnodes[d.statistics.nexthop], "id": d.statistics.nexthop}
|
||||
if ("gateway_nexthop" in d.statistics && d.statistics.gateway_nexthop in graphnodes)
|
||||
d.statistics.gateway_nexthop = {"node": graphnodes[d.statistics.gateway_nexthop], "id": d.statistics.gateway_nexthop}
|
||||
}
|
||||
})
|
||||
|
||||
links.forEach( function (d) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue