Overview
The stats frame uses an empty units array for two different situations: "this server
genuinely has no container Quadlet units" and "unit state was never collected". The
frontend has a distinct no-data presentation for the second case, but the backend can
never trigger it.
Details
Use Case / Steps:
- Have the poller fail to collect unit state for a server (SSH scan fails, or the
scope has no units to query).
- Open the Monitor tab and select that server.
- The glance bar shows a confident 0 / 0 / 0 rather than the no-data placeholder.
Expected vs Actual:
- Expected: A server whose unit state could not be determined shows the placeholder
dash, distinguishing "not measured" from "measured, and the answer is zero".
- Actual: Both cases render 0, so an unmeasured server is indistinguishable from an
empty one.
Details:
updateSummaryStrip (static/main.js:1772-1787) reaches its placeholder branch only
when units is undefined or null; the placeholder markup lives at
templates/dashboard.html:115-127. The backend never emits either value: when
_build_first_command (services/stats_engine.py:282-284) finds no unit names it
silently returns the plain podman ps command, unit_states_by_scope[scope] is set to
{} (:470), and the comprehension at :473-484 flattens that to a present-but-empty
list in the published payload (:486-491).
Scope:
Have the engine omit the units key (or emit null) when unit state was not collected,
while continuing to emit [] when it was collected and found nothing. This makes the
existing frontend placeholder path reachable without changing updateSummaryStrip.
Sequenced after #317, the inventory reconciler under #281. Until the quadlets table is actually populated, every server would hit the not-measured placeholder, which relabels a total outage rather than fixing it.
Overview
The stats frame uses an empty
unitsarray for two different situations: "this servergenuinely has no container Quadlet units" and "unit state was never collected". The
frontend has a distinct no-data presentation for the second case, but the backend can
never trigger it.
Details
Use Case / Steps:
scope has no units to query).
Expected vs Actual:
dash, distinguishing "not measured" from "measured, and the answer is zero".
empty one.
Details:
updateSummaryStrip(static/main.js:1772-1787) reaches its placeholder branch onlywhen
unitsisundefinedornull; the placeholder markup lives attemplates/dashboard.html:115-127. The backend never emits either value: when_build_first_command(services/stats_engine.py:282-284) finds no unit names itsilently returns the plain
podman pscommand,unit_states_by_scope[scope]is set to{}(:470), and the comprehension at:473-484flattens that to a present-but-emptylist in the published payload (
:486-491).Scope:
Have the engine omit the
unitskey (or emitnull) when unit state was not collected,while continuing to emit
[]when it was collected and found nothing. This makes theexisting frontend placeholder path reachable without changing
updateSummaryStrip.Sequenced after #317, the inventory reconciler under #281. Until the
quadletstable is actually populated, every server would hit the not-measured placeholder, which relabels a total outage rather than fixing it.