diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index 856895d..09bfa5c 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -44,14 +44,15 @@ export function ProxmoxDashboard() { const [componentKey, setComponentKey] = useState(0) const fetchSystemData = useCallback(async () => { + console.log("[v0] Fetching system data from Flask server...") try { const response = await fetch("http://localhost:8008/api/system") if (!response.ok) { throw new Error("Server not responding") } const data: FlaskSystemData = await response.json() + console.log("[v0] System data received:", data) - // Determine health status based on system metrics let status: "healthy" | "warning" | "critical" = "healthy" if (data.cpu_usage > 90 || data.memory_usage > 90) { status = "critical" @@ -68,11 +69,12 @@ export function ProxmoxDashboard() { }) setIsServerConnected(true) } catch (error) { - console.error("Error fetching system data:", error) + console.error("[v0] Failed to fetch system data from Flask server:", error) setIsServerConnected(false) setSystemStatus((prev) => ({ ...prev, status: "critical", + serverName: "Server Offline", nodeId: "Server Offline", uptime: "N/A", lastUpdate: new Date().toLocaleTimeString(), @@ -118,12 +120,27 @@ export function ProxmoxDashboard() { return (
+ {!isServerConnected && ( +
+
+
+ + Flask Server Offline + + • Start the server:{" "} + python3 AppImage/scripts/flask_server.py + +
+
+
+ )} +
-
+
ProxMenux Logo { + const target = e.target as HTMLImageElement + target.style.display = "none" + document.querySelector(".fallback-icon")?.classList.remove("hidden") + }} /> +

ProxMenux Monitor