Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Show vCenter MoRef in workload ID column for vSphere VMs

rcourtman9c7d3978e1ea
diff --git a/frontend-modern/src/hooks/useWorkloads.ts b/frontend-modern/src/hooks/useWorkloads.ts
index 7f429aa8b6..13909f0848 100644
--- a/frontend-modern/src/hooks/useWorkloads.ts
+++ b/frontend-modern/src/hooks/useWorkloads.ts
@@ -378,11 +378,20 @@ const mapResourceToWorkload = (resource: APIResource): WorkloadGuest | null => {
? resource.proxmox.vmid
: 0;
const rawDisplayId = resource.id;
+ // vCenter identifies VMs by managed object reference (e.g. `vm-206`),
+ // not a numeric vmid. When the resource has no Proxmox-shaped numeric
+ // vmid, fall back to the vSphere MoRef so the workload table's ID
+ // column shows the identifier operators recognize from vCenter rather
+ // than rendering blank.
+ const vsphereDisplayId =
+ workloadType === 'vm' && vmid <= 0
+ ? (resource.vmware?.managedObjectId ?? '').trim() || undefined
+ : undefined;
const displayId =
workloadType === 'vm' || workloadType === 'system-container'
? vmid > 0
? String(vmid)
- : undefined
+ : vsphereDisplayId
: rawDisplayId
? rawDisplayId.length > 12
? rawDisplayId.slice(0, 12)