don't count offline nodes
parent
86307665fc
commit
cb716e297d
|
@ -344,13 +344,13 @@ function reload() {
|
||||||
updated_at.text(d3.time.format("%X")(new Date()))
|
updated_at.text(d3.time.format("%X")(new Date()))
|
||||||
|
|
||||||
var nNodes = data.nodes.filter(function(d) {
|
var nNodes = data.nodes.filter(function(d) {
|
||||||
return !d.flags.client
|
return !d.flags.client && d.flags.online
|
||||||
}).length,
|
}).length,
|
||||||
nGateways = data.nodes.filter(function(d) {
|
nGateways = data.nodes.filter(function(d) {
|
||||||
return d.flags.gateway
|
return d.flags.gateway && d.flags.online
|
||||||
}).length,
|
}).length,
|
||||||
nClients = data.nodes.filter(function(d) {
|
nClients = data.nodes.filter(function(d) {
|
||||||
return d.flags.client
|
return d.flags.client && d.flags.online
|
||||||
}).length
|
}).length
|
||||||
|
|
||||||
d3.select("#nodecount")
|
d3.select("#nodecount")
|
||||||
|
|
Loading…
Reference in New Issue