feat(web): dashboard redesign — Gitea palette, health panels, VM/audit enrichment (stages A–C)
Stage A: swap CSS tokens to the real Gitea dark palette (accent blue #4183c4); add Jinja formatting filters (humanbytes/duration/relative_time/localtime/shorten_path/thousands), a health status-header, and an inline SVG icon sprite; fix two UI bugs — unthemed action pages (htmx swap into #action-slot with a full-page HX-Request fallback) and polling wiping form input (hx-preserve). Stage B: four read-only panels that degrade to notices (never 500) — host resources (/proc, two-sample CPU%), VMware module health, template inventory (.vmem warn + last backup), and a path-contained file browser; backup card becomes a validated template dropdown; expensive dir-size walk is TTL-cached. Adds operations/inventory.py plus host_resources()/vmware_module_health() in operations/host.py. Stage C: parse_clone_name() adds a Job column (job_id + started) to the VM table; nav gains a Gitea link-out derived from the OIDC issuer origin (no fabricated run URLs); audit page gets action icons, relative time, and a client-side filter. Gates: 989 tests pass, coverage 94.12%, ruff + mypy --strict clean. Stage D (service management) intentionally deferred.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
{#
|
||||
Inline SVG icon sprite (A6). One copy per page (included once from
|
||||
base.html), visually hidden -- every icon elsewhere is a
|
||||
<svg class="icon"><use href="#i-...">. No external requests: this is the
|
||||
entire icon set, vendored as markup, not a font/CDN.
|
||||
#}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" style="display:none"
|
||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<symbol id="i-server" viewBox="0 0 24 24">
|
||||
<rect x="2" y="3" width="20" height="7" rx="1.5"></rect>
|
||||
<rect x="2" y="14" width="20" height="7" rx="1.5"></rect>
|
||||
<line x1="6" y1="6.5" x2="6.01" y2="6.5"></line>
|
||||
<line x1="6" y1="17.5" x2="6.01" y2="17.5"></line>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-disk" viewBox="0 0 24 24">
|
||||
<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse>
|
||||
<path d="M3 5v6c0 1.66 4.03 3 9 3s9-1.34 9-3V5"></path>
|
||||
<path d="M3 11v6c0 1.66 4.03 3 9 3s9-1.34 9-3v-6"></path>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-cpu" viewBox="0 0 24 24">
|
||||
<rect x="6" y="6" width="12" height="12" rx="1.5"></rect>
|
||||
<rect x="10" y="1.5" width="4" height="3"></rect>
|
||||
<rect x="10" y="19.5" width="4" height="3"></rect>
|
||||
<rect x="1.5" y="10" width="3" height="4"></rect>
|
||||
<rect x="19.5" y="10" width="3" height="4"></rect>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-box" viewBox="0 0 24 24">
|
||||
<path d="M21 8l-9-5-9 5 9 5 9-5z"></path>
|
||||
<path d="M3 8v8l9 5 9-5V8"></path>
|
||||
<line x1="12" y1="13" x2="12" y2="21"></line>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-gear" viewBox="0 0 24 24">
|
||||
<circle cx="12" cy="12" r="3"></circle>
|
||||
<path d="M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1"></path>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-file" viewBox="0 0 24 24">
|
||||
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"></path>
|
||||
<path d="M14 2v6h6"></path>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-external" viewBox="0 0 24 24">
|
||||
<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path>
|
||||
<path d="M15 3h6v6"></path>
|
||||
<path d="M10 14L21 3"></path>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-check" viewBox="0 0 24 24">
|
||||
<path d="M20 6L9 17l-5-5"></path>
|
||||
</symbol>
|
||||
|
||||
<symbol id="i-alert" viewBox="0 0 24 24">
|
||||
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"></path>
|
||||
<line x1="12" y1="9" x2="12" y2="13"></line>
|
||||
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
||||
</symbol>
|
||||
</svg>
|
||||
Reference in New Issue
Block a user