From 1bf6358b94d0466cd0ab0e5ef47bd45d770e477e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 5 Nov 2014 22:39:21 -0600 Subject: Always link to torrent and magnet, even if not available We were already doing this on the details page; no need to hide it on the listing page. Signed-off-by: Dan McGee --- templates/releng/release_list.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/releng/release_list.html b/templates/releng/release_list.html index be257f9e..5c8e003a 100644 --- a/templates/releng/release_list.html +++ b/templates/releng/release_list.html @@ -31,9 +31,9 @@ {{ item.version }} {{ item.kernel_version|default:"" }} {{ item.available|yesno|capfirst }} - {% if item.available %}Torrent{% endif %} - {% if item.available %}Magnet{% endif %} + Torrent + Magnet {% if item.torrent_data %}{{ item.torrent.file_length|filesizeformat }}{% endif %} {% endfor %} -- cgit v1.2.3 From 935d801615dd320693d4c85359aab9f12bd91b14 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 5 Nov 2014 23:02:24 -0600 Subject: Add icons, more detail to releases pages Signed-off-by: Dan McGee --- templates/releng/release_detail.html | 15 ++++++++++----- templates/releng/release_list.html | 25 +++++++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/releng/release_detail.html b/templates/releng/release_detail.html index 5cd1c432..11155c0c 100644 --- a/templates/releng/release_detail.html +++ b/templates/releng/release_detail.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load static %} {% block title %}Arch Linux - Release: {{ release.version }}{% endblock %} @@ -9,11 +10,15 @@
  • Release Date: {{ release.release_date|date }}
  • {% if release.kernel_version %}
  • Kernel Version: {{ release.kernel_version }}
  • {% endif %} -
  • Available: {{ release.available|yesno }}
  • - {% if release.torrent_data %}
  • Download: Torrent, - Magnet
  • {% endif %} +
  • Available: {{ release.available|yesno|capfirst }}
  • + {% if release.torrent_data %} +
  • + Download via Torrent
  • +
  • + Download via Magnet URI
  • + {% endif %} {% if release.md5_sum %}
  • MD5: {{ release.md5_sum }}
  • {% endif %} {% if release.sha1_sum %}
  • SHA1: {{ release.sha1_sum }}
  • {% endif %}
diff --git a/templates/releng/release_list.html b/templates/releng/release_list.html index 5c8e003a..fa15bcb9 100644 --- a/templates/releng/release_list.html +++ b/templates/releng/release_list.html @@ -12,28 +12,41 @@

Releases

+

This is a list of ISO releases made by the Arch Linux release + engineering team. These are typically done on a monthly cadence, containing + the latest kernel and base packages from the package repositories. Click + the version of each release to read any additional notes or details about + each release.

+

Torrents and magnet URIs are available to download the releases. + Releases listed as not available may still be seeded by peers, but are no + longer registered via the official Arch Linux torrent tracker. We always + recommend running the latest available release.

+ + - - {% for item in release_list %} + - - {% endfor %} @@ -50,7 +63,7 @@ $(document).ready(function() { $(".results").tablesorter({ widgets: ['zebra'], sortList: [[0,1], [1,1]], - headers: { 4: { sorter: false }, 5: { sorter: false } } + headers: { 0: { sorter: false } } }); }); -- cgit v1.2.3 From 9b5eb6ab383dcd090cdbf88a250ecdfd407c3beb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 5 Nov 2014 23:03:43 -0600 Subject: Add torrent/magnet icons to download page Signed-off-by: Dan McGee --- templates/public/download.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/public/download.html b/templates/public/download.html index 967d8a6e..cbd7cd73 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -59,9 +59,9 @@ {% if release %}{% endif %}

Netboot

