spearhead-statuskit/site/layouts/partials/systems.html
2017-08-30 19:00:58 -06:00

29 lines
975 B
HTML

{{ $okAlert := index .content.Site.Data.severity.alerts "ok"}}
{{ $okDesc := index .content.Site.Data.severity.descriptions "ok" }}
{{ with .content.Site.Params.systems }}
<div class="systems">
{{ range . }}
{{ $name := . }}
<div class="system-operational">
<div class="card">
{{- $name -}}
{{ if $.incidents }}
{{ range $.incidents }}
{{ if in .Params.affectedsystems $name }}
{{ $alert := index .Site.Data.severity.alerts .Params.severity }}
{{ $desc := index .Site.Data.severity.descriptions .Params.severity }}
{{ partial "status-badge" (dict "alert" $alert "description" $desc) }}
{{ else }}
{{ partial "status-badge" (dict "alert" $okAlert "description" $okDesc) }}
{{ end }}
{{ end }}
{{ else }}
{{ partial "status-badge" (dict "alert" $okAlert "description" $okDesc) }}
{{ end }}
</div>
</div>
{{ end }}
</div>
{{ end }}