From 551a5d23ed9afb5a0b3e5e3b62cc84340722d34d Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 16 Oct 2025 12:39:23 +0000 Subject: [PATCH] Guest drawer fallback content for agentless guests (refs #563) --- .../src/components/Dashboard/GuestRow.tsx | 233 ++++++++++-------- 1 file changed, 133 insertions(+), 100 deletions(-) diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsx index 814278c..f2742fb 100644 --- a/frontend-modern/src/components/Dashboard/GuestRow.tsx +++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx @@ -52,7 +52,7 @@ export function GuestRow(props: GuestRowProps) { const [drawerOpen, setDrawerOpen] = createSignal(drawerState.get(initialGuestId) ?? false); const guestId = createMemo(() => buildGuestId(props.guest)); - const hasMultipleDisks = createMemo(() => (props.guest.disks?.length ?? 0) > 1); + const hasFilesystemDetails = createMemo(() => (props.guest.disks?.length ?? 0) > 0); const ipAddresses = createMemo(() => props.guest.ipAddresses ?? []); const networkInterfaces = createMemo(() => props.guest.networkInterfaces ?? []); const hasNetworkInterfaces = createMemo(() => networkInterfaces().length > 0); @@ -95,16 +95,19 @@ export function GuestRow(props: GuestRowProps) { } return lines.length > 0 ? lines : undefined; }); - const memoryTooltip = createMemo(() => - memoryExtraLines()?.join('\n') ?? undefined, + const memoryTooltip = createMemo(() => memoryExtraLines()?.join('\n') ?? undefined); + const hasDrawerContent = createMemo( + () => + hasOsInfo() || + ipAddresses().length > 0 || + (memoryExtraLines()?.length ?? 0) > 0 || + hasFilesystemDetails() || + hasNetworkInterfaces(), ); - const canShowDrawer = createMemo(() => - hasOsInfo() || - ipAddresses().length > 0 || - (memoryExtraLines() && memoryExtraLines()!.length > 0) || - hasMultipleDisks() || - hasNetworkInterfaces(), + const hasFallbackContent = createMemo( + () => !hasDrawerContent() && (props.guest.type === 'qemu' || props.guest.type === 'lxc'), ); + const canShowDrawer = createMemo(() => hasDrawerContent() || hasFallbackContent()); createEffect(on(guestId, (id) => { const stored = drawerState.get(id); @@ -408,101 +411,131 @@ export function GuestRow(props: GuestRowProps) { drawerDisabled() ? 'opacity-50 saturate-75 pointer-events-none' : '' }`} > - 0}> -
-
Guest Overview
-
- -
- 0}> - {osName()} - - 0 && osVersion().length > 0}> - - - 0}> - {osVersion()} - -
-
- 0}> -
- - {(ip) => ( - - {ip} - - )} - -
-
+ +
+ Guest details unavailable +
+
+ + Start this container and ensure the Pulse user has sufficient Proxmox + permissions to collect guest metrics. +

+ } + > +

{getDiskStatusTooltip()}

+

+ Install and run the qemu-guest-agent inside this VM so Pulse can surface + OS, network, and filesystem details. +

+
+
-
-
- - 0}> -
-
Memory
-
- {(line) =>
{line}
}
-
-
-
- - 0}> -
-
Filesystems
-
- -
-
-
- - -
-
Network Interfaces
-
Row charts show current rate; totals below are cumulative since boot.
-
- - {(iface) => { - const addresses = iface.addresses ?? []; - const hasTraffic = (iface.rxBytes ?? 0) > 0 || (iface.txBytes ?? 0) > 0; - return ( -
-
- {iface.name || 'interface'} - - - {iface.mac} - - -
- 0}> -
- - {(ip) => ( - - {ip} - - )} - -
+ } + > + <> + 0}> +
+
Guest Overview
+
+ +
+ 0}> + {osName()} - -
- Total RX {formatBytes(iface.rxBytes ?? 0)} - Total TX {formatBytes(iface.txBytes ?? 0)} -
+ 0 && osVersion().length > 0}> + + + 0}> + {osVersion()}
- ); - }} - -
-
+
+ 0}> +
+ + {(ip) => ( + + {ip} + + )} + +
+
+
+
+ + + 0}> +
+
Memory
+
+ {(line) =>
{line}
}
+
+
+
+ + 0}> +
+
Filesystems
+
+ +
+
+
+ + +
+
Network Interfaces
+
Row charts show current rate; totals below are cumulative since boot.
+
+ + {(iface) => { + const addresses = iface.addresses ?? []; + const hasTraffic = (iface.rxBytes ?? 0) > 0 || (iface.txBytes ?? 0) > 0; + return ( +
+
+ {iface.name || 'interface'} + + + {iface.mac} + + +
+ 0}> +
+ + {(ip) => ( + + {ip} + + )} + +
+
+ +
+ Total RX {formatBytes(iface.rxBytes ?? 0)} + Total TX {formatBytes(iface.txBytes ?? 0)} +
+
+
+ ); + }} +
+
+
+
+