353:935d6fb77c31
Anton Shestakov <av6@dwimlabs.net>, Mon, 13 Apr 2020 18:59:36 +0800
tests: response.body is bytes

previous change 322:38b1d78b2242

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>
{% module Template('ui/project-link.html', project=project) %}
<span class="uk-text-nowrap">· check #{{ check.ordinal }}</span>
</h2>
<div class="uk-grid">
<div class="uk-width-small-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>
<dt>Result:</dt>
<dd>
<img src="{{ project.get_url() }}/{{ check.ordinal }}/dot.svg" alt="Check Result">
{% 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 %}
</dd>
<dt>Other formats:</dt>
<dd><a href="{{ project.get_url() }}/{{ check.ordinal }}/raw">raw</a></dd>
</dl>
</div>
<div class="uk-width-small-2-3">
<dl class="uk-description-list-horizontal list-terse">
{% set change = check.change %}
<dt>Commit:</dt>
<dd><a href="{{ adapter.get_commit_url(change) }}">{% if change.rev is not None %}{{ change.rev }}:{% end %}{{ change.node[:12] }}</a></dd>
<dt>Branch:</dt>
<dd><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></dd>
<dt>Author:</dt>
<dd>{{ change.author }}</dd>
<dt>Date:</dt>
<dd>{% module Time(change.date, False) %}</dd>
<dt>Description:</dt>
<dd>{{ change.message }}</dd>
</dl>
</div>
</div>
{% if reference is not None %}
<p>
Overall,
{% 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
{% else %}
{% 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
{% else %}
same as
{% end %}
{% end %}
<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>).
</p>
{% end %}
{% if chart or files or codes %}
<div class="uk-flex uk-flex-middle uk-margin-top">
{% if chart %}
<div class="uk-position-relative uk-flex-item-auto chart-container">
<svg id="check-chart"></svg>
<table class="uk-display-inline-block uk-position-absolute uk-position-z-index uk-text-nowrap uk-hidden chart-tooltip">
<tr>
<td>
<div class="uk-display-inline-block legend-dot" data-dot="warnings"></div>
</td>
<td>Warnings:</td>
<td data-point="warnings">0</td>
</tr>
<tr>
<td>
<div class="uk-display-inline-block legend-dot" data-dot="errors"></div>
</td>
<td>Errors:</td>
<td data-point="errors">0</td>
</tr>
<tr>
<td>
<div class="uk-display-inline-block legend-dot" data-dot="duration"></div>
</td>
<td>Duration:</td>
<td data-point="duration">0</td>
</tr>
</table>
</div>
<script type="application/json" id="check-chart-data">{% raw json_encode(chart) %}</script>
{% end %}
{% if files or codes %}
<div class="uk-position-relative uk-flex-item-none uk-margin-left uk-margin-right">
{% if files.get('errors') or files.get('warnings') %}
<svg id="check-files-pie" width="120" height="120"></svg>
<script type="application/json" id="check-files-data">{% raw json_encode(files) %}</script>
{% end %}
{% if codes.get('errors') or codes.get('warnings') %}
<svg id="check-codes-pie" width="120" height="120"></svg>
<script type="application/json" id="check-codes-data">{% raw json_encode(codes) %}</script>
{% end %}
<div class="uk-display-inline-block uk-position-absolute uk-position-z-index uk-text-nowrap uk-hidden pie-tooltip"></div>
</div>
{% end %}
</div>
{% end %}
{% include ui/check-log.html %}
</div>
{% end %}