summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@archlinux.org>2019-02-18 20:39:28 +0100
committerJelle van der Waa <jelle@archlinux.org>2019-02-18 20:56:15 +0100
commitfdae105d968bcd29b2b31407a99882f66ab07de0 (patch)
tree965864a4be9956c3dabeec23745789dea068ca29 /templates
parent413c173c214fd7fa3e34d1559cf21f04ec8067cb (diff)
downloadarchweb-fdae105d968bcd29b2b31407a99882f66ab07de0.tar.gz
archweb-fdae105d968bcd29b2b31407a99882f66ab07de0.zip
mirrors: replace self-written floatvalue with floatformat
In 2013 floatformat was very slow in the mirror status page, these days floatformat is not that much slower.
Diffstat (limited to 'templates')
-rw-r--r--templates/mirrors/mirror_details_urls.html6
-rw-r--r--templates/mirrors/status_table.html6
-rw-r--r--templates/mirrors/url_details_logs.html2
3 files changed, 7 insertions, 7 deletions
diff --git a/templates/mirrors/mirror_details_urls.html b/templates/mirrors/mirror_details_urls.html
index a2df00de..0f88b06c 100644
--- a/templates/mirrors/mirror_details_urls.html
+++ b/templates/mirrors/mirror_details_urls.html
@@ -29,9 +29,9 @@
<td>{{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }}</td>
<td>{{ m_url.completion_pct|percentage:1 }}</td>
<td>{{ m_url.delay|duration|default:'unknown' }}</td>
- <td>{{ m_url.duration_avg|floatvalue:2 }}</td>
- <td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
- <td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
+ <td>{{ m_url.duration_avg|floatformat:2 }}</td>
+ <td>{{ m_url.duration_stddev|floatformat:2 }}</td>
+ <td>{{ m_url.score|floatformat:1|default:'∞' }}</td>
<td><a href="{{ m_url.id }}/">Details</a></td>
</tr>
{% endfor %}
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 77f6e454..30b60452 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -21,9 +21,9 @@
<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 }}</td>
- <td>{{ m_url.duration_avg|floatvalue:2 }}</td>
- <td>{{ m_url.duration_stddev|floatvalue:2 }}</td>
- <td>{{ m_url.score|floatvalue:1|default:'∞' }}</td>
+ <td>{{ m_url.duration_avg|floatformat:2 }}</td>
+ <td>{{ m_url.duration_stddev|floatformat:2 }}</td>
+ <td>{{ m_url.score|floatformat:1|default:'∞' }}</td>
<td><a href="{{ m_url.get_absolute_url }}">details</a></td>
</tr>{% endfor %}
</tbody>
diff --git a/templates/mirrors/url_details_logs.html b/templates/mirrors/url_details_logs.html
index 2396fde7..19e530ab 100644
--- a/templates/mirrors/url_details_logs.html
+++ b/templates/mirrors/url_details_logs.html
@@ -21,7 +21,7 @@
<td>{% if log.location %}{{ log.location.source_ip }}{% else %}Unknown{% endif %}</td>
<td>{{ log.last_sync|date:'Y-m-d H:i' }}</td>
<td>{{ log.delay|duration }}</td>
- <td>{{ log.duration|floatvalue }}</td>
+ <td>{{ log.duration|floatformat:2 }}</td>
<td>{{ log.is_success|yesno|capfirst }}</td>
<td class="wrap">{{ log.error|linebreaksbr }}</td>
</tr>{% endfor %}