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.

Restore infrastructure settings platform sections

rcourtmand6a2f4949f44
diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
index b25b1f1944..dd5b2026ab 100644
--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
@@ -173,11 +173,6 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
const sortedProducts = createMemo(() =>
[...products()]
- .filter((product) => {
- const configuredCount = groupedConfiguredRows().get(product.type)?.length ?? 0;
- const discoveredCount = groupedDiscoveredRows().get(product.type)?.length ?? 0;
- return configuredCount + discoveredCount > 0;
- })
.sort((left, right) => {
const configuredDifference =
(groupedConfiguredRows().get(right.type)?.length ?? 0) -
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
index 711b09c69e..12dc8f1a61 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
@@ -236,7 +236,7 @@ describe('InfrastructureWorkspace', () => {
const renderWorkspace = (propOverrides: Record<string, unknown> = {}) =>
render(() => (<InfrastructureWorkspace {...{ ...baseProps(), ...propOverrides }} />) as any);
- it('renders the instance-first source manager as the only landing surface', async () => {
+ it('renders the source manager landing with direct product sections', async () => {
renderWorkspace();
await waitFor(() => expect(screen.getByText('Infrastructure systems')).toBeInTheDocument());
@@ -244,10 +244,12 @@ describe('InfrastructureWorkspace', () => {
expect(screen.getByRole('button', { name: /Discovery settings/i })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: /Detect from address/i })).toBeNull();
expect(screen.getByText('Proxmox VE')).toBeInTheDocument();
- expect(screen.queryByText('VMware vCenter')).toBeNull();
- expect(screen.queryByText('TrueNAS SCALE')).toBeNull();
- expect(screen.queryByText('Standalone hosts')).toBeNull();
+ expect(screen.getByText('VMware vCenter')).toBeInTheDocument();
+ expect(screen.getByText('TrueNAS SCALE')).toBeInTheDocument();
+ expect(screen.getByText('Standalone hosts')).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Add Proxmox VE/i })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: /Add TrueNAS SCALE/i })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: /Add host/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Add infrastructure$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Edit/i })).toBeInTheDocument();
expect(screen.queryByRole('heading', { name: 'Monitored systems' })).not.toBeInTheDocument();
@@ -686,7 +688,9 @@ describe('InfrastructureWorkspace', () => {
expect(screen.getByText('delly')).toBeInTheDocument();
expect(screen.getByText('minipc')).toBeInTheDocument();
expect(screen.getAllByText('Host telemetry').length).toBeGreaterThan(0);
- expect(screen.queryByText('Standalone hosts')).toBeNull();
+ expect(screen.getByText('Standalone hosts')).toBeInTheDocument();
+ expect(screen.getAllByText('delly')).toHaveLength(1);
+ expect(screen.getAllByText('minipc')).toHaveLength(1);
});
it('hides the add flow and source-manager actions in read-only mode', () => {