Anton Shestakov <av6@dwimlabs.net>, Fri, 06 Oct 2017 16:24:27 +0800
viewer: no need to compare to True, fixes two E712 warnings as well
templates/check.html
Permissions: -rw-r--r--
{% extends "base.html" %} {% block title %}Check #
{{ check.ordinal }}{% end %} <div class="uk-container uk-container-center uk-margin-large-top"> {% module Template('ui/project-link.html', project=project) %} <span class="uk-text-nowrap">· check #
{{ check.ordinal }}</span> <div class="uk-width-small-1-3"> <dl class="uk-description-list-horizontal list-terse"> <dd>{% module Time(check.started) %}</dd> <dd>{% module Time(check.finished) %}</dd> <dd>{{ check.get_duration() }}</dd> <img src="{{ project.get_url() }}/{{ check.ordinal }}/dot.svg" alt="Check Result"> {{ locale.translate('{} error', '{} errors', check.errors).format(check.errors) }},
{{ locale.translate('{} warning', '{} warnings', check.warnings).format(check.warnings) }} <dd><a href="{{ project.get_url() }}/{{ check.ordinal }}/raw">raw
</a></dd> <div class="uk-width-small-2-3"> <dl class="uk-description-list-horizontal list-terse"> {% set change = check.change %} <dd><a href="{{ adapter.get_commit_url(change) }}">{% if change.rev is not None %}{{ change.rev }}:
{% end %}{{ change.node[:12] }}</a></dd> <dd><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></dd> <dd>{{ change.author }}</dd> <dd>{% module Time(change.date, False) %}</dd> <dd>{{ change.message }}</dd> {% if reference is not None %} {% if check.errors > reference.errors %} <span class="uk-text-danger">worse
</span> than
{% elif check.errors < reference.errors %} <span class="uk-text-success">better
</span> than
{% if check.warnings > reference.warnings %} <span class="uk-text-warning">worse
</span> than
{% elif check.warnings < reference.warnings %} <span class="uk-text-success">better
</span> than
<a href="{{ project.get_url() }}/{{ reference.ordinal }}">check #
{{ reference.ordinal }}</a>,
the previous check on branch
{{ change.branch }} (
<a href="{{ project.get_url() }}/{{ check.ordinal }}/compare/{{ reference.ordinal }}">compare
</a>).
<div class="uk-position-relative chart-container"> <svg id="check-chart"></svg> <div class="uk-panel uk-panel-box uk-panel-box-secondary uk-display-inline-block uk-position-absolute uk-hidden chart-tooltip"> <dl class="uk-description-list-horizontal list-terse"> <dd data-point="warnings">0
</dd> <dd data-point="errors">0
</dd> <dd data-point="duration">0
</dd> <script type="application/json" id="check-chart-data">{% raw json_encode(chart) %}</script> {% include ui/check-log.html %}