From ab9a439f2c6c2c0985b4e0935b9fc0a6d663ee95 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 30 May 2026 11:20:05 +0100 Subject: [PATCH] Fix agent Manage modal: drop unusable Pause, declutter layout Pulse Agents push telemetry to Pulse, so there is no pause concept for them: the backend hardcodes agent connections to Enabled=true with SupportsPause=false, and the frontend setEnabled() throws 'Pause is not supported for agent connections' before any request is sent. The agent Manage dialog still rendered an enabled 'Pause connection' button (and an 'Enabled' status pill implying a toggle), so the button could only ever surface that error. Remove both from the agent panel. Pause stays for API-pulled sources (pve/pbs/pmg/vmware/ truenas), where it genuinely stops polling. Remove source is unchanged and works: it calls DELETE /api/agents/agent/{id}, which drops the host from state, revokes the agent token, and blocklists the host so future reports are rejected until 'Allow reconnect'. The dialog already explains the host keeps running until uninstalled. Also declutter the dialog the user flagged as 'weird': - Drop the redundant summary header (name, 'Pulse Agent' eyebrow, OS, endpoint) that duplicated the dialog title/subtitle and the info cards below it. - Clamp the uninstall command previews to 3 lines so the long Windows PowerShell one-liner no longer dominates the modal; the Copy buttons still deliver the full command. --- .../Settings/InfrastructureWorkspace.tsx | 43 ++----------------- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx index ed437f94d..481b3be8e 100644 --- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx +++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx @@ -23,7 +23,6 @@ import { import { InfrastructureSourceManager } from './InfrastructureSourceManager'; import { InfrastructureSourcePicker } from './InfrastructureSourcePicker'; import { - connectionAgentEndpointDisplay, connectionAgentIdentitySummary, connectionAgentVersionPresentation, connectionLastActivityText, @@ -361,13 +360,11 @@ const InfrastructureWorkspaceContent: Component = ); const renderAgentConnectionDetails = (connection: Connection) => { - const pausePending = () => rowActions.pendingAction(connection.id) === 'pause'; const removePending = () => rowActions.pendingAction(connection.id) === 'remove'; const removeConfirming = () => rowActions.confirmingRemove(connection.id); const error = () => rowActions.actionError(connection.id); const versionPresentation = () => connectionAgentVersionPresentation(connection); const identitySummary = () => connectionAgentIdentitySummary(connection); - const endpointDisplay = () => connectionAgentEndpointDisplay(connection); const infoCard = (label: string, value: string) => (
{label}
@@ -378,25 +375,7 @@ const InfrastructureWorkspaceContent: Component = return (
-
-
-
- Pulse Agent -
-
{connection.name}
- - {(summary) =>
{summary()}
} -
- - {(endpoint) =>
{endpoint()}
} -
-
- - {connection.enabled ? 'Enabled' : 'Paused'} - -
- -
+
{infoCard('Connection state', connection.state)} {infoCard('Last seen', connection.lastSeen ? connection.lastSeen : 'No activity yet')} @@ -459,7 +438,7 @@ const InfrastructureWorkspaceContent: Component =
Linux / macOS / FreeBSD
-
+
{agentUninstallCommands().linux}