next change | 241:f5efb98791b5 |
previous change | 134:c750ded699ca |
Permissions: -rw-r--r--
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% extends "base.html" %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
|
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% block title %}Check #{{ check.ordinal }}{% end %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
|
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% block content %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<div class="uk-container uk-container-center uk-margin-large-top"> |
26
26:8c1ce7d12350
viewer: use new get_url() method for project and check links
Anton Shestakov <av6@dwimlabs.net>
previous changes: 25:52cac2f85af5
line |
diff
|
<h2> |
46
46:0f45e02848a1
models: add Project.get_title() method, use it, test it
Anton Shestakov <av6@dwimlabs.net>
previous changes: 44:1c2db26fa4bd
line |
diff
|
<a href="{{ project.get_url() }}">{{ project.get_title() }}</a>: |
26
26:8c1ce7d12350
viewer: use new get_url() method for project and check links
Anton Shestakov <av6@dwimlabs.net>
previous changes: 25:52cac2f85af5
line |
diff
|
check #{{ check.ordinal }} |
26:8c1ce7d12350
viewer: use new get_url() method for project and check links
Anton Shestakov <av6@dwimlabs.net>
previous changes: 25:52cac2f85af5
line |
diff
|
</h2> |
132
132:3cfe292cacf3
viewer: show check results in a bigger font
Anton Shestakov <av6@dwimlabs.net>
previous changes: 125:751f50b9b5fa
line |
diff
|
<h3> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% if check.success %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{{ locale.translate('{} error', '{} errors', check.errors).format(check.errors) }}, |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{{ locale.translate('{} warning', '{} warnings', check.warnings).format(check.warnings) }} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% else %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
Job failed. |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% end %} |
132
132:3cfe292cacf3
viewer: show check results in a bigger font
Anton Shestakov <av6@dwimlabs.net>
previous changes: 125:751f50b9b5fa
line |
diff
|
</h3> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<div class="uk-grid"> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<div class="uk-width-medium-1-3"> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dl class="uk-description-list-horizontal list-terse"> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Started:</dt> |
25
25:52cac2f85af5
viewer: the two existing UI modules can just use positional arguments
Anton Shestakov <av6@dwimlabs.net>
previous changes: 16:784e5bd0fcba
line |
diff
|
<dd>{% module Time(check.started) %}</dd> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Finished:</dt> |
25
25:52cac2f85af5
viewer: the two existing UI modules can just use positional arguments
Anton Shestakov <av6@dwimlabs.net>
previous changes: 16:784e5bd0fcba
line |
diff
|
<dd>{% module Time(check.finished) %}</dd> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Duration:</dt> |
27
27:9fa79edc2e45
viewer: use new get_duration() method to format time taken by a check
Anton Shestakov <av6@dwimlabs.net>
previous changes: 26:8c1ce7d12350
line |
diff
|
<dd>{{ check.get_duration() }}</dd> |
99
99:b0bcc3b9dc46
viewer: allow viewing checker output as plain text
Anton Shestakov <av6@dwimlabs.net>
previous changes: 96:92d44000f283
line |
diff
|
<dt>Other formats:</dt> |
115
115:2311bfce57b4
viewer: remove Check.get_url() method for not being very useful
Anton Shestakov <av6@dwimlabs.net>
previous changes: 110:6b22a1b4b85c
line |
diff
|
<dd><a href="{{ project.get_url() }}/{{ check.ordinal }}/raw">raw</a></dd> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</dl> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</div> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<div class="uk-width-medium-2-3"> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dl class="uk-description-list-horizontal list-terse"> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% set change = check.change %} |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Commit:</dt> |
120
120:21ef016ac29d
models: revs are not unique, can be nulls
Anton Shestakov <av6@dwimlabs.net>
previous changes: 115:2311bfce57b4
line |
diff
|
<dd><a href="{{ adapter.get_commit_url(change) }}">{% if change.rev is not None %}{{ change.rev }}:{% end %}{{ change.node[:12] }}</a></dd> |
96
96:92d44000f283
viewer: show commit branch as a separate list item
Anton Shestakov <av6@dwimlabs.net>
previous changes: 90:c8e8f09464cf
line |
diff
|
<dt>Branch:</dt> |
109
109:6cbbab799f3c
viewer: provide change/branch links for projects (i.e. on Bitbucket)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 99:b0bcc3b9dc46
line |
diff
|
<dd><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></dd> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Author:</dt> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dd>{{ change.author }}</dd> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Date:</dt> |
75
75:a784221a989b
viewer: add proper markup to changeset date so it's picked up by moment.js
Anton Shestakov <av6@dwimlabs.net>
previous changes: 73:a9c9da814fe3
line |
diff
|
<dd>{% module Time(change.date, False) %}</dd> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dt>Description:</dt> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<dd>{{ change.message }}</dd> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</dl> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</div> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</div> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
<pre class="check-log">{# |
47
47:5633f9a8dc95
incoming: use dicts instead of tuples for Check.lines
Anton Shestakov <av6@dwimlabs.net>
previous changes: 46:0f45e02848a1
line |
diff
|
#}{% for number, line in enumerate(lines, 1) %}{# |
68
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
#}<div id="l{{ number }}"{% if 'task' in line %} data-task="{{ line['task'] }}"{% end %}{% if 'cls' in line %} class="{{ line['cls'] }}"{% end %}>{# |
44
44:1c2db26fa4bd
viewer: use a lineno class to put styles on the line number links
Anton Shestakov <av6@dwimlabs.net>
previous changes: 27:9fa79edc2e45
line |
diff
|
#}<a href="#l{{ number }}" class="lineno" data-line-number="{{ number }}"></a>{# |
110
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{% if 'link' in line %}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{{ line['text'][:line['link_start']] }}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}<a href="{{ line['link'] }}" class="filelink">{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{{ line['text'][line['link_start']:line['link_end']] }}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}</a>{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{{ line['text'][line['link_end']:] }}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{% else %}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{{ line['text'] }}{# |
110:6b22a1b4b85c
viewer: provide links to file/line on warnings/errors in check logs
Anton Shestakov <av6@dwimlabs.net>
previous changes: 109:6cbbab799f3c
line |
diff
|
#}{% end %}{# |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
#}</div>{# |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
#}{% end %}{# |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
#}</pre> |
68
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
<script> |
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
(function($) { |
90
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
$('.check-log div.task').each(function() { |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
var $line = $(this); |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
var task = $line.attr('data-task'); |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
var $lines = $line.nextAll('[data-task="' + task + '"]'); |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
if ($lines.length === 0) { return; } |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
var $collapser = $('<a>').addClass('collapser'); |
90:c8e8f09464cf
viewer: create collapsers wholly on client-side
Anton Shestakov <av6@dwimlabs.net>
previous changes: 89:6498a4ad0788
line |
diff
|
$line.append($collapser); |
73
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
var toggle = function() { |
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
var collapsed = $collapser.hasClass('collapsed'); |
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
$lines.toggleClass('uk-hidden', collapsed); |
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
}; |
68
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
$collapser.on('click', function() { |
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
$collapser.toggleClass('collapsed'); |
73
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
toggle(); |
68
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
}); |
134
134:c750ded699ca
viewer: also don't collapse on failures
Anton Shestakov <av6@dwimlabs.net>
previous changes: 132:3cfe292cacf3
line |
diff
|
var important = '.error, .warning, .failure, :target'; |
134:c750ded699ca
viewer: also don't collapse on failures
Anton Shestakov <av6@dwimlabs.net>
previous changes: 132:3cfe292cacf3
line |
diff
|
if (task != 'checks' && $lines.filter(important).length === 0) { |
73
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
$collapser.addClass('collapsed'); |
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
toggle(); |
73:a9c9da814fe3
viewer: setup and clone tasks without errors/warnings are collapsed by default
Anton Shestakov <av6@dwimlabs.net>
previous changes: 68:58a9dddf8731
line |
diff
|
} |
68
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
}); |
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
})(jQuery); |
68:58a9dddf8731
viewer: make task blocks collapsible (except cleanup)
Anton Shestakov <av6@dwimlabs.net>
previous changes: 47:5633f9a8dc95
line |
diff
|
</script> |
13
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
</div> |
13:448ea1a0274c
viewer: add check view
Anton Shestakov <av6@dwimlabs.net>
previous changes:
line |
diff
|
{% end %} |