mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-30 19:29:43 -04:00
Indicate template on scheduled jobs
We’ve removed the template on the jobs page, so you can no longer see which template a job is about to be sent with. This is removing information which might enable you to undo a costly mistake. I don’t think we need to bring back the whole template – giving its name, and a link to it meets the need just as well.
This commit is contained in:
@@ -350,6 +350,11 @@ def get_job_partials(job):
|
||||
notifications = notification_api_client.get_notifications_for_service(
|
||||
job['service'], job['id'], status=filter_args['status']
|
||||
)
|
||||
template = service_api_client.get_service_template(
|
||||
service_id=current_service['id'],
|
||||
template_id=job['template'],
|
||||
version=job['template_version']
|
||||
)['data']
|
||||
return {
|
||||
'counts': render_template(
|
||||
'partials/count.html',
|
||||
@@ -369,7 +374,9 @@ def get_job_partials(job):
|
||||
),
|
||||
help=get_help_argument(),
|
||||
time_left=get_time_left(job['created_at']),
|
||||
job=job
|
||||
job=job,
|
||||
template=template,
|
||||
template_version=job['template_version'],
|
||||
),
|
||||
'status': render_template(
|
||||
'partials/jobs/status.html',
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
{% if job.job_status == 'scheduled' %}
|
||||
|
||||
<p>
|
||||
Sending will start {{ job.scheduled_for|format_datetime_relative }}
|
||||
Sending
|
||||
<a href="{{ url_for('.view_template_version', service_id=current_service.id, template_id=template.id, version=template_version) }}">{{ template.name }}</a>
|
||||
{{ job.scheduled_for|format_datetime_relative }}
|
||||
</p>
|
||||
<div class="page-footer">
|
||||
<form method="post">
|
||||
|
||||
Reference in New Issue
Block a user