diff options
author | Dan McGee <dan@archlinux.org> | 2013-05-11 00:59:53 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-05-11 00:59:53 +0200 |
commit | 76be96ac2c11604a2bfceed4212b686719620b13 (patch) | |
tree | 113f7e2333ebbe479fedb85879df7391abd3626b /templates/mirrors | |
parent | 4e872235010b1b7ad8cb6912b9e3ccf4c39a352d (diff) | |
download | archweb-76be96ac2c11604a2bfceed4212b686719620b13.tar.gz archweb-76be96ac2c11604a2bfceed4212b686719620b13.tar.xz |
Pull mirror error table into inclusion template
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/mirrors')
-rw-r--r-- | templates/mirrors/error_table.html | 23 | ||||
-rw-r--r-- | templates/mirrors/status.html | 24 | ||||
-rw-r--r-- | templates/mirrors/status_table.html | 3 |
3 files changed, 25 insertions, 25 deletions
diff --git a/templates/mirrors/error_table.html b/templates/mirrors/error_table.html new file mode 100644 index 0000000..6054814 --- /dev/null +++ b/templates/mirrors/error_table.html @@ -0,0 +1,23 @@ +{% load flags mirror_status %} +<table id="errorlog_mirrors" class="results"> + <thead> + <tr> + <th>Mirror URL</th> + <th>Protocol</th> + <th>Country</th> + <th>Error Message</th> + <th>Last Occurred</th> + <th>Occurrences (last {{ cutoff|hours }})</th> + </tr> + </thead> + <tbody> + {% for log in error_logs %}<tr class="{% cycle 'odd' 'even' %}"> + <td>{{ log.url__url }}</td> + <td>{{ log.url__protocol__protocol }}</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>{% endfor %} + </tbody> +</table> diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index a3da1ad..331c18e 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -71,29 +71,7 @@ <a name="errorlog" id="errorlog"></a> <h3>Mirror Syncing Error Log</h3> - <table id="errorlog_mirrors" class="results"> - <thead> - <tr> - <th>Mirror URL</th> - <th>Protocol</th> - <th>Country</th> - <th>Error Message</th> - <th>Last Occurred</th> - <th>Occurrences (last {{ cutoff|hours }})</th> - </tr> - </thead> - <tbody> - {% for log in error_logs %}<tr class="{% cycle 'odd' 'even' %}"> - <td>{{ log.url__url }}</td> - <td>{{ log.url__protocol__protocol }}</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>{% endfor %} - </tbody> - </table> - + {% include "mirrors/error_table.html" %} </div> {% endblock %} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html index e848a9c..2817542 100644 --- a/templates/mirrors/status_table.html +++ b/templates/mirrors/status_table.html @@ -1,5 +1,4 @@ -{% load mirror_status %} -{% load flags %} +{% load flags mirror_status %} <table id="{{ table_id }}" class="results"> <thead> <tr> |