From 40ac4818aa7812a5399a0d4c176137984d5cfd30 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 12 Sep 2010 10:14:34 -0500 Subject: Add mirror status view Signed-off-by: Dan McGee --- templates/mirrors/status.html | 53 +++++++++++++++++++++++++++++++++++++ templates/mirrors/status_table.html | 29 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 templates/mirrors/status.html create mode 100644 templates/mirrors/status_table.html (limited to 'templates/mirrors') diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html new file mode 100644 index 00000000..8dd6fa11 --- /dev/null +++ b/templates/mirrors/status.html @@ -0,0 +1,53 @@ +{% extends "base.html" %} + +{% block title %}Arch Linux - Mirror Status{% endblock %} + +{% block content %} +
+

Mirror Status

+ +

Out of Sync Mirrors

+ {% with bad_urls as urls %} + {% include "mirrors/status_table.html" %} + {% endwith %} + +

Successfully Syncing Mirrors

+ {% with good_urls as urls %} + {% include "mirrors/status_table.html" %} + {% endwith %} + +

Mirror Syncing Error Log

+ + + + + + + + + + + + + {% for log in error_logs %} + + + + + + + + + {% endfor %} + +
Mirror URLProtocolCountryError MessageLast OccurredOccurrences (last 24 hours)
{{ log.url__url }}{{ log.url__protocol__protocol }}{{ log.url__mirror__country }}{{ log.error }}{{ log.check_time__max|date:'Y-m-d H:i' }}{{ log.error__count }}
+ +
+{% load cdn %}{% jquery %} + + +{% endblock %} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html new file mode 100644 index 00000000..d7f5b0ec --- /dev/null +++ b/templates/mirrors/status_table.html @@ -0,0 +1,29 @@ +{% load mirror_status %} + + + + + + + + + + + + + + + {% for m_url in urls %} + + + + + + + + + + + {% endfor %} + +
Mirror URLProtocolCountryLast SyncDelay (hh:mm)μ Duration (secs)σ Duration (secs)Mirror Score
{{ m_url.url }}{{ m_url.protocol }}{{ m_url.mirror.country }}{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}{{ m_url.delay|duration|default:'unknown' }}{{ m_url.duration_avg|floatformat:2|default:'unknown' }}{{ m_url.duration_stddev|floatformat:2|default:'unknown' }}{{ m_url.score|floatformat:1|default:'unknown' }}
-- cgit v1.2.3-2-g168b From 2a296af10d34c65e0f94d1a5b70c84ba31596ba4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 21 Sep 2010 17:30:14 -0500 Subject: Add ordering, sorting, and a lot more info to mirror status page This should get this to the point where it is releasable to the general public for their use and pleasure. Still not sure on how often the check should be run, and we probably want to incorporate this mined data into some other things like the mirror list generator. Signed-off-by: Dan McGee --- templates/mirrors/status.html | 56 ++++++++++++++++++++++++++++++++++--- templates/mirrors/status_table.html | 2 +- 2 files changed, 53 insertions(+), 5 deletions(-) (limited to 'templates/mirrors') diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index 8dd6fa11..5743e47b 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -5,19 +5,64 @@ {% block content %}

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 + 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 + has synced recently. This page contains several pieces of information about + each mirror.

+
    +
  • Mirror URL: Mirrors are checked on a per-URL basis. If + both FTP and HTTP access are provided, both will be listed here.
  • +
  • Last Sync: The timestamp retrieved from the + lastsync file on the mirror. If this file could not be + retrieved or contained data we didn't recognize, this column will show + 'unknown'.
  • +
  • Delay: The calculated mirroring delay; e.g. last + check − last sync.
  • +
  • μ Duration: The average (mean) time it took to connect and + retrieve the lastsync file from the given URL. Note that this + connection time is from the location of the Arch server; your geography + may product different results.
  • +
  • σ Duration: The standard deviation of the connect and + retrieval time. A high standard deviation can indicate an unstable or + overloaded mirror.
  • +
  • Mirror Score: A very rough calculation for ranking + mirrors. It is currently calculated as hours delay + average + duration + standard deviation. Lower is better.
  • +
+

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.

+ +

The last mirror check ran at {{ last_check|date:'Y-m-d H:i' }} UTC.

+ +

Out of Sync Mirrors

{% with bad_urls as urls %} + {% with 'outofsync_mirrors' as table_id %} {% include "mirrors/status_table.html" %} {% endwith %} + {% endwith %} +

Successfully Syncing Mirrors

{% with good_urls as urls %} + {% with 'successful_mirrors' as table_id %} {% include "mirrors/status_table.html" %} {% endwith %} + {% endwith %} +

Mirror Syncing Error Log

- +
@@ -35,8 +80,8 @@ - - + + {% endfor %} @@ -47,7 +92,10 @@ {% endblock %} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html index d7f5b0ec..90bbf6b6 100644 --- a/templates/mirrors/status_table.html +++ b/templates/mirrors/status_table.html @@ -1,5 +1,5 @@ {% load mirror_status %} -
Mirror URL{{ log.url__protocol__protocol }} {{ log.url__mirror__country }} {{ log.error }}{{ log.check_time__max|date:'Y-m-d H:i' }}{{ log.error__count }}{{ log.last_occurred|date:'Y-m-d H:i' }}{{ log.error_count }}
+
-- cgit v1.2.3-2-g168b
Mirror URL