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>
18 lines
797 B
Python
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)
|