summaryrefslogtreecommitdiff
path: root/templates/mirrors
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-21 02:11:13 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-21 02:11:13 -0300
commita30350ac6e76c66d14f6d78ed2b5ae4e5799c79c (patch)
treea2b7127366a1b9d8d5be9fcda5abefacef7d2579 /templates/mirrors
parentd8f82d9d72eec6042536797f75e06a9296f4cc71 (diff)
parent2470c543d60c96343a5b0fefe04464b5b445b859 (diff)
Merge branch 'master' of git://projects.archlinux.org/archweb
Conflicts: devel/views.py feeds.py templates/devel/index.html templates/packages/flag.html templates/public/index.html todolists/views.py urls.py
Diffstat (limited to 'templates/mirrors')
-rw-r--r--templates/mirrors/mirror_details.html111
-rw-r--r--templates/mirrors/mirrorlist.txt2
-rw-r--r--templates/mirrors/mirrorlist_status.txt2
-rw-r--r--templates/mirrors/mirrors.html2
-rw-r--r--templates/mirrors/status.html9
-rw-r--r--templates/mirrors/status_table.html2
6 files changed, 92 insertions, 36 deletions
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 2edc61d4..1b44f65b 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load mirror_status %}
{% block title %}Parabola - {{ mirror.name }} - Mirror Details{% endblock %}
@@ -12,47 +13,105 @@
<tr>
<th>Name:</th>
<td>{{ mirror.name }}</td>
- </tr><tr>
+ </tr>
+ <tr>
<th>Tier:</th>
<td>{{ mirror.get_tier_display }}</td>
- </tr><tr>
+ </tr>
+ <tr>
+ <th>Country:</th>
+ <td>{{ mirror.country }}</td>
+ </tr>
+ <tr>
+ <th>Has ISOs:</th>
+ <td>{{ mirror.isos|yesno }}</td>
+ </tr>
+ {% if user.is_authenticated %}
+ <tr>
+ <th>Public:</th>
+ <td>{{ mirror.public|yesno }}</td>
+ </tr>
+ <tr>
+ <th>Active:</th>
+ <td>{{ mirror.active|yesno }}</td>
+ </tr>
+ <tr>
+ <th>Rsync IPs:</th>
+ <td class="wrap">{{mirror.rsync_ips.all|join:', '}}</td>
+ </tr>
+ <tr>
+ <th>Admin Email:</th>
+ <td>{% if mirror.admin_email %}<a href="mailto:{{ mirror.admin_email }}">{{ mirror.admin_email }}</a>{% else %}None{% endif %}</td>
+ </tr>
+ <tr>
+ <th>Notes:</th>
+ <td>{{ mirror.notes|linebreaks }}</td>
+ </tr>
+ <tr>
<th>Upstream:</th>
- <!-- TODO: linking to non-public mirrors -->
<td>{% if mirror.upstream %}
<a href="{{ mirror.upstream.get_absolute_url }}"
title="Mirror details for {{ mirror.upstream.name }}">{{ mirror.upstream.name }}</a>
{% else %}None{% endif %}</td>
- </tr><tr>
+ </tr>
+ <tr>
<th>Downstream:</th>
{% with mirror.downstream as ds_mirrors %}
<td>{% if ds_mirrors %}
{% for ds in ds_mirrors %}
<a href="{{ ds.get_absolute_url }}"
- title="Mirror details for {{ ds.name }}">{{ ds.name }}</a><br/>
+ title="Mirror details for {{ ds.name }}">{{ ds.name }}</a>
+ {% if not ds.active %}<span class="testing-dep">(inactive)</span>{% endif %}
+ {% if not ds.public %}<span class="testing-dep">(private)</span>{% endif %}
+ <br/>
{% endfor %}
- {% else %}None{% endif %}
- </td>
- {% endwith %}
- </tr><tr>
- <th>Country:</th>
- <td>{{ mirror.country }}</td>
- </tr><tr>
- <th>Has ISOs:</th>
- <td>{{ mirror.isos|yesno }}</td>
- </tr><tr>
- <th>Protocols:</th>
- <td>{{ mirror.supported_protocols }}</td>
- </tr><tr>
- <th>Mirror URLs:</th>
- {% with mirror.urls.all as urls %}
- <td>{% if urls %}
- {% for u in urls %}
- <a href="{{ u.url }}">{{ u.url }}</a><br/>
- {% endfor %}
- {% else %}None{% endif %}
- </td>
+ {% else %}None{% endif %}</td>
{% endwith %}
</tr>
+ {% endif %}
+ </table>
+
+ <h3>Available URLs</h3>
+
+ <table id="available_urls" class="results">
+ <thead>
+ <tr>
+ <th>Mirror URL</th>
+ <th>IPv4</th>
+ <th>IPv6</th>
+ <th>Last Sync</th>
+ <th>Completion %</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>{% if m_url.protocol.is_download %}<a href="{{ m_url.url }}">{{ m_url.url }}</a>{% else %}{{ m_url.url }}{% endif %}</td>
+ <td>{{ m_url.has_ipv4|yesno }}</td>
+ <td>{{ m_url.has_ipv6|yesno }}</td>
+ <td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
+ <td>{{ m_url.completion_pct|percentage:1 }}</td>
+ <td>{{ m_url.delay|duration|default:'unknown' }}</td>
+ <td>{{ m_url.duration_avg|floatformat:2 }}</td>
+ <td>{{ m_url.duration_stddev|floatformat:2 }}</td>
+ <td>{{ m_url.score|floatformat:1|default:'∞' }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
</table>
</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $("#available_urls:has(tbody tr)").tablesorter(
+ {widgets: ['zebra'], sortList: [[0,0]],
+ headers: { 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } } });
+});
+</script>
{% endblock %}
diff --git a/templates/mirrors/mirrorlist.txt b/templates/mirrors/mirrorlist.txt
index c5197e91..b91c52a2 100644
--- a/templates/mirrors/mirrorlist.txt
+++ b/templates/mirrors/mirrorlist.txt
@@ -8,6 +8,6 @@ content right, and then go back later to fix it all up.
## Generated on {% now "Y-m-d" %}
##{% for mirror_url in mirror_urls %}{% ifchanged %}
-## {{ mirror_url.mirror.country }}{% endifchanged %}
+## {{ mirror_url.real_country }}{% endifchanged %}
#Server = {{ mirror_url.url}}$repo/os/$arch{% endfor %}
{% endautoescape %}
diff --git a/templates/mirrors/mirrorlist_status.txt b/templates/mirrors/mirrorlist_status.txt
index dbc03911..5bf94287 100644
--- a/templates/mirrors/mirrorlist_status.txt
+++ b/templates/mirrors/mirrorlist_status.txt
@@ -8,6 +8,6 @@ content right, and then go back later to fix it all up.
## Sorted by mirror score from mirror status page
## Generated on {% now "Y-m-d" %}
{% for mirror_url in mirror_urls %}
-## Score: {{ mirror_url.score|floatformat:1|default:'unknown' }}, {{ mirror_url.mirror.country }}
+## Score: {{ mirror_url.score|floatformat:1|default:'unknown' }}, {{ mirror_url.real_country }}
#Server = {{ mirror_url.url}}$repo/os/$arch{% endfor %}
{% endautoescape %}
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html
index 7562cb6f..41cca6fa 100644
--- a/templates/mirrors/mirrors.html
+++ b/templates/mirrors/mirrors.html
@@ -15,7 +15,6 @@
{% if user.is_authenticated %}
<th>Public</th>
<th>Active</th>
- <th>Rsync IPs</th>
<th>Admin Email</th>
<th>Notes</th>
{% endif %}
@@ -33,7 +32,6 @@
{% if user.is_authenticated %}
<td>{{mirror.public|yesno}}</td>
<td>{{mirror.active|yesno}}</td>
- <td class="wrap">{{mirror.rsync_ips.all|join:', '}}</td>
<td>{{mirror.admin_email}}</td>
<td class="wrap">{{mirror.notes|linebreaks}}</td>
{% endif %}
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index cd56f8f9..f315f7c3 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -91,7 +91,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ log.url__url }}</td>
<td>{{ log.url__protocol__protocol }}</td>
- <td>{{ log.url__mirror__country }}</td>
+ <td>{{ log.country }}</td>
<td>{{ log.error }}</td>
<td>{{ log.last_occurred|date:'Y-m-d H:i' }}</td>
<td>{{ log.error_count }}</td>
@@ -106,12 +106,11 @@
<script type="text/javascript" src="/media/archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
+ var headers = { 5: { sorter: 'duration' }, 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } };
$("#outofsync_mirrors:has(tbody tr)").tablesorter(
- {widgets: ['zebra'], sortList: [[3,1]],
- headers: { 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } } });
+ {widgets: ['zebra'], sortList: [[3,1]], headers: headers });
$("#successful_mirrors:has(tbody tr)").tablesorter(
- {widgets: ['zebra'], sortList: [[8,0]],
- headers: { 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } } });
+ {widgets: ['zebra'], sortList: [[8,0]], headers: headers });
$("#errorlog_mirrors:has(tbody tr)").tablesorter(
{widgets: ['zebra'], sortList: [[4,1], [5,1]]});
});
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 240a5452..72de25dc 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -18,7 +18,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ m_url.url }}</td>
<td>{{ m_url.protocol }}</td>
- <td>{{ m_url.mirror.country }}</td>
+ <td>{{ m_url.real_country }}</td>
<td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
<td>{{ m_url.completion_pct|percentage:1 }}</td>
<td>{{ m_url.delay|duration|default:'unknown' }}</td>