ui: dashboard crit-alerts banner

This commit is contained in:
2026-05-04 20:29:49 +01:00
parent e0847517a8
commit b25f96e465
4 changed files with 30 additions and 8 deletions
+1
View File
@@ -4,6 +4,7 @@
<div class="max-w-[1280px] mx-auto px-8">
{{$page := .Page}}
{{template "crit_banner" .Page}}
{{if eq $page.HostCount 0}}
{{/* ---------- empty state ---------- */}}
+13
View File
@@ -0,0 +1,13 @@
{{define "crit_banner"}}
{{if gt .CritOpenCount 0}}
<div class="crit-banner flex items-center justify-between mb-4 px-4 py-2.5 rounded-md text-[13px]"
style="border: 1px solid color-mix(in oklch, var(--bad), transparent 60%);
background: color-mix(in oklch, var(--bad), transparent 88%);">
<div class="flex items-center gap-3">
<span class="dot dot-critical"></span>
<span><span class="text-bad font-medium">{{.CritOpenCount}} critical alert{{if ne .CritOpenCount 1}}s{{end}}</span> open across the fleet</span>
</div>
<a href="/alerts?severity=critical&status=open" class="btn btn-danger">Review →</a>
</div>
{{end}}
{{end}}