lazyflat/web/templates/logs.html
Moritz 04b591fa9e ui: slim 4-card strip, admin-only system log, HTMX apply, title cleanup
* Wohnungen header: single slim row with Alert status · Filter summary ·
  Auto-Bewerben toggle · Trockenmodus toggle. Big filter panel removed —
  filters live only in /einstellungen/filter.
* Alert status: 'nicht eingerichtet' until the user has actual filters (+
  valid notification creds if telegram/email). 'aktiv' otherwise.
* Logs tab: admin-only (gated both in layout and server-side). Shows merged
  audit + errors across all users, sorted newest-first, capped at 300.
* Apply, auto-apply, trockenmodus and circuit reset buttons post via HTMX and
  swap the Wohnungen body. While any application is still running for the
  user the poll interval drops from 30s to 3s so status flips to 'beworben'
  or 'fehlgeschlagen' almost immediately.
* Browser tab title is now always 'lazyflat'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 11:25:59 +02:00

27 lines
1.2 KiB
HTML

{% extends "_layout.html" %}
{% block content %}
<section class="card">
<div class="px-4 py-3 border-b border-soft flex items-center justify-between">
<h2 class="font-semibold">System-Log</h2>
<span class="text-xs text-slate-500">{{ events|length }} Einträge (max 300, letzte 14 Tage)</span>
</div>
<div class="divide-y divide-soft">
{% for e in events %}
<div class="px-4 py-2 mono flex items-start gap-3 flex-wrap">
<span class="text-slate-500 shrink-0">{{ e.ts|de_dt }}</span>
{% if e.kind == 'error' %}
<span class="chip chip-bad">{{ e.source }}</span>
{% else %}
<span class="chip chip-info">{{ e.source }}</span>
{% endif %}
<span class="text-slate-700">{{ e.action }}</span>
{% if e.user %}<span class="text-slate-500">user={{ e.user }}</span>{% endif %}
{% if e.details %}<span class="text-slate-500">— {{ e.details }}</span>{% endif %}
{% if e.ip %}<span class="text-slate-400">[{{ e.ip }}]</span>{% endif %}
</div>
{% else %}
<div class="px-4 py-8 text-center text-slate-500">Keine Einträge.</div>
{% endfor %}
</div>
</section>
{% endblock %}