summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-10-13 17:56:08 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-10-13 17:56:08 -0700
commit4032dc1ff11dcbbd4d9453749872b28b7188d45d (patch)
tree72b8967d59845ce04d785dc90fcc5b3e7c4a8467
parentdc7de8b93810cac6c2494f89ccbc49f32c90d6c0 (diff)
downloadfatcat-4032dc1ff11dcbbd4d9453749872b28b7188d45d.tar.gz
fatcat-4032dc1ff11dcbbd4d9453749872b28b7188d45d.zip
coverage: show counts and fraction in tooltip of coverage bars
-rw-r--r--python/fatcat_web/templates/entity_macros.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index d5ecd9b6..e8a763d2 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -270,19 +270,19 @@ yellow
{% set frac_none = stats.none/stats.total %}
<div class="ui {{ extra_class }} multiple progress" data-percent="0,0,0,0" style="margin-bottom: 0.1em;">
- <div class="green bar" style="border-radius: 0; min-width: 0; width: {{ (frac_bright*100)|round(method='ceil') }}%;" title="bright">
+ <div class="green bar" style="border-radius: 0; min-width: 0; width: {{ (frac_bright*100)|round(method='ceil') }}%;" title="bright: {{ "{:,}".format(stats.bright) }} ({{ (frac_bright*100)|round(2,method='ceil') }}%)">
<div class="progress">{# {{ (frac_bright*100)|int }}% #}</div>
</div>
- <div class="green bar" style="border-radius: 0; min-width: 0; width: {{ (frac_dark*100)|round(method='ceil') }}%; background-color: darkgreen;" title="dark">
+ <div class="green bar" style="border-radius: 0; min-width: 0; width: {{ (frac_dark*100)|round(method='ceil') }}%; background-color: darkgreen;" title="dark: {{ "{:,}".format(stats.dark) }} ({{ (frac_dark*100)|round(2,method='ceil') }}%">
<div class="progress">{# {{ (frac_dark*100)|int }}% #}</div>
</div>
{% if stats.shadows_only %}
- {% set frac_shadows_only = stats.shadows_only/stats.total %}
- <div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_shadows_only*100)|round(method='ceil') }}%; background-color: darkred;" title="shadows only">
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
+ <div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_shadows_only*100)|round(method='ceil') }}%; background-color: darkred;" title="shadows only: {{ "{:,}".format(stats.shadows_only) }} ({{ (frac_shadows_only*100)|round(2,method='ceil') }}%)">
<div class="progress">{# {{ (frac_shadows_only*100)|int }}% #}</div>
</div>
{% endif %}
- <div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_none*100)|round(method='ceil') }}%;" title="no preservation">
+ <div class="red bar" style="border-radius: 0; min-width: 0; width: {{ (frac_none*100)|round(method='ceil') }}%;" title="no preservation: {{ "{:,}".format(stats.none) }} ({{ (frac_none*100)|round(2,method='ceil') }}%)">
<div class="progress">{# {{ (frac_none*100)|int }}% #}</div>
</div>
</div>