Pulse/internal/models
rcourtman 61fce38a71 alerts(history): carry alert metadata to the frontend so resourceType resolves
The alert engine stamps metadata.resourceType on every alert, but the
websocket state path converts alerts.Alert to models.Alert, which had no
Metadata field, so every active alert reached the frontend stripped. The
history Type badge then fell back to unified-store lookups that miss
nodes (alert.resourceId is the platform-native node ID while unified
resources mint canonical ids, and alert.resourceName is the raw node
name while unified resources prefer the display name), rendering
Unknown. In mock mode the generated history rows had the same gap.

models.Alert gained the Metadata field in f62f35e24 (it rode along with
the memory-cache commit); this completes the transport:

- copy Metadata in activeAlertsSnapshot (websocket active alerts),
  GetRecentlyResolved (resolved alerts to state), and the mock
  UpdateAlertSnapshots conversion; sources are deep clones already
- deep-copy Metadata in models cloneAlert to keep the snapshot
  clone contract honest
- stamp resourceType in the mock history generator using the real
  engine vocabulary (node, vm, system-container)
- recognize system-container in the history Type badge map; that is
  what the v6 engine stamps for LXC guests

Verified live in mock mode: history previously resolved 277 of 780
rows to Unknown (all node alerts); now 718/718 rows and 19/19 active
alerts carry resourceType and zero badges render Unknown.
2026-06-11 19:53:45 +01:00
..
account_roles.go fix(hosted): enforce tenant org membership during handoff 2026-03-26 23:14:54 +00:00
ceph_cluster_identity.go Reconcile Ceph pool alert identity 2026-05-28 14:42:43 +01:00
ceph_pool_storage_test.go Reconcile Ceph pool alert identity 2026-05-28 14:42:43 +01:00
concurrency_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
converters.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
converters_additional_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
converters_test.go Keep live resource metrics fresh 2026-06-01 08:59:56 +01:00
deepcopy.go alerts(history): carry alert metadata to the frontend so resourceType resolves 2026-06-11 19:53:45 +01:00
deepcopy_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
disk_summary.go Restore linked host-agent disk inventory for guest VMs 2026-04-22 09:22:46 +01:00
disk_summary_test.go Restore linked host-agent disk inventory for guest VMs 2026-04-22 09:22:46 +01:00
metrics_types.go Route physical disk drawer IO through canonical history 2026-04-01 23:33:43 +01:00
metrics_types_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
models.go memory: restore the v5 reclaimable-cache split end-to-end 2026-06-11 19:42:40 +01:00
models_frontend.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
models_frontend_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
models_helpers_test.go Fix PBS backup identity matching 2026-06-03 11:43:20 +01:00
node_aliases_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
organization.go Fail closed on ambiguous email principal resolution 2026-05-05 09:26:10 +01:00
organization_additional_test.go Fail closed on ambiguous email principal resolution 2026-05-05 09:26:10 +01:00
profile_validation.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
profile_validation_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
profile_validation_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
profiles.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
snapshot_provider.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
state_additional_test.go Reconcile Ceph pool alert identity 2026-05-28 14:42:43 +01:00
state_docker_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
state_host_test.go Fix PBS backup identity matching 2026-06-03 11:43:20 +01:00
state_snapshot.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
state_snapshot_additional_test.go Stabilize RC release backend race proofs 2026-04-11 23:18:44 +01:00
state_snapshot_concurrency_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
state_snapshot_frontend_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
state_snapshot_merge_test.go Merge linked host disks into guest overviews 2026-04-30 14:37:43 +01:00