From 2c1336488059dfc24c34dd11865c713fec252cbc Mon Sep 17 00:00:00 2001
From: Dan McGee
Date: Thu, 30 Sep 2010 12:47:30 -0500
Subject: Mirror status improvements
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Fix sorting issues. '', 'unknown', and '∞' should now always sort after
anything else in the list.
* Add a completion percentage column; this will tell you at a glance if a
mirror is sometimes unresponsive. This should probably be incorporated
into the mirror score.
* Make a few more things dynamic in the template, like the time back the
page reflects.
* Add some additional template tags for formatting things.
Signed-off-by: Dan McGee
---
templates/mirrors/status.html | 55 +++++++++++++++++++++++++++++++------
templates/mirrors/status_table.html | 6 ++--
2 files changed, 50 insertions(+), 11 deletions(-)
(limited to 'templates/mirrors')
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 8dbecc07..1111d047 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -8,7 +8,7 @@
Mirror Status
This page reports the status of all known, public, and active Arch Linux
mirrors. All data on this page reflects the status of the mirrors within
- the last 24 hours. All listed times are UTC. The check script runs
+ the last {{ cutoff|hours }}. All listed times are UTC. The check script runs
on a regular basis and polls for the lastsync file in the root of
our repository layout. This file is regularly updated on the central
repository, so checking the value within allows one to see if the mirror
@@ -21,6 +21,9 @@
lastsync file on the mirror. If this file could not be
retrieved or contained data we didn't recognize, this column will show
'unknown'.
+
Completion %: The number of mirror checks that have
+ successfully connected and disconnected from the given URL. If this is
+ below 100%, the mirror may be unreliable.
μ Delay: The calculated average mirroring delay; e.g. the
mean value of last check − last sync for each check of
this mirror URL. Due to the timing of mirror checks, any value under
@@ -38,7 +41,7 @@
The final table on this page is an error log, which shows any errors
that occurred while contacting mirrors. This only shows errors that
- occurred within the last 24 hours.
+ occurred within the last {{ cutoff|hours }}.
The last mirror check ran at {{ last_check|date:'Y-m-d H:i' }} UTC.
- Checks have ran {{ num_checks }} times in the last 24 hours at an average
+ Checks have ran {{ num_checks }} times in the last {{ cutoff|hours }} at an average
interval of {{ check_frequency|duration }} (hh:mm).
@@ -75,7 +78,7 @@
Country |
Error Message |
Last Occurred |
- Occurrences (last 24 hours) |
+ Occurrences (last {{ cutoff|hours }}) |
@@ -96,12 +99,46 @@
{% load cdn %}{% jquery %}
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 75157765..240a5452 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -6,6 +6,7 @@
Protocol |
Country |
Last Sync |
+ Completion % |
μ Delay (hh:mm) |
μ Duration (secs) |
σ Duration (secs) |
@@ -19,9 +20,10 @@
{{ m_url.protocol }} |
{{ m_url.mirror.country }} |
{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }} |
+ {{ m_url.completion_pct|percentage:1 }} |
{{ m_url.delay|duration|default:'unknown' }} |
- {{ m_url.duration_avg|floatformat:2|default:'unknown' }} |
- {{ m_url.duration_stddev|floatformat:2|default:'unknown' }} |
+ {{ m_url.duration_avg|floatformat:2 }} |
+ {{ m_url.duration_stddev|floatformat:2 }} |
{{ m_url.score|floatformat:1|default:'∞' }} |
{% endfor %}
--
cgit v1.2.3-2-g168b