meshstats: fix NaN client count
This commit is contained in:
parent
31d1464805
commit
81379a8263
@ -9,7 +9,7 @@ define(function () {
|
|||||||
var totalNewNodes = sum(d.nodes.new.map(one))
|
var totalNewNodes = sum(d.nodes.new.map(one))
|
||||||
var totalLostNodes = sum(d.nodes.lost.map(one))
|
var totalLostNodes = sum(d.nodes.lost.map(one))
|
||||||
var totalClients = sum(d.nodes.all.filter(online).map( function (d) {
|
var totalClients = sum(d.nodes.all.filter(online).map( function (d) {
|
||||||
return d.statistics.clients
|
return d.statistics.clients ? d.statistics.clients : 0
|
||||||
}))
|
}))
|
||||||
var totalGateways = sum(d.nodes.all.filter(online).filter( function (d) {
|
var totalGateways = sum(d.nodes.all.filter(online).filter( function (d) {
|
||||||
return d.flags.gateway
|
return d.flags.gateway
|
||||||
|
Loading…
Reference in New Issue
Block a user