feat: pipeline monitor + orchestrator stats dashboard
This commit is contained in:
@@ -12,6 +12,33 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if orchestrator %}
|
||||
<div class="worker {% if not orchestrator.online %}offline{% endif %}" style="margin-bottom:0.75rem">
|
||||
<div class="hdr">
|
||||
<b>{{ orchestrator.role }}</b>
|
||||
<span class="gpu">orchestrateur</span>
|
||||
<span class="state">{% if orchestrator.online %}online{% else %}offline{% endif %}</span>
|
||||
</div>
|
||||
{% if orchestrator.online %}
|
||||
<div class="bar">
|
||||
<span>CPU</span>
|
||||
<span style="font-size:0.8rem;color:var(--accent)">{{ orchestrator.cpu_load or '?' }}</span>
|
||||
</div>
|
||||
<div class="bar">
|
||||
<span>RAM</span>
|
||||
<progress value="{{ orchestrator.ram_used_mib or 0 }}" max="{{ orchestrator.ram_total_mib or 1 }}"></progress>
|
||||
<small>{{ orchestrator.ram_used_mib or '?' }} / {{ orchestrator.ram_total_mib or '?' }} MiB</small>
|
||||
</div>
|
||||
<div class="worker-meta">
|
||||
<span class="tag muted">SSD {{ orchestrator.ssd_avail }} dispo</span>
|
||||
<span class="tag muted">{{ orchestrator.ssd_used_pct }} utilise</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="err">{{ orchestrator.error or "unreachable" }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="worker-grid">
|
||||
{% for w in workers %}
|
||||
<div class="worker {% if not w.online %}offline{% endif %}">
|
||||
|
||||
47
app/templates/_pipeline.html
Normal file
47
app/templates/_pipeline.html
Normal 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 %}
|
||||
@@ -18,6 +18,13 @@
|
||||
<p class="muted">Chargement des workers…</p>
|
||||
</section>
|
||||
|
||||
<section id="pipeline">
|
||||
<h2>Pipeline reconstruction</h2>
|
||||
<div hx-get="/partials/pipeline" hx-trigger="load, every 5s" hx-swap="innerHTML">
|
||||
<p class="muted">Chargement pipeline...</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="jobs">
|
||||
<h2>Jobs</h2>
|
||||
<div id="jobs-table" hx-get="/partials/jobs" hx-trigger="load, every 3s" hx-swap="innerHTML">
|
||||
|
||||
Reference in New Issue
Block a user