diff --git a/app/__init__.py b/app/__init__.py index 45ce09319..f32a98b6c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -33,7 +33,6 @@ from app.asset_fingerprinter import asset_fingerprinter from app.config import configs from app.extensions import redis_client from app.formatters import ( - convert_time_unixtimestamp, convert_markdown_template, convert_to_boolean, format_auth_type, diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index efe86c763..8a81defd8 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -421,14 +421,18 @@ td.table-empty-message { width: 25%; overflow-wrap: anywhere; } + td.jobid { + width: 5%; + } td.template { - width: 20%; + width: 25%; } td.time-sent { - width: 20%; + width: 30%; } td.sender { - width: 15%; + width: 20%; + overflow-wrap: break-word; } td.count-of-recipients { width: 5%; diff --git a/app/main/views/activity.py b/app/main/views/activity.py index a415dc4d5..db7d576ef 100644 --- a/app/main/views/activity.py +++ b/app/main/views/activity.py @@ -3,7 +3,7 @@ from flask_login import current_user from werkzeug.utils import redirect from app import current_service, job_api_client -from app.formatters import get_time_left, convert_time_unixtimestamp +from app.formatters import convert_time_unixtimestamp, get_time_left from app.main import main from app.utils.pagination import ( generate_next_dict, @@ -43,13 +43,9 @@ def all_jobs_activity(service_id): def handle_pagination(jobs, service_id, page): if page is None: abort(404, "Invalid page argument ({}).".format(request.args.get("page"))) - prev_page = generate_previous_dict("main.all_jobs_activity", service_id, page) if page > 1 else None - next_page = generate_next_dict("main.all_jobs_activity", service_id, page) if jobs["links"].get("next") else None - pagination = generate_pagination_pages(jobs["total"], jobs['page_size'], page) - return prev_page, next_page, pagination @@ -57,17 +53,17 @@ def generate_job_dict(jobs): return [ { "job_id": job["id"], - "sort_value": hashlib.sha1(job["id"].encode("utf-8")).hexdigest(), - "job_sort_value": job["id"].replace("-", ""), "time_left": get_time_left(job["created_at"]), "download_link": url_for(".view_job_csv", service_id=current_service.id, job_id=job["id"]), "view_job_link": url_for(".view_job", service_id=current_service.id, job_id=job["id"]), "created_at": job["created_at"], - "time_sent_data_value": convert_time_unixtimestamp(job["processing_finished"] if job["processing_finished"] else job["processing_started"] - if job["processing_started"] else job["created_at"]), + "time_sent_data_value": convert_time_unixtimestamp( + job["processing_finished"] if job["processing_finished"] + else job["processing_started"] if job["processing_started"] + else job["created_at"] + ), "processing_finished": job["processing_finished"], "processing_started": job["processing_started"], - "notification_count": job["notification_count"], "created_by": job["created_by"], "template_name": job["template_name"] } diff --git a/app/templates/views/activity/all-activity.html b/app/templates/views/activity/all-activity.html index ad98dd9c6..aa26d28cf 100644 --- a/app/templates/views/activity/all-activity.html +++ b/app/templates/views/activity/all-activity.html @@ -1,8 +1,5 @@ {% extends "withnav_template.html" %} -{% from "components/ajax-block.html" import ajax_block %} -{% from "components/previous-next-navigation.html" import previous_next_navigation %} - {% block service_page_title %} All activity {% endblock %} @@ -54,7 +51,6 @@ > Next arrow - {% endif %} @@ -65,23 +61,19 @@ {% block maincolumn_content %} -
+

All activity

{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %} - + {% include 'views/dashboard/write-first-messages.html' %} {% endif %} - - -

All activity

-

Sent jobs

- +
- {% if all_jobs_dict %} {% for job in all_jobs_dict %} - {% if job.job_id %} - - - + - - + - + - {% endif %} {% endfor %} {% else %} - {% endif %}
+ Job ID# @@ -101,29 +93,18 @@
- - {{ job.job_id if job.job_id else 'Manually entered number' }} +
+ + {{ job.job_id[:8] if job.job_id else 'Manually entered number' }} - {{ job.template_name }} - {{ job.template_name }} {{ (job.processing_finished if job.processing_finished else job.processing_started if job.processing_started else job.created_at)|format_datetime_table }} - {{ job.created_by.name }} - {{ job.created_by.name }} {% if job.time_left != "Data no longer available" %} File Download Icon @@ -132,15 +113,13 @@ {% endif %}
-

Note: Report data is only available for 7 days after your message has been sent

+

Note:Report data is only available for 7 days after your message has been sent

{{show_pagination}}