-- cgit v1.2.3 From cd22bfd73b184888df13b194ecdf6e482b36c3fc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 7 Nov 2014 09:27:56 -0600 Subject: Master signing keys page improvements * Don't show non-packagers * Don't hardcode group names in view code * Reduce number of database queries for all of the cross-signature developer name lookups Signed-off-by: Dan McGee --- templates/public/keys.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/public/keys.html b/templates/public/keys.html index 54d52ab8..37d5b232 100644 --- a/templates/public/keys.html +++ b/templates/public/keys.html @@ -123,8 +123,8 @@
{% for sig in cross_signatures %} - - + + -- cgit v1.2.3 From eb7172cd4d9d7af690b2be06e3f925d3023be71c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 13:43:59 -0600 Subject: Convert some of URL details to Jinja2 Anytime we have a loop with >100 items, the Django template engine begins to be the bottleneck. This one is relatively straightforward to convert, and sets the stage for converting the mirror status page as well. Signed-off-by: Dan McGee --- templates/mirrors/url_details.html | 29 +-------------------------- templates/mirrors/url_details_logs.html.jinja | 28 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 templates/mirrors/url_details_logs.html.jinja (limited to 'templates') diff --git a/templates/mirrors/url_details.html b/templates/mirrors/url_details.html index 557a1b79..8b7646b8 100644 --- a/templates/mirrors/url_details.html +++ b/templates/mirrors/url_details.html @@ -1,5 +1,4 @@ {% extends "base.html" %} -{% load cycle from future %} {% load static from staticfiles %} {% load mirror_status %} {% load flags %} @@ -57,34 +56,8 @@ {% endif %}
Release Date Version Kernel Version Available?TorrentMagnet Download Size
{% if item.torrent_data %} + Torrent +   + Magnet + {% endif %} {{ item.release_date|date }} {{ item.version }} {{ item.kernel_version|default:"" }} {{ item.available|yesno|capfirst }}TorrentMagnet {% if item.torrent_data %}{{ item.torrent.file_length|filesizeformat }}{% endif %}
{% user_pgp_key_link sig.signer %}{% user_pgp_key_link sig.signee %}{% user_pgp_key_link developer_keys sig.signer %}{% user_pgp_key_link developer_keys sig.signee %} {{ sig.created }} {{ sig.expires|default:"" }}
-

Check Logs

+ {% include "mirrors/url_details_logs.html.jinja" %} - - - - - - - - - - - - - - - {% for log in logs %} - - - - - - - - - {% endfor %} - -
Check TimeCheck LocationCheck IPLast SyncDelay (hh:mm)Duration (s)Success?Error Message
{{ log.check_time|date:'Y-m-d H:i' }}{% country_flag log.location.country %}{{ log.location.country.name }}{{ log.location.source_ip }}{{ log.last_sync|date:'Y-m-d H:i' }}{{ log.delay|duration }}{{ log.duration|floatvalue }}{{ log.is_success|yesno|capfirst }}{{ log.error|linebreaksbr }}
{% endblock %} diff --git a/templates/mirrors/url_details_logs.html.jinja b/templates/mirrors/url_details_logs.html.jinja new file mode 100644 index 00000000..8f7c5644 --- /dev/null +++ b/templates/mirrors/url_details_logs.html.jinja @@ -0,0 +1,28 @@ +

Check Logs

+ + + + + + + + + + + + + + + + {% for log in logs %} + + + + + + + + + {% endfor %} + +
Check TimeCheck LocationCheck IPLast SyncDelay (hh:mm)Duration (s)Success?Error Message
{{ log.check_time|date('Y-m-d H:i') }}{{ country_flag(log.location.country) }}{{ log.location.country.name }}{{ log.location.source_ip }}{{ log.last_sync|date('Y-m-d H:i') }}{{ log.delay()|duration }}{{ log.duration|floatvalue }}{{ log.is_success|yesno|capfirst }}{{ log.error|linebreaksbr }}
-- cgit v1.2.3 From 713ab837ba59c4a7c0b60cb8e8be4b27f4520e52 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 14:00:06 -0600 Subject: Convert mirror status tables to Jinja2 Yay for way improved performance. Local testing showed render times going from 265 ms to 135 ms. Signed-off-by: Dan McGee --- templates/mirrors/error_table.html | 24 ------------------------ templates/mirrors/error_table.html.jinja | 22 ++++++++++++++++++++++ templates/mirrors/mirror_details.html | 2 +- templates/mirrors/status.html | 6 +++--- templates/mirrors/status_table.html | 30 ------------------------------ templates/mirrors/status_table.html.jinja | 28 ++++++++++++++++++++++++++++ 6 files changed, 54 insertions(+), 58 deletions(-) delete mode 100644 templates/mirrors/error_table.html create mode 100644 templates/mirrors/error_table.html.jinja delete mode 100644 templates/mirrors/status_table.html create mode 100644 templates/mirrors/status_table.html.jinja (limited to 'templates') diff --git a/templates/mirrors/error_table.html b/templates/mirrors/error_table.html deleted file mode 100644 index cd7265af..00000000 --- a/templates/mirrors/error_table.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load cycle from future %} -{% load flags mirror_status %} - - - - - - - - - - - - - {% for log in error_logs %} - - - - - - - {% endfor %} - -
Mirror URLProtocolCountryError MessageLast OccurredOccurrences (last {{ cutoff|hours }})
{{ log.url__url }}{{ log.url__protocol__protocol }}{% country_flag log.country %}{{ log.country.name }}{{ log.error|linebreaksbr }}{{ log.last_occurred|date:'Y-m-d H:i' }}{{ log.error_count }}
diff --git a/templates/mirrors/error_table.html.jinja b/templates/mirrors/error_table.html.jinja new file mode 100644 index 00000000..52f68135 --- /dev/null +++ b/templates/mirrors/error_table.html.jinja @@ -0,0 +1,22 @@ + + + + + + + + + + + + + {% for log in error_logs %} + + + + + + + {% endfor %} + +
Mirror URLProtocolCountryError MessageLast OccurredOccurrences (last {{ cutoff|hours }})
{{ log.url__url }}{{ log.url__protocol__protocol }}{{ country_flag(log.country) }}{{ log.country.name }}{{ log.error|linebreaksbr }}{{ log.last_occurred|date('Y-m-d H:i') }}{{ log.error_count }}
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 2ff41828..e4ae55b4 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -132,7 +132,7 @@

