truenas-burnin/app/templates/dashboard.html
Brandon Walter b73b5251ae Initial commit — TrueNAS Burn-In Dashboard v0.5.0
Full-stack burn-in orchestration dashboard (Stages 1–6d complete):
FastAPI backend, SQLite/WAL, SSE live dashboard, mock TrueNAS server,
SMTP/webhook notifications, batch burn-in, settings UI, audit log,
stats page, cancel SMART/burn-in, drag-to-reorder stages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 00:08:29 -05:00

74 lines
2.8 KiB
HTML

{% extends "layout.html" %}
{% block title %}TrueNAS Burn-In — Dashboard{% endblock %}
{% block content %}
{% include "components/modal_start.html" %}
{% include "components/modal_batch.html" %}
<!-- Stats bar — counts are updated live by app.js updateCounts() -->
<div class="stats-bar">
<div class="stat-card" data-stat-filter="all">
<span class="stat-value" id="stat-all">{{ drives | length }}</span>
<span class="stat-label">Drives</span>
</div>
<div class="stat-card stat-running" data-stat-filter="running">
<span class="stat-value" id="stat-running">0</span>
<span class="stat-label">Running</span>
</div>
<a class="stat-card stat-failed" href="/history?state=failed" data-stat-filter="failed">
<span class="stat-value" id="stat-failed">0</span>
<span class="stat-label">Failed</span>
</a>
<div class="stat-card stat-passed" data-stat-filter="passed">
<span class="stat-value" id="stat-passed">0</span>
<span class="stat-label">Passed</span>
</div>
<div class="stat-card stat-idle" data-stat-filter="idle">
<span class="stat-value" id="stat-idle">0</span>
<span class="stat-label">Idle</span>
</div>
</div>
<!-- Failed drive banner — shown/hidden by JS when failed count > 0 -->
<div id="failed-banner" class="banner banner-error" hidden>
<strong><span class="failed-count">0</span> drive(s)</strong> have failed tests —
<a href="/history?state=failed" style="color:inherit;text-decoration:underline">View history</a>
</div>
<div class="filter-bar" id="filter-bar">
<button class="filter-btn active" data-filter="all">
All <span class="badge">0</span>
</button>
<button class="filter-btn" data-filter="running">
Running <span class="badge">0</span>
</button>
<button class="filter-btn" data-filter="failed">
Failed <span class="badge">0</span>
</button>
<button class="filter-btn" data-filter="passed">
Passed <span class="badge">0</span>
</button>
<button class="filter-btn" data-filter="idle">
Idle <span class="badge">0</span>
</button>
<!-- Batch start bar (hidden until checkboxes are selected) -->
<div id="batch-bar" class="batch-bar" hidden>
<span class="batch-count-label"><span id="batch-count">0</span> selected</span>
<button class="btn-batch-start" id="batch-start-btn">Start Burn-In</button>
<button class="btn-batch-clear" id="batch-clear-btn">Clear</button>
</div>
<!-- Cancel all running burn-ins (shown by JS when any burn-in is active) -->
<button class="btn-cancel-all" id="cancel-all-btn" hidden title="Cancel all running and queued burn-in jobs">✕ Cancel All Burn-Ins</button>
</div>
<div class="table-wrap">
<div hx-ext="sse" sse-connect="/sse/drives">
<div id="drives-table-wrap" sse-swap="drives-update" hx-swap="innerHTML">
{% include "components/drives_table.html" %}
</div>
</div>
</div>
{% endblock %}