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:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{{$page := .Page}}
|
{{$page := .Page}}
|
||||||
{{template "crit_banner" .Page}}
|
{{template "crit_banner" .Page}}
|
||||||
{{if eq $page.HostCount 0}}
|
{{if and (eq $page.HostCount 0) (eq (len $page.PendingHosts) 0)}}
|
||||||
|
|
||||||
{{/* ---------- empty state ---------- */}}
|
{{/* ---------- empty state ---------- */}}
|
||||||
<div class="pt-14 pb-24">
|
<div class="pt-14 pb-24">
|
||||||
|
|||||||
Reference in New Issue
Block a user