From 9a1458700abe0f3465a23b8bef7156aabfaa73f2 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 7 Dec 2025 23:34:21 +0000 Subject: [PATCH] debug: add console logging to verify unified resources usage Temporary logging to verify which code path is being used: - DockerRoute: logs docker-host and docker-container counts - HostsRoute: logs host count - DashboardView: logs VM count Check browser console to confirm unified resources are being received. These logs can be removed once migration is verified. --- frontend-modern/src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsx index 2689971..e576c8b 100644 --- a/frontend-modern/src/App.tsx +++ b/frontend-modern/src/App.tsx @@ -107,6 +107,7 @@ function DockerRoute() { // If we have unified resources, convert and reconstruct hierarchy if (dockerHostResources.length > 0) { + console.log('[DockerRoute] Using unified resources:', dockerHostResources.length, 'hosts,', dockerContainerResources.length, 'containers'); return dockerHostResources.map(h => { const platformData = h.platformData as Record | undefined; @@ -206,6 +207,7 @@ function HostsRoute() { // If we have unified resources, convert them to legacy Host format // (This will be simplified once HostsOverview is migrated to use resources directly) if (unifiedHosts.length > 0) { + console.log('[HostsRoute] Using unified resources:', unifiedHosts.length, 'hosts'); return unifiedHosts.map(r => { const platformData = r.platformData as Record | undefined; return { @@ -876,6 +878,7 @@ function App() { const vms = createMemo(() => { const vmResources = state().resources?.filter(r => r.type === 'vm') ?? []; if (vmResources.length > 0) { + console.log('[DashboardView] Using unified resources: VMs:', vmResources.length); return vmResources.map(r => { const platformData = r.platformData as Record | undefined; return {