feat: own incident statuses with a color; incidents before maintenance
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 9m38s
ci / test (pull_request) Successful in 14m21s
ci / build (pull_request) Successful in 16m36s
ci / image (pull_request) Successful in 3m37s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 9m38s
ci / test (pull_request) Successful in 14m21s
ci / build (pull_request) Successful in 16m36s
ci / image (pull_request) Successful in 3m37s
Organizations add statuses of their own, with a name and a color, next to the built-in ones (Settings, incident statuses; API under /org/incident-statuses, managed with org.manage). Updates pick them by ID; the console and status pages show them in their color. Renaming or recoloring carries into the history; a status in use cannot be deleted (409 status_in_use). API responses give status "custom" with status_id, status_name and status_color. Status pages now list recent incidents before planned maintenance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
43a04e99b1
commit
2409a919c3
26 files changed
+1257
-238
No files matched your search
@@ -136,10 +136,18 @@ var endpoints = []endpoint{
|
||||
{method: "PATCH", path: "/api/v1/org/incidents/:id", tag: "Monitors", summary: "Name an incident", perm: "incidents.write",
|
||||
description: "The title status pages show; empty shows the monitor's name.", req: incidentTitleRequest{}, status: http.StatusNoContent},
|
||||
{method: "POST", path: "/api/v1/org/incidents/:id/updates", tag: "Monitors", summary: "Post an update with a status", perm: "incidents.write",
|
||||
description: "`message` is Markdown. `public` (default true) shows it on status pages; false keeps it an internal note. The update's status becomes the incident's.",
|
||||
description: "`status` is a built-in status or the `id` of one of the organization's own. `message` is Markdown. `public` (default true) shows it on status pages; false keeps it an internal note. The update's status becomes the incident's.",
|
||||
req: incidentUpdateRequest{}, resp: incidentUpdateView{}, status: http.StatusCreated},
|
||||
{method: "DELETE", path: "/api/v1/org/incidents/:id/updates/:update", tag: "Monitors", summary: "Delete an update", perm: "incidents.write",
|
||||
status: http.StatusNoContent},
|
||||
{method: "GET", path: "/api/v1/org/incident-statuses", tag: "Monitors", summary: "List the organization's own incident statuses", perm: "incidents.read",
|
||||
resp: obj{"statuses": []incidentStatusView{}}},
|
||||
{method: "POST", path: "/api/v1/org/incident-statuses", tag: "Monitors", summary: "Add an incident status with a color", perm: "org.manage",
|
||||
description: "`color` is `#rrggbb`. Updates use it by its `id` as `status`.", req: incidentStatusRequest{}, resp: incidentStatusView{}, status: http.StatusCreated},
|
||||
{method: "PUT", path: "/api/v1/org/incident-statuses/:id", tag: "Monitors", summary: "Rename or recolor an incident status", perm: "org.manage",
|
||||
description: "Applies to the history of incidents that used it too.", req: incidentStatusRequest{}, status: http.StatusNoContent},
|
||||
{method: "DELETE", path: "/api/v1/org/incident-statuses/:id", tag: "Monitors", summary: "Delete an unused incident status", perm: "org.manage",
|
||||
description: "`409 status_in_use` while updates use it.", status: http.StatusNoContent},
|
||||
|
||||
// Status pages
|
||||
{method: "GET", path: "/api/v1/org/statuspages", tag: "Status pages", summary: "List status pages", resp: obj{"pages": []statusPageView{}}},
|
||||
|
||||
Reference in new issue
Block a user