diff --git a/lib/meshstats.js b/lib/meshstats.js index 96d19fd..b10f7c4 100644 --- a/lib/meshstats.js +++ b/lib/meshstats.js @@ -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 } )