diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index b480f7f..aa0f03e 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -63,14 +63,9 @@ export function ProxmoxDashboard() { const [lastScrollY, setLastScrollY] = useState(0) const fetchSystemData = useCallback(async () => { - console.log("[v0] Fetching system data from Flask server...") - console.log("[v0] Current window location:", window.location.href) - const baseUrl = typeof window !== "undefined" ? `${window.location.protocol}//${window.location.hostname}:8008` : "" const apiUrl = `${baseUrl}/api/system` - console.log("[v0] API URL:", apiUrl) - try { const response = await fetch(apiUrl, { method: "GET", @@ -79,14 +74,12 @@ export function ProxmoxDashboard() { }, cache: "no-store", }) - console.log("[v0] Response status:", response.status) if (!response.ok) { throw new Error(`Server responded with status: ${response.status}`) } const data: FlaskSystemData = await response.json() - console.log("[v0] System data received:", data) let status: "healthy" | "warning" | "critical" = "healthy" if (data.cpu_usage > 90 || data.memory_usage > 90) { @@ -104,13 +97,6 @@ export function ProxmoxDashboard() { }) setIsServerConnected(true) } catch (error) { - console.error("[v0] Failed to fetch system data from Flask server:", error) - console.error("[v0] Error details:", { - message: error instanceof Error ? error.message : "Unknown error", - apiUrl, - windowLocation: window.location.href, - }) - setIsServerConnected(false) setSystemStatus((prev) => ({ ...prev, @@ -248,9 +234,7 @@ export function ProxmoxDashboard() {
- {/* Logo and Title */}
- {/* Logo and Title */}
{ - console.log("[v0] Logo failed to load, using fallback icon") const target = e.target as HTMLImageElement target.style.display = "none" const fallback = target.parentElement?.querySelector(".fallback-icon") @@ -282,7 +265,6 @@ export function ProxmoxDashboard() {
- {/* Desktop Actions */}
@@ -312,7 +294,6 @@ export function ProxmoxDashboard() {
- {/* Mobile Actions */}
{statusIcon} @@ -327,7 +308,6 @@ export function ProxmoxDashboard() {
- {/* Mobile Server Info */}
Uptime: {systemStatus.uptime}
@@ -493,27 +473,27 @@ export function ProxmoxDashboard() {
- + {activeTab === "overview" && } - + {activeTab === "storage" && } - + {activeTab === "network" && } - + {activeTab === "vms" && } - + {activeTab === "hardware" && } - + {activeTab === "logs" && }