photolib/templates/job.html

75 lines
1.9 KiB
HTML

{% set title = job.uuid %}
{% extends "page.html" %}
{% block title %}{{ job.uuid }}{% endblock %}
{% block subtitle %}{{ job.status.name | title }}{% endblock %}
{% block buttons %}
<a href="#"><button class="secondary-button pure-button">Pause</button></a>
<a href="#"><button class="secondary-button pure-button">Cancel</button></a>
<a href="/jobs"><button class="secondary-button pure-button">All Jobs</button></a>
{% endblock %}
{% block head %}
lol head
{% endblock %}
{% block body %}
{{ job }}<br>
<h2>Progress</h2>
<table>
{% set ns = namespace(sum=0) %}
{% for status, count in status_totals.items(): %}
<tr>
{%- set ns.sum = ns.sum + count %}
<td>{{ status }}</td>
<td>{{ count }}</td>
</tr>
{% endfor %}
</table>
totalcount: {{ ns.sum }}<br>
<div class="progress">
{% for status, count in status_totals.items(): %}
{% if count > 0 %}
<div style="flex-grow:{{ count }}" class="{{ status.name }}">
<a href="#targets-{{ status.name }}">{{ status.name }}: {{ count }}</a>
</div>
{% endif %}
{% endfor %}
</div>
<h2>Targets</h2>
Total targets: {{ status_totals.values() | sum }}<br>
Table of target -> how many photos it selected
<h2>Target photos</h2>
{% for status, count in status_totals.items(): %}
{% if count > 0 %}
<a name="targets-{{ status.name }}"></a>
<h3>{{ status.name | title }}</h3>
<ul>
{% for photo, photoset, target_status, target in statuses %}
{% if target_status.status == status %}
<li>
target: {{ target.id }}<br>
target_status: {{ target_status.id }}<br>
photo: <a href="/thumb/one/big/{{ photo.uuid }}.jpg">{{ photo.uuid }}</a><br />
set: <a href="/photo/{{ photoset.uuid }}">{{ photoset.uuid }}</a><br />
status: {{ target_status.status }}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endblock %}