summaryrefslogtreecommitdiff
path: root/templates/mirrors
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
commit03fa7e4f27bdb39a8f8f5ed91a87d18bf8357b47 (patch)
treec67eafcbda55706f18400b3115a2b8a5be318394 /templates/mirrors
parent91c451821ce7000cbc268cec8427d208a6cedd7e (diff)
parentb8ee7b1ee281b45b245fb454228b8ad847c56200 (diff)
Merge branch 'archweb' into archweb-generic2
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
Diffstat (limited to 'templates/mirrors')
-rw-r--r--templates/mirrors/mirror_details.html32
-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.html18
-rw-r--r--templates/mirrors/status_table.html3
7 files changed, 40 insertions, 28 deletions
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 76ab3d5b..18f72125 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>
@@ -104,15 +106,23 @@
{% endfor %}
</tbody>
</table>
+
+ <h3>Mirror Status Chart</h3>
+
+ <div id="visualize-mirror" class="visualize-chart"></div>
</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 "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() {
+ mirror_status("#visualize-mirror", "./json/");
});
</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..9050414d 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>
@@ -88,8 +91,8 @@
{% spaceless %}<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>
@@ -98,8 +101,7 @@
</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() {
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 1961d222..2dd7ef49 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>
@@ -17,7 +18,7 @@
{% spaceless %}<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>