mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 01:04:00 -04:00
Added letters info to service / admin dashboard & activity page
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
field_headings=['Recipient', 'Status'],
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
|
||||
{% call row_heading() %}
|
||||
<a class="file-list-filename" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.to }}</a>
|
||||
<p class="file-list-hint">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<div class="ajax-block-container">
|
||||
<div class="grid-row">
|
||||
<div id="total-email" class="column-half">
|
||||
<div id="total-email" class="{{column_width}}">
|
||||
{{ big_number_with_status(
|
||||
statistics['email']['requested'],
|
||||
message_count_label(statistics['email']['requested'], 'email', suffix='sent'),
|
||||
@@ -14,7 +14,7 @@
|
||||
link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed')
|
||||
) }}
|
||||
</div>
|
||||
<div id="total-sms" class="column-half">
|
||||
<div id="total-sms" class="{{column_width}}">
|
||||
{{ big_number_with_status(
|
||||
statistics['sms']['requested'],
|
||||
message_count_label(statistics['sms']['requested'], 'sms', suffix='sent'),
|
||||
@@ -25,5 +25,18 @@
|
||||
link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed')
|
||||
) }}
|
||||
</div>
|
||||
{% if 'letter' in current_service['permissions'] %}
|
||||
<div id="total-letters" class="{{column_width}}">
|
||||
{{ big_number_with_status(
|
||||
statistics['letter']['requested'],
|
||||
message_count_label(statistics['letter']['requested'], 'letter', suffix='sent'),
|
||||
statistics['letter']['failed'],
|
||||
statistics['letter']['failed_percentage'],
|
||||
statistics['letter']['show_warning'],
|
||||
failure_link=url_for(".view_notifications", service_id=service_id, message_type='letter', status='failed'),
|
||||
link=url_for(".view_notifications", service_id=service_id, message_type='letter', status='')
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,35 +13,36 @@
|
||||
<h1 class="heading-large">
|
||||
{{ message_count_label(99, message_type, suffix='') | capitalize }}
|
||||
</h1>
|
||||
{% if not message_type == "letter" %}
|
||||
{{ ajax_block(
|
||||
partials,
|
||||
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status),
|
||||
'counts'
|
||||
) }}
|
||||
|
||||
{{ ajax_block(
|
||||
partials,
|
||||
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status),
|
||||
'counts'
|
||||
) }}
|
||||
<form
|
||||
method="post"
|
||||
action="{{ url_for('.view_notifications', service_id=current_service.id, message_type=message_type) }}"
|
||||
class="grid-row"
|
||||
>
|
||||
<div class="column-three-quarters">
|
||||
{{ textbox(
|
||||
search_form.to,
|
||||
width='1-1',
|
||||
label='Search by {}'.format('email address' if message_type == 'email' else 'phone number')
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-one-quarter align-button-with-textbox">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="submit" class="button" value="Search">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form
|
||||
method="post"
|
||||
action="{{ url_for('.view_notifications', service_id=current_service.id, message_type=message_type) }}"
|
||||
class="grid-row"
|
||||
>
|
||||
<div class="column-three-quarters">
|
||||
{{ textbox(
|
||||
search_form.to,
|
||||
width='1-1',
|
||||
label='Search by {}'.format('email address' if message_type == 'email' else 'phone number')
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-one-quarter align-button-with-textbox">
|
||||
<form id="search-form" method="post">
|
||||
<input type="hidden" name="to" value="{{ search_form.to.data }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="submit" class="button" value="Search">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="search-form" method="post">
|
||||
<input type="hidden" name="to" value="{{ search_form.to.data }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
</form>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{{ ajax_block(
|
||||
partials,
|
||||
|
||||
@@ -1,22 +1,34 @@
|
||||
{% from "components/big-number.html" import big_number_with_status %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
<div class="grid-row bottom-gutter">
|
||||
<div class="column-half">
|
||||
<div class="column-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.email.delivered + global_stats.email.failed,
|
||||
message_count_label(global_stats.email.delivered, 'email'),
|
||||
global_stats.email.failed,
|
||||
global_stats.email.failure_rate,
|
||||
global_stats.email.failure_rate|float > 3,
|
||||
smaller=True
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-half">
|
||||
<div class="column-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.sms.delivered + global_stats.sms.failed,
|
||||
message_count_label(global_stats.sms.delivered, 'sms'),
|
||||
global_stats.sms.failed,
|
||||
global_stats.sms.failure_rate,
|
||||
global_stats.sms.failure_rate|float > 3,
|
||||
smaller=True
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.letter.delivered + global_stats.letter.failed,
|
||||
message_count_label(global_stats.letter.delivered, 'letter'),
|
||||
global_stats.letter.failed,
|
||||
global_stats.letter.failure_rate,
|
||||
global_stats.letter.failure_rate|float > 3,
|
||||
smaller=True
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user