Change performance stats to be 2 decimal places

We are starting to see lots of 100.0%s in the current table
and we think this looks suspiciously too good so think it is
beneficial to change it to be 2dp such that we get a few more
non 100.0% values.

This will put all the values in to having 2dp, however it will
also require the API to have a change to
https://github.com/alphagov/notifications-api/blob/master/app/performance_dashboard/rest.py#L81
where it is currently losing the granularity down to a single
decimal place (meaning that if we were really at 99.894% then that
would be shown on the page as 99.90% rather than 99.89%). However,
I don't think it is a blocker that we get that sorted before this
can be merged.
This commit is contained in:
David McDonald
2021-11-25 14:49:38 +00:00
parent ded7fa524f
commit 30330d86b1
2 changed files with 17 additions and 17 deletions

View File

@@ -88,7 +88,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half">
{{ big_number(
'{:.1f}%'.format(average_percentage_under_10_seconds),
'{:.2f}%'.format(average_percentage_under_10_seconds),
label='on average',
) }}
</div>
@@ -107,7 +107,7 @@
{{ item.date | format_date_normal }}
{% endcall %}
{% call field() %}
{{ item.percentage_under_10_seconds }}%
{{ '{:.2f}%'.format(item.percentage_under_10_seconds) }}
{% endcall %}
{% endcall %}
<p class="table-show-more-link">