{{/* we expect 0 or 1 root control runs */}} {{ range .Root.ControlRuns -}} {{ template "control_run_template" . -}} {{ end }} {{/* we expect 0 or 1 root groups */}} {{ range .Root.Groups -}} {{ template "root_group_template" . -}} {{ end }}
{{ define "root_summary" }}
TOTAL {{ asstr .TotalCount }}
✅ OK {{ .Ok }}
⇨ Skip {{ .Skip }}
ℹ Info {{ .Info }}
❌ Alarm {{ .Alarm }}
❗ Error {{ .Error }}
{{ end }} {{ define "summary" }}
OK Skip Info Alarm Error Total
{{ .Ok }} {{ .Skip }} {{ .Info }} {{ .Alarm }} {{ .Error }} {{ asstr .TotalCount }}
{{ end }} {{ define "root_group_template"}}

{{ .Title }}

{{ template "root_summary" .Summary.Status }} {{ if .ControlRuns }} {{ range .ControlRuns}} {{ template "control_run_template" . }} {{ end }} {{ end }} {{ range .Groups }} {{ template "group_template" . }} {{ end }}
{{ end }} {{ define "group_template"}}

{{ .Title }}

{{ template "summary" .Summary.Status }} {{ if .ControlRuns }} {{ range .ControlRuns}} {{ template "control_run_template" . }} {{ end }} {{ end }} {{ range .Groups }} {{ template "group_template" . }} {{ end }}
{{ end }} {{ define "control_run_template"}}

{{ .Title }}

{{ if .Description }}

{{ .Description }}

{{ end }} {{ template "summary" .Summary }} {{ if .GetError }}
{{ .GetError }}
{{ else }} {{ $length := len .Rows }} {{ if gt $length 0 }} {{ template "control_run_table_template" . }} {{ end }} {{ end }}
{{ end }} {{ define "control_run_table_template" }} {{ range .Rows }} {{ template "control_run_table_row_template" . }} {{ end }}
Reason Dimensions
{{ end }} {{ define "control_run_table_row_template" }} {{ statusicon .Status }} {{ .Reason }} {{ range .Dimensions }} {{ .Value }} {{ end }} {{ end }}