summaryrefslogtreecommitdiff
path: root/mirrors/static
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-11-11 14:55:37 -0600
committerDan McGee <dan@archlinux.org>2012-11-11 15:12:20 -0600
commite26d5722289bd2e972633891d8dac09296b0cbc4 (patch)
treefa4fb76f36be54a44c08c72e4e19601d987d2de9 /mirrors/static
parent923ebbb53abf1d77a2f21b76e88faa085251af78 (diff)
Mirror graph tweaking after usage with real data
* Clamp y-axis minimum to 0. * Don't plot `is_success == false` values. * Ensure URLs are sorted predictably. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/static')
-rw-r--r--mirrors/static/mirror_status.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/mirrors/static/mirror_status.js b/mirrors/static/mirror_status.js
index 1c352a9f..decc8fb8 100644
--- a/mirrors/static/mirror_status.js
+++ b/mirrors/static/mirror_status.js
@@ -25,7 +25,7 @@ function mirror_status(chart_id, data_url) {
d3.max(data, function(c) { return d3.max(c.logs, function(v) { return v.check_time; }); })
]).nice(d3.time.hour);
y.domain([
- d3.min(data, function(c) { return d3.min(c.logs, function(v) { return v.duration; }); }),
+ 0,
d3.max(data, function(c) { return d3.max(c.logs, function(v) { return v.duration; }); })
]).nice();
@@ -111,6 +111,9 @@ function mirror_status(chart_id, data_url) {
return {
url: url.url,
logs: jQuery.map(url.logs, function(log, j) {
+ if (!log.is_success) {
+ return null;
+ }
return {
duration: log.duration,
check_time: new Date(log.check_time)