refactor map.js, show all offline nodes

This commit is contained in:
Nils Schneider 2015-03-26 13:51:08 +01:00
commit 40ecf2641e
2 changed files with 34 additions and 22 deletions

View file

@ -66,8 +66,6 @@ function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist,
var newnodes = limit("firstseen", age, sortByKey("firstseen", nodes).filter(online))
var lostnodes = limit("lastseen", age, sortByKey("lastseen", nodes).filter(offline))
var onlinenodes = nodes.filter(online)
var graph = data[1].batadv
var graphnodes = data[0].nodes
@ -112,7 +110,7 @@ function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist,
d.target.node.neighbours.push({ node: d.source.node, link: d })
})
map.setData(now, newnodes, lostnodes, onlinenodes, links)
map.setData(now, nodes, links, newnodes, lostnodes)
meshstats.setData(nodes)
nodelist.setData(now, nodes)
linklist.setData(links)