meshstats: show offline nodes (#39)
This commit is contained in:
parent
4c6ba69dd3
commit
2da97bca16
|
@ -6,6 +6,7 @@ define(function () {
|
|||
self.setData = function (d) {
|
||||
var totalNodes = sum(d.nodes.all.map(one))
|
||||
var totalOnlineNodes = sum(d.nodes.all.filter(online).map(one))
|
||||
var totalOfflineNodes = sum(d.nodes.all.filter(function (node) {return !node.flags.online}).map(one))
|
||||
var totalNewNodes = sum(d.nodes.new.map(one))
|
||||
var totalLostNodes = sum(d.nodes.lost.map(one))
|
||||
var totalClients = sum(d.nodes.all.filter(online).map( function (d) {
|
||||
|
@ -20,6 +21,7 @@ define(function () {
|
|||
}))
|
||||
|
||||
var nodetext = [{ count: totalOnlineNodes, label: "online" },
|
||||
{ count: totalOfflineNodes, label: "offline" },
|
||||
{ count: totalNewNodes, label: "neu" },
|
||||
{ count: totalLostNodes, label: "verschwunden" }
|
||||
].filter( function (d) { return d.count > 0 } )
|
||||
|
|
Loading…
Reference in a new issue