mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 02:19:12 -04:00
isort and remove sorting from ui
This commit is contained in:
@@ -98,15 +98,13 @@ def create_job_dict_entry(job):
|
||||
return {
|
||||
"job_id": job_id,
|
||||
"can_download": can_download,
|
||||
"download_link": url_for(
|
||||
".view_job_csv",
|
||||
service_id=current_service.id,
|
||||
job_id=job_id
|
||||
) if can_download else None,
|
||||
"download_link": (
|
||||
url_for(".view_job_csv", service_id=current_service.id, job_id=job_id)
|
||||
if can_download
|
||||
else None
|
||||
),
|
||||
"view_job_link": url_for(
|
||||
".view_job",
|
||||
service_id=current_service.id,
|
||||
job_id=job_id
|
||||
".view_job", service_id=current_service.id, job_id=job_id
|
||||
),
|
||||
"activity_time": activity_time,
|
||||
"created_by": job.get("created_by"),
|
||||
|
||||
@@ -43,10 +43,9 @@ def service_dashboard(service_id):
|
||||
service_data_retention_days = 7
|
||||
|
||||
active_jobs = [job for job in job_response if job["job_status"] != "cancelled"]
|
||||
sorted_jobs = sorted(active_jobs, key=lambda job: job["created_at"], reverse=True)
|
||||
job_lists = [
|
||||
{**job_dict, "finished_processing": job_is_finished(job_dict)}
|
||||
for job_dict in sorted_jobs
|
||||
for job_dict in active_jobs
|
||||
]
|
||||
|
||||
total_messages = service_api_client.get_service_message_ratio(service_id)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<span>Template</span>
|
||||
</th>
|
||||
<th data-sortable scope="col" role="columnheader" class="table-field-heading">
|
||||
<span>Time sent</span>
|
||||
<span>Started</span>
|
||||
</th>
|
||||
<th data-sortable scope="col" role="columnheader" class="table-field-heading">
|
||||
<span>Sender</span>
|
||||
|
||||
Reference in New Issue
Block a user