diff options
author | Dan McGee <dan@archlinux.org> | 2012-11-11 14:55:37 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-11-11 15:12:20 -0600 |
commit | e26d5722289bd2e972633891d8dac09296b0cbc4 (patch) | |
tree | fa4fb76f36be54a44c08c72e4e19601d987d2de9 /mirrors/utils.py | |
parent | 923ebbb53abf1d77a2f21b76e88faa085251af78 (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/utils.py')
-rw-r--r-- | mirrors/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mirrors/utils.py b/mirrors/utils.py index ba027c99..85e4ee93 100644 --- a/mirrors/utils.py +++ b/mirrors/utils.py @@ -41,7 +41,8 @@ def get_mirror_statuses(cutoff=DEFAULT_CUTOFF, mirror_ids=None): success_count=Count('logs__duration'), last_sync=Max('logs__last_sync'), last_check=Max('logs__check_time'), - duration_avg=Avg('logs__duration')) + duration_avg=Avg('logs__duration')).order_by( + 'mirror', 'url') if mirror_ids: urls = urls.filter(mirror_id__in=mirror_ids) |