diff options
author | Dan McGee <dan@archlinux.org> | 2014-11-08 14:00:06 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-11-08 14:00:09 -0600 |
commit | 713ab837ba59c4a7c0b60cb8e8be4b27f4520e52 (patch) | |
tree | 926af09762f87d14d14f118774240a34a8080430 /templates/mirrors/error_table.html.jinja | |
parent | eb7172cd4d9d7af690b2be06e3f925d3023be71c (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'templates/mirrors/error_table.html.jinja')
-rw-r--r-- | templates/mirrors/error_table.html.jinja | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ +<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="{{ loop.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> |