Commit daa50fc
committed
feat(alerts): edit existing cluster alerts in-place (#618)
Automation > Alerts only offered enable/disable + delete; changing a rule
meant delete-and-recreate. Add an Edit action that opens the create modal
pre-filled with the alert's current config and saves via the existing
PUT /api/clusters/<id>/alerts/<id> endpoint — no delete/recreate.
Frontend-only; the backend PUT already supports every field:
- Edit button on each alert row (next to delete)
- openEditAlert() pre-fills name/target/metric/operator/threshold/channels/
severity/escalation; modal title + submit button switch to edit mode
- submit branches: editingAlert -> PUT (keeps current enabled), else POST
- form remounts by key so defaultValues re-apply; New Alert resets to create
- new i18n key alertUpdated in all 8 language blocks (editAlert already existed)
Verified live (create -> PUT-edit -> readback): every field updated, enabled
preserved. Rebuilt web/index.html.
Refs #6181 parent 43f892f commit daa50fc
3 files changed
Lines changed: 94 additions & 34 deletions
0 commit comments