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 290:a08915486c39

templates/compare.html

Permissions: -rw-r--r--

Other formats: Feeds:
{% extends "base.html" %}
{% block title %}#{{ reference.ordinal }} and #{{ 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">
· comparing <a href="{{ project.get_url() }}/{{ reference.ordinal }}">#{{ reference.ordinal }}</a>
and <a href="{{ project.get_url() }}/{{ check.ordinal }}">#{{ check.ordinal }}</a>
</span>
</h2>
{% if check.change.branch != reference.change.branch %}
<div class="uk-alert">
Checks are for different branches: {{ check.change.branch }} and {{ reference.change.branch }}.
</div>
{% end %}
{% if check.change_id == reference.change_id %}
<div class="uk-alert">
Both checks are for the same commit:
{% set change = check.change %}
<a href="{{ adapter.get_commit_url(change) }}">{% if change.rev is not None %}{{ change.rev }}:{% end %}{{ change.node[:12] }}</a>.
</div>
{% end %}
{% include ui/check-log.html %}
</div>
{% end %}