summaryrefslogtreecommitdiff
path: root/templates/mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'templates/mirrors')
-rw-r--r--templates/mirrors/mirror_details.html41
-rw-r--r--templates/mirrors/mirrorlist.txt2
-rw-r--r--templates/mirrors/mirrorlist_generate.html2
-rw-r--r--templates/mirrors/mirrorlist_status.txt2
-rw-r--r--templates/mirrors/mirrors.html9
-rw-r--r--templates/mirrors/status.html27
-rw-r--r--templates/mirrors/status_table.html9
7 files changed, 56 insertions, 36 deletions
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 76ab3d5b..98755ad2 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -1,16 +1,18 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
+{% load flags %}
{% block title %}{{ BRANDING_DISTRONAME }} - {{ mirror.name }} - Mirror Details{% endblock %}
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
{% block content %}
-<!-- TODO: ids and classes -->
-<div id="pkgdetails" class="box">
+<div class="box">
<h2>Mirror Details: {{ mirror.name }}</h2>
- <table id="pkginfo">
+ <table class="compact">
<tr>
<th>Name:</th>
<td>{{ mirror.name }}</td>
@@ -20,10 +22,6 @@
<td>{{ mirror.get_tier_display }}</td>
</tr>
<tr>
- <th>Country:</th>
- <td>{% if mirror.country %}<img src="{{ mirror.country.flag }}" alt=""/> {% endif %}{{ mirror.country.name|default:'Worldwide' }}</td>
- </tr>
- <tr>
<th>Has ISOs:</th>
<td>{{ mirror.isos|yesno|capfirst }}</td>
</tr>
@@ -78,6 +76,8 @@
<thead>
<tr>
<th>Mirror URL</th>
+ <th>Protocol</th>
+ <th>Country</th>
<th>IPv4</th>
<th>IPv6</th>
<th>Last Sync</th>
@@ -92,6 +92,8 @@
{% 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.protocol }}</td>
+ <td class="country">{% country_flag m_url.country %}{{ m_url.country.name }}</td>
<td>{{ m_url.has_ipv4|yesno|capfirst }}</td>
<td>{{ m_url.has_ipv6|yesno|capfirst }}</td>
<td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
@@ -105,14 +107,31 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+
+<div class="box">
+ <h2>Mirror Status Charts</h2>
+
+ <p>Periodic checks of the mirrors are done from various geographic
+ locations, IP addresses, and using IPv4 or IPv6. These results are
+ summarized in graphical form below.</p>
+
+ <div id="charts-container"></div>
+</div>
+{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "d3-3.0.6.min.js" %}"></script>
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript" src="{% static "mirror_status.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' } } });
+ {widgets: ['zebra'], sortList: [[1,0], [2,0]],
+ headers: { 8: { sorter: 'mostlydigit' }, 9: { sorter: 'mostlydigit' }, 10: { sorter: 'mostlydigit' } } });
+});
+$(document).ready(function() {
+ draw_graphs("/mirrors/locations/json/", "./json/", "#charts-container");
});
</script>
{% endblock %}
diff --git a/templates/mirrors/mirrorlist.txt b/templates/mirrors/mirrorlist.txt
index bbe468fc..b8eada93 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.real_country.name|default:'Worldwide' }}{% endifchanged %}
+## {{ mirror_url.country.name|default:'Worldwide' }}{% endifchanged %}
#Server = {{ mirror_url.url}}$repo/os/$arch{% endfor %}
{% endautoescape %}
diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html
index 2025eec2..e141ae3d 100644
--- a/templates/mirrors/mirrorlist_generate.html
+++ b/templates/mirrors/mirrorlist_generate.html
@@ -24,6 +24,8 @@
<li><a href="all/">All mirrors</a></li>
<li><a href="all/ftp/">All mirrors, FTP only</a></li>
<li><a href="all/http/">All mirrors, HTTP only</a></li>
+ <li><a href="all/https/">All mirrors, HTTPS only</a></li>
+ <li><a href="all/smart/">All mirrors, Smart protocols</a>: this link only includes FTP mirrors if an HTTP mirror is not available in a given country.</li>
</ul>
<h3>Customized by country mirrorlist</h3>
diff --git a/templates/mirrors/mirrorlist_status.txt b/templates/mirrors/mirrorlist_status.txt
index 61d0abb1..cdbc7adb 100644
--- a/templates/mirrors/mirrorlist_status.txt
+++ b/templates/mirrors/mirrorlist_status.txt
@@ -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.real_country.name|default:'Worldwide' }}
+## Score: {{ mirror_url.score|floatformat:1|default:'unknown' }}, {{ mirror_url.country.name|default:'Worldwide' }}
#Server = {{ mirror_url.url}}$repo/os/$arch{% endfor %}
{% endautoescape %}
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html
index aea458d8..16c6fb3b 100644
--- a/templates/mirrors/mirrors.html
+++ b/templates/mirrors/mirrors.html
@@ -10,7 +10,6 @@
<tr>
<th>Server</th>
<th>Tier</th>
- <th>Country</th>
<th>ISOs</th>
<th>Protocols</th>
{% if user.is_authenticated %}
@@ -27,9 +26,8 @@
<td><a href="{{ mirror.get_absolute_url }}"
title="Mirror details for {{ mirror.name }}">{{ mirror.name }}</a></td>
<td>{{ mirror.get_tier_display }}</td>
- <td>{% if mirror.country %}<img src="{{ mirror.country.flag }}" alt=""/> {% endif %}{{ mirror.country.name }}</td>
<td>{{ mirror.isos|yesno|capfirst }}</td>
- <td class="wrap">{{ mirror.supported_protocols|join:", " }}</td>
+ <td class="wrap">{{ mirror.protocols|join:", " }}</td>
{% if user.is_authenticated %}
<td>{{ mirror.public|yesno|capfirst }}</td>
<td>{{ mirror.active|yesno|capfirst }}</td>
@@ -41,12 +39,11 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [2,0]]});
+ $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
});
</script>
{% endblock %}
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index fbd4d520..de2c3d5c 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -1,12 +1,15 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
+{% load flags %}
-{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Status{% endblock %}
+{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %}
+
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
{% block content %}
<div id="mirrorstatus" class="box">
- <h2>Mirror Status</h2>
+ <h2>Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}</h2>
<p>This page reports the status of all known, public, and active {{ BRANDING_DISTRONAME }}
mirrors. All data on this page reflects the status of the mirrors within
the <em>last {{ cutoff|hours }}</em>. All listed times are UTC. The check script runs
@@ -16,8 +19,8 @@
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>Mirror URL:</em> Mirrors are checked on a per-URL basis. All
+ available URLs and protocols for each known mirror are listed.</li>
<li><em>Completion %:</em> 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.</li>
@@ -84,22 +87,22 @@
</tr>
</thead>
<tbody>
- {% for log in error_logs %}
- {% spaceless %}<tr class="{% cycle 'odd' 'even' %}">
+ {% for log in error_logs %}<tr class="{% cycle 'odd' 'even' %}">
<td>{{ log.url__url }}</td>
<td>{{ log.url__protocol__protocol }}</td>
- <td class="country">{% if log.country %}<img src="{{ log.country.flag }}" alt=""/> {% endif %}{{ log.country.name }}</td>
- <td class="wrap">{{ log.error }}</td>
+ <td class="country">{% country_flag log.country %}{{ log.country.name }}</td>
+ <td class="wrap">{{ log.error|linebreaksbr }}</td>
<td>{{ log.last_occurred|date:'Y-m-d H:i' }}</td>
<td>{{ log.error_count }}</td>
- </tr>
- {% endspaceless %}{% endfor %}
+ </tr>{% endfor %}
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% 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() {
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 1961d222..e848a9c9 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -1,4 +1,5 @@
{% load mirror_status %}
+{% load flags %}
<table id="{{ table_id }}" class="results">
<thead>
<tr>
@@ -13,17 +14,15 @@
</tr>
</thead>
<tbody>
- {% for m_url in urls %}
- {% spaceless %}<tr class="{% cycle 'odd' 'even' %}">
+ {% for m_url in urls %}<tr class="{% cycle 'odd' 'even' %}">
<td>{{ m_url.url }}</td>
<td>{{ m_url.protocol }}</td>
- <td class="country">{% if m_url.real_country %}<img src="{{ m_url.real_country.flag }}" alt=""/> {% endif %}{{ m_url.real_country.name }}</td>
+ <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>
- </tr>
- {% endspaceless %}{% endfor %}
+ </tr>{% endfor %}
</tbody>
</table>