mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Remove counts from notification page
The counts on the notification page will only ever show 1 thing. Which
feels like overkill, especially if you’re only sending one-off messages.
It’s also confusing when you come from the job/activity pages which
have one set of numbers to then be confronted with a different set of
numbers.
The important stuff on this page is:
- what the message was
- some meta information about it
Sorry Leo 😢
This commit is contained in:
@@ -59,7 +59,6 @@ def view_notification(service_id, notification_id):
|
||||
filetype='png',
|
||||
),
|
||||
),
|
||||
status=request.args.get('status'),
|
||||
updates_url=url_for(
|
||||
".view_notification_updates",
|
||||
service_id=service_id,
|
||||
@@ -80,49 +79,10 @@ def view_notification_updates(service_id, notification_id):
|
||||
))
|
||||
|
||||
|
||||
def _get_single_notification_counts(notification, help_argument):
|
||||
return [
|
||||
(
|
||||
label,
|
||||
query_param,
|
||||
url_for(
|
||||
".view_notification",
|
||||
service_id=notification['service'],
|
||||
notification_id=notification['id'],
|
||||
status=query_param,
|
||||
help=help_argument
|
||||
),
|
||||
count
|
||||
) for label, query_param, count in [
|
||||
[
|
||||
'total', '',
|
||||
1
|
||||
],
|
||||
[
|
||||
'sending', 'sending',
|
||||
int(notification['status'] in SENDING_STATUSES)
|
||||
],
|
||||
[
|
||||
'delivered', 'delivered',
|
||||
int(notification['status'] in DELIVERED_STATUSES)
|
||||
],
|
||||
[
|
||||
'failed', 'failed',
|
||||
int(notification['status'] in FAILURE_STATUSES)
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def get_single_notification_partials(notification):
|
||||
status_args = get_status_arg(request.args)
|
||||
|
||||
return {
|
||||
'counts': render_template(
|
||||
'partials/count.html',
|
||||
counts=_get_single_notification_counts(notification, request.args.get('help', 0)),
|
||||
status=status_args
|
||||
),
|
||||
'notifications': render_template(
|
||||
'partials/notifications/notifications.html',
|
||||
notification=notification,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{{ template|string }}
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
|
||||
{{ ajax_block(partials, updates_url, 'counts', finished=finished) }}
|
||||
{{ ajax_block(partials, updates_url, 'notifications', finished=finished) }}
|
||||
|
||||
{{ page_footer(
|
||||
|
||||
Reference in New Issue
Block a user