Files
cosma-qc/app/templates/_jobs_table.html

62 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% macro duration(job) -%}
{%- if job.started_at and job.finished_at -%}
{{ job._duration }}
{%- elif job.started_at and not job.finished_at -%}
{{ job._duration }}
{%- else -%} 
{%- endif -%}
{%- endmacro %}
{% if not acquisitions %}
<p class="muted">Aucune acquisition. Ingeste un dossier via <code>scripts/ingest.py</code>.</p>
{% else %}
<div class="acq-grid">
{% for acq in acquisitions %}
<div class="acq-col">
<h3 class="acq-title">
{{ acq.name }} <span class="total">{{ acq.total_duration }}</span>
</h3>
<ul class="job-list">
{% for j in acq.jobs %}
<li class="job-item {{ j.status }}">
<span class="icon">
{% if j.status == 'done' %}<span class="check"></span>
{% elif j.status in ('running','extracting') %}<span class="spin"></span>
{% elif j.status == 'error' %}<span class="err"></span>
{% else %}<span class="sq"></span>{% endif %}
</span>
<span class="label">
{{ j.auv }}/{{ j.gopro_serial }}/{{ j.segment_label }}
{% if j.status == 'done' and j.viser_url %}
<a class="ext" href="{{ j.viser_url }}" target="_blank">viser</a>
{% endif %}
</span>
<span class="dur">{{ j._duration }}</span>
{% if j.status in ('queued','extracting','running') %}
<button class="mini" hx-post="/jobs/{{ j.id }}/cancel" hx-target="#jobs-table">×</button>
{% elif j.status == 'error' %}
<button class="mini" hx-post="/jobs/{{ j.id }}/retry" hx-target="#jobs-table"></button>
{% endif %}
</li>
{% if j.error %}<li class="err-line">{{ j.error }}</li>{% endif %}
{% endfor %}
</ul>
{# Stitch section (placeholder — wired up once multi-job stitching lands) #}
<div class="stitch-section">
<div class="stitch-title">
<span class="icon"><span class="sq"></span></span>
<span>stitch</span>
</div>
<ul class="stitch-children">
<li class="sub pending"><span class="sq"></span> pair GP1↔GP2 per AUV</li>
<li class="sub pending"><span class="sq"></span> cross-AUV merge</li>
<li class="sub pending"><span class="sq"></span> final PLY</li>
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}