Error Log

- {% include "mirrors/error_table.html" %} + {% include "mirrors/error_table.html.jinja" %}
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index 24408be7..530e3ff5 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -60,18 +60,18 @@

Out of Sync Mirrors

{% with urls=bad_urls table_id='outofsync_mirrors' %} - {% include "mirrors/status_table.html" %} + {% include "mirrors/status_table.html.jinja" %} {% endwith %}

Successfully Syncing Mirrors

{% with urls=good_urls table_id='successful_mirrors' %} - {% include "mirrors/status_table.html" %} + {% include "mirrors/status_table.html.jinja" %} {% endwith %}

Mirror Syncing Error Log

- {% include "mirrors/error_table.html" %} + {% include "mirrors/error_table.html.jinja" %}
{% endblock %} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html deleted file mode 100644 index 83538303..00000000 --- a/templates/mirrors/status_table.html +++ /dev/null @@ -1,30 +0,0 @@ -{% load cycle from future %} -{% load flags mirror_status %} - - - - - - - - - - - - - - - - {% for m_url in urls %} - - - - - - - - - - {% endfor %} - -
Mirror URLProtocolCountryCompletion %μ Delay (hh:mm)μ Duration (s)σ Duration (s)Mirror Score
{{ m_url.url }}{{ m_url.protocol }}{% country_flag m_url.country %}{{ m_url.country.name }}{{ m_url.completion_pct|percentage:1 }}{{ m_url.delay|duration|default:'unknown' }}{{ m_url.duration_avg|floatvalue:2 }}{{ m_url.duration_stddev|floatvalue:2 }}{{ m_url.score|floatvalue:1|default:'∞' }}details
diff --git a/templates/mirrors/status_table.html.jinja b/templates/mirrors/status_table.html.jinja new file mode 100644 index 00000000..598a1af0 --- /dev/null +++ b/templates/mirrors/status_table.html.jinja @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + {% for m_url in urls %} + + + + + + + + + + {% endfor %} + +
Mirror URLProtocolCountryCompletion %μ Delay (hh:mm)μ Duration (s)σ Duration (s)Mirror Score
{{ m_url.url }}{{ m_url.protocol }}{{ country_flag(m_url.country) }}{{ m_url.country.name }}{{ m_url.completion_pct|percentage(1) }}{{ m_url.delay|duration|default('unknown') }}{{ m_url.duration_avg|floatvalue(2) }}{{ m_url.duration_stddev|floatvalue(2) }}{{ m_url.score|floatvalue(1)|default('∞') }}details
-- cgit v1.2.3 From 122273496a24c4608de776978b1b449d9c6cde09 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 14:04:31 -0600 Subject: Make delay a property, not a function And re-indent the URL details log template now that we've broken it out. Signed-off-by: Dan McGee --- templates/mirrors/url_details_logs.html.jinja | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'templates') diff --git a/templates/mirrors/url_details_logs.html.jinja b/templates/mirrors/url_details_logs.html.jinja index 8f7c5644..09742f76 100644 --- a/templates/mirrors/url_details_logs.html.jinja +++ b/templates/mirrors/url_details_logs.html.jinja @@ -1,28 +1,28 @@ -

Check Logs

+

Check Logs

