1.7 KiB
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/Metricsare already surfaced inApp.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.
- Condition type picker (Immediate / Threshold / New value / Ratio, see
018) with type-specific fields, reusing
- "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.