Files
patrick 5ecd143535 Feature: HTMX + Jinja2 Frontend ersetzt Next.js komplett
- Kein Node.js, kein npm, kein Build-Schritt mehr
- HTMX 2.0.4 + PicoCSS 2 vendored in backend/static/
- Jinja2 Templates für alle 9 Seiten (Dashboard, ZFS, Snapshots,
  Shares, Identities, Logs, Services, Navigator, Login)
- HTMX Fragments für Live-Updates (30s Polling Dashboard)
- JWT als httpOnly Cookie statt localStorage
- Disk Usage zeigt TB/PB korrekt (Jinja2 serverseitig formatiert)
- Update-safe: nur Python-Deps, keine npm-Abhängigkeiten

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 18:45:46 +02:00

30 lines
1.4 KiB
HTML

{% macro fmt_bytes(b) %}
{%- if b == 0 %}0 B
{%- elif b < 1048576 %}{{ "%.1f"|format(b/1024) }} KB
{%- elif b < 1073741824 %}{{ "%.1f"|format(b/1048576) }} MB
{%- elif b < 1099511627776 %}{{ "%.1f"|format(b/1073741824) }} GB
{%- else %}{{ "%.1f"|format(b/1099511627776) }} TB
{%- endif %}
{%- endmacro %}
{% if not filesystems %}
<p>Keine Dateisysteme gefunden.</p>
{% else %}
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem">
{% for fs in filesystems %}
<article style="margin:0;padding:1rem">
<strong>{{ fs.mountpoint }}</strong>
<div class="progress-bar-wrap" style="margin:0.4rem 0">
<div class="progress-bar {% if fs.capacity > 85 %}bar-red{% elif fs.capacity > 70 %}bar-yellow{% else %}bar-blue{% endif %}" style="width:{{ fs.capacity }}%"></div>
</div>
<div style="display:grid;grid-template-columns:1fr 1fr 1fr;font-size:0.8rem;gap:0.25rem">
<div><div style="color:var(--pico-muted-color)">Total</div><strong>{{ fmt_bytes(fs.total) }}</strong></div>
<div><div style="color:var(--pico-muted-color)">Belegt</div><strong>{{ fmt_bytes(fs.used) }}</strong></div>
<div><div style="color:var(--pico-muted-color)">Frei</div><strong>{{ fmt_bytes(fs.available) }}</strong></div>
</div>
<small style="color:var(--pico-muted-color)">{{ fs.filesystem }}</small>
</article>
{% endfor %}
</div>
{% endif %}