Commit Graph

32 Commits

Author SHA1 Message Date
rcourtman 5d4f51c027 Key TrueNAS systems by configured connection, not reported hostname
Two TrueNAS systems that report the same hostname collapsed into one
flapping resource (#1573, #1575): systemSourceID keyed the system by the
snapshot-reported hostname, every child pool/dataset/app/VM/share/disk
was scoped under it, and the client minted the system's machine key from
the DMI serial with a hostname fallback, so serial-less systems sharing
a hostname (and DR clones sharing a serial) also fully merged in the
identity matcher.

The system source ID now scopes to the connection ID the poller passes
through NewLiveProviderForConnection; the hostname arm survives only for
fixture snapshots, which carry no connection. The ingest identity drops
the machine key entirely (DR clones share DMI serials, and vendor
placeholder serials collide across unrelated machines), the client no
longer falls back to the hostname for MachineID, and ingest skips
identity-pin completion for SourceTrueNAS so a stale pre-fix pin or a
same-named agent host's pin cannot lend the system a machine key and
re-merge what connection scoping keeps apart. Agent.AgentID and the
native metric history keys follow the source ID minus its system:
prefix, so BuildMetricsTarget keeps resolving one series.

Rows minted under the retired hostname-keyed derivation re-key once via
record-declared succession: records name their old canonical IDs in
IngestRecord.SupersededCanonicalIDs and IngestRecords applies the
existing ApplyCanonicalIDSuccessions semantics (operator state and
action audits re-key, the superseded pin drops, never while the old ID
still belongs to a live resource, journal rows are never rewritten).
Alert identities and persisted metric series under old child IDs are
not re-keyed: active alerts re-arm under the new IDs and TrueNAS host
charts are backed by native read-through history.
2026-07-14 11:51:55 +01:00
rcourtman 92524e1c27 Harden CodeQL storage and integer boundaries 2026-07-09 17:37:08 +01:00
rcourtman c8dc45577c Emit TrueNAS pool status incidents 2026-06-29 22:54:19 +01:00
rcourtman c05eed4306 Fix TrueNAS unavailable SMART disk health
Refs #1474

Separate TrueNAS native disk state from SMART health so null or unavailable smart_status projects as UNKNOWN without replacement risk, while explicit SMART failure and native failure states still alert.

Proof:

- go test ./internal/truenas ./internal/unifiedresources ./internal/storagehealth

- npm --prefix frontend-modern test -- src/features/storageBackups/__tests__/diskPresentation.test.ts
2026-05-28 12:53:46 +01:00
rcourtman 9ef4e588b7 Add TrueNAS services and stabilize dev startup 2026-05-21 12:08:25 +01:00
rcourtman 179f88d721 Align TrueNAS storage with native queries 2026-05-21 10:39:36 +01:00
rcourtman 6293d6b312 Align TrueNAS protection with native queries 2026-05-21 10:28:50 +01:00
rcourtman e189733434 Align TrueNAS apps with native app.query 2026-05-21 10:23:48 +01:00
rcourtman 497390ff95 Scope TrueNAS resources by appliance
Scope TrueNAS child source IDs under the system source key so duplicate pool, dataset, app, VM, share, and disk names from different appliances do not merge.

Use the resulting hierarchy for per-system TrueNAS overview counts and scoped mock metric targets.
2026-05-21 00:59:00 +01:00
rcourtman 0801ede8c3 Add native TrueNAS network share inventory 2026-05-20 23:50:37 +01:00
rcourtman 3fa46aa836 Add native TrueNAS VM inventory to overview
Project TrueNAS vm.query inventory into canonical VM resources and render it on the TrueNAS overview.
2026-05-20 22:32:46 +01:00
rcourtman 2202f36674 Rebuild TrueNAS overview around native app API data
Project TrueNAS app.query data into the unified resource contract and render the TrueNAS overview apps table from that native facet.

Keep Docker metadata as the runtime compatibility fallback for shared container tooling.
2026-05-20 21:54:40 +01:00
rcourtman f0ad7f1284 Fix TrueNAS fractional uptime decoding
Refs #1469
2026-05-18 23:12:27 +01:00
rcourtman 5b94724bf2 truenas: bespoke Systems + Disks tables; project uptime/temp on the system row
Audit pass on the TrueNAS pages turned up three concrete issues:

1. **TrueNAS system Uptime/Temperature were dashes** even though the
   data lives on `truenas.uptimeSeconds` and on the
   `agent.temperature` max-sensor projection. The system row is
   emitted by `internal/truenas/provider.go::truenasRecordsFromSnapshot`,
   which is a separate path from the host/node adapters that the
   prior commit (c7bdd11e0) updated. Project the same top-level
   `Resource.Uptime` and `Resource.Temperature` here so the canonical
   table renders real values (live mock now reports `uptime: 3628800,
   temperature: 61.5` on the TrueNAS appliance row).

2. **The Systems tab needed NAS-native columns.** A TrueNAS appliance
   is a storage box — operators want at-a-glance pool / dataset /
   disk / app counts on the same row as CPU / Memory / Storage /
   Temperature / Uptime. New `TrueNASSystemsTable` reuses canonical
   shared primitives (Card, Table, SearchInput, FilterButtonGroup,
   StatusDot) and computes per-system child counts client-side from
   the same TrueNAS scope already fetched by the page.

3. **Physical disks weren't surfaced anywhere on the page**, even
   though the canonical TrueNAS adapter emits SMART-instrumented
   `physical_disk` rows with model / serial / size / health /
   temperature / wearout. Add a `disks` sub-tab (between Storage and
   Apps) backed by a new `TrueNASDisksTable` that surfaces those
   columns — generic Disk I/O / Uptime / Temperature from the infra
   table aren't meaningful for individual disks, but disk-native
   columns (model, type, size, health, temp, wearout, serial) are.

Browser verification (Playwright, chromium, live mock-mode dev runtime):
- 9 tests pass. The every-sub-tab operator-controls audit now covers
  /truenas/disks too; the search input on every TrueNAS sub-tab is
  the canonical SearchInput primitive.

Targeted vitest: `src/features/truenas/__tests__/truenasPageModel.test.ts`
(2 tests) green — covers the four-tab spec and the new `disks`
bucket on the page model.

Targeted Go: `go test ./internal/truenas/...` green.

Contract-neutral bypass: PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT set.
This completes the platform-page column-fit audit for TrueNAS. New
top-level `Resource.Uptime` / `Resource.Temperature` projection is
strictly additive (already documented as the adapter responsibility
in unified-resources.md by c7bdd11e0). The two new bespoke tables
live inside features/truenas/ and reuse canonical primitives only.
2026-05-16 12:51:36 +01:00
rcourtman 2b9b1ec573 Fix TrueNAS system info buildtime decoding
Fixes #1469
2026-05-15 14:21:39 +01:00
rcourtman a3f99a271b Curate demo-facing mock data across platform views 2026-03-31 18:05:55 +01:00
rcourtman a09f61d214 Modernize platform mock runtime fixtures 2026-03-31 13:36:11 +01:00
rcourtman d3d242cc50 fix(truenas): make api integration default-on 2026-03-30 09:05:57 +01:00
rcourtman b51498e578 fix(truenas): project smart disk health into canonical risk 2026-03-30 04:45:22 +01:00
rcourtman 65d386bbd9 feat(truenas): add native host chart fallback 2026-03-29 21:35:05 +01:00
rcourtman a71f370731 feat(truenas): add native disk chart fallback 2026-03-29 21:17:51 +01:00
rcourtman eebf5bd678 feat(truenas): project aggregate disk temperatures 2026-03-29 21:02:52 +01:00
rcourtman 8590a7b17c feat(truenas): add reporting fallback for disk temperatures 2026-03-29 20:48:15 +01:00
rcourtman 56c14ca19f feat(ai): add canonical truenas app config reads 2026-03-29 20:36:43 +01:00
rcourtman 298b23626b feat(ai): add canonical truenas app log reads 2026-03-29 20:13:39 +01:00
rcourtman b0ba88d541 feat(ai): add canonical truenas app control 2026-03-29 19:50:31 +01:00
rcourtman 20a16d5edd feat(truenas): project cpu temperatures into host sensors 2026-03-29 19:00:21 +01:00
rcourtman 16f976537f feat(truenas): project system telemetry through canonical host history 2026-03-29 17:56:42 +01:00
rcourtman e14ddcf348 feat(truenas): project app stats through canonical workload history 2026-03-29 17:17:57 +01:00
rcourtman 0de0245ea1 feat(truenas): ingest apps as canonical workloads 2026-03-29 16:04:09 +01:00
rcourtman e403dc02c3 feat(truenas): ingest api-backed disk temperatures 2026-03-29 14:57:09 +01:00
rcourtman 778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00