Files
notifications-admin/app/templates/views/job.html
Chris Hill-Scott d9073862fa Put data from job on job page
The main change is showing the finished time if the job is finished, rather
than the start time.
2016-03-03 11:38:38 +00:00

98 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "withnav_template.html" %}
{% from "components/table.html" import list_table, field, right_aligned_field_heading %}
{% from "components/big-number.html" import big_number %}
{% from "components/banner.html" import banner %}
{% from "components/sms-message.html" import sms_message %}
{% from "components/email-message.html" import email_message %}
{% block page_title %}
{{ uploaded_file_name }} GOV.UK Notify
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">
{{ uploaded_file_name }}
</h1>
{% if 'sms' == template.template_type %}
<div class="grid-row">
<div class="column-two-thirds">
{{ sms_message(
template.formatted_as_markup,
)}}
</div>
</div>
{% elif 'email' == template.template_type %}
{{ email_message(
template.subject,
template,
from_address='{}@notifications.service.gov.uk'.format(service.email_from),
from_name=from_name
)}}
{% endif %}
{% if finished_at %}
<p class='heading-small'>
Finished {{ finished_at|format_datetime }}
</p>
{% else %}
<p class='heading-small'>
Started {{ uploaded_at|format_datetime }}
</p>
{% endif %}
<ul class="grid-row job-totals">
<li class="column-one-quarter">
{{ big_number(
counts.queued, 'queued'
)}}
</li>
<li class="column-one-quarter">
{{ big_number(
counts.sent, 'sent'
)}}
</li>
<li class="column-one-quarter">
{{ big_number(
counts.failed,
'failed'
)}}
</li>
<li class="column-one-quarter">
{{ big_number(
cost, 'total cost'
)}}
</li>
</ul>
{% if notifications %}
{% call(item) list_table(
notifications,
caption=uploaded_file_name,
caption_visible=False,
empty_message="Messages go here",
field_headings=[
'Recipient',
right_aligned_field_heading('Status')
]
) %}
{% call field() %}
{{ item.to }}
{% endcall %}
{% call field(
align='right',
status='error' if item.status == 'Failed' else 'default'
) %}
{{ item.status|title }} at {{ item.sent_at|format_time }}
{% endcall %}
{% endcall %}
{% else %}
<p>
<a href="{{ url_for(".view_job", service_id=service_id, job_id=job_id) }}">Refresh</a>
</p>
{% endif %}
{% endblock %}