Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Route Proxmox picker choices to kind-scoped platforms URL

rcourtmana6145510d085
diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
index af9c681c20..8d570b2d4f 100644
--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx
@@ -48,7 +48,7 @@ export const InfrastructureWorkspace: Component<InfrastructureWorkspaceProps> =
return;
}
props.onSelectAgent(choice.kind);
- navigate('/settings/infrastructure/platforms/proxmox');
+ navigate(`/settings/infrastructure/platforms/proxmox/${choice.kind}`);
};
createEffect(() => {
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
index 2fea1cc719..9dbdfa74a6 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
@@ -130,14 +130,23 @@ describe('InfrastructureWorkspace', () => {
expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/platforms/vmware');
});
- it('preselects the Proxmox kind and lands on the platforms route for PVE, PBS, and PMG', () => {
+ it('preselects the Proxmox kind and lands on the kind-scoped platforms route for PVE, PBS, and PMG', () => {
renderWorkspace();
fireEvent.click(screen.getByRole('button', { name: /Add a system/i }));
- fireEvent.click(screen.getByText('Proxmox Backup Server'));
+ fireEvent.click(screen.getByText('Proxmox VE'));
+ expect(onSelectAgentSpy).toHaveBeenCalledWith('pve');
+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/platforms/proxmox/pve');
+ fireEvent.click(screen.getByRole('button', { name: /Add a system/i }));
+ fireEvent.click(screen.getByText('Proxmox Backup Server'));
expect(onSelectAgentSpy).toHaveBeenCalledWith('pbs');
- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/platforms/proxmox');
+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/platforms/proxmox/pbs');
+
+ fireEvent.click(screen.getByRole('button', { name: /Add a system/i }));
+ fireEvent.click(screen.getByText('Proxmox Mail Gateway'));
+ expect(onSelectAgentSpy).toHaveBeenCalledWith('pmg');
+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/platforms/proxmox/pmg');
});
it('renders the install workspace when the URL is /install', () => {