aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-28 15:07:10 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-30 18:28:03 -0700
commit426308d44baf9165a2ac8adf4d3573154a5e7f46 (patch)
tree7c0e6890bbf6590f0c31b2178927b17b268413cd /python/fatcat_web/templates/entity_macros.html
parente41c4073103c8df070843af54541127ee9f55981 (diff)
downloadfatcat-426308d44baf9165a2ac8adf4d3573154a5e7f46.tar.gz
fatcat-426308d44baf9165a2ac8adf4d3573154a5e7f46.zip
control shadow preservation display with a flag
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r--python/fatcat_web/templates/entity_macros.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index c3ae099a..718c071c 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -265,7 +265,6 @@ yellow
{% set frac_bright = stats.bright/stats.total %}
{% set frac_dark = stats.dark/stats.total %}
- {% set frac_shadows_only = stats.shadows_only/stats.total %}
{% 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;">
@@ -275,9 +274,12 @@ yellow
<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="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">
<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="progress">{# {{ (frac_none*100)|int }}% #}</div>
</div>
@@ -290,7 +292,6 @@ yellow
{% set frac_bright = stats.bright/stats.total %}
{% set frac_dark = stats.dark/stats.total %}
- {% set frac_shadows_only = stats.shadows_only/stats.total %}
{% set frac_none = stats.none/stats.total %}
<table class="ui very basic very compact collapsing table" style="font-weight: bold; margin-left: 1em;">
@@ -305,11 +306,14 @@ yellow
<td class="right aligned" >{{ "{:,}".format(stats.dark) }}
<td class="right aligned" >{{ (frac_dark*100)|round(2,method='ceil') }}%
<td>preserved but not publicly accessible (dark)
+ {% if stats.shadows_only %}
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
<tr>
<td style="background-color: darkred;">
<td class="right aligned" >{{ "{:,}".format(stats.shadows_only) }}
<td class="right aligned" >{{ (frac_shadows_only*100)|round(2,method='ceil') }}%
<td>only independently preserved in "shadow" libraries
+ {% endif %}
<tr>
<td style="background-color: #db2828;">
<td class="right aligned" >{{ "{:,}".format(stats.none) }}
@@ -324,7 +328,6 @@ yellow
{% set frac_bright = stats.bright/stats.total %}
{% set frac_dark = stats.dark/stats.total %}
- {% set frac_shadows_only = stats.shadows_only/stats.total %}
{% set frac_none = stats.none/stats.total %}
<table class="ui very basic very compact collapsing table">
@@ -337,10 +340,13 @@ yellow
<td style="background-color: darkgreen;">
<td class="right aligned" >{{ "{:,}".format(stats.dark) }}
<td>preserved, inaccessible (dark)
+ {% if stats.shadows_only %}
+ {% set frac_shadows_only = stats.shadows_only/stats.total %}
<tr>
<td style="background-color: darkred;">
<td class="right aligned" >{{ "{:,}".format(stats.shadows_only) }}
<td>shadow library only
+ {% endif %}
<tr>
<td style="background-color: #db2828;">
<td class="right aligned" >{{ "{:,}".format(stats.none) }}