feat: maintenance windows and Markdown descriptions
Monitors and groups get one-off or recurring maintenance. While it is in progress, failures neither open incidents nor alert, so the SLA is not affected; successes still resolve earlier incidents. The console shows monitors under maintenance and lists windows on a new page and on monitor pages. Status pages announce maintenance in progress and planned for the next two weeks and mark affected components; the occurrences are part of the snapshot and evaluated when the page is shown, so this also works from cache during an API outage. Maintenance and status page descriptions are rendered as Markdown. Closes #71 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
259b3b8e05
commit
43b0a35f20
28 files changed
+3918
-894
No files matched your search
@@ -19,6 +19,18 @@ type PublicAssets struct {
|
||||
// "/acme/" or "/" on a custom domain. Empty leaves them out, as in a
|
||||
// single-file export, which can only link elsewhere.
|
||||
LegalBase string
|
||||
// Now is the moment the page shows, deciding which maintenance is in
|
||||
// progress.
|
||||
Now time.Time
|
||||
}
|
||||
|
||||
// Markdown renders src for display, or returns "" when it cannot.
|
||||
func Markdown(src string) string {
|
||||
html, err := RenderMarkdown(src)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return html
|
||||
}
|
||||
|
||||
// StylesheetText returns the built stylesheet for inlining.
|
||||
@@ -49,6 +61,8 @@ func PageStatus(s string) Status {
|
||||
return StatusDegraded
|
||||
case agentapi.PageOutage:
|
||||
return StatusDown
|
||||
case agentapi.PageUnderMaintenance:
|
||||
return StatusMaintenance
|
||||
}
|
||||
return StatusUnknown
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user