add nodelist
This commit is contained in:
parent
7cc653f20a
commit
ad56296a83
2 changed files with 105 additions and 3 deletions
|
|
@ -1,9 +1,9 @@
|
|||
require(["router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "simplenodelist", "infobox/main"],
|
||||
function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, SimpleNodelist, Infobox) {
|
||||
require(["router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "nodelist", "simplenodelist", "infobox/main"],
|
||||
function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist, SimpleNodelist, Infobox) {
|
||||
getJSON("config.json").then(main)
|
||||
|
||||
function main(config) {
|
||||
var linklist, lostnodeslist, map, meshstats, newnodeslist, router
|
||||
var linklist, lostnodeslist, map, meshstats, newnodeslist, nodelist, router
|
||||
|
||||
function createGUI() {
|
||||
moment.locale("de")
|
||||
|
|
@ -22,6 +22,7 @@ function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, SimpleNode
|
|||
meshstats = new Meshstats()
|
||||
newnodeslist = new SimpleNodelist(config, "firstseen", router, "Neue Knoten")
|
||||
lostnodeslist = new SimpleNodelist(config, "lastseen", router, "Verschwundene Knoten")
|
||||
nodelist = new Nodelist(router)
|
||||
linklist = new Linklist(linkScale, router)
|
||||
|
||||
sidebar.add(meshstats)
|
||||
|
|
@ -29,6 +30,7 @@ function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, SimpleNode
|
|||
newlost.add(newnodeslist)
|
||||
newlost.add(lostnodeslist)
|
||||
tabs.add("Neu & Verschwunden", newlost)
|
||||
tabs.add("Alle Knoten", nodelist)
|
||||
tabs.add("Verbindungen", linklist)
|
||||
|
||||
router.addTarget(infobox)
|
||||
|
|
@ -111,6 +113,7 @@ function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, SimpleNode
|
|||
|
||||
map.setData(now, newnodes, lostnodes, onlinenodes, links)
|
||||
meshstats.setData(nodes)
|
||||
nodelist.setData(now, nodes)
|
||||
linklist.setData(links)
|
||||
newnodeslist.setData(newnodes)
|
||||
lostnodeslist.setData(lostnodes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue