mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-16 03:10:16 -04:00
Fixe formatting pep8 issues
This commit is contained in:
@@ -73,7 +73,6 @@ def view_jobs(service_id):
|
||||
@login_required
|
||||
@user_has_permissions('view_activity', admin_override=True)
|
||||
def view_job(service_id, job_id):
|
||||
|
||||
job = job_api_client.get_job(service_id, job_id)['data']
|
||||
filter_args = _parse_filter_args(request.args)
|
||||
filter_args['status'] = _set_status_filters(filter_args)
|
||||
@@ -230,14 +229,13 @@ def view_notifications(service_id, message_type):
|
||||
@login_required
|
||||
@user_has_permissions('view_activity', admin_override=True)
|
||||
def view_notification(service_id, job_id, notification_id):
|
||||
|
||||
now = time.strftime('%H:%M')
|
||||
|
||||
return render_template(
|
||||
'views/notification.html',
|
||||
message=[
|
||||
message for message in messages if message['id'] == notification_id
|
||||
][0],
|
||||
][0],
|
||||
delivered_at=now,
|
||||
uploaded_at=now,
|
||||
job_id=job_id
|
||||
@@ -269,7 +267,7 @@ def get_status_filters(service, message_type, statistics):
|
||||
stats[key]
|
||||
)
|
||||
for key, label, option in filters
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def _get_job_counts(job, help_argument):
|
||||
@@ -287,25 +285,25 @@ def _get_job_counts(job, help_argument):
|
||||
count
|
||||
) for label, query_param, count in [
|
||||
[
|
||||
'total', '',
|
||||
job.get('notification_count', 0)
|
||||
'total', '',
|
||||
job.get('notification_count', 0)
|
||||
],
|
||||
[
|
||||
'sending', 'sending',
|
||||
job.get('notification_count', 0) -
|
||||
job.get('notifications_delivered', 0) -
|
||||
job.get('notifications_failed', 0)
|
||||
'sending', 'sending',
|
||||
job.get('notification_count', 0) -
|
||||
job.get('notifications_delivered', 0) -
|
||||
job.get('notifications_failed', 0)
|
||||
],
|
||||
[
|
||||
'delivered', 'delivered',
|
||||
job.get('notifications_delivered', 0)
|
||||
'delivered', 'delivered',
|
||||
job.get('notifications_delivered', 0)
|
||||
],
|
||||
[
|
||||
'failed', 'failed',
|
||||
job.get('notifications_failed', 0)
|
||||
'failed', 'failed',
|
||||
job.get('notifications_failed', 0)
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def get_job_partials(job):
|
||||
|
||||
Reference in New Issue
Block a user