Fully resolve gateway names in hopglass (#57)

Depends on hopglass/hopglass-server#56
This commit is contained in:
Marvin W 2016-08-05 19:47:25 +02:00 committed by PetaByteBoy // Milan Pässler
commit cb065d8d07
4 changed files with 48 additions and 23 deletions

View file

@ -156,8 +156,11 @@ define(["chroma-js", "virtual-dom", "numeral-intl", "filters/genericnode", "verc
if (d === null)
return null
if (d in nodeDict)
return nodeDict[d].nodeinfo.hostname
if (d.node)
return d.node.nodeinfo.hostname
if (d.id)
return d.id
return d
})
@ -166,8 +169,11 @@ define(["chroma-js", "virtual-dom", "numeral-intl", "filters/genericnode", "verc
if (d === null)
return null
if (d in nodeDict)
return nodeDict[d].nodeinfo.hostname
if (d.node)
return d.node.nodeinfo.hostname
if (d.id)
return d.id
return d
})
@ -188,8 +194,8 @@ define(["chroma-js", "virtual-dom", "numeral-intl", "filters/genericnode", "verc
fillTable("Koordinaten", geoTable, geoDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Uplink", uplinkTable, uplinkDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Autom. Updates", autoTable, autoDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Nodes an Gateway", gwNodesTable, gwNodesDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Clients an Gateway", gwClientsTable, gwClientsDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Gateway", gwNodesTable, gwNodesDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Gateway", gwClientsTable, gwClientsDict.sort(function (a, b) { return b[1] - a[1] }))
fillTable("Site", siteTable, siteDict.sort(function (a, b) { return b[1] - a[1] }))
}