feat(console): set an incident's status right in the incident list
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 12m19s
ci / test (pull_request) Successful in 12m58s
ci / build (pull_request) Successful in 15m32s
ci / image (pull_request) Successful in 4m29s

Each row of the incident list offers "Set status" to those who may write
the monitor's incidents: a status (built-in or own, the next one
preselected), an optional message and whether it shows on status pages.
An update may now just change the status, without a message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-23 23:57:05 +01:00
1 parent 2409a919c3
commit 437b6e934f
9 files changed
+1966 -1693

No files matched your search

+7 -3
View File
@@ -909,12 +909,16 @@ func (s *Server) incidentsView(c *gin.Context, p *principal, page web.Page, me w
if err != nil {
return nil, err
}
v := web.IncidentsView{Rows: make([]web.IncidentRow, len(rows)), Pager: pager(c, info)}
v := web.IncidentsView{Rows: make([]web.IncidentRow, len(rows)), Pager: pager(c, info), Custom: d.statuses.list()}
for i, r := range rows {
v.Rows[i] = d.incidentRow(store.Incident{
inc := store.Incident{
ID: r.ID, OrgID: r.OrgID, MonitorID: r.MonitorID, StartedAt: r.StartedAt, ResolvedAt: r.ResolvedAt, Cause: r.Cause,
Title: r.Title, Status: r.Status, StatusID: r.StatusID,
}, r.MonitorName)
}
v.Rows[i] = d.incidentRow(inc, r.MonitorName)
// Whoever may write the monitor's incidents sets the status here.
v.Rows[i].CanWrite = canInGroup(p, authz.IncidentsWrite, d.tree, d.byID[r.MonitorID].GroupID)
v.Rows[i].NextStatus = nextIncidentStatus(inc)
}
if monitor != nil {
if m, ok := d.byID[*monitor]; ok {