summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-21 17:39:46 -0500
committerDan McGee <dan@archlinux.org>2010-09-21 17:39:46 -0500
commitb3883820a249a0bb6ba6237f815b8cdffd630fcd (patch)
tree5c17812e1dde0c2885bf3520f435debc3e1122c9 /templates
parent4a99d313bfb2a226e6777a39a9a8588106f42685 (diff)
parent8ff8190c5ca29473cbcc398fb12b33b4430cc050 (diff)
Merge branch 'mirror-check'
Diffstat (limited to 'templates')
-rw-r--r--templates/mirrors/status.html101
-rw-r--r--templates/mirrors/status_table.html29
-rw-r--r--templates/public/index.html13
3 files changed, 140 insertions, 3 deletions
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
new file mode 100644
index 00000000..5743e47b
--- /dev/null
+++ b/templates/mirrors/status.html
@@ -0,0 +1,101 @@
+{% extends "base.html" %}
+
+{% block title %}Arch Linux - Mirror Status{% endblock %}
+
+{% block content %}
+<div id="mirrorstatus" class="box">
+ <h2>Mirror Status</h2>
+ <p>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 <em>last 24 hours</em>. All listed times are UTC. The check script runs
+ on a regular basis and polls for the <tt>lastsync</tt> 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.</p>
+ <ul>
+ <li><em>Mirror URL:</em> Mirrors are checked on a per-URL basis. If
+ both FTP and HTTP access are provided, both will be listed here.</li>
+ <li><em>Last Sync:</em> The timestamp retrieved from the
+ <tt>lastsync</tt> file on the mirror. If this file could not be
+ retrieved or contained data we didn't recognize, this column will show
+ 'unknown'.</li>
+ <li><em>Delay:</em> The calculated mirroring delay; e.g. <code>last
+ check − last sync</code>.</li>
+ <li><em>μ Duration:</em> The average (mean) time it took to connect and
+ retrieve the <tt>lastsync</tt> file from the given URL. Note that this
+ connection time is from the location of the Arch server; your geography
+ may product different results.</li>
+ <li><em>σ Duration:</em> The standard deviation of the connect and
+ retrieval time. A high standard deviation can indicate an unstable or
+ overloaded mirror.</li>
+ <li><em>Mirror Score:</em> A very rough calculation for ranking
+ mirrors. It is currently calculated as <code>hours delay + average
+ duration + standard deviation</code>. Lower is better.</li>
+ </ul>
+ <p>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.</p>
+ <ul>
+ <li><a href="#outofsync">Out of Sync Mirrors</a></li>
+ <li><a href="#successful">Successfully Syncing Mirrors</a></li>
+ <li><a href="#errorlog">Mirror Syncing Error Log</a></li>
+ </ul>
+
+ <p>The last mirror check ran at {{ last_check|date:'Y-m-d H:i' }} UTC.</p>
+
+ <a name="outofsync"/>
+ <h3>Out of Sync Mirrors</h3>
+ {% with bad_urls as urls %}
+ {% with 'outofsync_mirrors' as table_id %}
+ {% include "mirrors/status_table.html" %}
+ {% endwith %}
+ {% endwith %}
+
+ <a name="successful"/>
+ <h3>Successfully Syncing Mirrors</h3>
+ {% with good_urls as urls %}
+ {% with 'successful_mirrors' as table_id %}
+ {% include "mirrors/status_table.html" %}
+ {% endwith %}
+ {% endwith %}
+
+ <a name="errorlog"/>
+ <h3>Mirror Syncing Error Log</h3>
+ <table id="errorlog_mirrors" class="results">
+ <thead>
+ <tr>
+ <th>Mirror URL</th>
+ <th>Protocol</th>
+ <th>Country</th>
+ <th>Error Message</th>
+ <th>Last Occurred</th>
+ <th>Occurrences (last 24 hours)</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for log in error_logs %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ log.url__url }}</td>
+ <td>{{ log.url__protocol__protocol }}</td>
+ <td>{{ log.url__mirror__country }}</td>
+ <td>{{ log.error }}</td>
+ <td>{{ log.last_occurred|date:'Y-m-d H:i' }}</td>
+ <td>{{ log.error_count }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $("#outofsync_mirrors").add("#successful_mirrors").tablesorter(
+ {widgets: ['zebra'], sortList: [[3,1], [5,1]]});
+ $("#errorlog_mirrors").tablesorter(
+ {widgets: ['zebra'], sortList: [[4,1], [5,1]]});
+});
+</script>
+{% endblock %}
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
new file mode 100644
index 00000000..90bbf6b6
--- /dev/null
+++ b/templates/mirrors/status_table.html
@@ -0,0 +1,29 @@
+{% load mirror_status %}
+<table id="{{ table_id }}" class="results">
+ <thead>
+ <tr>
+ <th>Mirror URL</th>
+ <th>Protocol</th>
+ <th>Country</th>
+ <th>Last Sync</th>
+ <th>Delay (hh:mm)</th>
+ <th>μ Duration (secs)</th>
+ <th>σ Duration (secs)</th>
+ <th>Mirror Score</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for m_url in urls %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ m_url.url }}</td>
+ <td>{{ m_url.protocol }}</td>
+ <td>{{ m_url.mirror.country }}</td>
+ <td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
+ <td>{{ m_url.delay|duration|default:'unknown' }}</td>
+ <td>{{ m_url.duration_avg|floatformat:2|default:'unknown' }}</td>
+ <td>{{ m_url.duration_stddev|floatformat:2|default:'unknown' }}</td>
+ <td>{{ m_url.score|floatformat:1|default:'unknown' }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
diff --git a/templates/public/index.html b/templates/public/index.html
index 5a87787d..cc7aa21b 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -132,17 +132,24 @@
title="T-shirts">Schwag via Freewear</a></li>
</ul>
- <h4>Development</h4>
+ <h4>Tools</h4>
<ul>
<li><a href="{% url mirrorlist %}"
title="Get a custom mirrorlist from our database">Mirrorlist Updater</a></li>
+ <li><a href="{% url mirror-status %}"
+ title="Check the status of all known mirrors">Mirror Status</a></li>
+ <li><a href="/packages/differences/"
+ title="See differences in packages between available architectures">Differences by Architecture</a></li>
+ </ul>
+
+ <h4>Development</h4>
+
+ <ul>
<li><a href="/packages/"
title="View/search the package repository database">Packages</a></li>
<li><a href="/groups/"
title="View the available package groups">Package Groups</a></li>
- <li><a href="/packages/differences/"
- title="See differences in packages between available architectures">Differences by Architecture</a></li>
<li><a href="http://bugs.archlinux.org/"
title="Report/track bugs or make feature requests">Bug Tracker</a></li>
<li><a href="{% url page-svn %}"