mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Improve display of failure rates
https://www.pivotaltracker.com/story/show/116052359 - add absolute numbers for failures - make percentages accurate to 1 decimal place (50.0%) - make error colour appear if failures go above 3.0% - make error colour boolean (don’t interpolate between the colours)
This commit is contained in:
@@ -6,12 +6,15 @@
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro big_number_with_status(number, label, status_number, status_label, percentage_bad=0) %}
|
||||
{% macro big_number_with_status(number, label, failures, failure_percentage, danger_zone=False) %}
|
||||
<div class="big-number-with-status">
|
||||
{{ big_number(number, label) }}
|
||||
<div class="big-number-status">
|
||||
<div class="big-number-status-error-percentage" style="opacity: {{ percentage_bad / 100 }}"></div>
|
||||
{{ big_number(status_number, status_label) }}
|
||||
<div class="big-number-status{% if danger_zone %}-failing{% endif %}">
|
||||
{% if failures %}
|
||||
{{ failures }} failed – {{ failure_percentage }}%
|
||||
{% else %}
|
||||
No failures
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user