- - - - - - - - - - - - - - - {% for log in logs %} - - - - - - - - - {% endfor %} - -
Check TimeCheck LocationCheck IPLast SyncDelay (hh:mm)Duration (s)Success?Error Message
{{ log.check_time|date('Y-m-d H:i') }}{{ country_flag(log.location.country) }}{{ log.location.country.name }}{{ log.location.source_ip }}{{ log.last_sync|date('Y-m-d H:i') }}{{ log.delay()|duration }}{{ log.duration|floatvalue }}{{ log.is_success|yesno|capfirst }}{{ log.error|linebreaksbr }}
+ + + + + + + + + + + + + + + {% for log in logs %} + + + + + + + + + {% endfor %} + +
Check TimeCheck LocationCheck IPLast SyncDelay (hh:mm)Duration (s)Success?Error Message
{{ log.check_time|date('Y-m-d H:i') }}{{ country_flag(log.location.country) }}{{ log.location.country.name }}{{ log.location.source_ip }}{{ log.last_sync|date('Y-m-d H:i') }}{{ log.delay|duration }}{{ log.duration|floatvalue }}{{ log.is_success|yesno|capfirst }}{{ log.error|linebreaksbr }}
-- cgit v1.2.3 From 886d2934ec672e0d4533f73e8b38248fdff9a6d5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 14:12:32 -0600 Subject: Break out available URLs into Jinja2 template Signed-off-by: Dan McGee --- templates/mirrors/mirror_details.html | 38 +----------------------- templates/mirrors/mirror_details_urls.html.jinja | 36 ++++++++++++++++++++++ templates/mirrors/url_details.html | 2 +- templates/mirrors/url_details_logs.html.jinja | 2 -- 4 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 templates/mirrors/mirror_details_urls.html.jinja (limited to 'templates') diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index e4ae55b4..64009380 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -93,43 +93,7 @@

Available URLs

- - - - - - - - - - - - - - - - - - - - {% for m_url in urls %} - - - - - - - - - - - - - - - {% endfor %} - -
Mirror URLProtocolCountryIPv4IPv6Last SyncCompletion %μ Delay (hh:mm)μ Duration (s)σ Duration (s)ScoreDetails
{% if m_url.protocol.is_download %}{{ m_url.url }}{% else %}{{ m_url.url }}{% endif %}{{ m_url.protocol }}{% country_flag m_url.country %}{{ m_url.country.name }}{{ m_url.has_ipv4|yesno|capfirst }}{{ m_url.has_ipv6|yesno|capfirst }}{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}{{ m_url.completion_pct|percentage:1 }}{{ m_url.delay|duration|default:'unknown' }}{{ m_url.duration_avg|floatvalue:2 }}{{ m_url.duration_stddev|floatvalue:2 }}{{ m_url.score|floatvalue:1|default:'∞' }}Details
+ {% include "mirrors/mirror_details_urls.html.jinja" %}

Error Log

{% include "mirrors/error_table.html.jinja" %} diff --git a/templates/mirrors/mirror_details_urls.html.jinja b/templates/mirrors/mirror_details_urls.html.jinja new file mode 100644 index 00000000..7ab1548b --- /dev/null +++ b/templates/mirrors/mirror_details_urls.html.jinja @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + {% for m_url in urls %} + + + + + + + + + + + + + + + {% endfor %} + +
Mirror URLProtocolCountryIPv4IPv6Last SyncCompletion %μ Delay (hh:mm)μ Duration (s)σ Duration (s)ScoreDetails
{% if m_url.protocol.is_download %}{{ m_url.url }}{% else %}{{ m_url.url }}{% endif %}{{ m_url.protocol }}{{ country_flag(m_url.country) }}{{ m_url.country.name }}{{ m_url.has_ipv4|yesno|capfirst }}{{ m_url.has_ipv6|yesno|capfirst }}{{ m_url.last_sync|date('Y-m-d H:i')|default('unknown') }}{{ m_url.completion_pct|percentage(1) }}{{ m_url.delay|duration|default('unknown') }}{{ m_url.duration_avg|floatvalue(2) }}{{ m_url.duration_stddev|floatvalue(2) }}{{ m_url.score|floatvalue(1)|default('∞') }}Details
diff --git a/templates/mirrors/url_details.html b/templates/mirrors/url_details.html index 8b7646b8..b61033cd 100644 --- a/templates/mirrors/url_details.html +++ b/templates/mirrors/url_details.html @@ -56,8 +56,8 @@ {% endif %} +

Check Logs

{% include "mirrors/url_details_logs.html.jinja" %} - {% endblock %} diff --git a/templates/mirrors/url_details_logs.html.jinja b/templates/mirrors/url_details_logs.html.jinja index 09742f76..58f179d8 100644 --- a/templates/mirrors/url_details_logs.html.jinja +++ b/templates/mirrors/url_details_logs.html.jinja @@ -1,5 +1,3 @@ -

Check Logs

- -- cgit v1.2.3