Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Move discovery settings into infrastructure

rcourtman350efa0f473d
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 569a088104..4d7a1afcd4 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -45,47 +45,50 @@ management, and fleet control surfaces.
23. `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`
24. `frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx`
25. `frontend-modern/src/components/Settings/InfrastructureSourcePicker.tsx`
-26. `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`
-27. `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`
-28. `frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx`
-29. `frontend-modern/src/components/Settings/SettingsSectionNav.tsx`
-30. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`
-31. `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`
-32. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx`
-33. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx`
-34. `frontend-modern/src/components/Settings/nodeModalModel.ts`
-35. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx`
-36. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx`
-37. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx`
-38. `frontend-modern/src/components/Settings/useNodeModalState.ts`
-39. `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`
-40. `frontend-modern/src/components/Infrastructure/deploy/ResultsStep.tsx`
-41. `frontend-modern/src/utils/agentProfilesPresentation.ts`
-42. `frontend-modern/src/utils/agentInstallCommand.ts`
-43. `frontend-modern/src/utils/infrastructureOnboardingPresentation.ts`
-44. `frontend-modern/src/api/nodes.ts`
-45. `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`
-46. `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`
-47. `frontend-modern/src/components/Settings/infrastructureSettingsModel.ts`
-48. `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`
-49. `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`
-50. `frontend-modern/src/utils/infrastructureSettingsPresentation.ts`
-51. `frontend-modern/src/utils/agentCapabilityPresentation.ts`
-49. `frontend-modern/src/utils/agentProfileSuggestionPresentation.ts`
-50. `frontend-modern/src/utils/configuredNodeCapabilityPresentation.ts`
-51. `frontend-modern/src/utils/configuredNodeStatusPresentation.ts`
-52. `frontend-modern/src/utils/unifiedAgentInventoryPresentation.ts`
-53. `frontend-modern/src/utils/unifiedAgentStatusPresentation.ts`
-54. `frontend-modern/src/utils/clusterEndpointPresentation.ts`
-55. `frontend-modern/src/utils/nodeModalPresentation.ts`
-56. `frontend-modern/src/utils/proxmoxSettingsPresentation.ts`
-57. `frontend-modern/src/components/Settings/platformConnectionsModel.ts`
-58. `frontend-modern/src/components/Settings/useTrueNASSettingsPanelState.ts`
-59. `frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`
-60. `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`
-61. `internal/hostagent/proxmox_setup.go`
-62. `internal/remoteconfig/client.go`
-63. `internal/agenttls/config.go`
+26. `frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx`
+27. `frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx`
+28. `frontend-modern/src/components/Settings/discoverySettingsModel.ts`
+29. `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`
+30. `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`
+31. `frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx`
+32. `frontend-modern/src/components/Settings/SettingsSectionNav.tsx`
+33. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`
+34. `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`
+35. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx`
+36. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx`
+37. `frontend-modern/src/components/Settings/nodeModalModel.ts`
+38. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx`
+39. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx`
+40. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx`
+41. `frontend-modern/src/components/Settings/useNodeModalState.ts`
+42. `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`
+43. `frontend-modern/src/components/Infrastructure/deploy/ResultsStep.tsx`
+44. `frontend-modern/src/utils/agentProfilesPresentation.ts`
+45. `frontend-modern/src/utils/agentInstallCommand.ts`
+46. `frontend-modern/src/utils/infrastructureOnboardingPresentation.ts`
+47. `frontend-modern/src/api/nodes.ts`
+48. `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`
+49. `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`
+50. `frontend-modern/src/components/Settings/infrastructureSettingsModel.ts`
+51. `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`
+52. `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`
+53. `frontend-modern/src/utils/infrastructureSettingsPresentation.ts`
+54. `frontend-modern/src/utils/agentCapabilityPresentation.ts`
+55. `frontend-modern/src/utils/agentProfileSuggestionPresentation.ts`
+56. `frontend-modern/src/utils/configuredNodeCapabilityPresentation.ts`
+57. `frontend-modern/src/utils/configuredNodeStatusPresentation.ts`
+58. `frontend-modern/src/utils/unifiedAgentInventoryPresentation.ts`
+59. `frontend-modern/src/utils/unifiedAgentStatusPresentation.ts`
+60. `frontend-modern/src/utils/clusterEndpointPresentation.ts`
+61. `frontend-modern/src/utils/nodeModalPresentation.ts`
+62. `frontend-modern/src/utils/proxmoxSettingsPresentation.ts`
+63. `frontend-modern/src/components/Settings/platformConnectionsModel.ts`
+64. `frontend-modern/src/components/Settings/useTrueNASSettingsPanelState.ts`
+65. `frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`
+66. `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`
+67. `internal/hostagent/proxmox_setup.go`
+68. `internal/remoteconfig/client.go`
+69. `internal/agenttls/config.go`
## Shared Boundaries
@@ -223,6 +226,7 @@ an add-only capacity posture.
Persistence-sensitive NAS targets must keep one canonical continuity model here: installer-owned bootstraps may use flash-backed or immutable-root launch hooks only as thin trampolines, while the durable wrapper, state, and reboot-surviving binary copy stay in the governed persistent state directory that updater continuity also refreshes.
9. Add or change profile management, the extracted agent profiles runtime owner, the infrastructure source-manager landing, the pure unified-agent inventory/install model, the connections-ledger workspace shell, the unified ConnectionEditor and its per-type credential slots, route model, shared install section owner, the shared direct-node/discovery infrastructure settings owners plus their model, shared frontend install-command assembly, Proxmox setup/install API transport, TrueNAS platform-connection management, VMware platform-connection management, the shared monitored-system admission preview shell for those platform connections, setup-completion install handoff transport, deploy-fallback manual install transport, and fleet-control presentation through `frontend-modern/src/api/agentProfiles.ts`, `frontend-modern/src/api/nodes.ts`, `frontend-modern/src/components/Settings/AgentProfilesPanel.tsx`, `frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts`, `frontend-modern/src/components/Settings/ConnectionsTable.tsx`, `frontend-modern/src/components/Settings/connectionsTableModel.ts`, `frontend-modern/src/components/Settings/useConnectionsLedger.ts`, `frontend-modern/src/components/Settings/useConnectionRowActions.ts`, `frontend-modern/src/components/Settings/ConnectionEditor/ConnectionEditor.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/AddressProbeStep.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/useConnectionEditor.ts`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx`, `frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx`, `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`, `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`, `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`, `frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx`, `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`, `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`, `frontend-modern/src/components/Settings/platformConnectionsModel.ts`, `frontend-modern/src/components/Settings/useTrueNASSettingsPanelState.ts`, `frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`, `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`, `frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx`, `frontend-modern/src/components/Settings/SettingsSectionNav.tsx`, `frontend-modern/src/components/Settings/infrastructureSettingsModel.ts`, `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`, `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`, `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`, `frontend-modern/src/components/Settings/nodeModalModel.ts`, `frontend-modern/src/components/Settings/useNodeModalState.ts`, `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`, and `frontend-modern/src/utils/agentInstallCommand.ts`. Phase 9 retired the legacy reporting/inventory surface (InfrastructureOperationsController, InfrastructureInventorySection, InfrastructureActiveRowDetails, InfrastructureIgnoredRowDetails, InfrastructureStopMonitoringDialog, useInfrastructureReportingState) and the per-type shells (PlatformConnectionsWorkspace, ProxmoxSettingsPanel, ProxmoxDirectWorkspace, ProxmoxConfiguredNodesTable, ProxmoxDirectConnectionsCard, ProxmoxDiscoveryResultsCard, ProxmoxDeleteNodeDialog, ProxmoxNodeModalStack, NodeModal shell, TrueNASSettingsPanel, VMwareSettingsPanel, useProxmoxDirectWorkspaceState); lifecycle extensions must route through the unified aggregator ledger, source-manager cards, and ConnectionEditor credential slots rather than reintroducing those retired surfaces.
Those lifecycle-owned settings hooks may consume websocket state only through `frontend-modern/src/contexts/appRuntime.ts`; they must not import `frontend-modern/src/App.tsx` or recreate root-shell providers.
+ Discovery configuration is part of that same lifecycle-owned workspace boundary. `InfrastructureSourceManager.tsx` must open one canonical discovery editor through `InfrastructureDiscoverySettingsDialog.tsx`, `DiscoverySettingsForm.tsx`, and `discoverySettingsModel.ts`, while the System/Network shell stays limited to network-boundary controls instead of reintroducing a second editable discovery surface.
Public demo and other read-only settings posture must stay reporting-first
on that same lifecycle-owned workspace boundary: infrastructure workspace
routes may retain install and platform setup surfaces for manageable
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6f7e484df1..972b8905c0 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -109,35 +109,34 @@ work extends shared components instead of creating new local variants.
83. `frontend-modern/src/utils/emptyStatePresentation.ts`
84. `frontend-modern/src/utils/typeColumnPresentation.ts`
85. `frontend-modern/src/pages/__tests__/Operations.helpers.test.ts`
-86. `frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx`
-87. `frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx`
-88. `frontend-modern/src/components/Settings/networkSettingsModel.ts`
-89. `frontend-modern/src/components/Settings/useDiscoverySettingsState.ts`
-90. `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`
-91. `frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx`
-92. `frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts`
-93. `frontend-modern/src/components/Settings/settingsNavigationModel.ts`
-94. `frontend-modern/src/components/Settings/settingsNavCatalog.ts`
-95. `frontend-modern/src/components/Settings/settingsNavVisibility.ts`
-96. `frontend-modern/src/components/Settings/settingsRouting.ts`
-97. `frontend-modern/src/components/Settings/settingsTabSaveBehavior.ts`
-98. `frontend-modern/src/components/Settings/settingsTypes.ts`
-99. `frontend-modern/src/components/Settings/useSettingsNavigation.ts`
-100. `frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx`
-101. `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`
-102. `frontend-modern/src/components/Settings/DockerRuntimeSettingsCard.tsx`
-103. `frontend-modern/src/components/shared/EnvironmentLockBadge.tsx`
-104. `frontend-modern/src/utils/environmentLockPresentation.ts`
-105. `frontend-modern/src/utils/docsLinks.ts`
-106. `tests/integration/tests/20-local-doc-links.spec.ts`
-107. `frontend-modern/src/index.css`
-108. `frontend-modern/src/components/shared/summaryInteractionA11y.ts`
-109. `frontend-modern/src/components/shared/SummaryRowActionButton.tsx`
-110. `frontend-modern/src/hooks/createNonSuspendingQuery.ts`
-111. `frontend-modern/src/components/shared/SummaryTableCardHeader.tsx`
-112. `frontend-modern/src/components/shared/UpgradeLink.tsx`
-113. `frontend-modern/src/components/shared/useUpgradeNavigation.ts`
-114. `frontend-modern/src/utils/upgradeNavigation.ts`
+86. `frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx`
+87. `frontend-modern/src/components/Settings/networkSettingsModel.ts`
+88. `frontend-modern/src/components/Settings/useDiscoverySettingsState.ts`
+89. `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`
+90. `frontend-modern/src/components/Settings/settingsPanelRegistryContext.tsx`
+91. `frontend-modern/src/components/Settings/settingsPanelRegistryLoaders.ts`
+92. `frontend-modern/src/components/Settings/settingsNavigationModel.ts`
+93. `frontend-modern/src/components/Settings/settingsNavCatalog.ts`
+94. `frontend-modern/src/components/Settings/settingsNavVisibility.ts`
+95. `frontend-modern/src/components/Settings/settingsRouting.ts`
+96. `frontend-modern/src/components/Settings/settingsTabSaveBehavior.ts`
+97. `frontend-modern/src/components/Settings/settingsTypes.ts`
+98. `frontend-modern/src/components/Settings/useSettingsNavigation.ts`
+99. `frontend-modern/src/components/Settings/useSettingsPanelRegistry.tsx`
+100. `frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx`
+101. `frontend-modern/src/components/Settings/DockerRuntimeSettingsCard.tsx`
+102. `frontend-modern/src/components/shared/EnvironmentLockBadge.tsx`
+103. `frontend-modern/src/utils/environmentLockPresentation.ts`
+104. `frontend-modern/src/utils/docsLinks.ts`
+105. `tests/integration/tests/20-local-doc-links.spec.ts`
+106. `frontend-modern/src/index.css`
+107. `frontend-modern/src/components/shared/summaryInteractionA11y.ts`
+108. `frontend-modern/src/components/shared/SummaryRowActionButton.tsx`
+109. `frontend-modern/src/hooks/createNonSuspendingQuery.ts`
+110. `frontend-modern/src/components/shared/SummaryTableCardHeader.tsx`
+111. `frontend-modern/src/components/shared/UpgradeLink.tsx`
+112. `frontend-modern/src/components/shared/useUpgradeNavigation.ts`
+113. `frontend-modern/src/utils/upgradeNavigation.ts`
115. `frontend-modern/src/components/DemoBanner.tsx`
116. `frontend-modern/src/components/Login.tsx`
117. `frontend-modern/src/stores/demoMode.ts`
@@ -2200,7 +2199,6 @@ into section-local strings.
`frontend-modern/src/components/Settings/AuditWebhookPanel.tsx`,
`frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx`,
`frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx`,
-`frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx`,
`frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx`,
`frontend-modern/src/components/Settings/networkSettingsModel.ts`,
`frontend-modern/src/components/Settings/SecurityAuthPanel.tsx`,
@@ -2252,18 +2250,19 @@ Settings-shell framing copy for self-hosted billing must route through
settings-owned adapter instead of importing generic commercial presentation
helpers in ways that can reintroduce top-level bundle-init cycles.
`frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx` is now a
-shell only. `frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx`
-owns discovery controls and shared subnet presets, while
+shell only for network-boundary controls.
`frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx`
-owns the public URL, CORS, embedding, and webhook-boundary UI. Shared prop
-contracts for that surface must extend
+owns the public URL, CORS, embedding, and webhook-boundary UI, while the
+editable discovery configuration entry point is owned by the infrastructure
+workspace instead of the System/Network route. Shared prop contracts for the
+network-boundary surface must extend
`frontend-modern/src/components/Settings/networkSettingsModel.ts` instead of
re-expanding the shell or reintroducing page-local section types.
`frontend-modern/src/utils/discoveryPresentation.ts` now owns the
customer-facing discovery-section framing copy, scan-scope labels, subnet
guidance, and environment-lock messaging so
-`frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx` stays a
-settings section shell instead of re-accumulating that wording inline.
+`frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx` stays a
+shared presentation shell instead of re-accumulating that wording inline.
That same settings-shell boundary now also owns the shared settings
presentation helpers that those panels consume. `frontend-modern/src/utils/systemSettingsPresentation.ts`
is the canonical owner for shared system-settings presets, summaries, and
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index b4e47208a0..b82e2c7f1f 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -594,6 +594,9 @@
"frontend-modern/src/components/Settings/ConnectionEditor/useConnectionEditor.ts",
"frontend-modern/src/components/Settings/ConnectionsTable.tsx",
"frontend-modern/src/components/Settings/connectionsTableModel.ts",
+ "frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx",
+ "frontend-modern/src/components/Settings/discoverySettingsModel.ts",
+ "frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx",
"frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx",
"frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx",
"frontend-modern/src/components/Settings/infrastructureSettingsModel.ts",
@@ -907,6 +910,9 @@
"frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/TrueNASCredentialSlot.tsx",
"frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/VMwareCredentialSlot.tsx",
"frontend-modern/src/components/Settings/ConnectionEditor/useConnectionEditor.ts",
+ "frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx",
+ "frontend-modern/src/components/Settings/discoverySettingsModel.ts",
+ "frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx",
"frontend-modern/src/components/Settings/infrastructureSettingsModel.ts",
"frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx",
"frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts",
@@ -2762,7 +2768,6 @@
"frontend-modern/src/components/Settings/DockerRuntimeSettingsCard.tsx",
"frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx",
"frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx",
- "frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx",
"frontend-modern/src/components/Settings/networkSettingsModel.ts",
"frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx",
"frontend-modern/src/components/Settings/OperationsPanel.tsx",
@@ -2894,7 +2899,6 @@
"frontend-modern/src/components/Settings/DockerRuntimeSettingsCard.tsx",
"frontend-modern/src/components/Settings/GeneralSettingsPanel.tsx",
"frontend-modern/src/components/Settings/NetworkBoundarySettingsSection.tsx",
- "frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx",
"frontend-modern/src/components/Settings/networkSettingsModel.ts",
"frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx",
"frontend-modern/src/components/Settings/OperationsPanel.tsx",
diff --git a/frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx b/frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx
similarity index 85%
rename from frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx
rename to frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx
index 055bf98821..200a45c2e1 100644
--- a/frontend-modern/src/components/Settings/NetworkDiscoverySection.tsx
+++ b/frontend-modern/src/components/Settings/DiscoverySettingsForm.tsx
@@ -13,9 +13,9 @@ import {
getNetworkDiscoverySubnetPresentation,
} from '@/utils/discoveryPresentation';
import { COMMON_DISCOVERY_SUBNETS } from '@/utils/systemSettingsPresentation';
-import type { NetworkDiscoverySectionProps } from './networkSettingsModel';
+import type { DiscoverySettingsFormProps } from './discoverySettingsModel';
-export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> = (props) => {
+export const DiscoverySettingsForm: Component<DiscoverySettingsFormProps> = (props) => {
const priorityNotice = getNetworkDiscoveryPriorityNotice();
const sectionPresentation = () =>
getNetworkDiscoverySectionPresentation(props.discoveryEnabled());
@@ -24,34 +24,32 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
const subnetPresentation = () => getNetworkDiscoverySubnetPresentation(props.discoveryMode());
return (
- <>
- <div class="p-4 sm:p-6">
- <div class="rounded-md border border-blue-200 dark:border-blue-800 bg-blue-50/70 dark:bg-blue-950/40 p-4">
- <div class="flex items-start gap-3">
- <svg
- class="w-5 h-5 text-blue-600 dark:text-blue-400 mt-0.5 flex-shrink-0"
- fill="none"
- stroke="currentColor"
- viewBox="0 0 24 24"
- >
- <path
- stroke-linecap="round"
- stroke-linejoin="round"
- stroke-width="2"
- d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
- />
- </svg>
- <div class="text-sm text-blue-800 dark:text-blue-200">
- <p class="font-medium mb-1">{priorityNotice.title}</p>
- <ul class="space-y-1">
- <For each={priorityNotice.items}>{(item) => <li>• {item}</li>}</For>
- </ul>
- </div>
+ <div class="space-y-5">
+ <div class="rounded-md border border-blue-200 bg-blue-50/70 p-4 dark:border-blue-800 dark:bg-blue-950/40">
+ <div class="flex items-start gap-3">
+ <svg
+ class="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-600 dark:text-blue-400"
+ fill="none"
+ stroke="currentColor"
+ viewBox="0 0 24 24"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
+ />
+ </svg>
+ <div class="text-sm text-blue-800 dark:text-blue-200">
+ <p class="mb-1 font-medium">{priorityNotice.title}</p>
+ <ul class="space-y-1">
+ <For each={priorityNotice.items}>{(item) => <li>• {item}</li>}</For>
+ </ul>
</div>
</div>
</div>
- <section class="p-4 sm:p-6 space-y-5">
+ <section class="space-y-5">
<SectionHeader
title={sectionPresentation().headerTitle}
description={sectionPresentation().headerDescription}
@@ -111,7 +109,7 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
}
}}
disabled={props.envOverrides().discoverySubnet || props.savingDiscoverySettings()}
- class="mt-1 h-5 w-5 sm:h-4 sm:w-4 border-slate-300 text-blue-600 focus:ring-blue-500"
+ class="mt-1 h-5 w-5 border-slate-300 text-blue-600 focus:ring-blue-500 sm:h-4 sm:w-4"
/>
<div class="space-y-1">
<p class="text-sm font-medium text-base-content">{autoModePresentation.label}</p>
@@ -133,11 +131,11 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
checked={props.discoveryMode() === 'custom'}
onChange={() => {
if (props.discoveryMode() !== 'custom') {
- props.handleDiscoveryModeChange('custom');
+ void props.handleDiscoveryModeChange('custom');
}
}}
disabled={props.envOverrides().discoverySubnet || props.savingDiscoverySettings()}
- class="mt-1 h-5 w-5 sm:h-4 sm:w-4 border-slate-300 text-blue-600 focus:ring-blue-500"
+ class="mt-1 h-5 w-5 border-slate-300 text-blue-600 focus:ring-blue-500 sm:h-4 sm:w-4"
/>
<div class="space-y-1">
<p class="text-sm font-medium text-base-content">
@@ -160,7 +158,11 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
return (
<button
type="button"
- class={`rounded border px-2.5 py-1 text-[0.7rem] transition-colors ${isActive ? 'border-blue-500 bg-blue-600 text-white dark:border-blue-400 dark:bg-blue-500' : 'border-border text-base-content hover:border-blue-400 hover:bg-blue-50 dark:hover:border-blue-500 dark:hover:bg-blue-900'}`}
+ class={`rounded border px-2.5 py-1 text-[0.7rem] transition-colors ${
+ isActive
+ ? 'border-blue-500 bg-blue-600 text-white dark:border-blue-400 dark:bg-blue-500'
+ : 'border-border text-base-content hover:border-blue-400 hover:bg-blue-50 dark:hover:border-blue-500 dark:hover:bg-blue-900'
+ }`}
onClick={async () => {
if (props.envOverrides().discoverySubnet) {
return;
@@ -190,8 +192,7 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
}}
disabled={props.envOverrides().discoverySubnet}
classList={{
- 'cursor-not-allowed opacity-60':
- props.envOverrides().discoverySubnet,
+ 'cursor-not-allowed opacity-60': props.envOverrides().discoverySubnet,
}}
>
{preset}
@@ -232,9 +233,9 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
type="text"
value={props.discoverySubnetDraft()}
placeholder={subnetPresentation().placeholder}
- class={`w-full min-h-10 sm:min-h-10 rounded-md border px-3 py-2.5 text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 ${
+ class={`w-full min-h-10 rounded-md border px-3 py-2.5 text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 sm:min-h-10 ${
props.envOverrides().discoverySubnet
- ? 'border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-600 dark:bg-amber-900 dark:text-amber-200 cursor-not-allowed opacity-60'
+ ? 'cursor-not-allowed border-amber-300 bg-amber-50 text-amber-800 opacity-60 dark:border-amber-600 dark:bg-amber-900 dark:text-amber-200'
: 'border-border bg-surface'
}`}
disabled={props.envOverrides().discoverySubnet}
@@ -303,6 +304,6 @@ export const NetworkDiscoverySection: Component<NetworkDiscoverySectionProps> =
</div>
</Show>
</section>
- </>
+ </div>
);
};
diff --git a/frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx b/frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx
new file mode 100644
index 0000000000..c13de0cfaa
--- /dev/null
+++ b/frontend-modern/src/components/Settings/InfrastructureDiscoverySettingsDialog.tsx
@@ -0,0 +1,52 @@
+import { Component, Show } from 'solid-js';
+import X from 'lucide-solid/icons/x';
+import { Dialog } from '@/components/shared/Dialog';
+import { DiscoverySettingsForm } from './DiscoverySettingsForm';
+import type { DiscoverySettingsFormProps } from './discoverySettingsModel';
+
+interface InfrastructureDiscoverySettingsDialogProps extends DiscoverySettingsFormProps {
+ isOpen: boolean;
+ onClose: () => void;
+}
+
+const closeButtonClass =
+ 'inline-flex h-9 w-9 items-center justify-center rounded-md border border-border text-base-content transition-colors hover:bg-surface-hover';
+
+export const InfrastructureDiscoverySettingsDialog: Component<
+ InfrastructureDiscoverySettingsDialogProps
+> = (props) => {
+ return (
+ <Show when={props.isOpen}>
+ <Dialog
+ isOpen={true}
+ onClose={props.onClose}
+ ariaLabel="Discovery settings"
+ panelClass="max-w-3xl"
+ >
+ <div class="flex h-full min-h-0 flex-col">
+ <div class="flex items-start justify-between gap-4 border-b border-border bg-surface-alt px-4 py-4 sm:px-6">
+ <div class="space-y-1">
+ <h2 class="text-base font-semibold text-base-content">Discovery settings</h2>
+ <p class="text-sm text-muted">
+ Configure the saved network scope and background scan behavior for infrastructure
+ source discovery.
+ </p>
+ </div>
+ <button
+ type="button"
+ onClick={props.onClose}
+ class={closeButtonClass}
+ aria-label="Close discovery settings dialog"
+ >
+ <X class="h-4 w-4" />
+ </button>
+ </div>
+
+ <div class="min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6">
+ <DiscoverySettingsForm {...props} />
+ </div>
+ </div>
+ </Dialog>
+ </Show>
+ );
+};
diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
index 8f2c20b9d8..5336105745 100644
--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
@@ -15,6 +15,7 @@ import type { Connection, ConnectionType } from '@/api/connections';
import type { TrueNASConnection } from '@/api/truenas';
import type { VMwareConnection } from '@/api/vmware';
import type { NodeConfig, NodeConfigWithStatus } from '@/types/nodes';
+import { InfrastructureDiscoverySettingsDialog } from './InfrastructureDiscoverySettingsDialog';
import { InfrastructureInstallerSection } from './InfrastructureInstallerSection';
import { InfrastructureSourceManager } from './InfrastructureSourceManager';
import { InfrastructureSourcePicker } from './InfrastructureSourcePicker';
@@ -41,7 +42,6 @@ import {
getInfrastructureOnboardingProductPresentation,
type InfrastructureOnboardingConnectionType,
} from '@/utils/infrastructureOnboardingPresentation';
-import { settingsTabPath } from './settingsNavigationModel';
import type { DiscoveredServer } from './infrastructureSettingsModel';
export type InfrastructureWorkspaceProps = InfrastructurePlatformSettingsProps;
@@ -95,6 +95,7 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =
const [showAgentProfiles, setShowAgentProfiles] = createSignal(false);
const [editingConnection, setEditingConnection] = createSignal<Connection | null>(null);
+ const [showDiscoverySettings, setShowDiscoverySettings] = createSignal(false);
const [selectedDiscoveredSource, setSelectedDiscoveredSource] =
createSignal<DiscoveredServer | null>(null);
const readOnly = createMemo(() => presentationPolicyIsReadOnly());
@@ -252,6 +253,12 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =
}
});
+ createEffect(() => {
+ if (readOnly() && showDiscoverySettings()) {
+ setShowDiscoverySettings(false);
+ }
+ });
+
createEffect(() => {
const selected = selectedDiscoveredSource();
const activeType = activeAddType();
@@ -687,12 +694,35 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =
onOpenDiscoverySettings={
readOnly()
? undefined
- : () => navigate(settingsTabPath('system-network'), { scroll: false })
+ : () => setShowDiscoverySettings(true)
}
onOpenConnection={readOnly() ? undefined : (connection) => setEditingConnection(connection)}
onReviewDiscoveredSource={readOnly() ? undefined : (server) => reviewDiscoveredSource(server)}
/>
+ <InfrastructureDiscoverySettingsDialog
+ isOpen={showDiscoverySettings()}
+ onClose={() => setShowDiscoverySettings(false)}
+ discoveryEnabled={props.discoveryEnabled}
+ discoveryMode={props.discoveryMode}
+ discoverySubnetDraft={props.discoverySubnetDraft}
+ discoverySubnetError={props.discoverySubnetError}
+ savingDiscoverySettings={props.savingDiscoverySettings}
+ envOverrides={props.envOverrides}
+ handleDiscoveryEnabledChange={props.handleDiscoveryEnabledChange}
+ handleDiscoveryModeChange={props.handleDiscoveryModeChange}
+ setDiscoveryMode={props.setDiscoveryMode}
+ setDiscoverySubnetDraft={props.setDiscoverySubnetDraft}
+ setDiscoverySubnetError={props.setDiscoverySubnetError}
+ setLastCustomSubnet={props.setLastCustomSubnet}
+ commitDiscoverySubnet={props.commitDiscoverySubnet}
+ parseSubnetList={props.parseSubnetList}
+ normalizeSubnetList={props.normalizeSubnetList}
+ isValidCIDR={props.isValidCIDR}
+ currentDraftSubnetValue={props.currentDraftSubnetValue}
+ discoverySubnetInputRef={props.discoverySubnetInputRef}
+ />
+
<Show when={routeStep() !== null}>
<Dialog
isOpen={true}
diff --git a/frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx b/frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx
index 8a56d584d6..3899bbf422 100644
--- a/frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx
+++ b/frontend-modern/src/components/Settings/NetworkSettingsPanel.tsx
@@ -2,19 +2,16 @@ import { Component } from 'solid-js';
import SettingsPanel from '@/components/shared/SettingsPanel';
import Network from 'lucide-solid/icons/network';
import { NetworkBoundarySettingsSection } from './NetworkBoundarySettingsSection';
-import { NetworkDiscoverySection } from './NetworkDiscoverySection';
import type { NetworkSettingsPanelProps } from './networkSettingsModel';
export const NetworkSettingsPanel: Component<NetworkSettingsPanelProps> = (props) => {
return (
<SettingsPanel
title="Network"
- description="Configure discovery, CORS, embedding, and webhook network boundaries."
+ description="Configure the public URL, CORS, embedding, and webhook network boundaries."
icon={<Network class="w-5 h-5" strokeWidth={2} />}
noPadding
- bodyClass="divide-y divide-border"
>
- <NetworkDiscoverySection {...props} />
<NetworkBoundarySettingsSection {...props} />
</SettingsPanel>
);
diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx
index 1c88bd49e2..795c9ae19a 100644
--- a/frontend-modern/src/components/Settings/Settings.tsx
+++ b/frontend-modern/src/components/Settings/Settings.tsx
@@ -103,12 +103,6 @@ const Settings: Component<SettingsProps> = (props) => {
setThemePreference: props.setThemePreference,
initialLoadComplete: infrastructureSettings.initialLoadComplete,
systemSettings,
- discoverySettings: {
- ...discoverySettings,
- handleDiscoveryEnabledChange: infrastructureSettings.handleDiscoveryEnabledChange,
- handleDiscoveryModeChange: infrastructureSettings.handleDiscoveryModeChange,
- commitDiscoverySubnet: infrastructureSettings.commitDiscoverySubnet,
- },
backupTransferFlow,
securityStatus,
});
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
index d4593a4592..41296d9819 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
@@ -144,6 +144,8 @@ const baseProps = () =>
initialLoadComplete: () => true,
discoveryEnabled: () => false,
discoveryMode: () => 'auto',
+ discoverySubnetDraft: () => '',
+ discoverySubnetError: () => undefined,
discoveryScanStatus: () => ({ scanning: false }),
discoveredNodes: () => [],
savingDiscoverySettings: () => false,
@@ -166,6 +168,17 @@ const baseProps = () =>
triggerDiscoveryScan: vi.fn(),
loadDiscoveredNodes: vi.fn(),
handleDiscoveryEnabledChange: vi.fn(),
+ handleDiscoveryModeChange: vi.fn(),
+ setDiscoveryMode: vi.fn(),
+ setDiscoverySubnetDraft: vi.fn(),
+ setDiscoverySubnetError: vi.fn(),
+ setLastCustomSubnet: vi.fn(),
+ commitDiscoverySubnet: vi.fn(),
+ parseSubnetList: vi.fn(() => []),
+ normalizeSubnetList: vi.fn((value: string) => value),
+ isValidCIDR: vi.fn(() => true),
+ currentDraftSubnetValue: vi.fn(() => ''),
+ discoverySubnetInputRef: vi.fn(),
testNodeConnection: vi.fn(),
requestDeleteNode: vi.fn(),
refreshClusterNodes: vi.fn(),
@@ -258,9 +271,10 @@ describe('InfrastructureWorkspace', () => {
expect(triggerDiscoveryScan).toHaveBeenCalledTimes(1);
fireEvent.click(screen.getByRole('button', { name: /Discovery settings/i }));
- expect(navigateSpy).toHaveBeenCalledWith('/settings/system-network', {
- scroll: false,
- });
+ expect(screen.getByRole('dialog', { name: /Discovery settings/i })).toBeInTheDocument();
+ expect(
+ screen.getByText(/Configure the saved network scope and background scan behavior/i),
+ ).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /^Review$/i }));
expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=pve', {
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 4f5c5fadae..3480db9843 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -131,8 +131,12 @@ describe('settings architecture guardrails', () => {
expect(infrastructureWorkspaceSource).toContain('reviewDiscoveredSource');
expect(infrastructureWorkspaceSource).toContain('selectedDiscoveredSource');
expect(infrastructureWorkspaceSource).toContain(
- "navigate(settingsTabPath('system-network'), { scroll: false })",
+ "import { InfrastructureDiscoverySettingsDialog } from './InfrastructureDiscoverySettingsDialog';",
);
+ expect(infrastructureWorkspaceSource).toContain(
+ "const [showDiscoverySettings, setShowDiscoverySettings] = createSignal(false);",
+ );
+ expect(infrastructureWorkspaceSource).toContain('<InfrastructureDiscoverySettingsDialog');
expect(infrastructureWorkspaceSource).toContain(
"onDetectFromAddress={readOnly() ? undefined : () => openAddFlow('detect')}",
);
@@ -169,6 +173,9 @@ describe('settings architecture guardrails', () => {
expect(infrastructureSourcePickerSource).toContain('Detect from address');
expect(infrastructureSourcePickerSource).toContain('getInfrastructureSourcePickerGroups');
expect(infrastructureSourcePickerSource).toContain('group.label');
+ expect(settingsHeaderMetaSource).toContain(
+ "description: 'Configure the public URL, CORS, embedding, and webhook network boundaries.'",
+ );
});
it('keeps the detect-first editor and inline credential bodies on the shared editor model', () => {
diff --git a/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts b/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts
index 44b1b5926a..db4ce7e52a 100644
--- a/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/useSettingsInfrastructurePanelProps.test.ts
@@ -52,7 +52,18 @@ const mountHook = (
discoverySettings: {
discoveryEnabled: () => false,
discoveryMode: () => 'auto',
+ discoverySubnetDraft: () => '',
+ discoverySubnetError: () => undefined,
savingDiscoverySettings: () => false,
+ setDiscoveryMode: () => 'auto',
+ setDiscoverySubnetDraft: () => '',
+ setDiscoverySubnetError: () => undefined,
+ setLastCustomSubnet: () => '',
+ parseSubnetList: () => [],
+ normalizeSubnetList: (value: string) => value,
+ isValidCIDR: () => true,
+ currentDraftSubnetValue: () => '',
+ assignDiscoverySubnetInputRef: () => undefined,
} as Parameters<typeof useSettingsInfrastructurePanelProps>[0]['discoverySettings'],
systemSettings: {
envOverrides: () => ({}),
@@ -83,6 +94,8 @@ const mountHook = (
triggerDiscoveryScan: async () => {},
loadDiscoveredNodes: async () => {},
handleDiscoveryEnabledChange: async () => true,
+ handleDiscoveryModeChange: async () => {},
+ commitDiscoverySubnet: async () => true,
testNodeConnection: () => {},
requestDeleteNode: () => {},
refreshClusterNodes: async () => {},
diff --git a/frontend-modern/src/components/Settings/discoverySettingsModel.ts b/frontend-modern/src/components/Settings/discoverySettingsModel.ts
new file mode 100644
index 0000000000..d4784570e2
--- /dev/null
+++ b/frontend-modern/src/components/Settings/discoverySettingsModel.ts
@@ -0,0 +1,22 @@
+import type { Accessor, Setter } from 'solid-js';
+
+export interface DiscoverySettingsFormProps {
+ discoveryEnabled: Accessor<boolean>;
+ discoveryMode: Accessor<'auto' | 'custom'>;
+ discoverySubnetDraft: Accessor<string>;
+ discoverySubnetError: Accessor<string | undefined>;
+ savingDiscoverySettings: Accessor<boolean>;
+ envOverrides: Accessor<Record<string, boolean>>;
+ handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;
+ handleDiscoveryModeChange: (mode: 'auto' | 'custom') => Promise<void>;
+ setDiscoveryMode: Setter<'auto' | 'custom'>;
+ setDiscoverySubnetDraft: Setter<string>;
+ setDiscoverySubnetError: Setter<string | undefined>;
+ setLastCustomSubnet: Setter<string>;
+ commitDiscoverySubnet: (value: string) => Promise<boolean>;
+ parseSubnetList: (value: string) => string[];
+ normalizeSubnetList: (value: string) => string;
+ isValidCIDR: (value: string) => boolean;
+ currentDraftSubnetValue: () => string;
+ discoverySubnetInputRef?: (el: HTMLInputElement) => void;
+}
diff --git a/frontend-modern/src/components/Settings/networkSettingsModel.ts b/frontend-modern/src/components/Settings/networkSettingsModel.ts
index 64c646daa4..adc668ceba 100644
--- a/frontend-modern/src/components/Settings/networkSettingsModel.ts
+++ b/frontend-modern/src/components/Settings/networkSettingsModel.ts
@@ -1,11 +1,6 @@
import type { Accessor, Setter } from 'solid-js';
export interface NetworkSettingsPanelProps {
- discoveryEnabled: Accessor<boolean>;
- discoveryMode: Accessor<'auto' | 'custom'>;
- discoverySubnetDraft: Accessor<string>;
- discoverySubnetError: Accessor<string | undefined>;
- savingDiscoverySettings: Accessor<boolean>;
envOverrides: Accessor<Record<string, boolean>>;
allowedOrigins: Accessor<string>;
setAllowedOrigins: Setter<string>;
@@ -17,43 +12,9 @@ export interface NetworkSettingsPanelProps {
setWebhookAllowedPrivateCIDRs: Setter<string>;
publicURL: Accessor<string>;
setPublicURL: Setter<string>;
- handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;
- handleDiscoveryModeChange: (mode: 'auto' | 'custom') => Promise<void>;
- setDiscoveryMode: Setter<'auto' | 'custom'>;
- setDiscoverySubnetDraft: Setter<string>;
- setDiscoverySubnetError: Setter<string | undefined>;
- setLastCustomSubnet: Setter<string>;
- commitDiscoverySubnet: (value: string) => Promise<boolean>;
setHasUnsavedChanges: Setter<boolean>;
- parseSubnetList: (value: string) => string[];
- normalizeSubnetList: (value: string) => string;
- isValidCIDR: (value: string) => boolean;
- currentDraftSubnetValue: () => string;
- discoverySubnetInputRef?: (el: HTMLInputElement) => void;
}
-export type NetworkDiscoverySectionProps = Pick<
- NetworkSettingsPanelProps,
- | 'commitDiscoverySubnet'
- | 'currentDraftSubnetValue'
- | 'discoveryEnabled'
- | 'discoveryMode'
- | 'discoverySubnetDraft'
- | 'discoverySubnetError'
- | 'discoverySubnetInputRef'
- | 'envOverrides'
- | 'handleDiscoveryEnabledChange'
- | 'handleDiscoveryModeChange'
- | 'isValidCIDR'
- | 'normalizeSubnetList'
- | 'parseSubnetList'
- | 'savingDiscoverySettings'
- | 'setDiscoveryMode'
- | 'setDiscoverySubnetDraft'
- | 'setDiscoverySubnetError'
- | 'setLastCustomSubnet'
->;
-
export type NetworkBoundarySettingsSectionProps = Pick<
NetworkSettingsPanelProps,
| 'allowEmbedding'
diff --git a/frontend-modern/src/components/Settings/proxmoxSettingsModel.ts b/frontend-modern/src/components/Settings/proxmoxSettingsModel.ts
index 60beffe613..851039651b 100644
--- a/frontend-modern/src/components/Settings/proxmoxSettingsModel.ts
+++ b/frontend-modern/src/components/Settings/proxmoxSettingsModel.ts
@@ -8,6 +8,7 @@ import type {
DiscoveryScanStatus,
NodeType,
} from './infrastructureSettingsModel';
+import type { DiscoverySettingsFormProps } from './discoverySettingsModel';
import type { TrueNASSettingsPanelState } from './useTrueNASSettingsPanelState';
import type { VMwareSettingsPanelState } from './useVMwareSettingsPanelState';
@@ -17,12 +18,14 @@ export interface InfrastructurePlatformSettingsProps {
selectedAgent: Accessor<NodeType>;
onSelectAgent: (agent: NodeType) => void;
initialLoadComplete: Accessor<boolean>;
- discoveryEnabled: Accessor<boolean>;
- discoveryMode: Accessor<DiscoveryMode>;
+ discoveryEnabled: DiscoverySettingsFormProps['discoveryEnabled'];
+ discoveryMode: DiscoverySettingsFormProps['discoveryMode'];
+ discoverySubnetDraft: DiscoverySettingsFormProps['discoverySubnetDraft'];
+ discoverySubnetError: DiscoverySettingsFormProps['discoverySubnetError'];
discoveryScanStatus: Accessor<DiscoveryScanStatus>;
discoveredNodes: Accessor<DiscoveredServer[]>;
- savingDiscoverySettings: Accessor<boolean>;
- envOverrides: Accessor<Record<string, boolean>>;
+ savingDiscoverySettings: DiscoverySettingsFormProps['savingDiscoverySettings'];
+ envOverrides: DiscoverySettingsFormProps['envOverrides'];
agentStateResources: Accessor<Resource[]>;
pbsInstances: Accessor<PBSInstance[]>;
pmgInstances: Accessor<PMGInstance[]>;
@@ -34,7 +37,18 @@ export interface InfrastructurePlatformSettingsProps {
temperatureMonitoringEnabled: Accessor<boolean>;
triggerDiscoveryScan: (options?: { quiet?: boolean }) => Promise<void>;
loadDiscoveredNodes: () => Promise<void>;
- handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;
+ handleDiscoveryEnabledChange: DiscoverySettingsFormProps['handleDiscoveryEnabledChange'];
+ handleDiscoveryModeChange: DiscoverySettingsFormProps['handleDiscoveryModeChange'];
+ setDiscoveryMode: DiscoverySettingsFormProps['setDiscoveryMode'];
+ setDiscoverySubnetDraft: DiscoverySettingsFormProps['setDiscoverySubnetDraft'];
+ setDiscoverySubnetError: DiscoverySettingsFormProps['setDiscoverySubnetError'];
+ setLastCustomSubnet: DiscoverySettingsFormProps['setLastCustomSubnet'];
+ commitDiscoverySubnet: DiscoverySettingsFormProps['commitDiscoverySubnet'];
+ parseSubnetList: DiscoverySettingsFormProps['parseSubnetList'];
+ normalizeSubnetList: DiscoverySettingsFormProps['normalizeSubnetList'];
+ isValidCIDR: DiscoverySettingsFormProps['isValidCIDR'];
+ currentDraftSubnetValue: DiscoverySettingsFormProps['currentDraftSubnetValue'];
+ discoverySubnetInputRef?: DiscoverySettingsFormProps['discoverySubnetInputRef'];
testNodeConnection: (nodeId: string) => void;
requestDeleteNode: (node: NodeConfigWithStatus) => void;
refreshClusterNodes: (nodeId: string) => Promise<void>;
diff --git a/frontend-modern/src/components/Settings/settingsHeaderMeta.ts b/frontend-modern/src/components/Settings/settingsHeaderMeta.ts
index 7b04e18a59..98c543cfee 100644
--- a/frontend-modern/src/components/Settings/settingsHeaderMeta.ts
+++ b/frontend-modern/src/components/Settings/settingsHeaderMeta.ts
@@ -17,7 +17,7 @@ export const SETTINGS_HEADER_META: SettingsHeaderMetaMap = {
},
'system-network': {
title: 'Network',
- description: 'Configure discovery, CORS, embedding, and webhook network boundaries.',
+ description: 'Configure the public URL, CORS, embedding, and webhook network boundaries.',
},
'system-updates': {
title: 'Updates',
diff --git a/frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts b/frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts
index 327ec1f349..d768877953 100644
--- a/frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts
+++ b/frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts
@@ -45,6 +45,8 @@ export function useSettingsInfrastructurePanelProps(
initialLoadComplete: params.infrastructureSettings.initialLoadComplete,
discoveryEnabled: params.discoverySettings.discoveryEnabled,
discoveryMode: params.discoverySettings.discoveryMode,
+ discoverySubnetDraft: params.discoverySettings.discoverySubnetDraft,
+ discoverySubnetError: params.discoverySettings.discoverySubnetError,
discoveryScanStatus: params.infrastructureSettings.discoveryScanStatus,
discoveredNodes: params.infrastructureSettings.discoveredNodes,
savingDiscoverySettings: params.discoverySettings.savingDiscoverySettings,
@@ -61,6 +63,17 @@ export function useSettingsInfrastructurePanelProps(
triggerDiscoveryScan: params.infrastructureSettings.triggerDiscoveryScan,
loadDiscoveredNodes: params.infrastructureSettings.loadDiscoveredNodes,
handleDiscoveryEnabledChange: params.infrastructureSettings.handleDiscoveryEnabledChange,
+ handleDiscoveryModeChange: params.infrastructureSettings.handleDiscoveryModeChange,
+ setDiscoveryMode: params.discoverySettings.setDiscoveryMode,
+ setDiscoverySubnetDraft: params.discoverySettings.setDiscoverySubnetDraft,
+ setDiscoverySubnetError: params.discoverySettings.setDiscoverySubnetError,
+ setLastCustomSubnet: params.discoverySettings.setLastCustomSubnet,
+ commitDiscoverySubnet: params.infrastructureSettings.commitDiscoverySubnet,
+ parseSubnetList: params.discoverySettings.parseSubnetList,
+ normalizeSubnetList: params.discoverySettings.normalizeSubnetList,
+ isValidCIDR: params.discoverySettings.isValidCIDR,
+ currentDraftSubnetValue: params.discoverySettings.currentDraftSubnetValue,
+ discoverySubnetInputRef: params.discoverySettings.assignDiscoverySubnetInputRef,
testNodeConnection: params.infrastructureSettings.testNodeConnection,
requestDeleteNode: params.infrastructureSettings.requestDeleteNode,
refreshClusterNodes: params.infrastructureSettings.refreshClusterNodes,
diff --git a/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx b/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx
index 29dfb7b9ba..8d698d9a6c 100644
--- a/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx
+++ b/frontend-modern/src/components/Settings/useSettingsSystemPanels.tsx
@@ -6,22 +6,14 @@ import type { RecoverySettingsPanelProps } from './RecoverySettingsPanel';
import type { UpdatesSettingsPanelProps } from './UpdatesSettingsPanel';
import { getSettingsConfigurationLoadingState } from '@/utils/settingsShellPresentation';
import type { useBackupTransferFlow } from './useBackupTransferFlow';
-import type { useDiscoverySettingsState } from './useDiscoverySettingsState';
import type { useSystemSettingsState } from './useSystemSettingsState';
-interface DiscoverySettingsPanelState extends ReturnType<typeof useDiscoverySettingsState> {
- commitDiscoverySubnet: (rawValue: string) => Promise<boolean>;
- handleDiscoveryEnabledChange: (enabled: boolean) => Promise<boolean>;
- handleDiscoveryModeChange: (mode: 'auto' | 'custom') => Promise<void>;
-}
-
interface UseSettingsSystemPanelsParams {
darkMode: Accessor<boolean>;
themePreference: Accessor<'light' | 'dark' | 'system'>;
setThemePreference: (pref: 'light' | 'dark' | 'system') => void;
initialLoadComplete: Accessor<boolean>;
systemSettings: ReturnType<typeof useSystemSettingsState>;
- discoverySettings: DiscoverySettingsPanelState;
backupTransferFlow: ReturnType<typeof useBackupTransferFlow>;
securityStatus: Accessor<SecurityStatusInfo | null>;
}
@@ -88,11 +80,6 @@ export function useSettingsSystemPanels(
return {
systemGeneralPanel,
getNetworkPanelProps: () => ({
- discoveryEnabled: params.discoverySettings.discoveryEnabled,
- discoveryMode: params.discoverySettings.discoveryMode,
- discoverySubnetDraft: params.discoverySettings.discoverySubnetDraft,
- discoverySubnetError: params.discoverySettings.discoverySubnetError,
- savingDiscoverySettings: params.discoverySettings.savingDiscoverySettings,
envOverrides: params.systemSettings.envOverrides,
allowedOrigins: params.systemSettings.allowedOrigins,
setAllowedOrigins: params.systemSettings.setAllowedOrigins,
@@ -104,19 +91,7 @@ export function useSettingsSystemPanels(
setWebhookAllowedPrivateCIDRs: params.systemSettings.setWebhookAllowedPrivateCIDRs,
publicURL: params.systemSettings.publicURL,
setPublicURL: params.systemSettings.setPublicURL,
- handleDiscoveryEnabledChange: params.discoverySettings.handleDiscoveryEnabledChange,
- handleDiscoveryModeChange: params.discoverySettings.handleDiscoveryModeChange,
- setDiscoveryMode: params.discoverySettings.setDiscoveryMode,
- setDiscoverySubnetDraft: params.discoverySettings.setDiscoverySubnetDraft,
- setDiscoverySubnetError: params.discoverySettings.setDiscoverySubnetError,
- setLastCustomSubnet: params.discoverySettings.setLastCustomSubnet,
- commitDiscoverySubnet: params.discoverySettings.commitDiscoverySubnet,
setHasUnsavedChanges: params.systemSettings.setHasUnsavedChanges,
- parseSubnetList: params.discoverySettings.parseSubnetList,
- normalizeSubnetList: params.discoverySettings.normalizeSubnetList,
- isValidCIDR: params.discoverySettings.isValidCIDR,
- currentDraftSubnetValue: params.discoverySettings.currentDraftSubnetValue,
- discoverySubnetInputRef: params.discoverySettings.assignDiscoverySubnetInputRef,
}),
getUpdatesPanelProps: () => ({
versionInfo: params.systemSettings.versionInfo,
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 641b012b20..37ec1cc975 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -137,8 +137,10 @@ import settingsTabSaveBehaviorSource from '@/components/Settings/settingsTabSave
import settingsSystemPanelsSource from '@/components/Settings/useSettingsSystemPanels.tsx?raw';
import settingsInfrastructurePanelPropsSource from '@/components/Settings/useSettingsInfrastructurePanelProps.ts?raw';
import discoverySettingsStateSource from '@/components/Settings/useDiscoverySettingsState.ts?raw';
+import discoverySettingsFormSource from '@/components/Settings/DiscoverySettingsForm.tsx?raw';
+import discoverySettingsModelSource from '@/components/Settings/discoverySettingsModel.ts?raw';
+import infrastructureDiscoverySettingsDialogSource from '@/components/Settings/InfrastructureDiscoverySettingsDialog.tsx?raw';
import networkBoundarySettingsSectionSource from '@/components/Settings/NetworkBoundarySettingsSection.tsx?raw';
-import networkDiscoverySectionSource from '@/components/Settings/NetworkDiscoverySection.tsx?raw';
import networkSettingsPanelSource from '@/components/Settings/NetworkSettingsPanel.tsx?raw';
import networkSettingsModelSource from '@/components/Settings/networkSettingsModel.ts?raw';
import reportingPresentationSource from '@/utils/reportingPresentation.ts?raw';
@@ -1399,14 +1401,16 @@ describe('frontend resource type boundaries', () => {
);
expect(systemSettingsPresentationSource).toContain('export function getBackupIntervalSummary');
expect(systemSettingsPresentationSource).toContain('export const COMMON_DISCOVERY_SUBNETS');
- expect(networkSettingsPanelSource).toContain('./NetworkDiscoverySection');
expect(networkSettingsPanelSource).toContain('./NetworkBoundarySettingsSection');
- expect(networkDiscoverySectionSource).toContain('COMMON_DISCOVERY_SUBNETS');
+ expect(networkSettingsPanelSource).not.toContain('./NetworkDiscoverySection');
+ expect(discoverySettingsFormSource).toContain('COMMON_DISCOVERY_SUBNETS');
+ expect(infrastructureDiscoverySettingsDialogSource).toContain('./DiscoverySettingsForm');
expect(networkBoundarySettingsSectionSource).toContain(
'Allowed Private IP Ranges for Webhooks',
);
- expect(networkSettingsModelSource).toContain('export type NetworkDiscoverySectionProps');
+ expect(networkSettingsModelSource).not.toContain('export type NetworkDiscoverySectionProps');
expect(networkSettingsModelSource).toContain('export type NetworkBoundarySettingsSectionProps');
+ expect(discoverySettingsModelSource).toContain('export interface DiscoverySettingsFormProps');
expect(settingsShellSource).toContain('./useDiscoverySettingsState');
expect(settingsShellSource).toContain('./useSettingsInfrastructurePanelProps');
expect(settingsShellSource).toContain('./useSettingsPanelRegistry');
@@ -3321,15 +3325,15 @@ describe('frontend resource type boundaries', () => {
expect(discoveryPresentationSource).toContain(
'export function getNetworkDiscoverySubnetPresentation',
);
- expect(networkDiscoverySectionSource).toContain('getNetworkDiscoveryPriorityNotice');
- expect(networkDiscoverySectionSource).toContain('getNetworkDiscoverySectionPresentation');
- expect(networkDiscoverySectionSource).toContain('getNetworkDiscoveryModePresentation');
- expect(networkDiscoverySectionSource).toContain('getNetworkDiscoverySubnetPresentation');
- expect(networkDiscoverySectionSource).toContain('getDiscoverySubnetRequiredMessage');
- expect(networkDiscoverySectionSource).toContain('getDiscoverySubnetInvalidFormatMessage');
- expect(networkDiscoverySectionSource).not.toContain('Configuration priority');
- expect(networkDiscoverySectionSource).not.toContain('Automatic scanning');
- expect(networkDiscoverySectionSource).not.toContain(
+ expect(discoverySettingsFormSource).toContain('getNetworkDiscoveryPriorityNotice');
+ expect(discoverySettingsFormSource).toContain('getNetworkDiscoverySectionPresentation');
+ expect(discoverySettingsFormSource).toContain('getNetworkDiscoveryModePresentation');
+ expect(discoverySettingsFormSource).toContain('getNetworkDiscoverySubnetPresentation');
+ expect(discoverySettingsFormSource).toContain('getDiscoverySubnetRequiredMessage');
+ expect(discoverySettingsFormSource).toContain('getDiscoverySubnetInvalidFormatMessage');
+ expect(discoverySettingsFormSource).not.toContain('Configuration priority');
+ expect(discoverySettingsFormSource).not.toContain('Automatic scanning');
+ expect(discoverySettingsFormSource).not.toContain(
'Discovery settings are locked by environment variables.',
);
expect(mailGatewaySource).toContain('getPMGThreatPresentation');
diff --git a/tests/integration/tests/68-infrastructure-onboarding.spec.ts b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
index 70020d33da..8cd3020efa 100644
--- a/tests/integration/tests/68-infrastructure-onboarding.spec.ts
+++ b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
@@ -197,6 +197,33 @@ test.describe('Infrastructure onboarding', () => {
.toBe(0);
});
+ test('desktop discovery settings open as an infrastructure-owned dialog', async ({
+ page,
+ }, testInfo) => {
+ test.skip(
+ testInfo.project.name.startsWith('mobile-'),
+ 'Desktop-only infrastructure manager coverage',
+ );
+
+ await prepareOnboardingPage(page);
+
+ await page.goto('/settings/infrastructure', { waitUntil: 'domcontentloaded' });
+ await page.waitForURL(/\/settings\/infrastructure(?:\?.*)?$/, { timeout: 15_000 });
+
+ await page.getByRole('button', { name: /Discovery settings/i }).click();
+
+ const dialog = page.getByRole('dialog', { name: 'Discovery settings' });
+ await expect(dialog).toBeVisible();
+ await expect(
+ dialog.getByText(
+ 'Configure the saved network scope and background scan behavior for infrastructure source discovery.',
+ ),
+ ).toBeVisible();
+ await expect(dialog.getByText('Automatic scanning')).toBeVisible();
+ await expect(dialog.getByRole('button', { name: 'Close discovery settings dialog' })).toBeVisible();
+ await expect(page).toHaveURL(/\/settings\/infrastructure(?:\?.*)?$/);
+ });
+
test('desktop per-platform add opens the matching modal and records direct type onboarding', async ({
page,
}, testInfo) => {