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.

refactor(recovery): align summary with scan-first monitoring cues

rcourtmanc862d4e526f8
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 1b1074d576..71eed7dc56 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -738,7 +738,8 @@ prefer a single support line over filling the card just because there is room.
Those support rows should also stay signal-driven. Recovery summary cards
should omit zero-value or low-value support rows like `Primary Item` or `Peak
Day` when they do not materially improve operator triage, so the top strip
-stays closer to storage's orientation-first rhythm.
+stays closer to the fast-scan rhythm used by the infrastructure and workloads
+surfaces.
That same summary-scan rule should also trim derivative rows that restate the
headline instead of adding a new operator question. `Freshness` should not add
an extra `<24h` row under a `fresh in 24h` headline, `Coverage` should not
@@ -751,6 +752,11 @@ expressed as short metric rows. Recovery summary cards should stay on the
shared monitoring-card rhythm of one dominant metric plus compact supporting
rows rather than reviving bespoke visual telemetry that makes the strip read
heavier than the rest of Pulse.
+That same scan rule should also use the summary header for the first, obvious
+recovery counts. The header should carry total protected items plus the top
+healthy/attention cues in the same way other Pulse monitoring summaries expose
+their first read, while the `Posture` card focuses on the composition of the
+attention state instead of repeating the same healthy count again.
That same differentiation rule applies across cards too. `Posture` and
`Freshness` should not lead with the same stale/attention headline; the
freshness card should emphasize recent successful coverage such as fresh-in-24h
diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx
index dc58737288..0c744ceb3f 100644
--- a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx
+++ b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx
@@ -62,13 +62,15 @@ describe('RecoverySummary', () => {
expect(screen.getByText(/recovery points/i)).toBeInTheDocument();
expect(screen.getByText(/item types/i)).toBeInTheDocument();
expect(screen.getByText('2 platforms')).toBeInTheDocument();
- expect(screen.getByText('Healthy 1 · Failed 1')).toBeInTheDocument();
+ expect(screen.getByText('1 healthy')).toBeInTheDocument();
+ expect(screen.getByText('1 attention')).toBeInTheDocument();
+ expect(screen.getByText('Failed 1')).toBeInTheDocument();
expect(screen.getByText('>7d 1 · Never Succeeded 1')).toBeInTheDocument();
expect(screen.getByText('fresh in 24h')).toBeInTheDocument();
expect(screen.getByText('Mar 9')).toBeInTheDocument();
expect(screen.getByText('2 protected items')).toBeInTheDocument();
expect(screen.getByText('need attention')).toBeInTheDocument();
- expect(screen.queryByText('protected items')).not.toBeInTheDocument();
+ expect(screen.queryByText('Healthy 1 · Failed 1')).not.toBeInTheDocument();
expect(screen.queryByText('Running')).not.toBeInTheDocument();
expect(screen.queryByText('<7d')).not.toBeInTheDocument();
expect(screen.queryByText('<1h')).not.toBeInTheDocument();
diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsx
index 18dc285e8b..4c01d7d6a3 100644
--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx
+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx
@@ -66,13 +66,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
() => {
const rows: Array<{ label: string; value: string | number; valueClass?: string }> = [];
const failedCount = postureSummary().failed + postureSummary().neverSucceeded;
- if (healthyCount() > 0) {
- rows.push({
- label: 'Healthy',
- value: healthyCount(),
- valueClass: 'text-emerald-600 dark:text-emerald-400',
- });
- }
if (failedCount > 0) {
rows.push({
label: 'Failed',
@@ -97,6 +90,12 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
value: postureSummary().running,
valueClass: 'text-blue-600 dark:text-blue-400',
});
+ } else if (healthyCount() > 0) {
+ rows.push({
+ label: 'Healthy',
+ value: healthyCount(),
+ valueClass: 'text-emerald-600 dark:text-emerald-400',
+ });
}
return rows.slice(0, 2);
},
@@ -162,7 +161,19 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
<Show when={hasRollups()}>
<SummaryPanel
headerLeft={
- <span class="font-medium text-base-content">{summary().total} protected items</span>
+ <>
+ <span class="font-medium text-base-content">{summary().total} protected items</span>
+ <Show when={healthyCount() > 0}>
+ <span class="text-emerald-600 dark:text-emerald-400">
+ {healthyCount()} healthy
+ </span>
+ </Show>
+ <Show when={attentionCount() > 0}>
+ <span class="text-amber-600 dark:text-amber-400">
+ {attentionCount()} attention
+ </span>
+ </Show>
+ </>
}
timeRange={props.timeRange()}
onTimeRangeChange={props.onTimeRangeChange ? handleTimeRangeChange : undefined}
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index 9247fadb9d..3643892056 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -465,6 +465,8 @@ describe('Recovery', () => {
const summary = await screen.findByTestId('recovery-summary');
expect(within(summary).getByText('Coverage')).toBeInTheDocument();
+ expect(within(summary).getByText(/\d+ protected items/i)).toBeInTheDocument();
+ expect(within(summary).getByText(/\d+ attention/i)).toBeInTheDocument();
expect(within(summary).queryByText('Primary Item')).not.toBeInTheDocument();
expect(within(summary).getByText(/item types/i)).toBeInTheDocument();
expect(within(summary).getAllByText(/platforms/i).length).toBeGreaterThan(0);