Files
checkbot/app/web/alerts.py
T
patrickandClaude Sonnet 5.5 347f55cf7c
test / pytest (3.11) (push) Waiting to run
test / pytest (3.13) (push) Waiting to run
feat: Phase 6c baseline, ack, host alarms, outage notice, send limit, privacy mode, UI link
Includes atomic migrations, per-rule reminder semantics, first-run helper script
and the note on the undecided UI chat idea.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 03:06:23 +01:00

18 lines
797 B
Python

from fastapi import APIRouter, Depends, Request
from ..users import User
from .deps import current_user, render
router = APIRouter()
SUPPRESS_LABELS = {"mute": "Stummschaltung", "downtime": "Downtime", "recovery_aus": "Recovery aus",
"nicht_gemeldet": "Problem war nicht gemeldet", "bestaetigt": "bestätigt",
"host_down": "Host down", "sendelimit": "im Sammelhinweis"}
AI_LABELS = {"pending": "läuft", "done": "fertig", "failed": "nicht verfügbar", "skipped": "übersprungen"}
@router.get("/alerts")
def alerts_page(request: Request, user: User = Depends(current_user)):
entries = request.app.state.runtime.alerts.recent()
return render(request, "alerts.html", user=user, entries=entries, ai_labels=AI_LABELS, suppress_labels=SUPPRESS_LABELS)