mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-19 20:52:32 -04:00
updated table titles and fields
This commit is contained in:
@@ -65,7 +65,6 @@ def service_dashboard(service_id):
|
||||
job_data = job_api_client.get_job(service_id, notificaton_job_id)["data"]
|
||||
if job_data:
|
||||
jobs.append(job_data)
|
||||
|
||||
service_data_retention_days = 7
|
||||
download_availability = []
|
||||
for job in jobs:
|
||||
@@ -82,11 +81,13 @@ def service_dashboard(service_id):
|
||||
job_id=job["id"],
|
||||
),
|
||||
)
|
||||
|
||||
download_availability.append(
|
||||
{
|
||||
"job_id": job["id"],
|
||||
"time_left": time_left,
|
||||
"download_link": download_link,
|
||||
"notification_count": job["notification_count"],
|
||||
}
|
||||
)
|
||||
return render_template(
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||||
|
||||
<h2 class="margin-top-4 margin-bottom-1">Batched Jobs</h2>
|
||||
<h2 class="margin-top-4 margin-bottom-1">Recent Batches</h2>
|
||||
|
||||
<div class='job-table'>
|
||||
{% call(item, row_number) list_table(
|
||||
@@ -38,12 +38,16 @@
|
||||
caption_visible=False,
|
||||
border_visible=True,
|
||||
empty_message='No batched job messages found  (messages are kept for {} days)'.format(service_data_retention_days)|safe,
|
||||
field_headings=['Template Name','Date/Time', 'Download (CSV) Report'],
|
||||
field_headings=['File Name','Template','Time Sent', 'Sender', '# of Recipeints'],
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
{% if item.job.original_file_name and item.job.id %}
|
||||
{{ download_availability }}
|
||||
{% if item.job.original_file_name and item.job.id and item.template %}
|
||||
{% call row_heading() %}
|
||||
<a class="usa-link file-list-filename" href="/services/{{ item.service }}/jobs/{{ item.job.id }}">{{ item.job.original_file_name|replace('.csv', '') if item.job.id else '' }}</a>
|
||||
<a class="usa-link file-list-filename" href="/services/{{ item.service }}/jobs/{{ item.job.id }}">{{ item.job.original_file_name if item.job.id else '' }}</a>
|
||||
{% endcall %}
|
||||
{% call row_heading() %}
|
||||
{{ item.template.name }}
|
||||
{% endcall %}
|
||||
{% call row_heading() %}
|
||||
{{ item.status|format_notification_status_as_time(
|
||||
@@ -51,13 +55,13 @@
|
||||
(item.updated_at or item.created_at)|format_datetime_short)
|
||||
}}
|
||||
{% endcall %}
|
||||
{% call row_heading() %}
|
||||
{{ item.created_by.name }}
|
||||
{% endcall %}
|
||||
{% call row_heading() %}
|
||||
{% set availability = download_availability|selectattr('job_id', 'equalto', item.job.id)|first %}
|
||||
{% if availability and availability.time_left != "Data no longer available" %}
|
||||
<a class="usa-link file-list-filename" href="{{ availability.download_link[0] }}">{{ "Download" if item.job.original_file_name else '' }}</a>
|
||||
<span>- {{ availability.time_left }}</span>
|
||||
{% elif availability %}
|
||||
<span>{{ availability.time_left }}</span>
|
||||
{% if availability %}
|
||||
{{ availability.notification_count}}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user