27:9fa79edc2e45
Anton Shestakov <av6@dwimlabs.net>, Thu, 16 Jun 2016 07:31:39 +0800
viewer: use new get_duration() method to format time taken by a check

next change 44:1c2db26fa4bd
previous change 26:8c1ce7d12350

templates/check.html

Permissions: -rw-r--r--

Other formats: Feeds:
{% extends "base.html" %}
{% block title %}Check #{{ check.ordinal }}{% end %}
{% block content %}
<div class="uk-container uk-container-center uk-margin-large-top">
<h2>
<a href="{{ project.get_url() }}">{{ project.name }}</a>:
check #{{ check.ordinal }}
</h2>
<p>
{% if check.success %}
{{ locale.translate('{} error', '{} errors', check.errors).format(check.errors) }},
{{ locale.translate('{} warning', '{} warnings', check.warnings).format(check.warnings) }}
{% else %}
Job failed.
{% end %}
</p>
<div class="uk-grid">
<div class="uk-width-medium-1-3">
<dl class="uk-description-list-horizontal list-terse">
<dt>Started:</dt>
<dd>{% module Time(check.started) %}</dd>
<dt>Finished:</dt>
<dd>{% module Time(check.finished) %}</dd>
<dt>Duration:</dt>
<dd>{{ check.get_duration() }}</dd>
</dl>
</div>
<div class="uk-width-medium-2-3">
<dl class="uk-description-list-horizontal list-terse">
{% set change = check.change %}
<dt>Commit:</dt>
<dd>{{ change.rev }}:{{ change.node[:12] }} {{ change.branch }}</dd>
<dt>Author:</dt>
<dd>{{ change.author }}</dd>
<dt>Date:</dt>
<dd><time>{{ change.date }}</time></dd>
<dt>Description:</dt>
<dd>{{ change.message }}</dd>
</dl>
</div>
</div>
<pre class="check-log">{#
#}{% for number, (cls, line) in enumerate(lines, 1) %}{#
#}<div id="l{{ number }}"{% if cls %} class="{{ cls }}"{% end %}>{#
#}<a href="#l{{ number }}" data-line-number="{{ number }}"></a>{#
#}{{ line }}{#
#}</div>{#
#}{% end %}{#
#}</pre>
</div>
{% end %}