aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
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/routes.py
parente41c4073103c8df070843af54541127ee9f55981 (diff)
downloadfatcat-426308d44baf9165a2ac8adf4d3573154a5e7f46.tar.gz
fatcat-426308d44baf9165a2ac8adf4d3573154a5e7f46.zip
control shadow preservation display with a flag
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 1281a617..bcfa133b 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -754,10 +754,16 @@ def coverage_search():
coverage_type_preservation = get_elastic_preservation_by_type(query)
if query.recent:
date_histogram = get_elastic_preservation_by_date(query)
- date_histogram_svg = preservation_by_date_histogram(date_histogram).render_data_uri()
+ date_histogram_svg = preservation_by_date_histogram(
+ date_histogram,
+ merge_shadows=Config.FATCAT_MERGE_SHADOW_PRESERVATION,
+ ).render_data_uri()
else:
year_histogram = get_elastic_preservation_by_year(query)
- year_histogram_svg = preservation_by_year_histogram(year_histogram).render_data_uri()
+ year_histogram_svg = preservation_by_year_histogram(
+ year_histogram,
+ merge_shadows=Config.FATCAT_MERGE_SHADOW_PRESERVATION,
+ ).render_data_uri()
return render_template(
'coverage_search.html',
query=query,
@@ -886,7 +892,10 @@ def container_ident_preservation_by_year_svg(ident):
except Exception as ae:
app.log.error(ae)
abort(503)
- return preservation_by_year_histogram(histogram).render_response()
+ return preservation_by_year_histogram(
+ histogram,
+ merge_shadows=Config.FATCAT_MERGE_SHADOW_PRESERVATION,
+ ).render_response()
@app.route('/container/<ident>/preservation_by_volume.json', methods=['GET', 'OPTIONS'])
@crossdomain(origin='*',headers=['access-control-allow-origin','Content-Type'])
@@ -914,7 +923,10 @@ def container_ident_preservation_by_volume_svg(ident):
except Exception as ae:
app.log.error(ae)
abort(503)
- return preservation_by_volume_histogram(histogram).render_response()
+ return preservation_by_volume_histogram(
+ histogram,
+ merge_shadows=Config.FATCAT_MERGE_SHADOW_PRESERVATION,
+ ).render_response()
@app.route('/release/<ident>.bib', methods=['GET'])
def release_bibtex(ident):