ui: show pending-hosts panel even when fleet is otherwise empty

The dashboard's empty-state ("No hosts yet.") was gated on
HostCount == 0 alone, which hid the pending-hosts panel — and
the inline accept form — for the most common first-run scenario:
operator just installed an agent that announced, the fleet has
zero accepted hosts, and the only thing the operator needs to do
is review fingerprint + click Accept.

Tighten the gate so the empty state only shows when there are
truly zero hosts and zero pending announces. With a pending
host, fall through to the regular dashboard layout so the
approval queue is visible and actionable.

Caught by the e2e enrol-via-announce smoke test (now unblocked
on PR #23).
This commit is contained in:
2026-05-08 21:47:31 +01:00
parent 68276810ec
commit 4cd36d83e3
+1 -1
View File
@@ -5,7 +5,7 @@
{{$page := .Page}}
{{template "crit_banner" .Page}}
{{if eq $page.HostCount 0}}
{{if and (eq $page.HostCount 0) (eq (len $page.PendingHosts) 0)}}
{{/* ---------- empty state ---------- */}}
<div class="pt-14 pb-24">