Files
ottyl/tickets/020-alerts-webapp-ui.md
T
2026-09-05 16:17:18 +01:00

1.7 KiB

020 — Alerts webapp UI

Summary

A webapp page for managing AlertRules (017) end to end: create/edit/enable/delete rules and configure their ntfy sink, without touching settings.json by hand.

Scope

  • A new route/panel (matching how Dashboards/Metrics are already surfaced in App.tsx) listing existing alert rules: name, condition summary, enabled state.
  • A rule editor:
    • Condition type picker (Immediate / Threshold / New value / Ratio, see 018) with type-specific fields, reusing FilterBar's query input for the query-based conditions rather than a separate text field.
    • Ntfy sink fields: topic and optional server override.
    • Enabled toggle.
  • "Send test notification" button wired to the sink delivery endpoint from 019, so a topic/server can be verified without waiting for a real trigger.
  • Contextual "?" help icons on the condition-type picker and sink fields, matching 021's pattern.

Acceptance criteria

  • Rules created/edited/deleted in the UI persist across a page reload (i.e. round-trip through the CRUD endpoints from 017).
  • Each condition type's fields validate before save (e.g. Ratio requires two queries and a threshold).
  • "Send test notification" delivers to the currently-entered topic/server without requiring the rule to be saved first.

Depends on