Update the jobs and activity page to show the user that created the job.

This commit is contained in:
Rebecca Law
2016-05-11 11:57:31 +01:00
parent 521fdc26ab
commit 46d5065297
9 changed files with 87 additions and 121 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -16,5 +16,5 @@
Started {{ uploaded_at|format_datetime }}
</p>
{% endif %}
Created by {{ created_by }}
</div>

View File

@@ -24,7 +24,7 @@
caption="Recent activity",
caption_visible=False,
empty_message='You havent 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 %}