diff --git a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx index 0fdc1c324..d8b978103 100644 --- a/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx +++ b/frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx @@ -1,5 +1,5 @@ import { Component, For, type JSX, Show, createMemo, createSignal } from 'solid-js'; -import { Archive, Cpu, Database, Mail, Server, ServerCog } from 'lucide-solid'; +import { Archive, ArrowRight, Cpu, Database, Mail, Server, ServerCog } from 'lucide-solid'; import type { ConnectionType, ProbeCandidate } from '@/api/connections'; import { AddressProbeStep } from './AddressProbeStep'; import { @@ -30,23 +30,23 @@ export interface ConnectionEditorProps { onSaved?: () => void; } -const DEFAULT_MANUAL_TYPES: ConnectionType[] = ['pve', 'pbs', 'pmg', 'vmware', 'truenas', 'agent']; +// Platform integrations — connect to a product's management API. Peers of +// each other. The agent is NOT in this list: it is a different kind of +// integration (see the dedicated section below the grid) and surfacing it +// as a tile alongside these hides what it actually adds. +const DEFAULT_PLATFORM_TYPES: ConnectionType[] = ['pve', 'pbs', 'pmg', 'vmware', 'truenas']; interface TileMeta { icon: Component<{ class?: string }>; description: string; } -const TILE_META: Partial> = { +const PLATFORM_TILE_META: Partial> = { pve: { icon: Server, description: 'VMs, containers, storage, backups' }, pbs: { icon: Archive, description: 'Backups, sync and verify jobs' }, pmg: { icon: Mail, description: 'Mail stats, queues, quarantine' }, vmware: { icon: ServerCog, description: 'vCenter or ESXi clusters' }, truenas: { icon: Database, description: 'Pools, datasets, replications' }, - agent: { - icon: Cpu, - description: 'Host metrics, or bare-metal Linux / Unraid / FreeBSD', - }, }; export const ConnectionEditor: Component = (props) => { @@ -60,7 +60,9 @@ export const ConnectionEditor: Component = (props) => { ); const [selectedCandidate, setSelectedCandidate] = createSignal(null); - const manualOptions = createMemo(() => props.manualTypeOptions ?? DEFAULT_MANUAL_TYPES); + const platformOptions = createMemo(() => + (props.manualTypeOptions ?? DEFAULT_PLATFORM_TYPES).filter((type) => type !== 'agent'), + ); const activeType = () => selectedType(); const showCredentialSlot = () => activeType() !== null; @@ -90,55 +92,95 @@ export const ConnectionEditor: Component = (props) => { +
chooseManualType('agent')} /> -
-
+
+
+
-
- - {(type) => { - const meta = TILE_META[type]; - const Icon = meta?.icon ?? Server; - const label = CONNECTION_TYPE_LABELS[type] ?? type; - const isAgent = type === 'agent'; - return ( -
- -
{meta!.description}
-
- - ); - }} - -
+ +
{meta!.description}
+
+ + ); + }} + + + + +
+
+
+ + +
} > diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts index c79472ec9..bb279e8e3 100644 --- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts +++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts @@ -75,8 +75,13 @@ describe('settings architecture guardrails', () => { it('keeps probe-first connection setup and inline node credentials on the shared editor model', () => { expect(connectionEditorSource).toContain("import { AddressProbeStep } from './AddressProbeStep';"); - expect(connectionEditorSource).toContain('const DEFAULT_MANUAL_TYPES: ConnectionType[] ='); + // Platform integrations render as peer tiles; the agent lives in its own + // section below so it can explain what host-level telemetry adds instead + // of being mistaken for one more peer of Proxmox / VMware / TrueNAS. + expect(connectionEditorSource).toContain('const DEFAULT_PLATFORM_TYPES: ConnectionType[] ='); + expect(connectionEditorSource).not.toContain("'agent'] ="); expect(connectionEditorSource).toContain('