feat(firewall-log): Phase 3 — UI /firewall-live mit WS-Stream + Filter + CSV

Neue Page management-ui/src/pages/FirewallLive — Live-Tail der NFLOG-
Events aus /api/v1/firewall/log/live (WebSocket). Features:

- Status-Indicator (Live/getrennt), Auto-Reconnect alle 2s nach Drop
- Filter-Bar (action/proto/src/dst/rule_id) — bei Änderung wird der
  WS neu verbunden, Server schickt frischen Snapshot
- Pause-Toggle: während Pause werden Events gebuffert (max 1000),
  beim Resume in die Tabelle gemerged
- CSV-Export der aktuellen Tabelle (timestamp/rule/action/proto/src/
  dst/iface/size)
- Color-coded Action-Tags (ACCEPT=grün, DROP=rot, REJECT=orange)
- Ring-Buffer 1000 im UI damit die DOM-Last bei Hochlast bleibt
- Sidebar-Eintrag "Firewall-Log" unter Sicherheit (Eye-Icon)
- DE/EN i18n

haproxy: backend api_backend bekommt `timeout tunnel 1h` damit der
WebSocket-Stream nicht nach `timeout server 60s` ohne Events stirbt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-12 21:14:43 +02:00
parent a798d1b796
commit 66187e5b77
11 changed files with 463 additions and 5 deletions

View File

@@ -83,7 +83,11 @@ frontend internal_stats
# ── Backends ───────────────────────────────────────────────────────────
# edgeguard-api itself: management UI, REST API, ACME webroot.
# timeout tunnel 1h: /api/v1/firewall/log/live ist ein langlebiger
# WebSocket-Stream — ohne Tunnel-Override fällt er nach `timeout
# server 60s` ohne Events um.
backend api_backend
timeout tunnel 1h
server api1 127.0.0.1:9443 check
{{- range $b := .Backends}}