306:edefddec933d
Anton Shestakov <av6@dwimlabs.net>, Sun, 24 Sep 2017 12:25:05 +0800
viewer: use subqueries to get data on index page Before, there were bare columns in the aggregate query, their values were undefined (but it somehow worked), as SQLite docs say. Good news is that now this bigger query uses (project_id, ordinal) index and is really fast.

previous change 241:f5efb98791b5

templates/ui/checks.html

Permissions: -rw-r--r--

Other formats: Feeds:
<tbody>
{% for check in checks %}
{% set project = check.project %}
{% set change = check.change %}
{% set adapter = project.get_adapter() %}
<tr>
<td class="uk-text-right">{% module Badges(check) %}</td>
<td class="uk-width-1-1 uk-text-break">{% module Template('ui/project-link.html', project=project) %}</td>
<td><a href="{{ project.get_url() }}/{{ check.ordinal }}">check #{{ check.ordinal }}</a></td>
<td><a href="{{ adapter.get_branch_url(change) }}">{{ change.branch }}</a></td>
<td><a href="{{ adapter.get_commit_url(change) }}">{% if change.rev is not None %}{{ change.rev }}:{% end %}{{ change.node[:12] }}</a></td>
<td>{% module Time(check.finished) %}</td>
<td>{{ check.get_duration() }}</td>
</tr>
{% end %}
</tbody>