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
Split node modal section owners
rcourtmanb00e1dc681fb
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex e9d3a89272..6bb0b59c37 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -52,18 +52,23 @@ management, and fleet control surfaces.28. `frontend-modern/src/components/Settings/useProxmoxSettingsPanelState.ts`29. `frontend-modern/src/components/Settings/UnifiedAgents.tsx`30. `frontend-modern/src/components/Settings/NodeModal.tsx`-31. `frontend-modern/src/components/Settings/nodeModalModel.ts`-32. `frontend-modern/src/components/Settings/useNodeModalState.ts`-33. `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`-34. `frontend-modern/src/components/Infrastructure/deploy/ResultsStep.tsx`-35. `frontend-modern/src/utils/agentProfilesPresentation.ts`-36. `frontend-modern/src/utils/agentInstallCommand.ts`-37. `frontend-modern/src/api/nodes.ts`-38. `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`-39. `frontend-modern/src/components/Settings/InfrastructureInventorySection.tsx`-40. `frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx`-41. `frontend-modern/src/components/Settings/InfrastructureIgnoredRowDetails.tsx`-42. `frontend-modern/src/components/Settings/InfrastructureStopMonitoringDialog.tsx`+31. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx`+32. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx`+33. `frontend-modern/src/components/Settings/nodeModalModel.ts`+34. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx`+35. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx`+36. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx`+37. `frontend-modern/src/components/Settings/useNodeModalState.ts`+38. `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`+39. `frontend-modern/src/components/Infrastructure/deploy/ResultsStep.tsx`+40. `frontend-modern/src/utils/agentProfilesPresentation.ts`+41. `frontend-modern/src/utils/agentInstallCommand.ts`+42. `frontend-modern/src/api/nodes.ts`+43. `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`+44. `frontend-modern/src/components/Settings/InfrastructureInventorySection.tsx`+45. `frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx`+46. `frontend-modern/src/components/Settings/InfrastructureIgnoredRowDetails.tsx`+47. `frontend-modern/src/components/Settings/InfrastructureStopMonitoringDialog.tsx`## Shared Boundaries@@ -72,16 +77,21 @@ management, and fleet control surfaces.3. `frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx` shared with `api-contracts`: the infrastructure operations controller is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.4. `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx` shared with `api-contracts`: the pure infrastructure operations inventory/install model is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.5. `frontend-modern/src/components/Settings/NodeModal.tsx` shared with `api-contracts`: the node setup modal render shell is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-6. `frontend-modern/src/components/Settings/nodeModalModel.ts` shared with `api-contracts`: the pure node setup modal model is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-7. `frontend-modern/src/components/Settings/UnifiedAgents.tsx` shared with `api-contracts`: the UnifiedAgents module is a compatibility shim for the canonical infrastructure operations controller and remains on the same shared agent lifecycle and API contract boundary while the old module path exists.-8. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx` shared with `api-contracts`: the shared infrastructure operations state hook is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.-9. `frontend-modern/src/components/Settings/useNodeModalState.ts` shared with `api-contracts`: the node setup modal state hook is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-10. `frontend-modern/src/utils/agentInstallCommand.ts` shared with `api-contracts`: the shared frontend install-command helper is both an agent lifecycle control surface and a canonical API/install transport contract boundary.-11. `internal/api/agent_install_command_shared.go` shared with `api-contracts`: agent install command assembly is both an agent lifecycle control surface and a canonical API payload contract boundary.-12. `internal/api/config_setup_handlers.go` shared with `api-contracts`: auto-register and setup handlers are both an agent lifecycle control surface and a canonical API payload contract boundary.-13. `internal/api/unified_agent.go` shared with `api-contracts`: unified agent download and installer handlers are both an agent lifecycle control surface and a canonical API payload contract boundary.-14. `scripts/install.ps1` shared with `deployment-installability`: the Windows installer is both a deployment installability entry point and a canonical agent lifecycle runtime continuity boundary.-15. `scripts/install.sh` shared with `deployment-installability`: the shell installer is both a deployment installability entry point and a canonical agent lifecycle runtime continuity boundary.+6. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx` shared with `api-contracts`: the node setup authentication section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+7. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx` shared with `api-contracts`: the node setup basic-info section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+8. `frontend-modern/src/components/Settings/nodeModalModel.ts` shared with `api-contracts`: the pure node setup modal model is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+9. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx` shared with `api-contracts`: the node setup monitoring section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+10. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx` shared with `api-contracts`: the node setup guide section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+11. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx` shared with `api-contracts`: the node setup status/footer section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+12. `frontend-modern/src/components/Settings/UnifiedAgents.tsx` shared with `api-contracts`: the UnifiedAgents module is a compatibility shim for the canonical infrastructure operations controller and remains on the same shared agent lifecycle and API contract boundary while the old module path exists.+13. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx` shared with `api-contracts`: the shared infrastructure operations state hook is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.+14. `frontend-modern/src/components/Settings/useNodeModalState.ts` shared with `api-contracts`: the node setup modal state hook is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+15. `frontend-modern/src/utils/agentInstallCommand.ts` shared with `api-contracts`: the shared frontend install-command helper is both an agent lifecycle control surface and a canonical API/install transport contract boundary.+16. `internal/api/agent_install_command_shared.go` shared with `api-contracts`: agent install command assembly is both an agent lifecycle control surface and a canonical API payload contract boundary.+17. `internal/api/config_setup_handlers.go` shared with `api-contracts`: auto-register and setup handlers are both an agent lifecycle control surface and a canonical API payload contract boundary.+18. `internal/api/unified_agent.go` shared with `api-contracts`: unified agent download and installer handlers are both an agent lifecycle control surface and a canonical API payload contract boundary.+19. `scripts/install.ps1` shared with `deployment-installability`: the Windows installer is both a deployment installability entry point and a canonical agent lifecycle runtime continuity boundary.+20. `scripts/install.sh` shared with `deployment-installability`: the shell installer is both a deployment installability entry point and a canonical agent lifecycle runtime continuity boundary.## Extension Points@@ -295,12 +305,15 @@ callers: `install.sh`, generated setup scripts, and runtime-side Unified Agent-dregistration must all create the same Pulse-managed `pulse-<canonical-scope-slug>`token name for a given Pulse endpoint instead of letting one caller drift intotimestamp-suffixed or rerun-local token identities.-The corresponding node setup modal owner (`NodeModal.tsx`,-`nodeModalModel.ts`, and `useNodeModalState.ts`) is presentation-only for-those API-managed Proxmox, PBS, and PMG connections. Lifecycle guidance in-that settings surface may explain monitored-system caps, but commercial-enforcement still belongs to the canonical add-node and `/api/auto-register`-boundaries instead of becoming a second modal-local exemption rule.+The corresponding node setup modal owner is now an explicit shell-plus-sections+surface: `NodeModal.tsx` composes `NodeModalBasicInfoSection.tsx`,+`NodeModalAuthenticationSection.tsx`, `NodeModalMonitoringSection.tsx`,+`NodeModalStatusFooter.tsx`, `nodeModalModel.ts`, and `useNodeModalState.ts`.+That presentation layer remains presentation-only for those API-managed+Proxmox, PBS, and PMG connections. Lifecycle guidance in that settings surface+may explain monitored-system caps, but commercial enforcement still belongs to+the canonical add-node and `/api/auto-register` boundaries instead of+becoming a second modal-local exemption rule.That same deterministic token-identity contract also applies to backend-ownedturnkey Proxmox token creation: generated setup scripts and the password-basedPBS add-node path must derive Pulse-managed token names from the canonical@@ -511,8 +524,8 @@ must preserve both `PULSE_ENABLE_PROXMOX` and `PULSE_PROXMOX_TYPE`, andarguments instead of silently collapsing back to generic host monitoring.The same lifecycle ownership now also covers manual node setup commandpresentation in the extracted node setup modal owner (`NodeModal.tsx`,-`nodeModalModel.ts`, and `useNodeModalState.ts`): the copied PVE permission-snippet must stay+`NodeModalSetupGuideSection.tsx`, `nodeModalModel.ts`, and+`useNodeModalState.ts`): the copied PVE permission snippet must stayaligned with the canonical backend setup script, including comma-joinedprivilege transport and non-destructive `PulseMonitor` role updates, insteadof shipping a stale local fork.@@ -529,9 +542,11 @@ helpers for both PVE and PBS, preserving the shared setup-token and expirycontract instead of letting one node type drift onto a raw fetch-only path.That same node setup modal owner must also stay on the direct`node-setup-settings-surface` proof path across `NodeModal.tsx`,-`nodeModalModel.ts`, and `useNodeModalState.ts`, rather than relying only on-broad lane ownership or downstream command tests to catch lifecycle drift in-the settings surface.+`NodeModalAuthenticationSection.tsx`, `NodeModalBasicInfoSection.tsx`,+`NodeModalMonitoringSection.tsx`, `NodeModalSetupGuideSection.tsx`,+`NodeModalStatusFooter.tsx`, `nodeModalModel.ts`, and `useNodeModalState.ts`,+rather than relying only on broad lane ownership or downstream command tests+to catch lifecycle drift in the settings surface.That same Proxmox lifecycle transport now explicitly includes the shared`frontend-modern/src/api/nodes.ts` client boundary itself: changes to setupcommand or install-command request transport must carry both lifecycle proofdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 90b6d65e29..95d5ac1f92 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -35,15 +35,20 @@ Own canonical runtime payload shapes between backend and frontend.12. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`13. `frontend-modern/src/components/Settings/UnifiedAgents.tsx`14. `frontend-modern/src/components/Settings/NodeModal.tsx`-15. `frontend-modern/src/components/Settings/nodeModalModel.ts`-16. `frontend-modern/src/components/Settings/useNodeModalState.ts`-17. `frontend-modern/src/utils/agentInstallCommand.ts`-18. `frontend-modern/src/api/nodes.ts`-19. `frontend-modern/src/api/license.ts`-20. `frontend-modern/src/api/monitoredSystemLedger.ts`-21. `frontend-modern/src/api/resources.ts`-22. `frontend-modern/src/api/monitoring.ts`-23. `internal/api/monitored_system_ledger.go`+15. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx`+16. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx`+17. `frontend-modern/src/components/Settings/nodeModalModel.ts`+18. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx`+19. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx`+20. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx`+21. `frontend-modern/src/components/Settings/useNodeModalState.ts`+22. `frontend-modern/src/utils/agentInstallCommand.ts`+23. `frontend-modern/src/api/nodes.ts`+24. `frontend-modern/src/api/license.ts`+25. `frontend-modern/src/api/monitoredSystemLedger.ts`+26. `frontend-modern/src/api/resources.ts`+27. `frontend-modern/src/api/monitoring.ts`+28. `internal/api/monitored_system_ledger.go`## Shared Boundaries@@ -59,13 +64,18 @@ Own canonical runtime payload shapes between backend and frontend.10. `frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx` shared with `agent-lifecycle`: the infrastructure operations controller is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.11. `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx` shared with `agent-lifecycle`: the pure infrastructure operations inventory/install model is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.12. `frontend-modern/src/components/Settings/NodeModal.tsx` shared with `agent-lifecycle`: the node setup modal render shell is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-13. `frontend-modern/src/components/Settings/nodeModalModel.ts` shared with `agent-lifecycle`: the pure node setup modal model is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-14. `frontend-modern/src/components/Settings/UnifiedAgents.tsx` shared with `agent-lifecycle`: the UnifiedAgents module is a compatibility shim for the canonical infrastructure operations controller and remains on the same shared agent lifecycle and API contract boundary while the old module path exists.-15. `frontend-modern/src/components/Settings/useAPITokenManagerState.ts` shared with `security-privacy`: the API token settings state hook is both a security/privacy control surface and a canonical API payload contract boundary.-16. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx` shared with `agent-lifecycle`: the shared infrastructure operations state hook is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.-17. `frontend-modern/src/components/Settings/useNodeModalState.ts` shared with `agent-lifecycle`: the node setup modal state hook is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.-18. `frontend-modern/src/utils/agentInstallCommand.ts` shared with `agent-lifecycle`: the shared frontend install-command helper is both an agent lifecycle control surface and a canonical API/install transport contract boundary.-19. `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.+13. `frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx` shared with `agent-lifecycle`: the node setup authentication section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+14. `frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx` shared with `agent-lifecycle`: the node setup basic-info section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+15. `frontend-modern/src/components/Settings/nodeModalModel.ts` shared with `agent-lifecycle`: the pure node setup modal model is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+16. `frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx` shared with `agent-lifecycle`: the node setup monitoring section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+17. `frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx` shared with `agent-lifecycle`: the node setup guide section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+18. `frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx` shared with `agent-lifecycle`: the node setup status/footer section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+19. `frontend-modern/src/components/Settings/UnifiedAgents.tsx` shared with `agent-lifecycle`: the UnifiedAgents module is a compatibility shim for the canonical infrastructure operations controller and remains on the same shared agent lifecycle and API contract boundary while the old module path exists.+20. `frontend-modern/src/components/Settings/useAPITokenManagerState.ts` shared with `security-privacy`: the API token settings state hook is both a security/privacy control surface and a canonical API payload contract boundary.+21. `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx` shared with `agent-lifecycle`: the shared infrastructure operations state hook is both an agent fleet lifecycle control surface and an API token, lookup, assignment, and reporting/install contract boundary.+22. `frontend-modern/src/components/Settings/useNodeModalState.ts` shared with `agent-lifecycle`: the node setup modal state hook is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary.+23. `frontend-modern/src/utils/agentInstallCommand.ts` shared with `agent-lifecycle`: the shared frontend install-command helper is both an agent lifecycle control surface and a canonical API/install transport contract boundary.+24. `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.20. `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.21. `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.22. `internal/api/ai_intelligence_handlers.go` shared with `ai-runtime`: AI intelligence handlers are both an AI runtime control surface and a canonical API payload contract boundary.@@ -1162,7 +1172,8 @@ types. That same shared client boundary must also validate a non-empty`command` response and keep the raw backend `token` field inside`frontend-modern/src/api/nodes.ts` rather than leaking it into downstream UIstate. Downstream Proxmox install-command consumers like the extracted node-setup modal owner (`NodeModal.tsx`, `nodeModalModel.ts`, and+setup modal owner (`NodeModal.tsx`, `NodeModalAuthenticationSection.tsx`,+`NodeModalSetupGuideSection.tsx`, `nodeModalModel.ts`, and`useNodeModalState.ts`) must then surface those canonical validation errorsdirectly rather than collapsing one node-type pane back to genericcopy-generation failure.diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 0009605b33..b954eb62db 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -137,6 +137,22 @@"api-contracts"]},+ {+ "path": "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "rationale": "the node setup authentication section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",+ "subsystems": [+ "agent-lifecycle",+ "api-contracts"+ ]+ },+ {+ "path": "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx",+ "rationale": "the node setup basic-info section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",+ "subsystems": [+ "agent-lifecycle",+ "api-contracts"+ ]+ },{"path": "frontend-modern/src/components/Settings/nodeModalModel.ts","rationale": "the pure node setup modal model is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",@@ -145,6 +161,30 @@"api-contracts"]},+ {+ "path": "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "rationale": "the node setup monitoring section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",+ "subsystems": [+ "agent-lifecycle",+ "api-contracts"+ ]+ },+ {+ "path": "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "rationale": "the node setup guide section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",+ "subsystems": [+ "agent-lifecycle",+ "api-contracts"+ ]+ },+ {+ "path": "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx",+ "rationale": "the node setup status/footer section is both an agent lifecycle control surface and a shared API-backed install/setup contract boundary",+ "subsystems": [+ "agent-lifecycle",+ "api-contracts"+ ]+ },{"path": "frontend-modern/src/components/Settings/SecurityAuthPanel.tsx","rationale": "the authentication settings surface is both a security/privacy control surface and a canonical settings-shell presentation boundary",@@ -382,7 +422,12 @@"frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx","frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts","frontend-modern/src/components/Settings/NodeModal.tsx",+ "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx","frontend-modern/src/components/Settings/nodeModalModel.ts",+ "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx","frontend-modern/src/components/Settings/ProxmoxConfiguredNodesTable.tsx","frontend-modern/src/components/Settings/ProxmoxDeleteNodeDialog.tsx","frontend-modern/src/components/Settings/ProxmoxDirectConnectionsCard.tsx",@@ -554,7 +599,12 @@"match_prefixes": [],"match_files": ["frontend-modern/src/components/Settings/NodeModal.tsx",+ "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx","frontend-modern/src/components/Settings/nodeModalModel.ts",+ "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx","frontend-modern/src/components/Settings/useNodeModalState.ts"],"allow_same_subsystem_tests": false,@@ -829,7 +879,12 @@"frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx","frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx","frontend-modern/src/components/Settings/NodeModal.tsx",+ "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx","frontend-modern/src/components/Settings/nodeModalModel.ts",+ "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx","frontend-modern/src/components/Settings/UnifiedAgents.tsx","frontend-modern/src/components/Settings/useAPITokenManagerState.ts","frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx",@@ -1002,7 +1057,12 @@"match_prefixes": [],"match_files": ["frontend-modern/src/components/Settings/NodeModal.tsx",+ "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx","frontend-modern/src/components/Settings/nodeModalModel.ts",+ "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx","frontend-modern/src/components/Settings/useNodeModalState.ts"],"allow_same_subsystem_tests": false,diff --git a/frontend-modern/src/components/Settings/NodeModal.tsx b/frontend-modern/src/components/Settings/NodeModal.tsxindex 5a212830e9..947ee05963 100644--- a/frontend-modern/src/components/Settings/NodeModal.tsx+++ b/frontend-modern/src/components/Settings/NodeModal.tsx@@ -1,75 +1,29 @@-import { Component, Show, For } from 'solid-js';-import { SectionHeader } from '@/components/shared/SectionHeader';-import {- formField,- formHelpText,- controlClass,- labelClass,- formCheckbox,-} from '@/components/shared/Form';-import { logger } from '@/utils/logger';-import { TogglePrimitive } from '@/components/shared/Toggle';-import { Dialog } from '@/components/shared/Dialog';-import {- getNodeEndpointHelp,- getNodeEndpointPlaceholder,- getNodeGuestUrlPlaceholder,- getNodeMonitoringCoverageCopy,- getNodeProductName,- getTemperatureMonitoringLockedCopy,- getNodeTokenIdPlaceholder,- getNodeUsernameHelp,- getNodeUsernamePlaceholder,-} from '@/utils/nodeModalPresentation';-import {- PVE_MANUAL_PERMISSION_COMMAND,- type NodeModalProps,-} from '@/components/Settings/nodeModalModel';+import { Component } from 'solid-js';+import { NodeModalAuthenticationSection } from '@/components/Settings/NodeModalAuthenticationSection';+import { NodeModalBasicInfoSection } from '@/components/Settings/NodeModalBasicInfoSection';+import { NodeModalMonitoringSection } from '@/components/Settings/NodeModalMonitoringSection';+import { NodeModalStatusFooter } from '@/components/Settings/NodeModalStatusFooter';+import type { NodeModalProps } from '@/components/Settings/nodeModalModel';import { useNodeModalState } from '@/components/Settings/useNodeModalState';+import { Dialog } from '@/components/shared/Dialog';+import { SectionHeader } from '@/components/shared/SectionHeader';+import { getNodeProductName } from '@/utils/nodeModalPresentation';export const NodeModal: Component<NodeModalProps> = (props) => {- const {- agentCommandError,- agentInstallCommand,- canStartTrial,- copyCommand,- copyProxmoxAgentInstallCommand,- copyQuickSetupCommand,- downloadProxmoxSetupScript,- formData,- handleStartTrial,- handleSubmit,- handleTestConnection,- hostLimitReached,- isAdvancedSetupMode,- isEditingExistingNode,- isTesting,- loadingAgentCommand,- quickSetupExpiry,- quickSetupExpiryLabel,- quickSetupPreviewCommand,- quickSetupTokenHint,- showTemperatureMonitoringSection,- startingTrial,- temperatureMonitoringEnabledValue,- testResult,- testResultPresentation,- updateField,- } = useNodeModalState(props);+ const state = useNodeModalState(props);return (<DialogisOpen={props.isOpen}onClose={props.onClose}panelClass="max-w-2xl"- ariaLabel={`${isEditingExistingNode() ? 'Edit' : 'Add'} ${getNodeProductName(props.nodeType)} node`}+ ariaLabel={`${state.isEditingExistingNode() ? 'Edit' : 'Add'} ${getNodeProductName(props.nodeType)} node`}><div class="relative w-full">- <form onSubmit={handleSubmit}>- {/* Header */}+ <form onSubmit={state.handleSubmit}><div class="flex items-center justify-between p-4 border-b border-border"><SectionHeader- title={`${isEditingExistingNode() ? 'Edit' : 'Add'} ${getNodeProductName(props.nodeType)} node`}+ title={`${state.isEditingExistingNode() ? 'Edit' : 'Add'} ${getNodeProductName(props.nodeType)} node`}size="md"class="flex-1"/>@@ -88,1573 +42,13 @@ export const NodeModal: Component<NodeModalProps> = (props) => {</button></div>- {/* Body */}<div class="p-6 space-y-6">- {/* Basic Information */}- <div>- <SectionHeader- title="Basic information"- size="sm"- class="mb-4"- titleClass="text-base-content"- />- <div class="grid grid-cols-1 gap-4 md:grid-cols-2">- <div class={formField}>- <label class={labelClass('flex items-center gap-2')}>- Node Name <span class="text-red-500">*</span>- </label>- <input- type="text"- value={formData().name}- onInput={(e) => updateField('name', e.currentTarget.value)}- placeholder="Pulse uses this label across dashboards"- required- class={controlClass()}- />- <p class={formHelpText}>- Required and must be unique. We can auto-fill it from the Endpoint URL if you- leave it blank.- </p>- </div>-- <div class={formField}>- <label class={labelClass('flex items-center gap-1')}>- Endpoint URL <span class="text-red-500">*</span>- </label>- <input- type="text"- value={formData().host}- onInput={(e) => updateField('host', e.currentTarget.value)}- placeholder={getNodeEndpointPlaceholder(props.nodeType)}- required- class={controlClass()}- />- <Show when={getNodeEndpointHelp(props.nodeType)}>- {(help) => <p class={formHelpText}>{help()}</p>}- </Show>- </div>-- <div class={formField}>- <label class={labelClass('flex items-center gap-1')}>- Guest URL <span class="text-slate-500 text-xs font-normal">(Optional)</span>- </label>- <input- type="text"- value={formData().guestURL}- onInput={(e) => updateField('guestURL', e.currentTarget.value)}- placeholder={getNodeGuestUrlPlaceholder(props.nodeType)}- class={controlClass()}- />- <p class={formHelpText}>- Optional guest-accessible URL for navigation. If specified, this URL will be- used when opening the web UI instead of the Endpoint URL.- </p>- </div>- </div>- </div>-- {/* Authentication */}- <div>- <SectionHeader- title="Authentication"- size="sm"- class="mb-4"- titleClass="text-base-content"- />-- {/* Auth Type Selector */}- <div class="mb-4">- <div class="flex gap-4">- <label class="flex items-center">- <input- type="radio"- name="authType"- value="password"- checked={formData().authType === 'password'}- onChange={() => updateField('authType', 'password')}- class="mr-2"- />- <span class="text-sm text-base-content">Username & Password</span>- </label>- <Show when={props.nodeType !== 'pmg'}>- <label class="flex items-center">- <input- type="radio"- name="authType"- value="token"- checked={formData().authType === 'token'}- onChange={() => updateField('authType', 'token')}- class="mr-2"- />- <span class="text-sm text-base-content">- API Token{' '}- <span class="text-green-600 dark:text-green-400 text-xs ml-1">- (Recommended)- </span>- </span>- </label>- </Show>- </div>- <Show when={props.nodeType === 'pmg'}>- <p class="text-xs text-muted mt-2">- Proxmox Mail Gateway does not support API tokens. Use a service account with- password authentication (for example <code>root@pam</code> or a dedicated{' '}- <code>api@pmg</code> user).- </p>- </Show>- </div>-- {/* Password Auth Fields */}- <Show when={formData().authType === 'password'}>- <div class="grid grid-cols-1 gap-4 md:grid-cols-2">- <div class={formField}>- <label class={labelClass()}>- Username <span class="text-red-500">*</span>- </label>- <input- type="text"- value={formData().user}- onInput={(e) => updateField('user', e.currentTarget.value)}- placeholder={getNodeUsernamePlaceholder(props.nodeType)}- required={formData().authType === 'password'}- class={controlClass()}- />- <Show when={getNodeUsernameHelp(props.nodeType)}>- {(help) => <p class={formHelpText}>{help()}</p>}- </Show>- </div>-- <div class={formField}>- <label class={labelClass('flex items-center gap-2')}>- Password- <Show when={!isEditingExistingNode()}>- <span class="text-red-500">*</span>- </Show>- </label>- <input- type="password"- value={formData().password}- onInput={(e) => updateField('password', e.currentTarget.value)}- placeholder={- isEditingExistingNode() ? 'Leave blank to keep existing' : 'Password'- }- required={formData().authType === 'password' && !isEditingExistingNode()}- class={controlClass()}- />- </div>- </div>- </Show>-- {/* Token Auth Fields */}- <Show when={formData().authType === 'token'}>- <div class="space-y-4">- {/* Token Creation Guide */}- <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-4">- <h5 class="text-sm font-medium text-blue-900 dark:text-blue-100 mb-3 flex items-center gap-2">- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <circle cx="12" cy="12" r="10"></circle>- <path d="M12 6v6l4 2"></path>- </svg>- Connection Setup- </h5>-- <Show when={props.nodeType === 'pve'}>- <div class="space-y-3 text-xs">- {/* Tab buttons */}- <div class="flex gap-2 flex-wrap">- <button- type="button"- onClick={() => updateField('setupMode', 'agent')}- class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'agent'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Agent Install- <span class="ml-1.5 px-1.5 py-0.5 text-[10px] font-semibold bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded">- Recommended- </span>- </button>- <button- type="button"- onClick={() => {- if (formData().setupMode === 'agent') {- updateField('setupMode', 'auto');- }- }}- class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${- isAdvancedSetupMode()- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Advanced- </button>- </div>-- <Show when={isAdvancedSetupMode()}>- <div class="mt-1 flex gap-2 flex-wrap pl-0.5">- <button- type="button"- onClick={() => updateField('setupMode', 'auto')}- class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'auto'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Direct Connection- </button>- <button- type="button"- onClick={() => updateField('setupMode', 'manual')}- class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'manual'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Manual Token Setup- </button>- </div>- </Show>-- {/* Agent Install Tab (Recommended) */}- <Show when={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:- </p>- <ul class="text-xs text-muted list-disc list-inside space-y-1">- <li>Creates monitoring user and API token automatically</li>- <li>Registers the node with Pulse</li>- <li>Enables temperature monitoring (no SSH required)</li>- <li>Enables Pulse Patrol automation for managing VMs/containers</li>- </ul>- <p class="text-blue-800 dark:text-blue-200 font-medium">- Run this command on your Proxmox VE node:- </p>- <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">- <button- type="button"- disabled={loadingAgentCommand()}- onClick={async () => {- logger.debug('[Agent Install] Copy button clicked');- await copyProxmoxAgentInstallCommand(- 'pve',- 'Command copied! Run it on your Proxmox node.',- );- }}- class="absolute top-2 right-2 p-1.5 hover:text-slate-200 bg-surface-hover rounded-md transition-colors disabled:opacity-50"- title="Copy command"- >- <Show- when={loadingAgentCommand()}- fallback={- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- }- >- <svg- class="animate-spin"- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <circle cx="12" cy="12" r="10" stroke-opacity="0.25"></circle>- <path d="M12 2a10 10 0 0 1 10 10" stroke-linecap="round"></path>- </svg>- </Show>- </button>- <Show- when={agentInstallCommand().length > 0}- fallback={- <code class="text-blue-400">- Click the copy button to generate the install command- </code>- }- >- <code class="block text-blue-100 whitespace-pre-wrap break-words">- {agentInstallCommand()}- </code>- </Show>- </div>- <Show when={agentCommandError()}>- <p class="text-xs text-red-500">{agentCommandError()}</p>- </Show>- <p class="text-[11px] text-muted italic">- The node will appear in Pulse automatically after the agent starts.- </p>- </div>- </Show>-- {/* Direct connection tab */}- <Show when={formData().setupMode === 'auto'}>- <div class="rounded-md border border-amber-200 bg-amber-50 px-3 py-2 mb-3 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.- </p>- </div>- <p class="text-blue-800 dark:text-blue-200">- Just copy and run this one command on your Proxmox VE server:- </p>-- {/* One-line command */}- <div class="space-y-3">- <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">- <button- type="button"- onClick={async () => {- await copyQuickSetupCommand(- 'pve',- true,- 'Command copied to clipboard! Run it on the server; the one-time setup token is already embedded.',- );- }}- class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-slate-200 bg-surface-hover rounded-md transition-colors"- title="Copy command"- >- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <Show- when={quickSetupPreviewCommand().length > 0}- fallback={- <code class="text-blue-400">- {formData().host- ? 'Click the copy button to generate the setup command'- : 'Please enter the Endpoint URL above first'}- </code>- }- >- <code class="block text-blue-100 whitespace-pre-wrap break-words">- {quickSetupPreviewCommand()}- </code>- </Show>- <Show when={quickSetupTokenHint().length > 0}>- <div class="mt-2 text-xs text-blue-800 dark:text-blue-200">- <span class="font-semibold">Setup token hint:</span>- <code class="ml-1 font-mono break-all text-blue-900 dark:text-blue-100">- {quickSetupTokenHint()}- </code>- <Show when={quickSetupExpiry()}>- <span class="ml-2">Expires at {quickSetupExpiryLabel()}</span>- </Show>- </div>- </Show>- </div>-- <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-3">- <div class="flex items-start space-x-2">- <svg- class="h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"- />- </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 Proxmox server may not be able to reach Pulse. Use the- alternative method below.- </p>- </div>- </div>- </div>-- {/* Alternative: Download script */}- <details class="bg-surface-alt rounded-md p-3">- <summary class="cursor-pointer text-sm font-medium text-base-content hover:text-base-content">- Alternative: Download script manually- </summary>- <div class="mt-3 space-y-3">- <button- type="button"- onClick={async () => {- await downloadProxmoxSetupScript('pve', true);- }}- class="w-full px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors text-sm font-medium"- >- Download setup script- </button>- <div class="text-xs text-muted">- 1. Click to download the script- <br />- 2. Upload to your server via SCP/SFTP- <br />- 3. Run:{' '}- <code class="bg-surface-alt px-1 rounded">- bash <downloaded-script>- </code>- </div>- </div>- </details>- </div>-- <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-3">- <p class="text-sm font-semibold text-blue-800 dark:text-blue-200 mb-2">- What this does:- </p>- <ul class="text-xs text-blue-700 dark:text-blue-300 space-y-1">- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>- Creates monitoring user{' '}- <code class="bg-blue-100 dark:bg-blue-800 px-1 rounded">- pulse-monitor@pve- </code>- </span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>Generates secure API token</span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>- Sets up monitoring permissions (PVEAuditor + guest agent access +- backup visibility)- </span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>Automatically registers node with Pulse</span>- </li>- </ul>- <p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">- Fully automatic - no manual token copying needed!- </p>- </div>- </Show>-- {/* Manual Setup Tab */}- <Show when={formData().setupMode === 'manual'}>- <p class="text-blue-800 dark:text-blue-200 mb-2">- Run these commands one by one on your Proxmox VE server:- </p>-- <div class="space-y-3">- {/* Step 1: Create user */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 1. Create monitoring user:- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- 'pveum user add pulse-monitor@pve --comment "Pulse monitoring service"';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- pveum user add pulse-monitor@pve --comment "Pulse monitoring- service"- </code>- </div>- </div>-- {/* Step 2: Generate token */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 2. Generate API token (save the output!):- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- 'pveum user token add pulse-monitor@pve pulse-token --privsep 0';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- pveum user token add pulse-monitor@pve pulse-token --privsep 0- </code>- </div>- <p class="text-amber-600 dark:text-amber-400 text-xs mt-1">- Important: Copy the token value immediately - it won't be shown- again!- </p>- </div>-- {/* Step 3: Set permissions */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 3. Set up monitoring permissions:- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs mb-1">- <button- type="button"- onClick={async () => {- await copyCommand(PVE_MANUAL_PERMISSION_COMMAND);- }}- class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content whitespace-pre-line">- {PVE_MANUAL_PERMISSION_COMMAND}- </code>- </div>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- 'pveum aclmod /storage -user pulse-monitor@pve -role PVEDatastoreAdmin';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- pveum aclmod /storage -user pulse-monitor@pve -role- PVEDatastoreAdmin- </code>- </div>- <p class="text-muted text-xs mt-1">- Note: PVEAuditor gives read-only API access. PulseMonitor adds- Sys.Audit plus either VM.Monitor (PVE 8) or VM.GuestAgent.Audit (PVE- 9+) for disk and guest metrics. PVEDatastoreAdmin on /storage adds- backup visibility.- </p>- </div>-- {/* Step 4: Use in Pulse */}- <div class="bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-800 rounded-md p-2">- <p class="text-sm font-medium text-green-900 dark:text-green-100 mb-1">- 4. Add to Pulse with:- </p>- <ul class="text-xs text-green-800 dark:text-green-200 ml-4 list-disc">- <li>- <strong>Token ID:</strong> pulse-monitor@pve!pulse-token- </li>- <li>- <strong>Token Value:</strong> [The value from step 2]- </li>- <li>- <strong>Endpoint URL:</strong>{' '}- {formData().host || 'https://your-server:8006'}- </li>- </ul>- </div>- </div>- </Show>- </div>- </Show>-- <Show when={props.nodeType === 'pbs'}>- <div class="space-y-3 text-xs">- {/* Tab buttons for PBS */}- <div class="flex gap-2 flex-wrap">- <button- type="button"- onClick={() => updateField('setupMode', 'agent')}- class={`inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'agent'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Agent Install- <span class="text-[10px] px-1.5 py-0.5 bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded">- Recommended- </span>- </button>- <button- type="button"- onClick={() => {- if (formData().setupMode === 'agent') {- updateField('setupMode', 'auto');- }- }}- class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${- isAdvancedSetupMode()- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Advanced- </button>- </div>-- <Show when={isAdvancedSetupMode()}>- <div class="mt-1 flex gap-2 flex-wrap pl-0.5">- <button- type="button"- onClick={() => updateField('setupMode', 'auto')}- class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'auto'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Direct Connection- </button>- <button- type="button"- onClick={() => updateField('setupMode', 'manual')}- class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${- formData().setupMode === 'manual'- ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'- : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'- }`}- >- Manual Token Setup- </button>- </div>- </Show>-- {/* Agent Install Tab for PBS */}- <Show when={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:- </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>- <li>Built-in temperature monitoring (no SSH required)</li>- <li>Pulse features (execute commands via Pulse Assistant)</li>- <li>Automatic reconnection on network issues</li>- </ul>- <p class="text-blue-800 dark:text-blue-200 text-xs mt-3">- Run this command on your PBS node:- </p>- <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">- <button- type="button"- onClick={() =>- copyProxmoxAgentInstallCommand(- 'pbs',- 'Command copied to clipboard',- )- }- class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-white rounded bg-surface hover:bg-slate-700 transition-colors"- title="Copy to clipboard"- disabled={loadingAgentCommand()}- >- <Show- when={loadingAgentCommand()}- fallback={- <svg- xmlns="http://www.w3.org/2000/svg"- class="h-4 w-4"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"- />- </svg>- }- >- <svg- class="animate-spin h-4 w-4"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- >- <circle- class="opacity-25"- cx="12"- cy="12"- r="10"- stroke="currentColor"- stroke-width="4"- ></circle>- <path- class="opacity-75"- fill="currentColor"- d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"- ></path>- </svg>- </Show>- </button>- <code class="text-green-400 whitespace-pre-wrap break-all pr-10">- {agentInstallCommand() ||- 'Click the copy button to generate and copy the install command'}- </code>- </div>- <Show when={agentCommandError()}>- <p class="text-xs text-red-500">{agentCommandError()}</p>- </Show>- <p class="text-xs text-muted">- The node will automatically appear in Pulse once the agent connects.- </p>- </div>- </Show>-- {/* Direct connection tab for PBS */}- <Show when={formData().setupMode === 'auto'}>- <p class="text-blue-800 dark:text-blue-200">- Just copy and run this one command on your Proxmox Backup Server:- </p>-- {/* One-line command */}- <div class="space-y-3">- <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">- <Show when={formData().host && formData().host.trim() !== ''}>- <button- type="button"- onClick={async () => {- await copyQuickSetupCommand(- 'pbs',- false,- 'Command copied to clipboard! Run it on the server; the one-time setup token is already embedded.',- );- }}- class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-slate-200 bg-surface-hover rounded-md transition-colors"- title="Copy command"- >- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- </Show>- <Show- when={quickSetupPreviewCommand().length > 0}- fallback={- <code class="text-blue-400">- {formData().host- ? 'Click the copy button to generate the setup command'- : '⚠️ Please enter the Endpoint URL above first'}- </code>- }- >- <code class="block text-blue-100 whitespace-pre-wrap break-words">- {quickSetupPreviewCommand()}- </code>- </Show>- <Show when={quickSetupTokenHint().length > 0}>- <div class="mt-2 text-xs text-blue-800 dark:text-blue-200">- <span class="font-semibold">Setup token hint:</span>- <code class="ml-1 font-mono break-all text-blue-900 dark:text-blue-100">- {quickSetupTokenHint()}- </code>- <Show when={quickSetupExpiry()}>- <span class="ml-2">Expires at {quickSetupExpiryLabel()}</span>- </Show>- </div>- </Show>- </div>-- <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-3">- <div class="flex items-start space-x-2">- <svg- class="h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"- fill="none"- viewBox="0 0 24 24"- stroke="currentColor"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"- />- </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>- </div>- </div>- </div>-- {/* Alternative: Download script */}- <details class="bg-surface-alt rounded-md p-3">- <summary class="cursor-pointer text-sm font-medium text-base-content hover:text-base-content">- Alternative: Download script manually- </summary>- <div class="mt-3 space-y-3">- <button- type="button"- onClick={async () => {- await downloadProxmoxSetupScript('pbs');- }}- class="w-full px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors text-sm font-medium"- >- Download setup script- </button>- <div class="text-xs text-muted">- 1. Click to download the script- <br />- 2. Upload to your PBS via SCP/SFTP- <br />- 3. Run:{' '}- <code class="bg-surface-alt px-1 rounded">- bash <downloaded-script>- </code>- </div>- </div>- </details>- </div>-- <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-3">- <p class="text-sm font-semibold text-blue-800 dark:text-blue-200 mb-2">- What this does:- </p>- <ul class="text-xs text-blue-700 dark:text-blue-300 space-y-1">- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>- Creates monitoring user{' '}- <code class="bg-blue-100 dark:bg-blue-800 px-1 rounded">- pulse-monitor@pbs- </code>- </span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>Generates secure API token</span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>- Sets up Audit permissions (read-only access to backups + system- stats)- </span>- </li>- <li class="flex items-start">- <span class="text-emerald-400 mr-2 mt-0.5">✓</span>- <span>Automatically registers server with Pulse</span>- </li>- </ul>- <p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">- ✨ Fully automatic - no manual token copying needed!- </p>- </div>- </Show>-- {/* Manual token setup tab for PBS */}- <Show when={formData().setupMode === 'manual'}>- <p class="text-blue-800 dark:text-blue-200 mb-2">- Run these commands one by one on your Proxmox Backup Server:- </p>-- <div class="space-y-3">- {/* Step 1: Create user */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 1. Create monitoring user:- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- 'proxmox-backup-manager user create pulse-monitor@pbs';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- proxmox-backup-manager user create pulse-monitor@pbs- </code>- </div>- </div>-- {/* Step 2: Generate token */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 2. Generate API token (save the output!):- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- 'proxmox-backup-manager user generate-token pulse-monitor@pbs pulse-token';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- proxmox-backup-manager user generate-token pulse-monitor@pbs- pulse-token- </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!- </p>- </div>-- {/* Step 3: Set permissions */}- <div>- <p class="text-sm font-medium text-base-content mb-1">- 3. Set up read-only permissions (includes system stats):- </p>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs mb-1">- <button- type="button"- onClick={async () => {- const cmd =- 'proxmox-backup-manager acl update / Audit --auth-id pulse-monitor@pbs';- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- proxmox-backup-manager acl update / Audit --auth-id- pulse-monitor@pbs- </code>- </div>- <div class="relative bg-surface rounded-md p-2 font-mono text-xs">- <button- type="button"- onClick={async () => {- const cmd =- "proxmox-backup-manager acl update / Audit --auth-id 'pulse-monitor@pbs!pulse-token'";- await copyCommand(cmd);- }}- class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"- title="Copy command"- >- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>- <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>- </svg>- </button>- <code class="text-base-content">- proxmox-backup-manager acl update / Audit --auth-id- 'pulse-monitor@pbs!pulse-token'- </code>- </div>- </div>-- {/* Step 4: Use in Pulse */}- <div class="bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-800 rounded-md p-2">- <p class="text-sm font-medium text-green-900 dark:text-green-100 mb-1">- 4. Add to Pulse with:- </p>- <ul class="text-xs text-green-800 dark:text-green-200 ml-4 list-disc">- <li>- <strong>Token ID:</strong> pulse-monitor@pbs!pulse-token- </li>- <li>- <strong>Token Value:</strong> [The value from step 2]- </li>- <li>- <strong>Endpoint URL:</strong>{' '}- {formData().host || 'https://your-server:8007'}- </li>- </ul>- </div>-- {/* Permission Info Box */}- <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-2 mt-3">- <p class="text-xs font-semibold text-amber-800 dark:text-amber-200 mb-1">- About PBS Permissions:- </p>- <ul class="text-xs text-amber-700 dark:text-amber-300 space-y-0.5">- <li>- <strong>Basic (DatastoreAudit):</strong> View backups only- </li>- <li>- <strong>Enhanced (Audit on /):</strong> View backups +- CPU/memory/uptime stats- </li>- <li class="text-amber-600 dark:text-amber-400">- → We use Enhanced for better monitoring visibility- </li>- </ul>- </div>- </div>- </Show>- </div>- </Show>- <Show when={props.nodeType === 'pmg'}>- <div class="space-y-3 text-xs text-base-content">- <p>- Generate a dedicated API token in{' '}- <strong>Configuration → API Tokens</strong> on your Mail Gateway. We- recommend creating a service user such as{' '}- <code class="font-mono">pulse-monitor@pmg</code>- with <em>Auditor</em> privileges.- </p>- <ol class="list-decimal ml-4 space-y-1">- <li>- Click <em>Add</em> and choose the service user (or create one if- needed).- </li>- <li>- Enable <em>Privilege Separation</em> and assign the <em>Auditor</em>{' '}- role.- </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.- </li>- </ol>- <p class="text-xs text-muted">- Pulse only requires read-only access. Avoid granting administrator- permissions to the token.- </p>- </div>- </Show>- </div>-- {/* Token Input Fields */}- <div class="grid grid-cols-1 gap-4 md:grid-cols-2">- <div class={formField}>- <label class={labelClass()}>- Token ID <span class="text-red-500">*</span>- </label>- <input- type="text"- value={formData().tokenName}- onInput={(e) => updateField('tokenName', e.currentTarget.value)}- placeholder={getNodeTokenIdPlaceholder(props.nodeType)}- required={formData().authType === 'token'}- class={controlClass('font-mono')}- />- <p class={formHelpText}>Full token ID from Proxmox (user@realm!tokenname).</p>- </div>-- <div class={formField}>- <label class={labelClass('flex items-center gap-2')}>- Token Value- <Show when={!isEditingExistingNode()}>- <span class="text-red-500">*</span>- </Show>- </label>- <input- type="password"- value={formData().tokenValue}- onInput={(e) => updateField('tokenValue', e.currentTarget.value)}- placeholder={- isEditingExistingNode()- ? 'Leave blank to keep existing'- : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'- }- required={formData().authType === 'token' && !isEditingExistingNode()}- class={controlClass('font-mono')}- />- <p class={formHelpText}>The secret value shown when creating the token.</p>- </div>- </div>- </div>- </Show>- </div>-- {/* SSL Settings */}- <div>- <SectionHeader- title="SSL settings"- size="sm"- class="mb-4"- titleClass="text-base-content"- />- <div class="space-y-3">- <label class="flex items-center gap-2 text-sm text-base-content">- <input- type="checkbox"- checked={formData().verifySSL}- onChange={(e) => updateField('verifySSL', e.currentTarget.checked)}- class={formCheckbox}- />- Verify SSL certificate- </label>-- <div class={formField}>- <label class={labelClass()}>SSL Fingerprint (optional)</label>- <input- type="text"- value={formData().fingerprint}- onInput={(e) => updateField('fingerprint', e.currentTarget.value)}- placeholder="AA:BB:CC:DD:EE:FF:..."- class={controlClass('font-mono')}- />- <p class={formHelpText}>- Useful when connecting to servers with self-signed certificates.- </p>- </div>- </div>- </div>-- {/* Monitoring Overview */}- <div>- <SectionHeader- title="Monitoring coverage"- size="sm"- class="mb-2"- titleClass="text-base-content"- />- <p class="text-sm text-muted">- {getNodeMonitoringCoverageCopy(props.nodeType)}- </p>- </div>-- {/* Physical Disk Monitoring - PVE only */}- <Show when={props.nodeType === 'pve'}>- <div class="space-y-4">- <SectionHeader- title="Advanced monitoring"- size="sm"- class="mb-3"- titleClass="text-base-content"- />- <div class="rounded-md border border-border bg-surface p-3 text-sm shadow-sm">- <div class="flex items-start justify-between gap-3">- <div>- <p class="font-medium text-base-content">- Monitor physical disk health (SMART)- </p>- <p class="mt-1 text-xs text-muted">- This will spin up idle HDDs; leave disabled if you rely on drive standby.- </p>- </div>- <TogglePrimitive- checked={formData().monitorPhysicalDisks}- onChange={(event) =>- updateField('monitorPhysicalDisks', event.currentTarget.checked)- }- ariaLabel={- formData().monitorPhysicalDisks- ? 'Disable physical disk monitoring'- : 'Enable physical disk monitoring'- }- />- </div>- <Show when={formData().monitorPhysicalDisks}>- <div class="mt-3 flex items-center gap-2 border-t border-border pt-3">- <label class="text-xs text-muted">Poll every</label>- <select- class="rounded border bg-surface px-2 py-1 text-xs text-base-content "- value={formData().physicalDiskPollingMinutes}- onChange={(e) =>- updateField(- 'physicalDiskPollingMinutes',- parseInt(e.currentTarget.value, 10),- )- }- >- <option value={5}>5 minutes</option>- <option value={15}>15 minutes</option>- <option value={30}>30 minutes</option>- <option value={60}>1 hour</option>- </select>- </div>- </Show>- </div>-- <Show when={showTemperatureMonitoringSection()}>- <div class="rounded-md border border-border bg-surface p-3 text-sm shadow-sm">- <div class="flex items-start justify-between gap-3">- <div>- <p class="font-medium text-base-content">Temperature monitoring</p>- <p class="mt-1 text-xs text-muted">- Uses the Pulse sensors key or proxy to read CPU/NVMe temperatures for this- node. Disable if you don't need temperature data or haven't deployed the- proxy yet.- </p>- </div>- <TogglePrimitive- checked={temperatureMonitoringEnabledValue()}- onChange={(event) => {- props.onToggleTemperatureMonitoring?.(event.currentTarget.checked);- }}- disabled={- props.savingTemperatureSetting || props.temperatureMonitoringLocked- }- ariaLabel={- temperatureMonitoringEnabledValue()- ? 'Disable temperature monitoring'- : 'Enable temperature monitoring'- }- />- </div>- <Show when={!temperatureMonitoringEnabledValue()}>- <p class="mt-3 rounded border border-blue-200 bg-blue-50 p-2 text-xs text-blue-700 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200">- Pulse will skip SSH temperature polling for this node. Existing dashboard- readings will stop refreshing.- </p>- </Show>- <Show when={props.temperatureMonitoringLocked}>- <p class="mt-3 rounded border border-amber-200 bg-amber-50 p-2 text-xs text-amber-800 dark:border-amber-700 dark:bg-amber-900 dark:text-amber-200">- {getTemperatureMonitoringLockedCopy()}- </p>- </Show>- </div>- </Show>- </div>- </Show>- <Show when={props.nodeType === 'pmg'}>- <div class="space-y-3">- <SectionHeader- title="Data collection"- size="sm"- class="mb-1"- titleClass="text-base-content"- />- <p class="text-xs text-muted">- Control which PMG data sets Pulse ingests. Disable individual collectors if you- want to limit API usage.- </p>-- <label class="flex items-start gap-2 text-sm text-base-content">- <input- type="checkbox"- checked={formData().monitorMailStats}- onChange={(e) => updateField('monitorMailStats', e.currentTarget.checked)}- class={formCheckbox + ' mt-0.5'}- />- <div>- <div>Mail statistics & trends</div>- <p class="text-xs text-muted mt-1">- Total mail volume, inbound/outbound breakdown, spam and virus counts.- </p>- </div>- </label>-- <label class="flex items-start gap-2 text-sm text-base-content">- <input- type="checkbox"- checked={formData().monitorQueues}- onChange={(e) => updateField('monitorQueues', e.currentTarget.checked)}- class={formCheckbox + ' mt-0.5'}- />- <div>- <div>Queue health insights</div>- <p class="text-xs text-muted mt-1">- Track Postfix queue depth and rejection trends to spot delivery bottlenecks.- </p>- </div>- </label>-- <label class="flex items-start gap-2 text-sm text-base-content">- <input- type="checkbox"- checked={formData().monitorQuarantine}- onChange={(e) => updateField('monitorQuarantine', e.currentTarget.checked)}- class={formCheckbox + ' mt-0.5'}- />- <div>- <div>Quarantine totals</div>- <p class="text-xs text-muted mt-1">- Mirror PMG quarantine sizes for spam, virus, and attachment buckets.- </p>- </div>- </label>-- <label class="flex items-start gap-2 text-sm text-base-content">- <input- type="checkbox"- checked={formData().monitorDomainStats}- onChange={(e) => updateField('monitorDomainStats', e.currentTarget.checked)}- class={formCheckbox + ' mt-0.5'}- />- <div>- <div>Domain-level statistics</div>- <p class="text-xs text-muted mt-1">- Gather per-domain metrics for deeper mail routing analysis.- </p>- </div>- </label>- </div>- </Show>+ <NodeModalBasicInfoSection modalProps={props} state={state} />+ <NodeModalAuthenticationSection modalProps={props} state={state} />+ <NodeModalMonitoringSection modalProps={props} state={state} /></div>- {/* Test Result */}- <Show when={testResult()}>- {(() => {- const result = testResult();- logger.debug('Test result display', {- status: result?.status,- message: result?.message,- });- return null;- })()}- <div class={testResultPresentation().panelClass}>- <div class="flex items-start gap-2">- <Show when={testResultPresentation().icon === 'success'}>- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- class="flex-shrink-0 mt-0.5"- >- <path d="M9 12l2 2 4-4"></path>- <circle cx="12" cy="12" r="10"></circle>- </svg>- </Show>- <Show when={testResultPresentation().icon === 'warning'}>- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- class="flex-shrink-0 mt-0.5"- >- <path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>- </svg>- </Show>- <Show when={testResultPresentation().icon === 'error'}>- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- class="flex-shrink-0 mt-0.5"- >- <circle cx="12" cy="12" r="10"></circle>- <line x1="15" y1="9" x2="9" y2="15"></line>- <line x1="9" y1="9" x2="15" y2="15"></line>- </svg>- </Show>- <div class={`flex-1 ${testResultPresentation().textClass}`}>- <p>{testResult()?.message}</p>- <Show when={testResult()?.isCluster}>- <p class="mt-1 text-xs opacity-80">- ✨ Cluster detected! All cluster nodes will be automatically added.- </p>- </Show>- <Show when={testResult()?.warnings && testResult()!.warnings!.length > 0}>- <div class="mt-2 space-y-1">- <p class="text-xs font-semibold opacity-90">Warnings:</p>- <ul class="text-xs space-y-0.5 opacity-80">- <For each={testResult()?.warnings}>{(warning) => <li>• {warning}</li>}</For>- </ul>- </div>- </Show>- </div>- </div>- </div>- </Show>-- {/* Endpoint limit warning with trial prompt */}- <Show when={hostLimitReached()}>- <div class="mx-6 mb-2 rounded-md border border-amber-200 bg-amber-50 dark:border-amber-900 dark:bg-amber-900/30 px-4 py-3">- <p class="text-sm font-medium text-amber-800 dark:text-amber-200">- Agent limit reached — you'll need to remove an agent or upgrade to add more.- </p>- <div class="mt-2 flex items-center gap-3">- <span class="text-xs text-amber-700 dark:text-amber-300">Need more agents?</span>- <Show when={canStartTrial()}>- <button- type="button"- class="text-xs font-semibold text-indigo-700 dark:text-indigo-300 hover:underline disabled:opacity-60"- disabled={startingTrial()}- onClick={handleStartTrial}- >- Start your free 14-day trial- </button>- </Show>- </div>- </div>- </Show>-- {/* Footer */}- <div class="flex items-center justify-between px-6 py-4 border-t border-border">- <button- type="button"- onClick={handleTestConnection}- disabled={isTesting()}- class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed"- >- {isTesting() ? 'Testing...' : 'Test Connection'}- </button>-- <div class="flex items-center gap-3">- <Show when={props.showBackToDiscovery && props.onBackToDiscovery}>- <button- type="button"- onClick={() => {- props.onBackToDiscovery!();- props.onClose();- }}- class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors flex items-center gap-2"- >- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- stroke-width="2"- >- <line x1="19" y1="12" x2="5" y2="12"></line>- <polyline points="12 19 5 12 12 5"></polyline>- </svg>- Back to Discovery- </button>- </Show>- <button- type="button"- onClick={props.onClose}- class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors"- >- Cancel- </button>- <button- type="submit"- class="px-4 py-2 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"- >- {isEditingExistingNode() ? 'Update' : 'Add'} Node- </button>- </div>- </div>+ <NodeModalStatusFooter modalProps={props} state={state} /></form></div></Dialog>diff --git a/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx b/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsxnew file mode 100644index 0000000000..b68370ced1--- /dev/null+++ b/frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx@@ -0,0 +1,155 @@+import { Component, Show } from 'solid-js';+import type { NodeModalProps } from '@/components/Settings/nodeModalModel';+import { NodeModalSetupGuideSection } from '@/components/Settings/NodeModalSetupGuideSection';+import type { NodeModalState } from '@/components/Settings/useNodeModalState';+import { SectionHeader } from '@/components/shared/SectionHeader';+import { controlClass, formField, formHelpText, labelClass } from '@/components/shared/Form';+import {+ getNodeTokenIdPlaceholder,+ getNodeUsernameHelp,+ getNodeUsernamePlaceholder,+} from '@/utils/nodeModalPresentation';++interface NodeModalAuthenticationSectionProps {+ modalProps: NodeModalProps;+ state: NodeModalState;+}++export const NodeModalAuthenticationSection: Component<NodeModalAuthenticationSectionProps> = (+ props,+) => {+ const { modalProps, state } = props;++ return (+ <div>+ <SectionHeader+ title="Authentication"+ size="sm"+ class="mb-4"+ titleClass="text-base-content"+ />++ <div class="mb-4">+ <div class="flex gap-4">+ <label class="flex items-center">+ <input+ type="radio"+ name="authType"+ value="password"+ checked={state.formData().authType === 'password'}+ onChange={() => state.updateField('authType', 'password')}+ class="mr-2"+ />+ <span class="text-sm text-base-content">Username & Password</span>+ </label>+ <Show when={modalProps.nodeType !== 'pmg'}>+ <label class="flex items-center">+ <input+ type="radio"+ name="authType"+ value="token"+ checked={state.formData().authType === 'token'}+ onChange={() => state.updateField('authType', 'token')}+ class="mr-2"+ />+ <span class="text-sm text-base-content">+ API Token{' '}+ <span class="text-green-600 dark:text-green-400 text-xs ml-1">(Recommended)</span>+ </span>+ </label>+ </Show>+ </div>+ <Show when={modalProps.nodeType === 'pmg'}>+ <p class="text-xs text-muted mt-2">+ Proxmox Mail Gateway does not support API tokens. Use a service account with password+ authentication (for example <code>root@pam</code> or a dedicated{' '}+ <code>api@pmg</code> user).+ </p>+ </Show>+ </div>++ <Show when={state.formData().authType === 'password'}>+ <div class="grid grid-cols-1 gap-4 md:grid-cols-2">+ <div class={formField}>+ <label class={labelClass()}>+ Username <span class="text-red-500">*</span>+ </label>+ <input+ type="text"+ value={state.formData().user}+ onInput={(event) => state.updateField('user', event.currentTarget.value)}+ placeholder={getNodeUsernamePlaceholder(modalProps.nodeType)}+ required={state.formData().authType === 'password'}+ class={controlClass()}+ />+ <Show when={getNodeUsernameHelp(modalProps.nodeType)}>+ {(help) => <p class={formHelpText}>{help()}</p>}+ </Show>+ </div>++ <div class={formField}>+ <label class={labelClass('flex items-center gap-2')}>+ Password+ <Show when={!state.isEditingExistingNode()}>+ <span class="text-red-500">*</span>+ </Show>+ </label>+ <input+ type="password"+ value={state.formData().password}+ onInput={(event) => state.updateField('password', event.currentTarget.value)}+ placeholder={state.isEditingExistingNode() ? 'Leave blank to keep existing' : 'Password'}+ required={state.formData().authType === 'password' && !state.isEditingExistingNode()}+ class={controlClass()}+ />+ </div>+ </div>+ </Show>++ <Show when={state.formData().authType === 'token'}>+ <div class="space-y-4">+ <NodeModalSetupGuideSection modalProps={modalProps} state={state} />++ <div class="grid grid-cols-1 gap-4 md:grid-cols-2">+ <div class={formField}>+ <label class={labelClass()}>+ Token ID <span class="text-red-500">*</span>+ </label>+ <input+ type="text"+ value={state.formData().tokenName}+ onInput={(event) => state.updateField('tokenName', event.currentTarget.value)}+ placeholder={getNodeTokenIdPlaceholder(modalProps.nodeType)}+ required={state.formData().authType === 'token'}+ class={controlClass('font-mono')}+ />+ <p class={formHelpText}>Full token ID from Proxmox (user@realm!tokenname).</p>+ </div>++ <div class={formField}>+ <label class={labelClass('flex items-center gap-2')}>+ Token Value+ <Show when={!state.isEditingExistingNode()}>+ <span class="text-red-500">*</span>+ </Show>+ </label>+ <input+ type="password"+ value={state.formData().tokenValue}+ onInput={(event) => state.updateField('tokenValue', event.currentTarget.value)}+ placeholder={+ state.isEditingExistingNode()+ ? 'Leave blank to keep existing'+ : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'+ }+ required={state.formData().authType === 'token' && !state.isEditingExistingNode()}+ class={controlClass('font-mono')}+ />+ <p class={formHelpText}>The secret value shown when creating the token.</p>+ </div>+ </div>+ </div>+ </Show>+ </div>+ );+};diff --git a/frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx b/frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsxnew file mode 100644index 0000000000..78f11105cc--- /dev/null+++ b/frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx@@ -0,0 +1,83 @@+import { Component, Show } from 'solid-js';+import type { NodeModalProps } from '@/components/Settings/nodeModalModel';+import type { NodeModalState } from '@/components/Settings/useNodeModalState';+import { SectionHeader } from '@/components/shared/SectionHeader';+import { controlClass, formField, formHelpText, labelClass } from '@/components/shared/Form';+import {+ getNodeEndpointHelp,+ getNodeEndpointPlaceholder,+ getNodeGuestUrlPlaceholder,+} from '@/utils/nodeModalPresentation';++interface NodeModalBasicInfoSectionProps {+ modalProps: NodeModalProps;+ state: NodeModalState;+}++export const NodeModalBasicInfoSection: Component<NodeModalBasicInfoSectionProps> = (props) => {+ const { modalProps, state } = props;++ return (+ <div>+ <SectionHeader+ title="Basic information"+ size="sm"+ class="mb-4"+ titleClass="text-base-content"+ />+ <div class="grid grid-cols-1 gap-4 md:grid-cols-2">+ <div class={formField}>+ <label class={labelClass('flex items-center gap-2')}>+ Node Name <span class="text-red-500">*</span>+ </label>+ <input+ type="text"+ value={state.formData().name}+ onInput={(event) => state.updateField('name', event.currentTarget.value)}+ placeholder="Pulse uses this label across dashboards"+ required+ class={controlClass()}+ />+ <p class={formHelpText}>+ Required and must be unique. We can auto-fill it from the Endpoint URL if you leave it+ blank.+ </p>+ </div>++ <div class={formField}>+ <label class={labelClass('flex items-center gap-1')}>+ Endpoint URL <span class="text-red-500">*</span>+ </label>+ <input+ type="text"+ value={state.formData().host}+ onInput={(event) => state.updateField('host', event.currentTarget.value)}+ placeholder={getNodeEndpointPlaceholder(modalProps.nodeType)}+ required+ class={controlClass()}+ />+ <Show when={getNodeEndpointHelp(modalProps.nodeType)}>+ {(help) => <p class={formHelpText}>{help()}</p>}+ </Show>+ </div>++ <div class={formField}>+ <label class={labelClass('flex items-center gap-1')}>+ Guest URL <span class="text-slate-500 text-xs font-normal">(Optional)</span>+ </label>+ <input+ type="text"+ value={state.formData().guestURL}+ onInput={(event) => state.updateField('guestURL', event.currentTarget.value)}+ placeholder={getNodeGuestUrlPlaceholder(modalProps.nodeType)}+ class={controlClass()}+ />+ <p class={formHelpText}>+ Optional guest-accessible URL for navigation. If specified, this URL will be used when+ opening the web UI instead of the Endpoint URL.+ </p>+ </div>+ </div>+ </div>+ );+};diff --git a/frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx b/frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsxnew file mode 100644index 0000000000..cbf6f44063--- /dev/null+++ b/frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx@@ -0,0 +1,233 @@+import { Component, Show } from 'solid-js';+import type { NodeModalProps } from '@/components/Settings/nodeModalModel';+import type { NodeModalState } from '@/components/Settings/useNodeModalState';+import { SectionHeader } from '@/components/shared/SectionHeader';+import { controlClass, formCheckbox, formField, formHelpText, labelClass } from '@/components/shared/Form';+import { TogglePrimitive } from '@/components/shared/Toggle';+import {+ getNodeMonitoringCoverageCopy,+ getTemperatureMonitoringLockedCopy,+} from '@/utils/nodeModalPresentation';++interface NodeModalMonitoringSectionProps {+ modalProps: NodeModalProps;+ state: NodeModalState;+}++export const NodeModalMonitoringSection: Component<NodeModalMonitoringSectionProps> = (props) => {+ const { modalProps, state } = props;++ return (+ <>+ <div>+ <SectionHeader title="SSL settings" size="sm" class="mb-4" titleClass="text-base-content" />+ <div class="space-y-3">+ <label class="flex items-center gap-2 text-sm text-base-content">+ <input+ type="checkbox"+ checked={state.formData().verifySSL}+ onChange={(event) => state.updateField('verifySSL', event.currentTarget.checked)}+ class={formCheckbox}+ />+ Verify SSL certificate+ </label>++ <div class={formField}>+ <label class={labelClass()}>SSL Fingerprint (optional)</label>+ <input+ type="text"+ value={state.formData().fingerprint}+ onInput={(event) => state.updateField('fingerprint', event.currentTarget.value)}+ placeholder="AA:BB:CC:DD:EE:FF:..."+ class={controlClass('font-mono')}+ />+ <p class={formHelpText}>+ Useful when connecting to servers with self-signed certificates.+ </p>+ </div>+ </div>+ </div>++ <div>+ <SectionHeader+ title="Monitoring coverage"+ size="sm"+ class="mb-2"+ titleClass="text-base-content"+ />+ <p class="text-sm text-muted">{getNodeMonitoringCoverageCopy(modalProps.nodeType)}</p>+ </div>++ <Show when={modalProps.nodeType === 'pve'}>+ <div class="space-y-4">+ <SectionHeader+ title="Advanced monitoring"+ size="sm"+ class="mb-3"+ titleClass="text-base-content"+ />+ <div class="rounded-md border border-border bg-surface p-3 text-sm shadow-sm">+ <div class="flex items-start justify-between gap-3">+ <div>+ <p class="font-medium text-base-content">Monitor physical disk health (SMART)</p>+ <p class="mt-1 text-xs text-muted">+ This will spin up idle HDDs; leave disabled if you rely on drive standby.+ </p>+ </div>+ <TogglePrimitive+ checked={state.formData().monitorPhysicalDisks}+ onChange={(event) =>+ state.updateField('monitorPhysicalDisks', event.currentTarget.checked)+ }+ ariaLabel={+ state.formData().monitorPhysicalDisks+ ? 'Disable physical disk monitoring'+ : 'Enable physical disk monitoring'+ }+ />+ </div>+ <Show when={state.formData().monitorPhysicalDisks}>+ <div class="mt-3 flex items-center gap-2 border-t border-border pt-3">+ <label class="text-xs text-muted">Poll every</label>+ <select+ class="rounded border bg-surface px-2 py-1 text-xs text-base-content"+ value={state.formData().physicalDiskPollingMinutes}+ onChange={(event) =>+ state.updateField(+ 'physicalDiskPollingMinutes',+ parseInt(event.currentTarget.value, 10),+ )+ }+ >+ <option value={5}>5 minutes</option>+ <option value={15}>15 minutes</option>+ <option value={30}>30 minutes</option>+ <option value={60}>1 hour</option>+ </select>+ </div>+ </Show>+ </div>++ <Show when={state.showTemperatureMonitoringSection()}>+ <div class="rounded-md border border-border bg-surface p-3 text-sm shadow-sm">+ <div class="flex items-start justify-between gap-3">+ <div>+ <p class="font-medium text-base-content">Temperature monitoring</p>+ <p class="mt-1 text-xs text-muted">+ Uses the Pulse sensors key or proxy to read CPU/NVMe temperatures for this+ node. Disable if you don't need temperature data or haven't deployed the proxy+ yet.+ </p>+ </div>+ <TogglePrimitive+ checked={state.temperatureMonitoringEnabledValue()}+ onChange={(event) => {+ modalProps.onToggleTemperatureMonitoring?.(event.currentTarget.checked);+ }}+ disabled={+ modalProps.savingTemperatureSetting || modalProps.temperatureMonitoringLocked+ }+ ariaLabel={+ state.temperatureMonitoringEnabledValue()+ ? 'Disable temperature monitoring'+ : 'Enable temperature monitoring'+ }+ />+ </div>+ <Show when={!state.temperatureMonitoringEnabledValue()}>+ <p class="mt-3 rounded border border-blue-200 bg-blue-50 p-2 text-xs text-blue-700 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200">+ Pulse will skip SSH temperature polling for this node. Existing dashboard+ readings will stop refreshing.+ </p>+ </Show>+ <Show when={modalProps.temperatureMonitoringLocked}>+ <p class="mt-3 rounded border border-amber-200 bg-amber-50 p-2 text-xs text-amber-800 dark:border-amber-700 dark:bg-amber-900 dark:text-amber-200">+ {getTemperatureMonitoringLockedCopy()}+ </p>+ </Show>+ </div>+ </Show>+ </div>+ </Show>++ <Show when={modalProps.nodeType === 'pmg'}>+ <div class="space-y-3">+ <SectionHeader+ title="Data collection"+ size="sm"+ class="mb-1"+ titleClass="text-base-content"+ />+ <p class="text-xs text-muted">+ Control which PMG data sets Pulse ingests. Disable individual collectors if you want+ to limit API usage.+ </p>++ <label class="flex items-start gap-2 text-sm text-base-content">+ <input+ type="checkbox"+ checked={state.formData().monitorMailStats}+ onChange={(event) => state.updateField('monitorMailStats', event.currentTarget.checked)}+ class={formCheckbox + ' mt-0.5'}+ />+ <div>+ <div>Mail statistics & trends</div>+ <p class="text-xs text-muted mt-1">+ Total mail volume, inbound/outbound breakdown, spam and virus counts.+ </p>+ </div>+ </label>++ <label class="flex items-start gap-2 text-sm text-base-content">+ <input+ type="checkbox"+ checked={state.formData().monitorQueues}+ onChange={(event) => state.updateField('monitorQueues', event.currentTarget.checked)}+ class={formCheckbox + ' mt-0.5'}+ />+ <div>+ <div>Queue health insights</div>+ <p class="text-xs text-muted mt-1">+ Track Postfix queue depth and rejection trends to spot delivery bottlenecks.+ </p>+ </div>+ </label>++ <label class="flex items-start gap-2 text-sm text-base-content">+ <input+ type="checkbox"+ checked={state.formData().monitorQuarantine}+ onChange={(event) =>+ state.updateField('monitorQuarantine', event.currentTarget.checked)+ }+ class={formCheckbox + ' mt-0.5'}+ />+ <div>+ <div>Quarantine totals</div>+ <p class="text-xs text-muted mt-1">+ Mirror PMG quarantine sizes for spam, virus, and attachment buckets.+ </p>+ </div>+ </label>++ <label class="flex items-start gap-2 text-sm text-base-content">+ <input+ type="checkbox"+ checked={state.formData().monitorDomainStats}+ onChange={(event) =>+ state.updateField('monitorDomainStats', event.currentTarget.checked)+ }+ class={formCheckbox + ' mt-0.5'}+ />+ <div>+ <div>Domain-level statistics</div>+ <p class="text-xs text-muted mt-1">+ Gather per-domain metrics for deeper mail routing analysis.+ </p>+ </div>+ </label>+ </div>+ </Show>+ </>+ );+};diff --git a/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx b/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsxnew file mode 100644index 0000000000..9c7371e6e8--- /dev/null+++ b/frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx@@ -0,0 +1,1009 @@+import { Component, Show } from 'solid-js';+import {+ PVE_MANUAL_PERMISSION_COMMAND,+ type NodeModalProps,+} from '@/components/Settings/nodeModalModel';+import type { NodeModalState } from '@/components/Settings/useNodeModalState';++interface NodeModalSetupGuideSectionProps {+ modalProps: NodeModalProps;+ state: NodeModalState;+}++export const NodeModalSetupGuideSection: Component<NodeModalSetupGuideSectionProps> = (props) => {+ const { modalProps, state } = props;++ return (+ <div class="space-y-4">+ <Show when={modalProps.nodeType === 'pve'}>+ <div class="space-y-3 text-xs">+ <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-4">+ <h5 class="text-sm font-medium text-blue-900 dark:text-blue-100 mb-3 flex items-center gap-2">+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <circle cx="12" cy="12" r="10"></circle>+ <path d="M12 6v6l4 2"></path>+ </svg>+ Connection Setup+ </h5>++ <div class="space-y-3 text-xs">+ <div class="flex gap-2 flex-wrap">+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'agent')}+ class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'agent'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Agent Install+ <span class="ml-1.5 px-1.5 py-0.5 text-[10px] font-semibold bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded">+ Recommended+ </span>+ </button>+ <button+ type="button"+ onClick={() => {+ if (state.formData().setupMode === 'agent') {+ state.updateField('setupMode', 'auto');+ }+ }}+ class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${+ state.isAdvancedSetupMode()+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Advanced+ </button>+ </div>++ <Show when={state.isAdvancedSetupMode()}>+ <div class="mt-1 flex gap-2 flex-wrap pl-0.5">+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'auto')}+ class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'auto'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Direct Connection+ </button>+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'manual')}+ class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'manual'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Manual Token Setup+ </button>+ </div>+ </Show>++ <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:+ </p>+ <ul class="text-xs text-muted list-disc list-inside space-y-1">+ <li>Creates monitoring user and API token automatically</li>+ <li>Registers the node with Pulse</li>+ <li>Enables temperature monitoring (no SSH required)</li>+ <li>Enables Pulse Patrol automation for managing VMs/containers</li>+ </ul>+ <p class="text-blue-800 dark:text-blue-200 font-medium">+ Run this command on your Proxmox VE node:+ </p>+ <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">+ <button+ type="button"+ disabled={state.loadingAgentCommand()}+ onClick={async () => {+ await state.copyProxmoxAgentInstallCommand(+ 'pve',+ 'Command copied! Run it on your Proxmox node.',+ );+ }}+ class="absolute top-2 right-2 p-1.5 hover:text-slate-200 bg-surface-hover rounded-md transition-colors disabled:opacity-50"+ title="Copy command"+ >+ <Show+ when={state.loadingAgentCommand()}+ fallback={+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ }+ >+ <svg+ class="animate-spin"+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <circle cx="12" cy="12" r="10" stroke-opacity="0.25"></circle>+ <path d="M12 2a10 10 0 0 1 10 10" stroke-linecap="round"></path>+ </svg>+ </Show>+ </button>+ <Show+ when={state.agentInstallCommand().length > 0}+ fallback={+ <code class="text-blue-400">+ Click the copy button to generate the install command+ </code>+ }+ >+ <code class="block text-blue-100 whitespace-pre-wrap break-words">+ {state.agentInstallCommand()}+ </code>+ </Show>+ </div>+ <Show when={state.agentCommandError()}>+ <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.+ </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>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.+ </p>+ </div>+ <p class="text-blue-800 dark:text-blue-200">+ Just copy and run this one command on your Proxmox VE server:+ </p>++ <div class="space-y-3">+ <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">+ <button+ type="button"+ onClick={async () => {+ await state.copyQuickSetupCommand(+ 'pve',+ true,+ 'Command copied to clipboard! Run it on the server; the one-time setup token is already embedded.',+ );+ }}+ class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-slate-200 bg-surface-hover rounded-md transition-colors"+ title="Copy command"+ >+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <Show+ when={state.quickSetupPreviewCommand().length > 0}+ fallback={+ <code class="text-blue-400">+ {state.formData().host+ ? 'Click the copy button to generate the setup command'+ : 'Please enter the Endpoint URL above first'}+ </code>+ }+ >+ <code class="block text-blue-100 whitespace-pre-wrap break-words">+ {state.quickSetupPreviewCommand()}+ </code>+ </Show>+ <Show when={state.quickSetupTokenHint().length > 0}>+ <div class="mt-2 text-xs text-blue-800 dark:text-blue-200">+ <span class="font-semibold">Setup token hint:</span>+ <code class="ml-1 font-mono break-all text-blue-900 dark:text-blue-100">+ {state.quickSetupTokenHint()}+ </code>+ <Show when={state.quickSetupExpiry()}>+ <span class="ml-2">Expires at {state.quickSetupExpiryLabel()}</span>+ </Show>+ </div>+ </Show>+ </div>++ <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-3">+ <div class="flex items-start space-x-2">+ <svg+ class="h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"+ />+ </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 Proxmox server may not be able to reach Pulse. Use the alternative+ method below.+ </p>+ </div>+ </div>+ </div>++ <details class="bg-surface-alt rounded-md p-3">+ <summary class="cursor-pointer text-sm font-medium text-base-content hover:text-base-content">+ Alternative: Download script manually+ </summary>+ <div class="mt-3 space-y-3">+ <button+ type="button"+ onClick={async () => {+ await state.downloadProxmoxSetupScript('pve', true);+ }}+ class="w-full px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors text-sm font-medium"+ >+ Download setup script+ </button>+ <div class="text-xs text-muted">+ 1. Click to download the script+ <br />+ 2. Upload to your server via SCP/SFTP+ <br />+ 3. Run:{' '}+ <code class="bg-surface-alt px-1 rounded">+ bash <downloaded-script>+ </code>+ </div>+ </div>+ </details>+ </div>++ <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-3">+ <p class="text-sm font-semibold text-blue-800 dark:text-blue-200 mb-2">+ What this does:+ </p>+ <ul class="text-xs text-blue-700 dark:text-blue-300 space-y-1">+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>+ Creates monitoring user{' '}+ <code class="bg-blue-100 dark:bg-blue-800 px-1 rounded">+ pulse-monitor@pve+ </code>+ </span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>Generates secure API token</span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>+ Sets up monitoring permissions (PVEAuditor + guest agent access + backup+ visibility)+ </span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>Automatically registers node with Pulse</span>+ </li>+ </ul>+ <p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">+ Fully automatic - no manual token copying needed!+ </p>+ </div>+ </div>+ </Show>++ <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:+ </p>++ <div class="space-y-3">+ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 1. Create monitoring user:+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command =+ 'pveum user add pulse-monitor@pve --comment "Pulse monitoring service"';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ pveum user add pulse-monitor@pve --comment "Pulse monitoring service"+ </code>+ </div>+ </div>++ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 2. Generate API token (save the output!):+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command =+ 'pveum user token add pulse-monitor@pve pulse-token --privsep 0';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ pveum user token add pulse-monitor@pve pulse-token --privsep 0+ </code>+ </div>+ <p class="text-amber-600 dark:text-amber-400 text-xs mt-1">+ Important: Copy the token value immediately - it won't be shown again!+ </p>+ </div>++ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 3. Set up monitoring permissions:+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs mb-1">+ <button+ type="button"+ onClick={async () => {+ await state.copyCommand(PVE_MANUAL_PERMISSION_COMMAND);+ }}+ class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content whitespace-pre-line">+ {PVE_MANUAL_PERMISSION_COMMAND}+ </code>+ </div>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command =+ 'pveum aclmod /storage -user pulse-monitor@pve -role PVEDatastoreAdmin';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ pveum aclmod /storage -user pulse-monitor@pve -role PVEDatastoreAdmin+ </code>+ </div>+ <p class="text-muted text-xs mt-1">+ Note: PVEAuditor gives read-only API access. PulseMonitor adds Sys.Audit+ plus either VM.Monitor (PVE 8) or VM.GuestAgent.Audit (PVE 9+) for disk and+ guest metrics. PVEDatastoreAdmin on /storage adds backup visibility.+ </p>+ </div>++ <div class="bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-800 rounded-md p-2">+ <p class="text-sm font-medium text-green-900 dark:text-green-100 mb-1">+ 4. Add to Pulse with:+ </p>+ <ul class="text-xs text-green-800 dark:text-green-200 ml-4 list-disc">+ <li>+ <strong>Token ID:</strong> pulse-monitor@pve!pulse-token+ </li>+ <li>+ <strong>Token Value:</strong> [The value from step 2]+ </li>+ <li>+ <strong>Endpoint URL:</strong>{' '}+ {state.formData().host || 'https://your-server:8006'}+ </li>+ </ul>+ </div>+ </div>+ </div>+ </Show>+ </div>+ </div>+ </div>+ </Show>++ <Show when={modalProps.nodeType === 'pbs'}>+ <div class="space-y-3 text-xs">+ <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-4">+ <h5 class="text-sm font-medium text-blue-900 dark:text-blue-100 mb-3 flex items-center gap-2">+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <circle cx="12" cy="12" r="10"></circle>+ <path d="M12 6v6l4 2"></path>+ </svg>+ Connection Setup+ </h5>++ <div class="space-y-3 text-xs">+ <div class="flex gap-2 flex-wrap">+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'agent')}+ class={`inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'agent'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Agent Install+ <span class="text-[10px] px-1.5 py-0.5 bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 rounded">+ Recommended+ </span>+ </button>+ <button+ type="button"+ onClick={() => {+ if (state.formData().setupMode === 'agent') {+ state.updateField('setupMode', 'auto');+ }+ }}+ class={`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border border-transparent transition-colors ${+ state.isAdvancedSetupMode()+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Advanced+ </button>+ </div>++ <Show when={state.isAdvancedSetupMode()}>+ <div class="mt-1 flex gap-2 flex-wrap pl-0.5">+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'auto')}+ class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'auto'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Direct Connection+ </button>+ <button+ type="button"+ onClick={() => state.updateField('setupMode', 'manual')}+ class={`inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md border border-transparent transition-colors ${+ state.formData().setupMode === 'manual'+ ? 'bg-surface text-blue-600 dark:text-blue-300 border-border shadow-sm'+ : 'text-muted hover:text-blue-600 dark:hover:text-blue-300 hover:bg-surface-hover'+ }`}+ >+ Manual Token Setup+ </button>+ </div>+ </Show>++ <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:+ </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>+ <li>Built-in temperature monitoring (no SSH required)</li>+ <li>Pulse features (execute commands via Pulse Assistant)</li>+ <li>Automatic reconnection on network issues</li>+ </ul>+ <p class="text-blue-800 dark:text-blue-200 text-xs mt-3">+ Run this command on your PBS node:+ </p>+ <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">+ <button+ type="button"+ onClick={() =>+ state.copyProxmoxAgentInstallCommand('pbs', 'Command copied to clipboard')+ }+ class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-white rounded bg-surface hover:bg-slate-700 transition-colors"+ title="Copy to clipboard"+ disabled={state.loadingAgentCommand()}+ >+ <Show+ when={state.loadingAgentCommand()}+ fallback={+ <svg+ xmlns="http://www.w3.org/2000/svg"+ class="h-4 w-4"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"+ />+ </svg>+ }+ >+ <svg+ class="animate-spin h-4 w-4"+ xmlns="http://www.w3.org/2000/svg"+ fill="none"+ viewBox="0 0 24 24"+ >+ <circle+ class="opacity-25"+ cx="12"+ cy="12"+ r="10"+ stroke="currentColor"+ stroke-width="4"+ ></circle>+ <path+ class="opacity-75"+ fill="currentColor"+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"+ ></path>+ </svg>+ </Show>+ </button>+ <code class="text-green-400 whitespace-pre-wrap break-all pr-10">+ {state.agentInstallCommand() ||+ 'Click the copy button to generate and copy the install command'}+ </code>+ </div>+ <Show when={state.agentCommandError()}>+ <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.+ </p>+ </div>+ </Show>++ <Show when={state.formData().setupMode === 'auto'}>+ <div class="space-y-3">+ <p class="text-blue-800 dark:text-blue-200">+ Just copy and run this one command on your Proxmox Backup Server:+ </p>++ <div class="space-y-3">+ <div class="relative bg-base rounded-md p-3 font-mono text-xs overflow-x-auto">+ <Show when={state.formData().host && state.formData().host.trim() !== ''}>+ <button+ type="button"+ onClick={async () => {+ await state.copyQuickSetupCommand(+ 'pbs',+ false,+ 'Command copied to clipboard! Run it on the server; the one-time setup token is already embedded.',+ );+ }}+ class="absolute top-2 right-2 p-1.5 text-slate-400 hover:text-slate-200 bg-surface-hover rounded-md transition-colors"+ title="Copy command"+ >+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ </Show>+ <Show+ when={state.quickSetupPreviewCommand().length > 0}+ fallback={+ <code class="text-blue-400">+ {state.formData().host+ ? 'Click the copy button to generate the setup command'+ : '⚠️ Please enter the Endpoint URL above first'}+ </code>+ }+ >+ <code class="block text-blue-100 whitespace-pre-wrap break-words">+ {state.quickSetupPreviewCommand()}+ </code>+ </Show>+ <Show when={state.quickSetupTokenHint().length > 0}>+ <div class="mt-2 text-xs text-blue-800 dark:text-blue-200">+ <span class="font-semibold">Setup token hint:</span>+ <code class="ml-1 font-mono break-all text-blue-900 dark:text-blue-100">+ {state.quickSetupTokenHint()}+ </code>+ <Show when={state.quickSetupExpiry()}>+ <span class="ml-2">Expires at {state.quickSetupExpiryLabel()}</span>+ </Show>+ </div>+ </Show>+ </div>++ <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-3">+ <div class="flex items-start space-x-2">+ <svg+ class="h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"+ />+ </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>+ </div>+ </div>+ </div>++ <details class="bg-surface-alt rounded-md p-3">+ <summary class="cursor-pointer text-sm font-medium text-base-content hover:text-base-content">+ Alternative: Download script manually+ </summary>+ <div class="mt-3 space-y-3">+ <button+ type="button"+ onClick={async () => {+ await state.downloadProxmoxSetupScript('pbs');+ }}+ class="w-full px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors text-sm font-medium"+ >+ Download setup script+ </button>+ <div class="text-xs text-muted">+ 1. Click to download the script+ <br />+ 2. Upload to your PBS via SCP/SFTP+ <br />+ 3. Run:{' '}+ <code class="bg-surface-alt px-1 rounded">+ bash <downloaded-script>+ </code>+ </div>+ </div>+ </details>+ </div>++ <div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-800 rounded-md p-3">+ <p class="text-sm font-semibold text-blue-800 dark:text-blue-200 mb-2">+ What this does:+ </p>+ <ul class="text-xs text-blue-700 dark:text-blue-300 space-y-1">+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>+ Creates monitoring user{' '}+ <code class="bg-blue-100 dark:bg-blue-800 px-1 rounded">+ pulse-monitor@pbs+ </code>+ </span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>Generates secure API token</span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>+ Sets up Audit permissions (read-only access to backups + system stats)+ </span>+ </li>+ <li class="flex items-start">+ <span class="text-emerald-400 mr-2 mt-0.5">✓</span>+ <span>Automatically registers server with Pulse</span>+ </li>+ </ul>+ <p class="text-xs text-green-600 dark:text-green-400 mt-2 font-semibold">+ ✨ Fully automatic - no manual token copying needed!+ </p>+ </div>+ </div>+ </Show>++ <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:+ </p>++ <div class="space-y-3">+ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 1. Create monitoring user:+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command = 'proxmox-backup-manager user create pulse-monitor@pbs';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ proxmox-backup-manager user create pulse-monitor@pbs+ </code>+ </div>+ </div>++ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 2. Generate API token (save the output!):+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command =+ 'proxmox-backup-manager user generate-token pulse-monitor@pbs pulse-token';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 text-slate-500 hover:text-base-content transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ proxmox-backup-manager user generate-token pulse-monitor@pbs pulse-token+ </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!+ </p>+ </div>++ <div>+ <p class="text-sm font-medium text-base-content mb-1">+ 3. Set up read-only permissions (includes system stats):+ </p>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs mb-1">+ <button+ type="button"+ onClick={async () => {+ const command =+ 'proxmox-backup-manager acl update / Audit --auth-id pulse-monitor@pbs';+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ proxmox-backup-manager acl update / Audit --auth-id pulse-monitor@pbs+ </code>+ </div>+ <div class="relative bg-surface rounded-md p-2 font-mono text-xs">+ <button+ type="button"+ onClick={async () => {+ const command =+ "proxmox-backup-manager acl update / Audit --auth-id 'pulse-monitor@pbs!pulse-token'";+ await state.copyCommand(command);+ }}+ class="absolute top-1 right-1 p-1 hover:text-muted transition-colors"+ title="Copy command"+ >+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>+ <path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>+ </svg>+ </button>+ <code class="text-base-content">+ proxmox-backup-manager acl update / Audit --auth-id+ 'pulse-monitor@pbs!pulse-token'+ </code>+ </div>+ </div>++ <div class="bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-800 rounded-md p-2">+ <p class="text-sm font-medium text-green-900 dark:text-green-100 mb-1">+ 4. Add to Pulse with:+ </p>+ <ul class="text-xs text-green-800 dark:text-green-200 ml-4 list-disc">+ <li>+ <strong>Token ID:</strong> pulse-monitor@pbs!pulse-token+ </li>+ <li>+ <strong>Token Value:</strong> [The value from step 2]+ </li>+ <li>+ <strong>Endpoint URL:</strong>{' '}+ {state.formData().host || 'https://your-server:8007'}+ </li>+ </ul>+ </div>++ <div class="bg-amber-50 dark:bg-amber-900 border border-amber-200 dark:border-amber-800 rounded-md p-2 mt-3">+ <p class="text-xs font-semibold text-amber-800 dark:text-amber-200 mb-1">+ About PBS Permissions:+ </p>+ <ul class="text-xs text-amber-700 dark:text-amber-300 space-y-0.5">+ <li>+ <strong>Basic (DatastoreAudit):</strong> View backups only+ </li>+ <li>+ <strong>Enhanced (Audit on /):</strong> View backups + CPU/memory/uptime+ stats+ </li>+ <li class="text-amber-600 dark:text-amber-400">+ → We use Enhanced for better monitoring visibility+ </li>+ </ul>+ </div>+ </div>+ </div>+ </Show>+ </div>+ </div>+ </div>+ </Show>++ <Show when={modalProps.nodeType === 'pmg'}>+ <div class="space-y-3 text-xs text-base-content">+ <p>+ Generate a dedicated API token in <strong>Configuration → API Tokens</strong> on your+ Mail Gateway. We recommend creating a service user such as{' '}+ <code class="font-mono">pulse-monitor@pmg</code>+ with <em>Auditor</em> privileges.+ </p>+ <ol class="list-decimal ml-4 space-y-1">+ <li>+ Click <em>Add</em> and choose the service user (or create one if needed).+ </li>+ <li>+ Enable <em>Privilege Separation</em> and assign the <em>Auditor</em> role.+ </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.+ </li>+ </ol>+ <p class="text-xs text-muted">+ Pulse only requires read-only access. Avoid granting administrator permissions to the+ token.+ </p>+ </div>+ </Show>+ </div>+ );+};diff --git a/frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx b/frontend-modern/src/components/Settings/NodeModalStatusFooter.tsxnew file mode 100644index 0000000000..17f77294b0--- /dev/null+++ b/frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx@@ -0,0 +1,161 @@+import { Component, For, Show } from 'solid-js';+import type { NodeModalProps } from '@/components/Settings/nodeModalModel';+import type { NodeModalState } from '@/components/Settings/useNodeModalState';+import { logger } from '@/utils/logger';++interface NodeModalStatusFooterProps {+ modalProps: NodeModalProps;+ state: NodeModalState;+}++export const NodeModalStatusFooter: Component<NodeModalStatusFooterProps> = (props) => {+ const { modalProps, state } = props;++ return (+ <>+ <Show when={state.testResult()}>+ {(() => {+ const result = state.testResult();+ logger.debug('Test result display', {+ status: result?.status,+ message: result?.message,+ });+ return null;+ })()}+ <div class={state.testResultPresentation().panelClass}>+ <div class="flex items-start gap-2">+ <Show when={state.testResultPresentation().icon === 'success'}>+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ class="flex-shrink-0 mt-0.5"+ >+ <path d="M9 12l2 2 4-4"></path>+ <circle cx="12" cy="12" r="10"></circle>+ </svg>+ </Show>+ <Show when={state.testResultPresentation().icon === 'warning'}>+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ class="flex-shrink-0 mt-0.5"+ >+ <path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>+ </svg>+ </Show>+ <Show when={state.testResultPresentation().icon === 'error'}>+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ class="flex-shrink-0 mt-0.5"+ >+ <circle cx="12" cy="12" r="10"></circle>+ <line x1="15" y1="9" x2="9" y2="15"></line>+ <line x1="9" y1="9" x2="15" y2="15"></line>+ </svg>+ </Show>+ <div class={`flex-1 ${state.testResultPresentation().textClass}`}>+ <p>{state.testResult()?.message}</p>+ <Show when={state.testResult()?.isCluster}>+ <p class="mt-1 text-xs opacity-80">+ ✨ Cluster detected! All cluster nodes will be automatically added.+ </p>+ </Show>+ <Show when={state.testResult()?.warnings && state.testResult()!.warnings!.length > 0}>+ <div class="mt-2 space-y-1">+ <p class="text-xs font-semibold opacity-90">Warnings:</p>+ <ul class="text-xs space-y-0.5 opacity-80">+ <For each={state.testResult()?.warnings}>{(warning) => <li>• {warning}</li>}</For>+ </ul>+ </div>+ </Show>+ </div>+ </div>+ </div>+ </Show>++ <Show when={state.hostLimitReached()}>+ <div class="mx-6 mb-2 rounded-md border border-amber-200 bg-amber-50 dark:border-amber-900 dark:bg-amber-900/30 px-4 py-3">+ <p class="text-sm font-medium text-amber-800 dark:text-amber-200">+ Agent limit reached — you'll need to remove an agent or upgrade to add more.+ </p>+ <div class="mt-2 flex items-center gap-3">+ <span class="text-xs text-amber-700 dark:text-amber-300">Need more agents?</span>+ <Show when={state.canStartTrial()}>+ <button+ type="button"+ class="text-xs font-semibold text-indigo-700 dark:text-indigo-300 hover:underline disabled:opacity-60"+ disabled={state.startingTrial()}+ onClick={state.handleStartTrial}+ >+ Start your free 14-day trial+ </button>+ </Show>+ </div>+ </div>+ </Show>++ <div class="flex items-center justify-between px-6 py-4 border-t border-border">+ <button+ type="button"+ onClick={state.handleTestConnection}+ disabled={state.isTesting()}+ class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed"+ >+ {state.isTesting() ? 'Testing...' : 'Test Connection'}+ </button>++ <div class="flex items-center gap-3">+ <Show when={modalProps.showBackToDiscovery && modalProps.onBackToDiscovery}>+ <button+ type="button"+ onClick={() => {+ modalProps.onBackToDiscovery!();+ modalProps.onClose();+ }}+ class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors flex items-center gap-2"+ >+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ >+ <line x1="19" y1="12" x2="5" y2="12"></line>+ <polyline points="12 19 5 12 12 5"></polyline>+ </svg>+ Back to Discovery+ </button>+ </Show>+ <button+ type="button"+ onClick={modalProps.onClose}+ class="px-4 py-2 text-sm border border-border text-base-content rounded-md hover:bg-surface-hover transition-colors"+ >+ Cancel+ </button>+ <button+ type="submit"+ class="px-4 py-2 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"+ >+ {state.isEditingExistingNode() ? 'Update' : 'Add'} Node+ </button>+ </div>+ </div>+ </>+ );+};diff --git a/frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts b/frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.tsindex e9d8f28a72..00da991534 100644--- a/frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts@@ -1,15 +1,42 @@import { describe, expect, it } from 'vitest';+import nodeModalAuthenticationSectionSource from '../NodeModalAuthenticationSection.tsx?raw';+import nodeModalBasicInfoSectionSource from '../NodeModalBasicInfoSection.tsx?raw';+import nodeModalMonitoringSectionSource from '../NodeModalMonitoringSection.tsx?raw';+import nodeModalSetupGuideSectionSource from '../NodeModalSetupGuideSection.tsx?raw';+import nodeModalStatusFooterSource from '../NodeModalStatusFooter.tsx?raw';import nodeModalSource from '../NodeModal.tsx?raw';import nodeModalModelSource from '../nodeModalModel.ts?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';const nodeModalSettingsOwnerSource = [+ nodeModalAuthenticationSectionSource,+ nodeModalBasicInfoSectionSource,+ nodeModalMonitoringSectionSource,+ nodeModalSetupGuideSectionSource,+ nodeModalStatusFooterSource,nodeModalSource,nodeModalModelSource,nodeModalStateSource,].join('\n');describe('NodeModal guardrails', () => {+ it('keeps the node modal shell focused on extracted section owners', () => {+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalBasicInfoSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalAuthenticationSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalMonitoringSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalStatusFooter');+ expect(nodeModalSource).not.toContain('title="Basic information"');+ expect(nodeModalSource).not.toContain('title="Authentication"');+ expect(nodeModalSource).not.toContain('title="Monitoring coverage"');+ expect(nodeModalSource).not.toContain('Start your free 14-day trial');+ expect(nodeModalAuthenticationSectionSource).toContain(+ '@/components/Settings/NodeModalSetupGuideSection',+ );+ expect(nodeModalSetupGuideSectionSource).toContain("await state.copyProxmoxAgentInstallCommand(");+ expect(nodeModalMonitoringSectionSource).toContain('title="Monitoring coverage"');+ expect(nodeModalStatusFooterSource).toContain('Start your free 14-day trial');+ });+it('keeps the manual PVE permission snippet aligned with the canonical setup script', () => {expect(nodeModalSettingsOwnerSource).toContain('export const PVE_MANUAL_PERMISSION_COMMAND = `');expect(nodeModalSettingsOwnerSource).toContain(@@ -28,9 +55,9 @@ describe('NodeModal guardrails', () => {expect(nodeModalStateSource).toContain("const data = await NodesAPI.getAgentInstallCommand({");expect(nodeModalStateSource).toContain('type,');expect(nodeModalStateSource).toContain('enableProxmox: true,');- expect(nodeModalSource).toContain("await copyProxmoxAgentInstallCommand(");- expect(nodeModalSource).toContain("'pve',");- expect(nodeModalSource).toContain("'pbs',");+ expect(nodeModalSettingsOwnerSource).toContain("await state.copyProxmoxAgentInstallCommand(");+ expect(nodeModalSettingsOwnerSource).toContain("'pve',");+ expect(nodeModalSettingsOwnerSource).toContain("'pbs',");expect(nodeModalStateSource).toContain("const message = error instanceof Error ? error.message : 'Failed to generate install command';",);@@ -58,10 +85,10 @@ describe('NodeModal guardrails', () => {'setQuickSetupPreviewCommand(response.commandWithoutEnv ?? response.commandWithEnv);',);expect(nodeModalStateSource).toContain('copyToClipboard(data.commandWithEnv)');- expect(nodeModalSource).toContain(+ expect(nodeModalSettingsOwnerSource).toContain("Command copied to clipboard! Run it on the server; the one-time setup token is already embedded.",);- expect(nodeModalSource).toContain('Setup token hint:');+ expect(nodeModalSettingsOwnerSource).toContain('Setup token hint:');expect(nodeModalStateSource).toContain("notificationStore.error('Please enter the Endpoint URL first');",);diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 746af15e6a..4ec9483fde 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -13,7 +13,12 @@ import infrastructureInventorySectionSource from '../InfrastructureInventorySectimport infrastructureActiveRowDetailsSource from '../InfrastructureActiveRowDetails.tsx?raw';import infrastructureIgnoredRowDetailsSource from '../InfrastructureIgnoredRowDetails.tsx?raw';import infrastructureStopMonitoringDialogSource from '../InfrastructureStopMonitoringDialog.tsx?raw';+import nodeModalAuthenticationSectionSource from '../NodeModalAuthenticationSection.tsx?raw';+import nodeModalBasicInfoSectionSource from '../NodeModalBasicInfoSection.tsx?raw';import nodeModalModelSource from '../nodeModalModel.ts?raw';+import nodeModalMonitoringSectionSource from '../NodeModalMonitoringSection.tsx?raw';+import nodeModalSetupGuideSectionSource from '../NodeModalSetupGuideSection.tsx?raw';+import nodeModalStatusFooterSource from '../NodeModalStatusFooter.tsx?raw';import nodeModalSource from '../NodeModal.tsx?raw';import infrastructureOperationsStateSource from '../useInfrastructureOperationsState.tsx?raw';import nodeModalStateSource from '../useNodeModalState.ts?raw';@@ -124,6 +129,11 @@ const extractedModules = ['../useAuditWebhookPanelState.ts','../BillingAdminOrganizationsTable.tsx','../useBillingAdminPanelState.ts',+ '../NodeModalAuthenticationSection.tsx',+ '../NodeModalBasicInfoSection.tsx',+ '../NodeModalMonitoringSection.tsx',+ '../NodeModalSetupGuideSection.tsx',+ '../NodeModalStatusFooter.tsx','../NodeModal.tsx','../nodeModalModel.ts','../useNodeModalState.ts',@@ -726,16 +736,31 @@ describe('Settings architecture guardrails', () => {});it('keeps the node setup modal shell behind extracted state and model owners', () => {+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalBasicInfoSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalAuthenticationSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalMonitoringSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalStatusFooter');expect(nodeModalSource).toContain('@/components/Settings/nodeModalModel');expect(nodeModalSource).toContain('@/components/Settings/useNodeModalState');+ expect(nodeModalSource).not.toContain('title="Basic information"');+ expect(nodeModalSource).not.toContain('title="Authentication"');+ expect(nodeModalSource).not.toContain('title="Monitoring coverage"');expect(nodeModalSource).not.toContain('const deriveNameFromHost =');expect(nodeModalSource).not.toContain('const PVE_MANUAL_PERMISSION_COMMAND = `');expect(nodeModalSource).not.toContain('const [quickSetupBootstrap, setQuickSetupBootstrap] =');expect(nodeModalSource).not.toContain('const handleTestConnection = async () =>');+ expect(nodeModalBasicInfoSectionSource).toContain('title="Basic information"');+ expect(nodeModalAuthenticationSectionSource).toContain(+ '@/components/Settings/NodeModalSetupGuideSection',+ );+ expect(nodeModalSetupGuideSectionSource).toContain('Connection Setup');+ expect(nodeModalMonitoringSectionSource).toContain('title="Monitoring coverage"');+ expect(nodeModalStatusFooterSource).toContain('Start your free 14-day trial');expect(nodeModalModelSource).toContain('export interface NodeModalProps');expect(nodeModalModelSource).toContain('export const deriveNameFromHost =');expect(nodeModalModelSource).toContain('export const PVE_MANUAL_PERMISSION_COMMAND = `');expect(nodeModalStateSource).toContain('export const useNodeModalState =');+ expect(nodeModalStateSource).toContain('export type NodeModalState = ReturnType<typeof useNodeModalState>;');expect(nodeModalStateSource).toContain('const [quickSetupBootstrap, setQuickSetupBootstrap] =');expect(nodeModalStateSource).toContain('const handleTestConnection = async () =>');expect(nodeModalStateSource).toContain("const PROXMOX_SETUP_HOST_REQUIRED_MESSAGE = 'Proxmox setup host is required';");diff --git a/frontend-modern/src/components/Settings/useNodeModalState.ts b/frontend-modern/src/components/Settings/useNodeModalState.tsindex 4a2331c3fb..c66938bcb4 100644--- a/frontend-modern/src/components/Settings/useNodeModalState.ts+++ b/frontend-modern/src/components/Settings/useNodeModalState.ts@@ -540,3 +540,5 @@ export const useNodeModalState = (props: NodeModalProps) => {updateField,};};++export type NodeModalState = ReturnType<typeof useNodeModalState>;diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 9d919245f3..c1c7598762 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -214,7 +214,12 @@ import infrastructureWorkspaceSource from '@/components/Settings/InfrastructureWimport infrastructureWorkspaceModelSource from '@/components/Settings/infrastructureWorkspaceModel.ts?raw';import proxmoxSettingsPresentationSource from '@/utils/proxmoxSettingsPresentation.ts?raw';import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanel.tsx?raw';+import nodeModalAuthenticationSectionSource from '@/components/Settings/NodeModalAuthenticationSection.tsx?raw';+import nodeModalBasicInfoSectionSource from '@/components/Settings/NodeModalBasicInfoSection.tsx?raw';import nodeModalModelSource from '@/components/Settings/nodeModalModel.ts?raw';+import nodeModalMonitoringSectionSource from '@/components/Settings/NodeModalMonitoringSection.tsx?raw';+import nodeModalSetupGuideSectionSource from '@/components/Settings/NodeModalSetupGuideSection.tsx?raw';+import nodeModalStatusFooterSource from '@/components/Settings/NodeModalStatusFooter.tsx?raw';import nodeModalSource from '@/components/Settings/NodeModal.tsx?raw';import nodeModalStateSource from '@/components/Settings/useNodeModalState.ts?raw';import nodeModalPresentationSource from '@/utils/nodeModalPresentation.ts?raw';@@ -2292,15 +2297,15 @@ describe('frontend resource type boundaries', () => {'export function buildInfrastructureWorkspacePath',);expect(nodeModalSource).toContain('getNodeProductName');- expect(nodeModalSource).toContain('getNodeEndpointPlaceholder');- expect(nodeModalSource).toContain('getNodeGuestUrlPlaceholder');- expect(nodeModalSource).toContain('getNodeUsernamePlaceholder');- expect(nodeModalSource).toContain('getNodeUsernameHelp');- expect(nodeModalSource).toContain('getNodeTokenIdPlaceholder');- expect(nodeModalSource).toContain('getNodeMonitoringCoverageCopy');- expect(nodeModalSource).toContain('getTemperatureMonitoringLockedCopy');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalBasicInfoSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalAuthenticationSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalMonitoringSection');+ expect(nodeModalSource).toContain('@/components/Settings/NodeModalStatusFooter');expect(nodeModalSource).toContain('@/components/Settings/nodeModalModel');expect(nodeModalSource).toContain('@/components/Settings/useNodeModalState');+ expect(nodeModalSource).not.toContain('title="Basic information"');+ expect(nodeModalSource).not.toContain('title="Authentication"');+ expect(nodeModalSource).not.toContain('title="Monitoring coverage"');expect(nodeModalSource).not.toContain('const getCleanFormData =');expect(nodeModalSource).not.toContain('const nodeProductName =');expect(nodeModalSource).not.toContain('const deriveNameFromHost =');@@ -2312,9 +2317,26 @@ describe('frontend resource type boundaries', () => {expect(nodeModalModelSource).toContain('export const deriveNameFromHost =');expect(nodeModalModelSource).toContain('export const PVE_MANUAL_PERMISSION_COMMAND = `');expect(nodeModalStateSource).toContain('export const useNodeModalState =');+ expect(nodeModalStateSource).toContain(+ 'export type NodeModalState = ReturnType<typeof useNodeModalState>;',+ );expect(nodeModalStateSource).toContain('getNodeModalDefaultFormData');expect(nodeModalStateSource).toContain('getNodeModalTestResultPresentation');expect(nodeModalStateSource).toContain('buildNodeModalMonitoringPayload');+ expect(nodeModalBasicInfoSectionSource).toContain('title="Basic information"');+ expect(nodeModalBasicInfoSectionSource).toContain('getNodeEndpointPlaceholder');+ expect(nodeModalBasicInfoSectionSource).toContain('getNodeGuestUrlPlaceholder');+ expect(nodeModalAuthenticationSectionSource).toContain(+ '@/components/Settings/NodeModalSetupGuideSection',+ );+ expect(nodeModalAuthenticationSectionSource).toContain('getNodeUsernamePlaceholder');+ expect(nodeModalAuthenticationSectionSource).toContain('getNodeUsernameHelp');+ expect(nodeModalAuthenticationSectionSource).toContain('getNodeTokenIdPlaceholder');+ expect(nodeModalSetupGuideSectionSource).toContain('Connection Setup');+ expect(nodeModalMonitoringSectionSource).toContain('title="Monitoring coverage"');+ expect(nodeModalMonitoringSectionSource).toContain('getNodeMonitoringCoverageCopy');+ expect(nodeModalMonitoringSectionSource).toContain('getTemperatureMonitoringLockedCopy');+ expect(nodeModalStatusFooterSource).toContain('Start your free 14-day trial');expect(nodeModalPresentationSource).toContain('export function getNodeModalDefaultFormData');expect(nodeModalPresentationSource).toContain('export function getNodeProductName');expect(nodeModalPresentationSource).toContain('export function getNodeEndpointPlaceholder');diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex f612311fe7..2209b9ff7c 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -1105,58 +1105,69 @@ class SubsystemLookupTest(unittest.TestCase):self.assertEqual(match["verification_requirement"]["id"], requirement_id)def test_lookup_paths_assigns_node_modal_to_agent_lifecycle_and_api_contracts(self) -> None:- result = lookup_paths(["frontend-modern/src/components/Settings/NodeModal.tsx"])+ result = lookup_paths(+ [+ "frontend-modern/src/components/Settings/NodeModal.tsx",+ "frontend-modern/src/components/Settings/NodeModalAuthenticationSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalBasicInfoSection.tsx",+ "frontend-modern/src/components/Settings/nodeModalModel.ts",+ "frontend-modern/src/components/Settings/NodeModalMonitoringSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx",+ "frontend-modern/src/components/Settings/NodeModalStatusFooter.tsx",+ "frontend-modern/src/components/Settings/useNodeModalState.ts",+ ]+ )self.assertEqual(result["unowned_runtime_files"], [])self.assertEqual({item["subsystem"] for item in result["impacted_subsystems"]},{"agent-lifecycle", "api-contracts"},)- file_entry = result["files"][0]- self.assertEqual(file_entry["classification"], "runtime")- self.assertEqual(- {match["subsystem"] for match in file_entry["matches"]},- {"agent-lifecycle", "api-contracts"},- )+ for file_entry in result["files"]:+ self.assertEqual(file_entry["classification"], "runtime")+ self.assertEqual(+ {match["subsystem"] for match in file_entry["matches"]},+ {"agent-lifecycle", "api-contracts"},+ )- lifecycle_match = next(- match for match in file_entry["matches"] if match["subsystem"] == "agent-lifecycle"- )- self.assertEqual(- lifecycle_match["contract"],- "docs/release-control/v6/internal/subsystems/agent-lifecycle.md",- )- self.assertEqual(lifecycle_match["lane_context"]["lane_id"], "L16")- self.assertEqual(- lifecycle_match["verification_requirement"]["id"],- "node-setup-settings-surface",- )- self.assertEqual(- lifecycle_match["verification_requirement"]["exact_files"],- [- "frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts"- ],- )+ lifecycle_match = next(+ match for match in file_entry["matches"] if match["subsystem"] == "agent-lifecycle"+ )+ self.assertEqual(+ lifecycle_match["contract"],+ "docs/release-control/v6/internal/subsystems/agent-lifecycle.md",+ )+ self.assertEqual(lifecycle_match["lane_context"]["lane_id"], "L16")+ self.assertEqual(+ lifecycle_match["verification_requirement"]["id"],+ "node-setup-settings-surface",+ )+ self.assertEqual(+ lifecycle_match["verification_requirement"]["exact_files"],+ [+ "frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts"+ ],+ )- api_contracts_match = next(- match for match in file_entry["matches"] if match["subsystem"] == "api-contracts"- )- self.assertEqual(- api_contracts_match["contract"],- "docs/release-control/v6/internal/subsystems/api-contracts.md",- )- self.assertEqual(api_contracts_match["lane_context"]["lane_id"], "L6")- self.assertEqual(- api_contracts_match["verification_requirement"]["id"],- "node-setup-settings-client-surface",- )- self.assertEqual(- api_contracts_match["verification_requirement"]["exact_files"],- [- "frontend-modern/src/api/__tests__/nodes.test.ts",- "frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts",- "frontend-modern/src/types/api.ts",- ],- )+ api_contracts_match = next(+ match for match in file_entry["matches"] if match["subsystem"] == "api-contracts"+ )+ self.assertEqual(+ api_contracts_match["contract"],+ "docs/release-control/v6/internal/subsystems/api-contracts.md",+ )+ self.assertEqual(api_contracts_match["lane_context"]["lane_id"], "L6")+ self.assertEqual(+ api_contracts_match["verification_requirement"]["id"],+ "node-setup-settings-client-surface",+ )+ self.assertEqual(+ api_contracts_match["verification_requirement"]["exact_files"],+ [+ "frontend-modern/src/api/__tests__/nodes.test.ts",+ "frontend-modern/src/components/Settings/__tests__/NodeModal.guardrails.test.ts",+ "frontend-modern/src/types/api.ts",+ ],+ )def test_lookup_paths_assigns_setup_completion_panel_to_agent_lifecycle(self) -> None:result = lookup_paths(["frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx"])