mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Update the jobs and activity page to show the user that created the job.
This commit is contained in:
@@ -17,11 +17,9 @@ from flask_login import login_required
|
||||
|
||||
from app.main import main
|
||||
from app import (
|
||||
job_api_client,
|
||||
statistics_api_client,
|
||||
service_api_client,
|
||||
template_statistics_client,
|
||||
current_service
|
||||
template_statistics_client
|
||||
)
|
||||
|
||||
from app.utils import user_has_permissions
|
||||
|
||||
@@ -74,7 +74,8 @@ def view_job(service_id, job_id):
|
||||
template,
|
||||
prefix=current_service['name']
|
||||
),
|
||||
job_id=job_id
|
||||
job_id=job_id,
|
||||
created_by=job['created_by']['name']
|
||||
)
|
||||
|
||||
|
||||
@@ -100,7 +101,8 @@ def view_job_updates(service_id, job_id):
|
||||
'status': render_template(
|
||||
'partials/jobs/status.html',
|
||||
uploaded_at=job['created_at'],
|
||||
finished_at=job['updated_at'] if finished else None
|
||||
finished_at=job['updated_at'] if finished else None,
|
||||
created_by=job['created_by']['name']
|
||||
),
|
||||
})
|
||||
|
||||
@@ -116,8 +118,6 @@ def view_notifications(service_id):
|
||||
|
||||
filter_args = _parse_filter_args(request.args)
|
||||
|
||||
print(filter_args)
|
||||
|
||||
notifications = notification_api_client.get_notifications_for_service(
|
||||
service_id=service_id,
|
||||
page=page,
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
Started {{ uploaded_at|format_datetime }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
Created by {{ created_by }}
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
caption="Recent activity",
|
||||
caption_visible=False,
|
||||
empty_message='You haven’t sent any notifications yet',
|
||||
field_headings=['Job', 'Time', right_aligned_field_heading('Status')]
|
||||
field_headings=['Job', 'Time', right_aligned_field_heading('Status'), 'Created By']
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.view_job', service_id=current_service.id, job_id=item.id) }}">{{ item.original_file_name }}</a>
|
||||
@@ -35,6 +35,9 @@
|
||||
{% call field(align='right') %}
|
||||
{{ item.status }}
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.created_by.name }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user