feat: pipeline monitor + orchestrator stats dashboard

This commit is contained in:
Ubuntu
2026-05-11 10:55:44 +00:00
parent e597407ee5
commit 1a4fffd2c1
6 changed files with 182 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
{% if error %}
<p class="err">{{ error }}</p>
{% elif not missions %}
<p class="muted">Aucune mission dans state.db.</p>
{% else %}
{% for m in missions %}
<div class="pipeline-mission">
<div class="pm-header">
<span class="pm-name">{{ m.name }}</span>
<span class="pm-status status-{{ m.status }}">{{ m.status }}</span>
<span class="pm-counts">
{% if m.counts.get('done') %}<span class="cnt ok">{{ m.counts.done }} done</span>{% endif %}
{% if m.counts.get('running') %}<span class="cnt busy">{{ m.counts.running }} running</span>{% endif %}
{% if m.counts.get('queued') %}<span class="cnt muted">{{ m.counts.queued }} queued</span>{% endif %}
{% if m.counts.get('degraded') %}<span class="cnt warn">{{ m.counts.degraded }} degraded</span>{% endif %}
{% if m.counts.get('error') %}<span class="cnt err">{{ m.counts.error }} error</span>{% endif %}
</span>
</div>
<table class="pipeline-jobs-table">
<thead>
<tr><th>AUV</th><th>Segment</th><th>Stage</th><th>Status</th><th>Worker</th><th>Duree</th></tr>
</thead>
<tbody>
{% for j in m.jobs %}
<tr class="pj-row status-{{ j.status }}">
<td>{{ j.auv_id }}</td>
<td class="muted">{{ j.segment_label or '-' }}</td>
<td><code>{{ j.stage }}</code></td>
<td><span class="pj-badge status-{{ j.status }}">{{ j.status }}</span></td>
<td class="muted">{{ j.worker_host or '-' }}</td>
<td class="muted">
{% if j.started_at and j.finished_at %}
{{ j.finished_at[11:16] if j.finished_at else '' }}
{% elif j.started_at %}
{{ j.started_at[11:16] }} →
{% else %}-{% endif %}
</td>
</tr>
{% if j.error_msg %}
<tr class="pj-err-row"><td colspan="6" class="err" style="font-size:0.72rem;padding:2px 8px">{{ j.error_msg[:120] }}</td></tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
{% endif %}