The API keeps the latest success per monitor and region and failures, thinned to one per five minutes while the error stays the same, for UPTIME_RETENTION_EVIDENCE (30 days). Monitor pages link evidence from the recent checks; a page shows timing, redirect chain with headers, certificate and the body as text. Readers see none of it, since responses may contain personal data or secrets. Closes #79 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
16 lines
340 B
Go
16 lines
340 B
Go
package web
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/a-h/templ"
|
|
)
|
|
|
|
var timingColors = []string{"bg-ink/30", "bg-ink/45", "bg-ink/60", "bg-maintenance", "bg-up"}
|
|
|
|
func timingColor(i int) string { return timingColors[i%len(timingColors)] }
|
|
|
|
func widthStyle(percent float64) templ.SafeCSS {
|
|
return templ.SafeCSS(fmt.Sprintf("width:%.2f%%", percent))
|
|
}
|