Skip to content

feat(ui): Show BMC discovery results on the Device page - #166

Merged
scotwells merged 1 commit into
feat/manual-inventory-recordsfrom
feat/device-discovery-status
Nov 24, 2026
Merged

scotwells merged 1 commit into
feat/manual-inventory-recordsfrom
feat/device-discovery-status

Conversation

@scotwells

@scotwells scotwells commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The Device page now shows what BMC discovery records about a device beside what its spec expects:

  • a BMC chip in the header;
  • expected and observed hardware identity side by side, with disagreements in red;
  • host and BMC network interfaces with their link state;
  • the discovery conditions, the last attempt, the TLS key and its expiry, and whether the key is approved.

If discovery read the hardware through a different endpoint from the one the spec records, the page compares nothing and marks those values amber. No API change is needed.

  • UI typecheck, tests and build pass.
  • Doc link and whitespace checks pass.
  • Discovery screenshots, including 390 px phone views, have no horizontal overflow.

🤖 Generated with Claude Code

@scotwells
scotwells requested a review from a team as a code owner November 24, 2026 14:42
@scotwells
scotwells requested review from ecv and kevwilliams November 24, 2026 14:42
@scotwells

Copy link
Copy Markdown
Contributor Author

Status fields behind each section:

  • Header chip and health chips: status.conditions (Reachable, Authenticated, Discovered, IdentityMatched, PublicKeyUnique).
  • Expected vs observed: spec.identity against status.discovery.inventory.systems[] (serialNumber, model, manufacturer, uuid, sku, powerState). The compared System is chosen as in internal/bmcdiscovery/status.go: by spec system UUID, else serial or SKU, else the only System. Red comes from IdentityMatched SerialMismatch, ModelMismatch or SystemUUIDMismatch, or from the same field rule.
  • Host NICs: systems[].networkInterfaces (id, macAddress, linkStatus, speedMbps), compared with spec.interfaces[].macAddress by address.
  • BMC: inventory.managers[] (id, model, firmwareVersion, networkInterfaces) and serviceRoot (redfishVersion, vendor, product).
  • Health: discovery.lastAttemptAt and lastAttemptEndpoint, tls.publicKeySHA256 and tls.notAfter. Key approval is from Authenticated: True means approved, PinNotApproved means not approved, and PinMismatch is red.

API-side evidence that nothing blocks the UI:

  • ui/provider/src/lib/api.ts fetchInventory / fetchInventoryCollection pass raw list items to toInventory without picking fields, so status is kept.
  • The staff-portal proxy forwards the upstream body in a data envelope (see the retained host source evidence in docs/development/staff-inventory-ui.md).
  • config/components/inventory/roles/viewer.yaml grants fleet.datumapis.com/devices.get, devices.list and devices.watch.
  • config/components/inventory/crds/fleet.datumapis.com.yaml declares the Device status subresource with a full discovery and conditions schema, so status is not pruned.

@scotwells scotwells changed the title Show BMC discovery results on the staff Device page feat(ui): Show BMC discovery results on the Device page Nov 24, 2026
The Device page showed nothing BMC discovery writes to Device.status.
Hardware & management now compares spec identity with the observed
System, lists host and BMC NICs with link state, and shows discovery
health: the five conditions, last attempt, TLS key, expiry and
approval. The header strip gains one BMC chip. Comparisons mirror
internal/bmcdiscovery so the page marks what IdentityMatched does.

When the retained inventory was read from an endpoint other than
spec.bmc.endpoint, or spec records none, discovery reports
IdentityMatched Unknown with StaleObservation. The page then compares
nothing: observed values and a TLS key read from another endpoint are
amber, with the endpoints in the tooltip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/device-discovery-status branch from e02ad88 to c76bde6 Compare November 24, 2026 14:49
@scotwells
scotwells merged commit 261282a into feat/manual-inventory-records Nov 24, 2026
11 checks passed
@scotwells
scotwells deleted the feat/device-discovery-status branch November 24, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant