From 627d364071b6d50ce9c967ecb43a5363ad0fdecc Mon Sep 17 00:00:00 2001 From: Sven van Ginkel Date: Wed, 23 Sep 2026 01:04:48 +0200 Subject: [PATCH] fix(ui): disable Add Monitor button when no eligible systems exist (#2392) --- .../network-monitors-table/monitor-dialog.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/site/src/components/network-monitors-table/monitor-dialog.tsx b/internal/site/src/components/network-monitors-table/monitor-dialog.tsx index 733935dc..a227ef20 100644 --- a/internal/site/src/components/network-monitors-table/monitor-dialog.tsx +++ b/internal/site/src/components/network-monitors-table/monitor-dialog.tsx @@ -353,6 +353,8 @@ export function AddMonitorDialog({ systemId, monitors }: { systemId?: string; mo const bulkFormRef = useRef(null) const { toast } = useToast() const { t } = useLingui() + const systems = useStore($systems) + const hasEligibleSystems = systemId ? true : systems.some(supportsNetworkMonitors) const resetBulkForm = () => { setBulkInput("") @@ -443,14 +445,19 @@ export function AddMonitorDialog({ systemId, monitors }: { systemId?: string; mo return ( <>
-
-