summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-07 17:10:38 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-30 18:23:12 -0700
commit6d79479347752e450e9a8eeb4fbac84691044c67 (patch)
treeeaaa24065c6831d25c5ea65830c51b64960eaaed /python/fatcat_web/routes.py
parentbd3c6566fb9fdd5507782f19672fc62d0c551d05 (diff)
downloadfatcat-6d79479347752e450e9a8eeb4fbac84691044c67.tar.gz
fatcat-6d79479347752e450e9a8eeb4fbac84691044c67.zip
update container view stats
- show release type counts - new-style preservation status (single bar) - show release_type preservation break down on coverage page
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 34cf2d50..93522fec 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -200,6 +200,10 @@ def generic_entity_view(entity_type, ident, view_template):
metadata.pop('extra')
entity._metadata = metadata
+ if view_template == "container_view_coverage.html":
+ entity._type_preservation = get_elastic_container_preservation_by_type(ident)
+ print(entity._type_preservation)
+
return render_template(view_template, entity_type=entity_type, entity=entity, editgroup_id=None)
def generic_entity_revision_view(entity_type, revision_id, view_template):
@@ -240,6 +244,7 @@ def container_underscore_view(ident):
@app.route('/container/<ident>/coverage', methods=['GET'])
def container_view_coverage(ident):
+ # note: there is a special hack to add entity._type_preservation for this endpoint
return generic_entity_view('container', ident, 'container_view_coverage.html')
@app.route('/container/<ident>/metadata', methods=['GET'])