From 97d554f63813bcc801db085e084c583729b65290 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 1 Oct 2025 17:27:05 +0200 Subject: [PATCH] update AppImage --- AppImage/components/proxmox-dashboard.tsx | 17 ++- AppImage/scripts/flask_server.py | 172 +++++++--------------- 2 files changed, 63 insertions(+), 126 deletions(-) diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index afe2031..03429b1 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -46,12 +46,13 @@ export function ProxmoxDashboard() { const fetchSystemData = useCallback(async () => { console.log("[v0] Fetching system data from Flask server...") console.log("[v0] Current window location:", window.location.href) + console.log("[v0] Window host:", window.location.host) + console.log("[v0] Window hostname:", window.location.hostname) + console.log("[v0] Window port:", window.location.port) - // Usar ruta relativa si estamos en el mismo servidor, sino usar localhost:8008 - const apiUrl = - window.location.hostname === "localhost" && window.location.port === "8008" - ? "/api/system" // Ruta relativa cuando estamos en el servidor Flask - : "http://localhost:8008/api/system" // URL completa para desarrollo + // Esto permite que los clientes se conecten usando la IP del servidor (ej: 192.168.0.52:8008) + // en lugar de localhost + const apiUrl = `/api/system` // Siempre usar ruta relativa console.log("[v0] API URL:", apiUrl) @@ -152,12 +153,12 @@ export function ProxmoxDashboard() {

• Try accessing:{" "} - http://localhost:8008/api/health + http://{typeof window !== "undefined" ? window.location.host : "localhost:8008"}/api/health

@@ -170,7 +171,7 @@ export function ProxmoxDashboard() {
-
+