From 78a553e558217640c0efa233ac7a7037be3f34b5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 12 Apr 2011 18:36:20 -0500 Subject: Add optional country override for individual mirror URLs This allows a named top-level mirror to have geographically distributed URLs, e.g. kernel.org and the geo-DNS setup. Signed-off-by: Dan McGee --- templates/mirrors/mirrorlist.txt | 2 +- templates/mirrors/mirrorlist_status.txt | 2 +- templates/mirrors/status.html | 2 +- templates/mirrors/status_table.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/mirrors') diff --git a/templates/mirrors/mirrorlist.txt b/templates/mirrors/mirrorlist.txt index 2eedbd7..24b52fa 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 e2fbc1e..e350439 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/status.html b/templates/mirrors/status.html index 5724c71..046c419 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -91,7 +91,7 @@ {{ log.url__url }} {{ log.url__protocol__protocol }} - {{ log.url__mirror__country }} + {{ log.country }} {{ log.error }} {{ log.last_occurred|date:'Y-m-d H:i' }} {{ log.error_count }} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html index 240a545..72de25d 100644 --- a/templates/mirrors/status_table.html +++ b/templates/mirrors/status_table.html @@ -18,7 +18,7 @@ {{ m_url.url }} {{ m_url.protocol }} - {{ m_url.mirror.country }} + {{ m_url.real_country }} {{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }} {{ m_url.completion_pct|percentage:1 }} {{ m_url.delay|duration|default:'unknown' }} -- cgit v1.2.3-24-g4f1b