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