Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Clarify infrastructure add source strategies
rcourtman4cb0313c827d
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex d4b5d692bb..c67acb5d61 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -121,6 +121,10 @@ submission separate. For new PVE/PBS setup, Agent Install and Direct Connectionsetup-script modes are command-driven auto-registration paths; Token ID/Valuefields, Test Connection, and Add Node submission belong only to Manual TokenSetup or existing-node edit flows.+The setup guide must also present the source strategy at action time: Agent+Install is the recommended API + Agent path, Direct Connection is the advanced+API inventory path, and Manual Token Setup is an advanced manual API-token+escape hatch.That shared monitored-system admission preview boundary also owns the disabledplatform-connection lifecycle state. Once a TrueNAS or VMware setup form marksdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex d0fcab93ba..4edf4ef4c0 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -128,6 +128,9 @@ Own canonical runtime payload shapes between backend and frontend.modes are auto-registration paths, while Token ID/Value fields, TestConnection, and Add Node are manual-token or existing-node edit controlsonly.+ That same client contract must expose the setup strategy before a token+ path is chosen: Agent Install is API + Agent, Direct Connection is API+ inventory, and Manual Token Setup is a manual API-token escape hatch.32. `internal/api/agent_install_command_shared.go` shared with `agent-lifecycle`: agent install command assembly is both an agent lifecycle control surface and a canonical API payload contract boundary.33. `internal/api/ai_handler.go` shared with `ai-runtime`: Pulse Assistant handlers are both an AI runtime control surface and a canonical API payload contract boundary.34. `internal/api/ai_handlers.go` shared with `ai-runtime`: AI settings and remediation handlers are both an AI runtime control surface and a canonical API payload contract boundary.diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 693bd16f96..f0b7ae9106 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -314,6 +314,9 @@ work extends shared components instead of creating new local variants.the grouped source-type picker, `?add=detect` owns the detect-from-addressutility, and typed add routes jump straight into the matching credentialslot through `initialType`.+ The picker and typed add dialog must use the shared source-strategy+ vocabulary so users choose between API inventory, Agent telemetry, and API+ + Agent coverage rather than only choosing a product logo.Credential slots are dispatched by the detected or manually-selected typeand must still reach the canonical form body rather than diverging into arevived provider-specific workspace.diff --git a/frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsx b/frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsxindex c629c69611..604fd8c87b 100644--- a/frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsx@@ -4,6 +4,7 @@ import type { InfrastructureOnboardingConnectionType } from '@/utils/infrastructimport {getInfrastructureSourcePickerGroups,getInfrastructureOnboardingProductPresentation,+ getInfrastructureSourceStrategyPresentation,} from '@/utils/infrastructureOnboardingPresentation';interface InfrastructureSourcePickerProps {@@ -29,11 +30,18 @@ export const InfrastructureSourcePicker: Component<InfrastructureSourcePickerProreturn (<div class="space-y-6 p-4"><Show when={props.onDetectFromAddress}>- <div class="flex justify-end">+ <div class="flex flex-col gap-3 rounded-md border border-border bg-surface-alt p-3 sm:flex-row sm:items-center sm:justify-between">+ <div class="space-y-1">+ <div class="text-sm font-medium text-base-content">Not sure which source to use?</div>+ <p class="text-xs text-muted">+ Probe an address and Pulse will open the matching API inventory flow when it+ recognizes the platform.+ </p>+ </div><buttontype="button"onClick={props.onDetectFromAddress}- class={detectButtonClass}+ class={`${detectButtonClass} self-start sm:self-center`}><Search class="mr-2 h-4 w-4" />Detect from address@@ -54,11 +62,14 @@ export const InfrastructureSourcePicker: Component<InfrastructureSourcePickerPro{(product) => {const Icon = CARD_ICON[product.type];const details = getInfrastructureOnboardingProductPresentation(product.type);+ const strategy = getInfrastructureSourceStrategyPresentation(+ details.sourceStrategy,+ );return (<buttontype="button"onClick={() => props.onSelectType(product.type)}- class="group flex h-full flex-col gap-3 rounded-xl border border-border bg-surface p-4 text-left transition-colors hover:border-blue-500 hover:bg-blue-50/40 dark:hover:bg-blue-950/20"+ class="group flex h-full flex-col gap-3 rounded-md border border-border bg-surface p-4 text-left transition-colors hover:border-blue-500 hover:bg-blue-50/40 dark:hover:bg-blue-950/20"><div class="flex items-start gap-3"><div@@ -72,6 +83,9 @@ export const InfrastructureSourcePicker: Component<InfrastructureSourcePickerPro<div class="text-sm font-semibold text-base-content">{details.label}</div>+ <span class="inline-flex items-center rounded-full border border-border bg-surface-alt px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-base-content">+ {strategy.label}+ </span><Show when={details.governanceState === 'admitted'}><span class="inline-flex items-center rounded-full border border-blue-200 bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-800 dark:border-blue-900 dark:bg-blue-950/40 dark:text-blue-200">Available now@@ -82,7 +96,22 @@ export const InfrastructureSourcePicker: Component<InfrastructureSourcePickerPro</div></div>- <div class="text-[11px] text-muted">{details.bestFor}</div>+ <p class="text-[11px] text-muted">{strategy.detail}</p>++ <div class="grid gap-2 text-[11px] text-muted">+ <div>+ <div class="font-medium uppercase tracking-wide text-base-content">+ Best for+ </div>+ <div>{details.bestFor}</div>+ </div>+ <div>+ <div class="font-medium uppercase tracking-wide text-base-content">+ Unlocks+ </div>+ <div>{details.coverage}</div>+ </div>+ </div></button>);}}diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsxindex c84eae9db2..cfbf773e9e 100644--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx@@ -47,6 +47,7 @@ import {} from '@/utils/infrastructureOnboardingMetrics';import {getInfrastructureOnboardingProductPresentation,+ getInfrastructureSourceStrategyPresentation,type InfrastructureOnboardingConnectionType,} from '@/utils/infrastructureOnboardingPresentation';import {@@ -825,7 +826,7 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =const addDialogDescription = createMemo(() => {const step = routeStep();if (!step || step === 'pick') {- return 'Choose the source type you want to add.';+ return 'Choose how Pulse should collect from this system: platform API, Pulse Agent, or both.';}if (step === 'detect') {return 'Probe an address and let Pulse open the matching credential flow when it recognizes the platform.';@@ -842,7 +843,8 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =const presentation = getInfrastructureOnboardingProductPresentation(activeAddType() as InfrastructureOnboardingConnectionType,);- return `${presentation.bestFor}. ${presentation.coverage}.`;+ const strategy = getInfrastructureSourceStrategyPresentation(presentation.sourceStrategy);+ return `${strategy.label}. ${presentation.bestFor}. ${presentation.coverage}.`;});const editDialogTitle = createMemo(() => {diff --git a/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx b/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsxindex 8644342b2b..0771300086 100644--- a/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx+++ b/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx@@ -109,9 +109,9 @@ export const NodeModalAuthenticationSection: Component<NodeModalAuthenticationSe<Show when={state.formData().setupMode === 'manual'}><div class="rounded-md border border-border bg-surface-alt px-3 py-2 text-xs leading-5 text-muted">- Use the manual token path only when you already created the API token yourself. The- automatic setup paths register the node without copying token credentials into this- form.+ Advanced manual token path: use this only when you already created the API token+ yourself. Agent Install and Direct Connection register the source automatically+ without copying token credentials into this form.</div><div class="grid grid-cols-1 gap-4 md:grid-cols-2">diff --git a/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx b/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsxindex 9c7371e6e8..7eb081f53f 100644--- a/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx+++ b/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx@@ -4,14 +4,53 @@ import {type NodeModalProps,} from '@/components/Settings/nodeModalModel';import type { NodeModalState } from '@/components/Settings/useNodeModalState';+import type { NodeModalNodeType, NodeModalSetupMode } from '@/utils/nodeModalPresentation';interface NodeModalSetupGuideSectionProps {modalProps: NodeModalProps;state: NodeModalState;}+const getNodeSetupStrategyPresentation = (+ nodeType: NodeModalNodeType,+ setupMode: NodeModalSetupMode,+): { label: string; detail: string } => {+ const productLabel = nodeType === 'pbs' ? 'Proxmox Backup Server' : 'Proxmox VE';++ if (setupMode === 'agent') {+ return {+ label: 'API + Agent',+ detail: `Recommended: creates the ${productLabel} API token, installs Pulse Agent, and registers the source automatically. No token fields are needed in this form.`,+ };+ }++ if (setupMode === 'auto') {+ return {+ label: 'API inventory',+ detail: `Advanced: creates the ${productLabel} API token and registers the API connection, but does not install Pulse Agent for node-local telemetry.`,+ };+ }++ return {+ label: 'Manual API token',+ detail:+ 'Advanced escape hatch: use this only when you already created the API token yourself and want to paste the token details into Pulse.',+ };+};+export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionProps> = (props) => {const { modalProps, state } = props;+ const setupStrategy = () =>+ getNodeSetupStrategyPresentation(modalProps.nodeType, state.formData().setupMode);+ const setupStrategyPanel = () => (+ <div class="rounded-md border border-blue-200 bg-surface px-3 py-2 dark:border-blue-800">+ <div class="text-[10px] font-semibold uppercase tracking-wide text-blue-700 dark:text-blue-300">+ Source strategy+ </div>+ <div class="mt-1 text-sm font-semibold text-base-content">{setupStrategy().label}</div>+ <p class="mt-1 text-xs leading-5 text-muted">{setupStrategy().detail}</p>+ </div>+ );return (<div class="space-y-4">@@ -32,6 +71,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</svg>Connection Setup</h5>+ {setupStrategyPanel()}<div class="space-y-3 text-xs"><div class="flex gap-2 flex-wrap">@@ -96,8 +136,9 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<Show when={state.formData().setupMode === 'agent'}><div class="space-y-3"><p class="text-xs text-muted">- Install the Pulse agent on your Proxmox node. This single command sets- everything up:+ Recommended API + Agent setup. This single command creates the API token,+ installs Pulse Agent, registers the node, and leaves Pulse waiting for the agent+ check-in:</p><ul class="text-xs text-muted list-disc list-inside space-y-1"><li>Creates monitoring user and API token automatically</li>@@ -168,7 +209,8 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<p class="text-xs text-red-500">{state.agentCommandError()}</p></Show><p class="text-[11px] text-muted italic">- The node will appear in Pulse automatically after the agent starts.+ No token fields are needed here. The node appears in Pulse automatically after+ the agent starts.</p></div></Show>@@ -177,9 +219,9 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<div class="space-y-3"><div class="rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-700 dark:bg-amber-900"><p class="text-xs text-amber-800 dark:text-amber-200">- <strong>Direct connection mode:</strong> this path connects Pulse to Proxmox- without installing the unified agent, so it does not include temperature- monitoring or Pulse Patrol automation.+ <strong>Advanced API inventory path:</strong> this connects Pulse to Proxmox+ without installing the unified agent, so temperature monitoring and Pulse+ Patrol automation stay unavailable until an agent is installed.</p></div><p class="text-blue-800 dark:text-blue-200">@@ -323,7 +365,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</li></ul><p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">- Fully automatic - no manual token copying needed!+ Fully automatic: no manual token copying needed.</p></div></div>@@ -332,7 +374,8 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<Show when={state.formData().setupMode === 'manual'}><div class="space-y-3"><p class="text-blue-800 dark:text-blue-200 mb-2">- Run these commands one by one on your Proxmox VE server:+ Advanced manual token setup. Run these commands one by one on your Proxmox VE+ server, then paste the token into the fields below:</p><div class="space-y-3">@@ -510,6 +553,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</svg>Connection Setup</h5>+ {setupStrategyPanel()}<div class="space-y-3 text-xs"><div class="flex gap-2 flex-wrap">@@ -574,8 +618,9 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<Show when={state.formData().setupMode === 'agent'}><div class="space-y-3"><p class="text-xs text-muted">- Install the Pulse agent on your Proxmox Backup Server. This is the recommended- method as it provides:+ Recommended API + Agent setup. This single command creates the API token,+ installs Pulse Agent, registers the server, and leaves Pulse waiting for the+ agent check-in:</p><ul class="text-xs text-muted list-disc list-inside space-y-1"><li>One-command setup (creates API user and token automatically)</li>@@ -646,13 +691,21 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<p class="text-xs text-red-500">{state.agentCommandError()}</p></Show><p class="text-xs text-muted">- The node will automatically appear in Pulse once the agent connects.+ No token fields are needed here. The server appears in Pulse automatically after+ the agent connects.</p></div></Show><Show when={state.formData().setupMode === 'auto'}><div class="space-y-3">+ <div class="rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-700 dark:bg-amber-900">+ <p class="text-xs text-amber-800 dark:text-amber-200">+ <strong>Advanced API inventory path:</strong> this connects Pulse to Proxmox+ Backup Server without installing the unified agent, so host-local telemetry+ and agent-driven operations stay unavailable until an agent is installed.+ </p>+ </div><p class="text-blue-800 dark:text-blue-200">Just copy and run this one command on your Proxmox Backup Server:</p>@@ -691,7 +744,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<code class="text-blue-400">{state.formData().host? 'Click the copy button to generate the setup command'- : '⚠️ Please enter the Endpoint URL above first'}+ : 'Please enter the Endpoint URL above first'}</code>}>@@ -729,7 +782,10 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</svg><div class="text-xs text-amber-700 dark:text-amber-300"><p class="font-semibold mb-1">If the command doesn't work:</p>- <p>Your PBS server may not be able to reach Pulse. Use the alternative method below.</p>+ <p>+ Your PBS server may not be able to reach Pulse. Use the alternative+ method below.+ </p></div></div></div>@@ -792,7 +848,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</li></ul><p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">- ✨ Fully automatic - no manual token copying needed!+ Fully automatic: no manual token copying needed.</p></div></div>@@ -801,7 +857,8 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro<Show when={state.formData().setupMode === 'manual'}><div class="space-y-3"><p class="text-blue-800 dark:text-blue-200 mb-2">- Run these commands one by one on your Proxmox Backup Server:+ Advanced manual token setup. Run these commands one by one on your Proxmox+ Backup Server, then paste the token into the fields below:</p><div class="space-y-3">@@ -869,7 +926,7 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</code></div><p class="text-amber-600 dark:text-amber-400 text-xs mt-1">- ⚠️ Copy the token value immediately - it won't be shown again!+ Copy the token value immediately - it won't be shown again!</p></div>@@ -994,8 +1051,8 @@ export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionPro</li><li>Copy the generated Token ID (e.g.{' '}- <code class="font-mono">pulse-monitor@pmg!pulse-edge</code>) and the secret value- into the fields below.+ <code class="font-mono">pulse-monitor@pmg!pulse-edge</code>) and the secret value into+ the fields below.</li></ol><p class="text-xs text-muted">diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex 379ca5a42c..90ca08d6f8 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -527,9 +527,17 @@ describe('InfrastructureWorkspace', () => {await waitFor(() => expect(screen.getByRole('dialog')).toBeInTheDocument());const dialog = screen.getByRole('dialog');expect(screen.getAllByText('Add infrastructure').length).toBeGreaterThan(0);- expect(screen.getByText('Choose the source type you want to add.')).toBeInTheDocument();+ expect(+ screen.getByText(+ 'Choose how Pulse should collect from this system: platform API, Pulse Agent, or both.',+ ),+ ).toBeInTheDocument();expect(within(dialog).getByRole('button', { name: 'Detect from address' })).toBeInTheDocument();expect(within(dialog).getByText('Virtualization')).toBeInTheDocument();+ expect(within(dialog).getAllByText('API inventory').length).toBeGreaterThan(0);+ expect(within(dialog).getByText('Agent telemetry')).toBeInTheDocument();+ expect(within(dialog).getAllByText('API + Agent').length).toBeGreaterThan(0);+ expect(within(dialog).getAllByText('Unlocks').length).toBeGreaterThan(0);expect(within(dialog).getByRole('button', { name: /TrueNAS SCALE/i })).toBeInTheDocument();});diff --git a/frontend-modern/src/components/Settings/__tests__/NodeModalSetupGuideSection.test.tsx b/frontend-modern/src/components/Settings/__tests__/NodeModalSetupGuideSection.test.tsxnew file mode 100644index 0000000000..47648f9b7b--- /dev/null+++ b/frontend-modern/src/components/Settings/__tests__/NodeModalSetupGuideSection.test.tsx@@ -0,0 +1,73 @@+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { createSignal } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';+import type { NodeModalNodeType, NodeModalSetupMode } from '@/utils/nodeModalPresentation';+import type { NodeModalState } from '../useNodeModalState';+import { NodeModalSetupGuideSection } from '../NodeModalSetupGuideSection';++const renderSetupGuide = (nodeType: NodeModalNodeType = 'pve') => {+ const Harness = () => {+ const [setupMode, setSetupMode] = createSignal<NodeModalSetupMode>('agent');+ const updateField = vi.fn((field: string, value: string | boolean | number) => {+ if (field === 'setupMode') {+ setSetupMode(value as NodeModalSetupMode);+ }+ });++ const state = {+ agentCommandError: () => null,+ agentInstallCommand: () => '',+ copyCommand: vi.fn(),+ copyProxmoxAgentInstallCommand: vi.fn(),+ copyQuickSetupCommand: vi.fn(),+ downloadProxmoxSetupScript: vi.fn(),+ formData: () => ({ setupMode: setupMode(), host: '' }),+ isAdvancedSetupMode: () => setupMode() === 'auto' || setupMode() === 'manual',+ loadingAgentCommand: () => false,+ quickSetupExpiry: () => null,+ quickSetupExpiryLabel: () => '',+ quickSetupPreviewCommand: () => '',+ quickSetupTokenHint: () => '',+ updateField,+ } as unknown as NodeModalState;++ return <NodeModalSetupGuideSection modalProps={{ nodeType } as any} state={state} />;+ };++ render(() => <Harness />);+};++describe('NodeModalSetupGuideSection', () => {+ afterEach(() => cleanup());++ it('keeps Proxmox Agent install framed as the recommended API plus Agent path', () => {+ renderSetupGuide('pve');++ expect(screen.getByText('Source strategy')).toBeInTheDocument();+ expect(screen.getByText('API + Agent')).toBeInTheDocument();+ expect(screen.getByText(/No token fields are needed in this form/i)).toBeInTheDocument();+ expect(screen.getByText(/No token fields are needed here/i)).toBeInTheDocument();+ expect(screen.queryByText('Manual API token')).not.toBeInTheDocument();+ });++ it('labels Proxmox direct and manual setup as advanced escape hatches', () => {+ renderSetupGuide('pve');++ fireEvent.click(screen.getByRole('button', { name: /^Advanced$/i }));+ expect(screen.getByText('API inventory')).toBeInTheDocument();+ expect(screen.getByText(/Advanced API inventory path/i)).toBeInTheDocument();++ fireEvent.click(screen.getByRole('button', { name: /^Manual Token Setup$/i }));+ expect(screen.getByText('Manual API token')).toBeInTheDocument();+ expect(screen.getByText(/Advanced manual token setup/i)).toBeInTheDocument();+ expect(screen.getByText(/Advanced escape hatch: use this only when/i)).toBeInTheDocument();+ });++ it('applies the same API plus Agent strategy language to PBS', () => {+ renderSetupGuide('pbs');++ expect(screen.getByText('API + Agent')).toBeInTheDocument();+ expect(screen.getByText(/creates the Proxmox Backup Server API token/i)).toBeInTheDocument();+ expect(screen.getByText(/No token fields are needed here/i)).toBeInTheDocument();+ });+});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex aa5b3dbb96..1f346ff3fb 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -16,6 +16,7 @@ import addressProbeStepSource from '../ConnectionEditor/AddressProbeStep.tsx?rawimport connectionEditorStateSource from '../ConnectionEditor/useConnectionEditor.ts?raw';import nodeCredentialSlotSource from '../ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx?raw';import nodeModalAuthenticationSectionSource from '../NodeModalAuthenticationSection.tsx?raw';+import nodeModalSetupGuideSectionSource from '../NodeModalSetupGuideSection.tsx?raw';import nodeModalStatusFooterSource from '../NodeModalStatusFooter.tsx?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';import trueNASCredentialSlotSource from '../ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx?raw';@@ -186,6 +187,10 @@ describe('settings architecture guardrails', () => {expect(infrastructureSourceManagerSource).not.toContain('Connection types');expect(infrastructureSourcePickerSource).toContain('Detect from address');expect(infrastructureSourcePickerSource).toContain('getInfrastructureSourcePickerGroups');+ expect(infrastructureSourcePickerSource).toContain(+ 'getInfrastructureSourceStrategyPresentation',+ );+ expect(infrastructureSourcePickerSource).toContain('Unlocks');expect(infrastructureSourcePickerSource).toContain('group.label');expect(settingsHeaderMetaSource).toContain("description: 'Configure the public URL, CORS, embedding, and webhook network boundaries.'",@@ -231,6 +236,10 @@ describe('settings architecture guardrails', () => {expect(infrastructureOnboardingPresentationSource).toContain('getInfrastructureSourcePickerGroups',);+ expect(infrastructureOnboardingPresentationSource).toContain(+ 'getInfrastructureSourceStrategyPresentation',+ );+ expect(infrastructureOnboardingPresentationSource).toContain('API + Agent');expect(infrastructureOnboardingPresentationSource).toContain('getInfrastructureSupportSummaryBadges',);@@ -247,6 +256,12 @@ describe('settings architecture guardrails', () => {expect(nodeModalAuthenticationSectionSource).toContain("state.formData().setupMode === 'manual'",);+ expect(nodeModalAuthenticationSectionSource).toContain('Advanced manual token path');+ expect(nodeModalSetupGuideSectionSource).toContain('Source strategy');+ expect(nodeModalSetupGuideSectionSource).toContain('API + Agent');+ expect(nodeModalSetupGuideSectionSource).toContain('API inventory');+ expect(nodeModalSetupGuideSectionSource).toContain('Manual API token');+ expect(nodeModalSetupGuideSectionSource).toContain('No token fields are needed');expect(nodeModalStatusFooterSource).toContain('guidedSetupOnlyMode');expect(nodeModalStateSource).toContain('data.setupMode !==');diff --git a/frontend-modern/src/utils/__tests__/infrastructureOnboardingPresentation.test.ts b/frontend-modern/src/utils/__tests__/infrastructureOnboardingPresentation.test.tsindex e0c60a65b9..1385710f47 100644--- a/frontend-modern/src/utils/__tests__/infrastructureOnboardingPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/infrastructureOnboardingPresentation.test.ts@@ -7,6 +7,7 @@ import {getInfrastructureOnboardingProductPresentation,getInfrastructureSourceManagerProducts,getInfrastructureSourcePickerGroups,+ getInfrastructureSourceStrategyPresentation,getInfrastructureSupportSummaryBadges,} from '@/utils/infrastructureOnboardingPresentation';@@ -25,10 +26,30 @@ describe('infrastructureOnboardingPresentation', () => {expect(agent.bestFor).toContain('full node-local telemetry');expect(agent.coverage).toContain('Low-overhead host telemetry');expect(agent.catalogDescription).toContain('Low-overhead host telemetry');+ expect(agent.sourceStrategy).toBe('agent');+ expect(pve.sourceStrategy).toBe('api-agent');expect(pve.coverage).toContain('Install Pulse Agent on each node');expect(pve.coverage).toContain('SMART data');});+ it('keeps the shared source-strategy vocabulary explicit for add flows', () => {+ expect(getInfrastructureSourceStrategyPresentation('api')).toMatchObject({+ label: 'API inventory',+ summary: 'Platform API',+ });+ expect(getInfrastructureSourceStrategyPresentation('agent')).toMatchObject({+ label: 'Agent telemetry',+ summary: 'Pulse Agent',+ });+ expect(getInfrastructureSourceStrategyPresentation('api-agent')).toMatchObject({+ label: 'API + Agent',+ summary: 'Platform API with Pulse Agent',+ });++ expect(getInfrastructureOnboardingProductPresentation('vmware').sourceStrategy).toBe('api');+ expect(getInfrastructureOnboardingProductPresentation('pbs').sourceStrategy).toBe('api-agent');+ });+it('keeps supported API products separate from the admitted VMware path', () => {expect(getInfrastructureApiProductsByGovernanceState('supported').map((product) => product.label),diff --git a/frontend-modern/src/utils/infrastructureOnboardingPresentation.ts b/frontend-modern/src/utils/infrastructureOnboardingPresentation.tsindex b33f01503a..771973d962 100644--- a/frontend-modern/src/utils/infrastructureOnboardingPresentation.ts+++ b/frontend-modern/src/utils/infrastructureOnboardingPresentation.ts@@ -15,6 +15,7 @@ export interface InfrastructureOnboardingProductPresentation {bestFor: string;coverage: string;catalogDescription: string;+ sourceStrategy: InfrastructureSourceStrategy;autoDetect: boolean;governanceState: PlatformGovernanceState;defaultSurfaceKeys: readonly string[];@@ -36,11 +37,20 @@ interface BaseProductPresentation {bestFor: string;coverage: string;catalogDescription: string;+ sourceStrategy: InfrastructureSourceStrategy;autoDetect: boolean;sourcePlatformId?: string;defaultSurfaceKeys: readonly string[];}+export type InfrastructureSourceStrategy = 'api' | 'agent' | 'api-agent';++export interface InfrastructureSourceStrategyPresentation {+ label: string;+ summary: string;+ detail: string;+}+export interface InfrastructureOnboardingPathPresentation {title: string;description: string;@@ -48,6 +58,28 @@ export interface InfrastructureOnboardingPathPresentation {coverage: string;}+const SOURCE_STRATEGY_PRESENTATION: Record<+ InfrastructureSourceStrategy,+ InfrastructureSourceStrategyPresentation+> = {+ api: {+ label: 'API inventory',+ summary: 'Platform API',+ detail: 'Uses the platform API for inventory, health, and managed resources.',+ },+ agent: {+ label: 'Agent telemetry',+ summary: 'Pulse Agent',+ detail: 'Installs Pulse Agent for host telemetry, local services, Docker, and Kubernetes.',+ },+ 'api-agent': {+ label: 'API + Agent',+ summary: 'Platform API with Pulse Agent',+ detail:+ 'Starts from platform inventory and adds Pulse Agent when node-local telemetry is needed.',+ },+};+const PRODUCT_PRESENTATION: Record<InfrastructureOnboardingConnectionType,BaseProductPresentation@@ -58,6 +90,7 @@ const PRODUCT_PRESENTATION: Record<'Linux, macOS, Windows, FreeBSD, and compatible hosts such as Unraid. Recommended on each machine where you want full node-local telemetry.',coverage: 'Low-overhead host telemetry, SMART, services, Docker, and Kubernetes',catalogDescription: 'Low-overhead host telemetry, services, Docker, Kubernetes',+ sourceStrategy: 'agent',autoDetect: false,defaultSurfaceKeys: ['host'],},@@ -66,6 +99,7 @@ const PRODUCT_PRESENTATION: Record<bestFor: 'vCenter-managed VMware environments',coverage: 'VM inventory, ESXi host health, datastore status',catalogDescription: 'VM inventory, ESXi hosts, datastores',+ sourceStrategy: 'api',autoDetect: true,sourcePlatformId: 'vmware-vsphere',defaultSurfaceKeys: ['vms', 'hosts', 'datastores'],@@ -75,6 +109,7 @@ const PRODUCT_PRESENTATION: Record<bestFor: 'TrueNAS appliances with API-backed management',coverage: 'Pools, datasets, apps, replications',catalogDescription: 'Pools, datasets, apps, replications',+ sourceStrategy: 'api',autoDetect: true,sourcePlatformId: 'truenas',defaultSurfaceKeys: ['datasets', 'pools', 'replication'],@@ -85,6 +120,7 @@ const PRODUCT_PRESENTATION: Record<coverage:'VMs, containers, storage, and cluster health. Install Pulse Agent on each node when you want full node-local telemetry such as temperatures and SMART data',catalogDescription: 'VMs, containers, storage, cluster health',+ sourceStrategy: 'api-agent',autoDetect: true,sourcePlatformId: 'proxmox-pve',defaultSurfaceKeys: ['vms', 'containers', 'storage', 'backups'],@@ -94,15 +130,24 @@ const PRODUCT_PRESENTATION: Record<bestFor: 'Backup infrastructure and protected storage',coverage: 'Backup jobs, sync, verify, prune, GC',catalogDescription: 'Backup jobs, sync, verify, prune, GC',+ sourceStrategy: 'api-agent',autoDetect: true,sourcePlatformId: 'proxmox-pbs',- defaultSurfaceKeys: ['backups', 'datastores', 'syncJobs', 'verifyJobs', 'pruneJobs', 'garbageJobs'],+ defaultSurfaceKeys: [+ 'backups',+ 'datastores',+ 'syncJobs',+ 'verifyJobs',+ 'pruneJobs',+ 'garbageJobs',+ ],},pmg: {label: 'Proxmox Mail Gateway',bestFor: 'Mail filtering and delivery operations',coverage: 'Mail stats, queues, quarantine, relay health',catalogDescription: 'Mail stats, queues, quarantine, relay health',+ sourceStrategy: 'api',autoDetect: true,sourcePlatformId: 'proxmox-pmg',defaultSurfaceKeys: ['mailStats', 'queues', 'quarantine', 'domainStats'],@@ -216,6 +261,10 @@ export const getInfrastructureOnboardingProductPresentation = (governanceState: governanceStateForType(type),});+export const getInfrastructureSourceStrategyPresentation = (+ strategy: InfrastructureSourceStrategy,+): InfrastructureSourceStrategyPresentation => SOURCE_STRATEGY_PRESENTATION[strategy];+export const getInfrastructureApiProductPresentations =(): InfrastructureOnboardingProductPresentation[] =>API_PRODUCT_ORDER.map((type) => getInfrastructureOnboardingProductPresentation(type));