From 8a026dfdeb6e0ada90ec54052e0073f25671a906 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 15 Jan 2018 12:29:03 +0000 Subject: [PATCH] The downloading of the CSV is working for as many as 190, 000 notifications. This PR re-enables the download link and filters the notifications by templates type. --- app/main/views/notifications.py | 3 ++- app/templates/views/notifications.html | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/main/views/notifications.py b/app/main/views/notifications.py index 438ad5d50..c50a3dac5 100644 --- a/app/main/views/notifications.py +++ b/app/main/views/notifications.py @@ -157,7 +157,8 @@ def download_notifications_csv(service_id): status=filter_args.get('status'), page=request.args.get('page', 1), page_size=5000, - format_for_csv=True + format_for_csv=True, + template_type=filter_args.get('message_type') ) ), mimetype='text/csv', diff --git a/app/templates/views/notifications.html b/app/templates/views/notifications.html index c1eb2985d..432e50731 100644 --- a/app/templates/views/notifications.html +++ b/app/templates/views/notifications.html @@ -47,11 +47,11 @@ {% endif %} - - - - - +

+ Download this report +   + Data available for 7 days +

{{ ajax_block( partials, url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status, page=page),