Files
cosma-qc/app/templates/_jobs_table.html
Silver Surfer b7d957c806 scaffold — FastAPI + SQLite + HTMX dashboard, ingest + dispatcher
- app/main.py : dashboard /, partials /partials/{jobs,monitor} (htmx polling)
- app/templates/ : index, jobs table, monitor card par worker
- app/static/style.css : thème sombre cohérent
- scripts/ingest.py : scan SSD d'acquisition, EXIF CreateDate → segments
  continus par (AUV, GoPro serial) avec seuil configurable
- scripts/dispatcher.py : polling queue, pick worker selon VRAM free,
  extraction ffmpeg + lingbot-map windowed --offload_to_cpu, progression DB
- DB : SQLite (acquisitions + jobs), lifecycle queued→extracting→running→done
- Workers par défaut : .87 (3060 12GB) + .84 (3090 24GB)

Contexte : QC terrain le jour-même (avant photogrammétrie à 30 jours),
plusieurs heures × 2 GoPros × 2-3 AUVs d'enregistrement à traiter en parallèle.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 09:52:41 +00:00

45 lines
1.7 KiB
HTML

{% if not jobs %}
<p class="muted">Aucun job. Ingeste un dossier d'acquisition via <code>scripts/ingest.py</code>.</p>
{% else %}
<table class="jobs">
<thead>
<tr>
<th>#</th><th>Acquisition</th><th>AUV</th><th>GoPro</th><th>Segment</th>
<th>Frames</th><th>Status</th><th>Worker</th><th>Progress</th><th>Actions</th>
</tr>
</thead>
<tbody>
{% for j in jobs %}
<tr class="status-{{ j.status }}">
<td>{{ j.id }}</td>
<td>{{ j.acquisition_name }}</td>
<td>{{ j.auv }}</td>
<td><code>{{ j.gopro_serial }}</code></td>
<td>{{ j.segment_label }}</td>
<td>{{ j.frame_count or "—" }}</td>
<td><span class="pill {{ j.status }}">{{ j.status }}</span></td>
<td>{{ j.worker_host or "—" }}</td>
<td>
{% if j.status == 'running' or j.status == 'extracting' %}
<progress value="{{ j.progress }}" max="100"></progress> {{ j.progress }}%
{% elif j.status == 'done' and j.viser_url %}
<a href="{{ j.viser_url }}" target="_blank">viser</a>
{% if j.ply_path %} · <a href="/api/jobs/{{ j.id }}/ply">PLY</a>{% endif %}
{% else %}—{% endif %}
</td>
<td>
{% if j.status in ['queued','extracting','running'] %}
<button hx-post="/jobs/{{ j.id }}/cancel" hx-target="#jobs-table" hx-swap="outerHTML">Stop</button>
{% elif j.status == 'error' %}
<button hx-post="/jobs/{{ j.id }}/retry" hx-target="#jobs-table" hx-swap="outerHTML">Retry</button>
{% endif %}
</td>
</tr>
{% if j.error %}
<tr class="err-row"><td colspan="10"><small>{{ j.error }}</small></td></tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}