mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Show message on job page if job is scheduled
If a job is scheduled then we can’t show the notifications yet, and the progress report will stay at 0%. In their place we should show what time a job will start. Later on (when the API is ready) this area of the page should also show a cancel button.
This commit is contained in:
@@ -277,7 +277,7 @@ def get_status_filters(service, message_type, statistics):
|
||||
|
||||
|
||||
def _get_job_counts(job, help_argument):
|
||||
sending = 0 if job['job_status'] == 'pending' else (
|
||||
sending = 0 if job['job_status'] == 'scheduled' else (
|
||||
job.get('notification_count', 0) -
|
||||
job.get('notifications_delivered', 0) -
|
||||
job.get('notifications_failed', 0)
|
||||
@@ -324,7 +324,6 @@ def get_job_partials(job):
|
||||
return {
|
||||
'counts': render_template(
|
||||
'partials/jobs/count.html',
|
||||
job=job,
|
||||
counts=_get_job_counts(job, request.args.get('help', 0)),
|
||||
status=filter_args['status']
|
||||
),
|
||||
@@ -340,7 +339,8 @@ def get_job_partials(job):
|
||||
status=request.args.get('status')
|
||||
),
|
||||
help=get_help_argument(),
|
||||
time_left=get_time_left(job['created_at'])
|
||||
time_left=get_time_left(job['created_at']),
|
||||
job=job
|
||||
),
|
||||
'status': render_template(
|
||||
'partials/jobs/status.html',
|
||||
|
||||
Reference in New Issue
Block a user