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.

Collapse Connected systems rows to one signal per row

rcourtman02885023b1b0
diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
index 63e1240f3a..c01141b996 100644
--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
@@ -24,7 +24,6 @@ import {
} from '@/components/shared/groupedTableRowPresentation';
import {
connectionAgentVersionPresentation,
- fleetSignalClassName,
infrastructureSourcePresentation,
surfaceLabel,
type FleetGovernanceSignal,
@@ -372,8 +371,16 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
);
const connectedSystemCount = createMemo(() => props.rows().length);
const discoveredCandidateCount = createMemo(() => props.discoveredNodes().length);
+ // Scoped to Proxmox VE: PBS/PMG/TrueNAS/etc. are fully covered by their
+ // own API and don't benefit from a paired agent in the way PVE hosts do
+ // (where the agent adds temps, SMART, host identity). Counting them here
+ // would create "Needs agent" pressure for systems that need nothing.
const apiOnlySystems = createMemo(() =>
- props.rows().filter((row) => rowHasApiCoverage(row) && !rowHasAgentCoverage(row)),
+ props
+ .rows()
+ .filter(
+ (row) => row.ownerType === 'pve' && rowHasApiCoverage(row) && !rowHasAgentCoverage(row),
+ ),
);
const apiOnlySystemCount = createMemo(() => apiOnlySystems().length);
// Names list keeps the descriptive 'Install agents' hint actionable: when
@@ -854,18 +861,20 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
{row.lastActivityText}
</span>
</div>
- <div class="mt-1 flex flex-wrap items-center gap-1">
- <For each={row.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
- </div>
+ <Show when={row.problem}>
+ {(problem) => (
+ <div
+ class={`mt-1 text-[11px] italic ${
+ problem().tone === 'critical'
+ ? 'text-rose-700 dark:text-rose-300'
+ : 'text-amber-700 dark:text-amber-300'
+ }`}
+ title={problem().detail}
+ >
+ {problem().label}
+ </div>
+ )}
+ </Show>
</TableCell>
<Show when={actionColumnVisible()}>
@@ -877,13 +886,16 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
}
>
<div class="flex flex-col items-end gap-1">
- {/* Row-level install-agent shortcut: the
- apiOnly attention state lands directly on
- the affected system instead of the user
- reading a global callout and figuring out
- which row it referred to. */}
+ {/* Row-level install-agent shortcut, scoped to
+ Proxmox VE: the agent adds node-local
+ telemetry (temps, SMART, host identity)
+ that the PVE API doesn't expose. PBS and
+ other API-only sources are fully covered
+ without an agent, so we don't nudge for
+ one there. */}
<Show
when={
+ row.ownerType === 'pve' &&
rowHasApiCoverage(row) &&
!rowHasAgentCoverage(row) &&
Boolean(props.onAddSource)
@@ -1007,18 +1019,20 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
{member.lastActivityText}
</span>
</div>
- <div class="mt-1 flex flex-wrap items-center gap-1">
- <For each={member.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
- </div>
+ <Show when={member.problem}>
+ {(problem) => (
+ <div
+ class={`mt-1 text-[11px] italic ${
+ problem().tone === 'critical'
+ ? 'text-rose-700 dark:text-rose-300'
+ : 'text-amber-700 dark:text-amber-300'
+ }`}
+ title={problem().detail}
+ >
+ {problem().label}
+ </div>
+ )}
+ </Show>
</TableCell>
<Show when={actionColumnVisible()}>
@@ -1286,17 +1300,21 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
<span class="text-[12px] text-muted/90">
{member.lastActivityText}
</span>
- <For each={member.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
</div>
+ <Show when={member.problem}>
+ {(problem) => (
+ <div
+ class={`mt-1 text-[11px] italic ${
+ problem().tone === 'critical'
+ ? 'text-rose-700 dark:text-rose-300'
+ : 'text-amber-700 dark:text-amber-300'
+ }`}
+ title={problem().detail}
+ >
+ {problem().label}
+ </div>
+ )}
+ </Show>
</div>
);
}}
@@ -1329,17 +1347,21 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
>
{row.lastActivityText}
</span>
- <For each={row.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
</div>
+ <Show when={row.problem}>
+ {(problem) => (
+ <div
+ class={`mt-1 text-[11px] italic ${
+ problem().tone === 'critical'
+ ? 'text-rose-700 dark:text-rose-300'
+ : 'text-amber-700 dark:text-amber-300'
+ }`}
+ title={problem().detail}
+ >
+ {problem().label}
+ </div>
+ )}
+ </Show>
<Show when={!props.readOnly && rowInteractive(row)}>
<button
type="button"
diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
index 31ba95c718..2da4ea6fbc 100644
--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureSourceManager.test.tsx
@@ -1,10 +1,11 @@
import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { InfrastructureSourceManager } from '../InfrastructureSourceManager';
-import type {
- FleetGovernanceSignal,
- InfrastructureSystemMemberRow,
- InfrastructureSystemRow,
+import {
+ primaryRowProblem,
+ type FleetGovernanceSignal,
+ type InfrastructureSystemMemberRow,
+ type InfrastructureSystemRow,
} from '../connectionsTableModel';
import type { Connection } from '@/api/connections';
@@ -38,6 +39,7 @@ const row = (overrides: Partial<InfrastructureSystemRow> = {}): InfrastructureSy
const fleetSignals = overrides.fleetSignals ?? [
signal({ key: 'liveness', label: 'Live', tone: 'ok' }),
];
+ const fleetHighlights = overrides.fleetHighlights ?? [signal({})];
return {
id: connection.id,
ownerType: connection.type,
@@ -51,7 +53,8 @@ const row = (overrides: Partial<InfrastructureSystemRow> = {}): InfrastructureSy
agentUpdateCount: 0,
lastActivityText: '5s ago',
fleetSignals,
- fleetHighlights: overrides.fleetHighlights ?? [signal({})],
+ fleetHighlights,
+ problem: overrides.problem ?? primaryRowProblem(fleetHighlights),
enabled: connection.enabled,
canEdit: false,
canPause: false,
@@ -67,21 +70,25 @@ const row = (overrides: Partial<InfrastructureSystemRow> = {}): InfrastructureSy
const member = (
overrides: Partial<InfrastructureSystemMemberRow> = {},
-): InfrastructureSystemMemberRow => ({
- id: overrides.id ?? 'member-1',
- name: overrides.name ?? 'member-1',
- subtitle: overrides.subtitle ?? 'Cluster member',
- source: overrides.source ?? 'agent',
- host: overrides.host ?? 'https://member-1:8006',
- coverageLabels: overrides.coverageLabels ?? ['Host telemetry'],
- statusLabel: overrides.statusLabel ?? 'Active',
- statusClassName: overrides.statusClassName ?? 'bg-green-100 text-green-800',
- lastActivityText: overrides.lastActivityText ?? '5s ago',
- fleetSignals: overrides.fleetSignals ?? [],
- fleetHighlights: overrides.fleetHighlights ?? [],
- primary: overrides.primary ?? false,
- agentConnection: overrides.agentConnection,
-});
+): InfrastructureSystemMemberRow => {
+ const fleetHighlights = overrides.fleetHighlights ?? [];
+ return {
+ id: overrides.id ?? 'member-1',
+ name: overrides.name ?? 'member-1',
+ subtitle: overrides.subtitle ?? 'Cluster member',
+ source: overrides.source ?? 'agent',
+ host: overrides.host ?? 'https://member-1:8006',
+ coverageLabels: overrides.coverageLabels ?? ['Host telemetry'],
+ statusLabel: overrides.statusLabel ?? 'Active',
+ statusClassName: overrides.statusClassName ?? 'bg-green-100 text-green-800',
+ lastActivityText: overrides.lastActivityText ?? '5s ago',
+ fleetSignals: overrides.fleetSignals ?? [],
+ fleetHighlights,
+ problem: overrides.problem ?? primaryRowProblem(fleetHighlights),
+ primary: overrides.primary ?? false,
+ agentConnection: overrides.agentConnection,
+ };
+};
describe('InfrastructureSourceManager setup summary', () => {
afterEach(() => cleanup());
@@ -156,8 +163,11 @@ describe('InfrastructureSourceManager setup summary', () => {
expect(screen.getByText('Needs attention')).toBeInTheDocument();
expect(screen.getByText('Needs agent')).toBeInTheDocument();
expect(screen.queryByText('Fleet governance')).toBeNull();
+ // The row now surfaces a single plain-English problem line under its
+ // status badge instead of a chip-per-signal stack. Info-toned signals
+ // (e.g. "Remote control enabled") aren't problems and don't render.
expect(screen.getByText('Credentials invalid')).toBeInTheDocument();
- expect(screen.getByText('Remote control enabled')).toBeInTheDocument();
+ expect(screen.queryByText('Remote control enabled')).toBeNull();
});
it('does not count hidden passive agent config handshakes as setup attention', () => {
@@ -251,7 +261,11 @@ describe('InfrastructureSourceManager setup summary', () => {
));
expect(screen.getByText('Needs attention').nextElementSibling?.textContent).toBe('1 system');
- expect(screen.getByText('Fleet OK')).toBeInTheDocument();
+ // "Fleet OK" is no longer rendered as a synthetic ok-chip; an empty
+ // problem line is the absence of trouble. The cluster-member row
+ // surfaces its single actionable problem ("Config drift") with the
+ // detail attached as a tooltip.
+ expect(screen.queryByText('Fleet OK')).toBeNull();
expect(screen.getByText('Config drift')).toHaveAttribute(
'title',
'Desired and applied fingerprints differ.',
diff --git a/frontend-modern/src/components/Settings/connectionsTableModel.ts b/frontend-modern/src/components/Settings/connectionsTableModel.ts
index 66905f8cee..70ec4bbff1 100644
--- a/frontend-modern/src/components/Settings/connectionsTableModel.ts
+++ b/frontend-modern/src/components/Settings/connectionsTableModel.ts
@@ -945,6 +945,16 @@ const isPassiveAgentRolloutConfirmationFallbackSignal = (
);
};
+// A row-level operational problem expressed as one plain-English sentence
+// — rendered below the status badge instead of as a parallel coloured chip.
+// `fleetHighlights` is retained on the row model for downstream consumers
+// (Manage drawer, audit views) that need the full structured signal list.
+export interface InfrastructureRowProblem {
+ label: string;
+ detail: string;
+ tone: 'warning' | 'critical';
+}
+
export interface InfrastructureSystemMemberRow {
id: string;
name: string;
@@ -958,6 +968,7 @@ export interface InfrastructureSystemMemberRow {
lastActivityText: string;
fleetSignals: FleetGovernanceSignal[];
fleetHighlights: FleetGovernanceSignal[];
+ problem?: InfrastructureRowProblem;
primary: boolean;
agentConnection?: Connection;
}
@@ -978,6 +989,7 @@ export interface InfrastructureSystemRow {
lastErrorMessage?: string;
fleetSignals: FleetGovernanceSignal[];
fleetHighlights: FleetGovernanceSignal[];
+ problem?: InfrastructureRowProblem;
enabled: boolean;
canEdit: boolean;
canPause: boolean;
@@ -988,3 +1000,15 @@ export interface InfrastructureSystemRow {
members: InfrastructureSystemMemberRow[];
connection: Connection;
}
+
+// Pick the single most important problem to surface in the row's status
+// column. Critical beats warning; otherwise first wins — the upstream
+// builder has already prioritised highlights (attention before info).
+export const primaryRowProblem = (
+ signals: readonly FleetGovernanceSignal[],
+): InfrastructureRowProblem | undefined => {
+ const critical = signals.find((signal) => signal.tone === 'critical');
+ const candidate = critical ?? signals.find((signal) => signal.tone === 'warning');
+ if (!candidate) return undefined;
+ return { label: candidate.label, detail: candidate.detail, tone: candidate.tone };
+};
diff --git a/frontend-modern/src/components/Settings/useConnectionsLedger.ts b/frontend-modern/src/components/Settings/useConnectionsLedger.ts
index db952bf1c6..c94566d787 100644
--- a/frontend-modern/src/components/Settings/useConnectionsLedger.ts
+++ b/frontend-modern/src/components/Settings/useConnectionsLedger.ts
@@ -16,6 +16,7 @@ import {
connectionLastActivityText,
fleetGovernanceSignalsForConnection,
lastActivityTextFromLastSeen,
+ primaryRowProblem,
surfaceLabel,
type FleetGovernanceSignal,
type InfrastructureSourceKind,
@@ -296,6 +297,7 @@ const buildMemberRow = (
...(agentConnection ? fleetGovernanceSignalsForConnection(agentConnection) : []),
];
+ const fleetHighlights = visibleFleetGovernanceSignals(fleetSignals);
return {
id: member.id,
name,
@@ -308,7 +310,8 @@ const buildMemberRow = (
statusClassName: presentation.badgeClass,
lastActivityText: lastActivityTextFromLastSeen(lastSeen),
fleetSignals,
- fleetHighlights: visibleFleetGovernanceSignals(fleetSignals),
+ fleetHighlights,
+ problem: primaryRowProblem(fleetHighlights),
primary: Boolean(member.primary),
agentConnection,
};
@@ -392,6 +395,7 @@ const buildRow = (
),
];
+ const fleetHighlights = visibleFleetGovernanceSignals(fleetSignals);
return {
id: primaryConnection.id,
ownerType,
@@ -409,7 +413,8 @@ const buildRow = (
: connectionLastActivityText(primaryConnection),
lastErrorMessage,
fleetSignals,
- fleetHighlights: visibleFleetGovernanceSignals(fleetSignals),
+ fleetHighlights,
+ problem: primaryRowProblem(fleetHighlights),
enabled: primaryConnection.enabled,
canEdit: EDITABLE_CONNECTION_TYPES.includes(primaryConnection.type),
canPause: primaryConnection.capabilities.supportsPause,