summaryrefslogtreecommitdiff
path: root/templates/mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'templates/mirrors')
-rw-r--r--templates/mirrors/mirror_details.html31
-rw-r--r--templates/mirrors/mirrorlist_status.txt4
-rw-r--r--templates/mirrors/status.html2
-rw-r--r--templates/mirrors/status_table.html6
-rw-r--r--templates/mirrors/url_details.html89
5 files changed, 115 insertions, 17 deletions
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 5138f3b9..b75c5316 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -42,6 +42,10 @@
<td>{{ mirror.active|yesno|capfirst }}</td>
</tr>
<tr>
+ <th>Created:</th>
+ <td>{{ mirror.created }}</td>
+ </tr>
+ <tr>
<th>Rsync IPs:</th>
<td class="wrap">{{mirror.rsync_ips.all|join:', '}}</td>
</tr>
@@ -54,8 +58,12 @@
<td>{% if mirror.alternate_email %}<a href="mailto:{{ mirror.alternate_email }}">{{ mirror.alternate_email }}</a>{% else %}None{% endif %}</td>
</tr>
<tr>
+ <th>Flyspray Issue:</th>
+ <td>{% if mirror.bug %}{% bug_link mirror.bug %}{% endif %}</td>
+ </tr>
+ <tr>
<th>Notes:</th>
- <td>{{ mirror.notes|linebreaks }}</td>
+ <td class="wrap">{{ mirror.notes|linebreaks }}</td>
</tr>
<tr>
<th>Upstream:</th>
@@ -67,14 +75,13 @@
<tr>
<th>Downstream:</th>
{% with mirror.downstream as ds_mirrors %}
- <td>{% if ds_mirrors %}
+ <td class="wrap">{% if ds_mirrors %}
{% for ds in ds_mirrors %}
<a href="{{ ds.get_absolute_url }}"
- 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 %}
+ title="Mirror details for {{ ds.name }}">{{ ds.name }}</a>{% comment %}
+ {% endcomment %}{% if not ds.active %} <span class="testing-dep">(inactive)</span>{% endif %}{% comment %}
+ {% endcomment %}{% if not ds.public %} <span class="testing-dep">(private)</span>{% endif %}{% comment %}
+ {% endcomment %}{% if not forloop.last %}, {% endif %}{% endfor %}
{% else %}None{% endif %}</td>
{% endwith %}
</tr>
@@ -96,7 +103,8 @@
<th>μ Delay (hh:mm)</th>
<th>μ Duration (secs)</th>
<th>σ Duration (secs)</th>
- <th>Mirror Score</th>
+ <th>Score</th>
+ <th>Details</th>
</tr>
</thead>
<tbody>
@@ -110,9 +118,10 @@
<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>
+ <td>{{ m_url.duration_avg|floatvalue:2 }}</td>
+ <td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
+ <td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
+ <td><a href="{{ m_url.id }}/">Details</a></td>
</tr>
{% endfor %}
</tbody>
diff --git a/templates/mirrors/mirrorlist_status.txt b/templates/mirrors/mirrorlist_status.txt
index cdbc7adb..746aae76 100644
--- a/templates/mirrors/mirrorlist_status.txt
+++ b/templates/mirrors/mirrorlist_status.txt
@@ -1,4 +1,4 @@
-{% comment %}
+{% load mirror_status %}{% comment %}
Yes, ugly templates are ugly, but in order to keep line breaks where we want
them, sacrifices have to be made. If editing this template, it is easiest to
forget about where line breaks are happening until you are done getting the
@@ -9,6 +9,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 %}
-## Score: {{ mirror_url.score|floatformat:1|default:'unknown' }}, {{ mirror_url.country.name|default:'Worldwide' }}
+## Score: {{ mirror_url.score|floatvalue:1|default:'unknown' }}, {{ mirror_url.country.name|default:'Worldwide' }}
#Server = {{ mirror_url.url}}$repo/os/$arch{% endfor %}
{% endautoescape %}
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 5a275e33..4d75cd8e 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -59,7 +59,7 @@
<a name="outofsync" id="outofsync"></a>
<h3>Out of Sync Mirrors</h3>
- {% with urls=bad_urls table_id='outofsync_mirrors' %}
+ {% with urls=bad_urls table_id='outofsync_mirrors' %}
{% include "mirrors/status_table.html" %}
{% endwith %}
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 6fc07a31..00b9c1df 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -20,9 +20,9 @@
<td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</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>
+ <td>{{ m_url.duration_avg|floatvalue:2 }}</td>
+ <td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
+ <td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
</tr>{% endfor %}
</tbody>
</table>
diff --git a/templates/mirrors/url_details.html b/templates/mirrors/url_details.html
new file mode 100644
index 00000000..0b9d2916
--- /dev/null
+++ b/templates/mirrors/url_details.html
@@ -0,0 +1,89 @@
+{% extends "base.html" %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load mirror_status %}
+{% load flags %}
+
+{% block title %}Arch Linux - {{ url.url }} - URL Details{% endblock %}
+
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
+{% block content %}
+<div class="box">
+ <h2>URL Details: {{ url.url }}</h2>
+
+ <table class="compact">
+ <tr>
+ <th>URL:</th>
+ <td>{{ url.url }}</td>
+ </tr>
+ <tr>
+ <th>Protocol:</th>
+ <td>{{ url.protocol }}</td>
+ </tr>
+ <tr>
+ <th>Country:</th>
+ <td class="country">{% country_flag url.country %}{{ url.country.name }}</td>
+ </tr>
+ <tr>
+ <th>IPv4:</th>
+ <td>{{ url.has_ipv4|yesno|capfirst }}</td>
+ </tr>
+ <tr>
+ <th>IPv6:</th>
+ <td>{{ url.has_ipv6|yesno|capfirst }}</td>
+ </tr>
+ {% if user.is_authenticated %}
+ <tr>
+ <th>Active:</th>
+ <td>{{ url.active|yesno|capfirst }}</td>
+ </tr>
+ <tr>
+ <th>Created:</th>
+ <td>{{ url.created }}</td>
+ </tr>
+ {% endif %}
+ </table>
+
+ <h3>Check Logs</h3>
+
+ <table id="check_logs" class="results">
+ <thead>
+ <tr>
+ <th>Check Time</th>
+ <th>Check Location</th>
+ <th>Check IP</th>
+ <th>Last Sync</th>
+ <th>Delay (hh:mm)</th>
+ <th>Duration (secs)</th>
+ <th>Success?</th>
+ <th>Error Message</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for log in logs %}<tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ log.check_time|date:'Y-m-d H:i' }}</td>
+ <td class="country">{% country_flag log.location.country %}{{ log.location.country.name }}</td>
+ <td>{{ log.location.source_ip }}</td>
+ <td>{{ log.last_sync|date:'Y-m-d H:i' }}</td>
+ <td>{{ log.delay|duration }}</td>
+ <td>{{ log.duration|floatvalue }}</td>
+ <td>{{ log.is_success|yesno|capfirst }}</td>
+ <td class="wrap">{{ log.error|linebreaksbr }}</td>
+ </tr>{% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $("#check_logs:has(tbody tr)").tablesorter(
+ {widgets: ['zebra'], sortList: [[0,1]],
+ headers: { 5: { sorter: 'mostlydigit' } } });
+});
+</script>
+{% endblock %}