From 88cf51a60274446122d9dc0d2a072516ed9c9362 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 11 Nov 2025 17:59:36 +0100 Subject: [PATCH] Update AppImage --- AppImage/components/health-status-modal.tsx | 13 ++++-- AppImage/components/proxmox-dashboard.tsx | 25 ++++++++++ AppImage/scripts/health_monitor.py | 52 +++++++++++++++++++-- AppImage/scripts/health_persistence.py | 12 ++++- 4 files changed, 92 insertions(+), 10 deletions(-) diff --git a/AppImage/components/health-status-modal.tsx b/AppImage/components/health-status-modal.tsx index 7a09397..3bdb0c8 100644 --- a/AppImage/components/health-status-modal.tsx +++ b/AppImage/components/health-status-modal.tsx @@ -92,6 +92,11 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu const data = await response.json() console.log("[v0] Health data received:", data) setHealthData(data) + + const event = new CustomEvent("healthStatusUpdated", { + detail: { status: data.overall }, + }) + window.dispatchEvent(event) } catch (err) { console.error("[v0] Error fetching health data:", err) setError(err instanceof Error ? err.message : "Unknown error") @@ -275,7 +280,7 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu onClick={() => handleCategoryClick(key, status)} className={`flex items-start gap-3 p-3 rounded-lg border transition-colors ${ status === "OK" - ? "bg-green-500/5 border-green-500/20 hover:bg-green-500/10" + ? "bg-card border-border hover:bg-muted/30" : status === "WARNING" ? "bg-yellow-500/5 border-yellow-500/20 hover:bg-yellow-500/10 cursor-pointer" : status === "CRITICAL" @@ -284,7 +289,7 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu }`} >
- + {getStatusIcon(status)}
@@ -294,7 +299,7 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu variant="outline" className={`shrink-0 text-xs ${ status === "OK" - ? "border-green-500 text-green-500 bg-green-500/5" + ? "border-green-500 text-green-500 bg-transparent" : status === "WARNING" ? "border-yellow-500 text-yellow-500 bg-yellow-500/5" : status === "CRITICAL" @@ -321,7 +326,7 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu {detailValue.reason} )}
- {status !== "OK" && ( + {(status === "WARNING" || status === "CRITICAL") && (