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.

Compact infrastructure source manager

rcourtmanf0105e586e22
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 6f9f873768..8f01baac90 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -204,6 +204,11 @@ desktop source-management table also inherits the surrounding settings panel
frame and the shared `Table` shell from `frontend-primitives`; lifecycle work
must not restore a local `overflow-x-auto` wrapper or a page-local table card
around that table.
+The same source-manager landing surface must keep onboarding primary and
+compact: `Add infrastructure` remains the obvious action, the setup summary is
+one short status strip, and detailed governance/fleet state stays in the
+systems table rows or deeper fleet surfaces instead of expanding into duplicate
+explanatory bands above the table.
Configured-node settings tables follow the same boundary:
`frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx` may own node,
credential, capability, status, and action cells, but table scroll framing must
diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
index 8f0dd3630b..e013b565b1 100644
--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
@@ -238,12 +238,6 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
);
const connectedSystemCount = createMemo(() => props.rows().length);
const discoveredCandidateCount = createMemo(() => props.discoveredNodes().length);
- const apiCoveredSystemCount = createMemo(
- () => props.rows().filter((row) => rowHasApiCoverage(row)).length,
- );
- const agentCoveredSystemCount = createMemo(
- () => props.rows().filter((row) => rowHasAgentCoverage(row)).length,
- );
const apiOnlySystemCount = createMemo(
() => props.rows().filter((row) => rowHasApiCoverage(row) && !rowHasAgentCoverage(row)).length,
);
@@ -263,28 +257,6 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
rowHasFleetTone(row, (signal) => signal.tone === 'warning' || signal.tone === 'critical'),
).length,
);
- const credentialIssueSystemCount = createMemo(
- () =>
- props
- .rows()
- .filter((row) =>
- rowHasFleetTone(
- row,
- (signal) => signal.key === 'credentials' && signal.tone === 'critical',
- ),
- ).length,
- );
- const remoteControlEnabledSystemCount = createMemo(
- () =>
- props
- .rows()
- .filter((row) =>
- rowHasFleetTone(
- row,
- (signal) => signal.key === 'remote-control' && signal.tone === 'info',
- ),
- ).length,
- );
const discoveryReadinessLabel = createMemo(() => {
if (props.discoveryScanStatus().scanning) return 'Scanning now';
if (discoveredCandidateCount() > 0) return `${discoveredCandidateCount()} to review`;
@@ -306,9 +278,8 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
if (connectedSystemCount() === 0) {
return {
kind: 'add',
- label: 'Choose source type',
- detail:
- 'Choose a supported platform API or install Pulse Agent to start building the unified infrastructure model.',
+ label: 'Add infrastructure',
+ detail: 'Add a platform, host, NAS, cluster, or endpoint to start monitoring.',
onClick: props.onAddInfrastructure,
};
}
@@ -340,6 +311,28 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
detail: completeAction.detail,
};
});
+ const setupSummaryMetrics = createMemo(() => [
+ {
+ label: 'Systems',
+ value: formatCount(connectedSystemCount(), 'system'),
+ },
+ {
+ label: 'Live',
+ value: formatCount(liveFleetSystemCount(), 'system'),
+ },
+ {
+ label: 'Needs attention',
+ value: formatCount(fleetAttentionSystemCount(), 'system'),
+ },
+ {
+ label: 'Needs agent',
+ value: formatCount(apiOnlySystemCount(), 'system'),
+ },
+ {
+ label: 'Discovery',
+ value: discoveryReadinessLabel(),
+ },
+ ]);
const [layoutWidth, setLayoutWidth] = createSignal(
typeof window !== 'undefined' ? window.innerWidth : 1024,
@@ -447,27 +440,35 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
</>
);
- const setupConfidenceBand = () => (
+ const setupSummaryBand = () => (
<section
- aria-label="Infrastructure setup confidence"
- class="border-b border-border bg-surface px-4 py-4"
+ aria-label="Infrastructure setup summary"
+ class="border-b border-border bg-surface px-4 py-3"
>
- <div class="flex flex-col gap-3 xl:flex-row xl:items-start xl:justify-between">
- <div class="max-w-3xl">
- <h3 class="text-sm font-semibold text-base-content">Infrastructure coverage</h3>
- <p class="mt-1 text-sm leading-5 text-muted">
- This is the source map Pulse uses to understand the estate. Confirm the API inventory,
- agent telemetry, scan scope, and any pending discovery candidates before relying on
- monitoring views or automation.
- </p>
- </div>
-
+ <h3 class="sr-only">Setup status</h3>
+ <div class="flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between">
+ <dl class="grid min-w-0 flex-1 grid-cols-2 overflow-hidden rounded-md border border-border-subtle bg-border-subtle sm:grid-cols-3 xl:grid-cols-5">
+ <For each={setupSummaryMetrics()}>
+ {(metric, index) => (
+ <div
+ class={`bg-surface px-3 py-3 ${
+ index() === setupSummaryMetrics().length - 1 ? 'col-span-2 sm:col-span-1' : ''
+ }`}
+ >
+ <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
+ {metric.label}
+ </dt>
+ <dd class="mt-1 text-sm font-semibold text-base-content">{metric.value}</dd>
+ </div>
+ )}
+ </For>
+ </dl>
<Show when={!props.readOnly && Boolean(setupConfidenceAction().onClick)}>
<button
type="button"
onClick={() => setupConfidenceAction().onClick?.()}
disabled={setupConfidenceAction().disabled}
- class={`${workspaceSecondaryButtonClass} self-start`}
+ class={`${workspaceSecondaryButtonClass} self-start xl:self-center`}
>
{setupConfidenceActionIcon(setupConfidenceAction().kind)}
{setupConfidenceAction().label}
@@ -475,97 +476,7 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
</Show>
</div>
- <dl class="mt-4 grid gap-0 border-y border-border-subtle sm:grid-cols-2 xl:grid-cols-5">
- <div class="border-b border-border-subtle px-3 py-3 sm:border-r xl:border-b-0">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Connected systems
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(connectedSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 xl:border-b-0 xl:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- API coverage
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(apiCoveredSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 sm:border-b-0 sm:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Agent coverage
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(agentCoveredSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 sm:border-b-0 xl:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Needs agent
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(apiOnlySystemCount(), 'system')}
- </dd>
- </div>
- <div class="px-3 py-3">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">Discovery</dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">{discoveryReadinessLabel()}</dd>
- </div>
- </dl>
-
<p class="mt-3 text-xs leading-5 text-muted">{setupConfidenceAction().detail}</p>
-
- <div class="mt-5 border-t border-border-subtle pt-4">
- <div class="max-w-3xl">
- <h3 class="text-sm font-semibold text-base-content">Fleet governance</h3>
- <p class="mt-1 text-sm leading-5 text-muted">
- Enrollment, liveness, version drift, adapter health, config state, credentials, update
- status, and remote-control posture come from the same governed connections ledger.
- </p>
- </div>
-
- <dl class="mt-3 grid gap-0 border-y border-border-subtle sm:grid-cols-2 xl:grid-cols-5">
- <div class="border-b border-border-subtle px-3 py-3 sm:border-r xl:border-b-0">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Managed fleet
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(connectedSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 xl:border-b-0 xl:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">Live</dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(liveFleetSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 sm:border-b-0 sm:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Needs attention
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(fleetAttentionSystemCount(), 'system')}
- </dd>
- </div>
- <div class="border-b border-border-subtle px-3 py-3 sm:border-b-0 xl:border-r">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Credential issues
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(credentialIssueSystemCount(), 'system')}
- </dd>
- </div>
- <div class="px-3 py-3">
- <dt class="text-[11px] font-medium uppercase tracking-[0.08em] text-muted">
- Remote control
- </dt>
- <dd class="mt-1 text-sm font-semibold text-base-content">
- {formatCount(remoteControlEnabledSystemCount(), 'system')}
- </dd>
- </div>
- </dl>
- </div>
</section>
);
@@ -585,7 +496,7 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
noPadding
>
{headerActions()}
- {setupConfidenceBand()}
+ {setupSummaryBand()}
<Show when={!useCardLayout()}>
<Table class="w-full min-w-[820px] table-fixed text-sm">
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
index 6fe9a8c7d7..fdfdd34529 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
@@ -61,10 +61,10 @@ const row = (overrides: Partial<InfrastructureSystemRow> = {}): InfrastructureSy
};
};
-describe('InfrastructureSourceManager fleet governance', () => {
+describe('InfrastructureSourceManager setup summary', () => {
afterEach(() => cleanup());
- it('surfaces governed fleet counts and row-level attention signals', () => {
+ it('keeps setup status compact while preserving row-level attention signals', () => {
render(() => (
<InfrastructureSourceManager
rows={() => [
@@ -105,11 +105,12 @@ describe('InfrastructureSourceManager fleet governance', () => {
/>
));
- expect(screen.getByText('Fleet governance')).toBeInTheDocument();
- expect(screen.getByText('Managed fleet')).toBeInTheDocument();
+ expect(screen.getByText('Setup status')).toBeInTheDocument();
+ expect(screen.getByText('Systems')).toBeInTheDocument();
+ expect(screen.getByText('Live')).toBeInTheDocument();
expect(screen.getByText('Needs attention')).toBeInTheDocument();
- expect(screen.getByText('Credential issues')).toBeInTheDocument();
- expect(screen.getByText('Remote control')).toBeInTheDocument();
+ expect(screen.getByText('Needs agent')).toBeInTheDocument();
+ expect(screen.queryByText('Fleet governance')).toBeNull();
expect(screen.getByText('Credentials invalid')).toBeInTheDocument();
expect(screen.getByText('Remote control enabled')).toBeInTheDocument();
});
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
index 4613ef9c24..c67bb5e402 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx
@@ -291,18 +291,18 @@ describe('InfrastructureWorkspace', () => {
expect(screen.queryByRole('button', { name: /^Detect address$/i })).toBeNull();
expect(screen.queryByRole('button', { name: /^Install agent$/i })).toBeNull();
const readiness = screen.getByRole('region', {
- name: /Infrastructure setup confidence/i,
+ name: /Infrastructure setup summary/i,
});
- expect(within(readiness).getByText('Infrastructure coverage')).toBeInTheDocument();
- expect(within(readiness).getByText('Connected systems')).toBeInTheDocument();
- expect(within(readiness).getByText('API coverage')).toBeInTheDocument();
- expect(within(readiness).getByText('Agent coverage')).toBeInTheDocument();
+ expect(within(readiness).getByText('Setup status')).toBeInTheDocument();
+ expect(within(readiness).getByText('Systems')).toBeInTheDocument();
+ expect(within(readiness).getByText('Live')).toBeInTheDocument();
+ expect(within(readiness).getByText('Needs attention')).toBeInTheDocument();
expect(within(readiness).getByText('Needs agent')).toBeInTheDocument();
expect(within(readiness).getByText('Discovery')).toBeInTheDocument();
- expect(within(readiness).getByText('Fleet governance')).toBeInTheDocument();
- expect(within(readiness).getByText('Managed fleet')).toBeInTheDocument();
- expect(within(readiness).getAllByText('1 system')).toHaveLength(4);
- expect(within(readiness).getAllByText('0 systems')).toHaveLength(5);
+ expect(within(readiness).queryByText('Infrastructure coverage')).toBeNull();
+ expect(within(readiness).queryByText('Fleet governance')).toBeNull();
+ expect(within(readiness).getAllByText('1 system').length).toBeGreaterThan(0);
+ expect(within(readiness).getAllByText('0 systems').length).toBeGreaterThan(0);
expect(within(readiness).getByText('Discovery off')).toBeInTheDocument();
expect(within(readiness).getByRole('button', { name: /Install agents/i })).toBeInTheDocument();
expect(screen.getByText('Proxmox VE')).toBeInTheDocument();
@@ -325,7 +325,7 @@ describe('InfrastructureWorkspace', () => {
fireEvent.click(
within(
screen.getByRole('region', {
- name: /Infrastructure setup confidence/i,
+ name: /Infrastructure setup summary/i,
}),
).getByRole('button', { name: /Install agents/i }),
);
@@ -505,7 +505,7 @@ describe('InfrastructureWorkspace', () => {
await waitFor(() => expect(screen.getByText('discovered-pve.lab')).toBeInTheDocument());
expect(screen.getByText('Discovered')).toBeInTheDocument();
const readiness = screen.getByRole('region', {
- name: /Infrastructure setup confidence/i,
+ name: /Infrastructure setup summary/i,
});
expect(within(readiness).getByText('1 to review')).toBeInTheDocument();
expect(within(readiness).getByText(/1 candidate discovered and waiting/i)).toBeInTheDocument();
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index cfda73902f..9eac84b9d9 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -488,14 +488,16 @@ describe('settings architecture guardrails', () => {
expect(infrastructureSourceManagerSource).toContain('Manage');
expect(infrastructureSourceManagerSource).not.toContain('Detect address');
expect(infrastructureSourceManagerSource).not.toContain("'Install agent'");
- expect(infrastructureSourceManagerSource).toContain('Choose source type');
+ expect(infrastructureSourceManagerSource).toContain('Add infrastructure');
expect(infrastructureSourceManagerSource).toContain('getInfrastructureEmptyStateSummary');
- expect(infrastructureSourceManagerSource).toContain('Infrastructure coverage');
- expect(infrastructureSourceManagerSource).toContain('Connected systems');
- expect(infrastructureSourceManagerSource).toContain('API coverage');
- expect(infrastructureSourceManagerSource).toContain('Agent coverage');
+ expect(infrastructureSourceManagerSource).toContain('Setup status');
+ expect(infrastructureSourceManagerSource).toContain('Systems');
+ expect(infrastructureSourceManagerSource).toContain('Live');
+ expect(infrastructureSourceManagerSource).toContain('Needs attention');
expect(infrastructureSourceManagerSource).toContain('Needs agent');
expect(infrastructureSourceManagerSource).toContain('setupConfidenceAction');
+ expect(infrastructureSourceManagerSource).not.toContain('Infrastructure coverage');
+ expect(infrastructureSourceManagerSource).not.toContain('Fleet governance');
expect(infrastructureSourceManagerSource).not.toContain('Connection types');
expect(infrastructureSourcePickerSource).toContain('Detect from address');
expect(infrastructureSourcePickerSource).toContain('getInfrastructureSourcePickerItems');