X-Git-Url: https://nos-oignons.net/gitweb/website.git/blobdiff_plain/77db51cc59b6507ffbd5ab4e4dffe4d440eb9a1d..3301c24016af2da98f690356c6aca47cf6b7716a:/assets/bw_graphs.js diff --git a/assets/bw_graphs.js b/assets/bw_graphs.js index bed5e11..ebfc192 100644 --- a/assets/bw_graphs.js +++ b/assets/bw_graphs.js @@ -61,6 +61,13 @@ BwDrawer.color.domain(nos_oignons_relays.map(function(r) {return r.fingerprint}) BwDrawer.color.range(nos_oignons_relays.map(function(r) {return r.color})); BwDrawer.draw_bandwidth_graph = function(raw_data, selector, period) { + // Purge non running relays + raw_data.relays.forEach(function(r, i) { + if (typeof r.read_history === 'undefined' || typeof r.write_history === 'undefined') { + raw_data.relays.splice(i, 1); + } + }); + var update_period; var svg = d3.select(selector).append("svg")