{{ define "main" }}
{{ $length := len .Checks }} {{ if eq $length 0 }}

There are no checks yet.

Create a check to check your services and get notified when they are down.

{{ else }} {{ if or (eq .Status "UNKNOWN") (eq .Status "SUCCESS") }}

All services are online

Last updated on {{ Now.UTC.Format "Jan 02 at 15:04 MST" }}

{{ else if eq .Status "INCIDENT" }}

Incident in progress

Last updated on {{ Now.UTC.Format "Jan 02 at 15:04 MST" }}

{{ else }}

Degraded performance

Last updated on {{ Now.UTC.Format "Jan 02 at 15:04 MST" }}

{{ end }}
{{ range $group, $checksAndStatus := .Checks }}
{{ if eq $checksAndStatus.Status "SUCCESS" }} {{ else if eq $checksAndStatus.Status "FAILURE" }} {{ else }} {{ end }}

{{ $group }}

{{ range $checksAndStatus.Checks }}
{{ if eq .Status "SUCCESS" }} {{ else if eq .Status "FAILURE" }} {{ else }} {{ end }}

{{ .Name }}

{{ .History.Uptime }}% uptime
{{ range .History.List }}
{{ if eq .Status "SUCCESS" }}
{{ else if eq .Status "FAILURE" }}
{{ else }}
{{ end }}
{{ end }}
{{ if eq $.TimeRange "90days" }} 90 days ago {{ else if eq $.TimeRange "48hours" }} 48 hours ago {{ else if eq $.TimeRange "90minutes" }} 90 minutes ago {{ end }}
Now
{{ end }}
{{ end }}
{{ end }}
{{ end }}