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
28 lines
780 B
Go
28 lines
780 B
Go
package web
|
|
|
|
import "fmt"
|
|
|
|
const inputClass = "w-full border border-rule bg-transparent px-2.5 py-1.5 text-sm outline-none focus:border-ink"
|
|
|
|
// commonTimeZones are suggested in the time zone field; any IANA name works.
|
|
var commonTimeZones = []string{
|
|
"UTC", "Europe/Berlin", "Europe/Vienna", "Europe/Zurich", "Europe/London", "Europe/Paris",
|
|
"Europe/Amsterdam", "America/New_York", "America/Chicago", "America/Los_Angeles", "Asia/Tokyo", "Asia/Singapore", "Australia/Sydney",
|
|
}
|
|
|
|
func maintenanceAPI(id string) string {
|
|
if id == "" {
|
|
return "/org/maintenance"
|
|
}
|
|
return "/org/maintenance/" + id
|
|
}
|
|
|
|
func maintenanceMethod(id string) string {
|
|
if id == "" {
|
|
return "post"
|
|
}
|
|
return "put"
|
|
}
|
|
|
|
func indent(depth int) string { return fmt.Sprintf("padding-left:%drem", depth) }
|