|
@@ -1,5 +1,5 @@
|
|
|
-require(["router", "map", "sidebar", "meshstats", "linklist", "simplenodelist", "infobox/main"],
|
|
|
-function (Router, Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) {
|
|
|
+require(["router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "simplenodelist", "infobox/main"],
|
|
|
+function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, SimpleNodelist, Infobox) {
|
|
|
getJSON("config.json").then(main)
|
|
|
|
|
|
function main(config) {
|
|
@@ -13,6 +13,8 @@ function (Router, Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) {
|
|
|
var linkScale = chroma.scale(chroma.interpolate.bezier(['green', 'yellow', 'red'])).domain([1, 5])
|
|
|
var sidebar = new Sidebar(document.body)
|
|
|
var infobox = new Infobox(config, sidebar, router)
|
|
|
+ var tabs = new Tabs()
|
|
|
+ var newlost = new Container()
|
|
|
|
|
|
map = new Map(linkScale, sidebar, router)
|
|
|
document.body.insertBefore(map.div, document.body.firstChild)
|
|
@@ -23,9 +25,11 @@ function (Router, Map, Sidebar, Meshstats, Linklist, SimpleNodelist, Infobox) {
|
|
|
linklist = new Linklist(linkScale, router)
|
|
|
|
|
|
sidebar.add(meshstats)
|
|
|
- sidebar.add(newnodeslist)
|
|
|
- sidebar.add(lostnodeslist)
|
|
|
- sidebar.add(linklist)
|
|
|
+ sidebar.add(tabs)
|
|
|
+ newlost.add(newnodeslist)
|
|
|
+ newlost.add(lostnodeslist)
|
|
|
+ tabs.add("Neu & Verschwunden", newlost)
|
|
|
+ tabs.add("Verbindungen", linklist)
|
|
|
|
|
|
router.addTarget(infobox)
|
|
|
router.addTarget(map)
|