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.

remove legacy fallbacks: routes now exclusively use unified resources

rcourtman17dd9e0d2840
diff --git a/.gemini/docs/unified-resource-architecture.md b/.gemini/docs/unified-resource-architecture.md
index aa8765703f..b7ce652aa2 100644
--- a/.gemini/docs/unified-resource-architecture.md
+++ b/.gemini/docs/unified-resource-architecture.md
@@ -544,10 +544,11 @@ The dedicated `/resources` unified view was abandoned in favor of migrating exis
- WebSocket state now includes resources array
- All pages can consume from unified model with legacy fallback
-4. **Future Cleanup (Phase 6):**
+4. **Cleanup (Phase 6) - COMPLETED:**
- [x] Remove debug console.log statements from frontend routes
- - [ ] Remove legacy arrays from State once migration is verified stable (keep fallback for safety)
- - [ ] Remove legacy AI context fallback
+ - [x] Remove legacy fallback code from route components (Docker, Hosts, Dashboard)
+ - [ ] Remove unused legacy arrays from backend StateFrontend (optional - still broadcast for API compatibility)
+ - [ ] Remove legacy AI context fallback (optional - verify AI uses unified model first)
- [ ] Simplify route components to use resources directly (remove adapter layer)
---
diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsx
index 2689971a7c..bfa9c845cc 100644
--- a/frontend-modern/src/App.tsx
+++ b/frontend-modern/src/App.tsx
@@ -184,8 +184,8 @@ function DockerRoute() {
});
}
- // Fall back to legacy data
- return state.dockerHosts ?? [];
+ // Return empty array if no unified resources available
+ return [];
});
return <DockerHosts hosts={hosts() as any} activeAlerts={activeAlerts} />;
@@ -249,8 +249,8 @@ function HostsRoute() {
});
}
- // Fall back to legacy data
- return state.hosts ?? [];
+ // Return empty array if no unified resources available
+ return [];
});
return (
@@ -913,7 +913,8 @@ function App() {
};
});
}
- return state().vms ?? [];
+ // Return empty array if no unified resources available
+ return [];
});
const containers = createMemo(() => {
@@ -956,7 +957,8 @@ function App() {
};
});
}
- return state().containers ?? [];
+ // Return empty array if no unified resources available
+ return [];
});
const nodes = createMemo(() => {
@@ -998,7 +1000,8 @@ function App() {
};
});
}
- return state().nodes ?? [];
+ // Return empty array if no unified resources available
+ return [];
});
return (