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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
refactor(recovery): simplify summary support lines
rcourtman230d4330e69c
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 3b79788496..4bc12dd56b 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -730,11 +730,11 @@ stale, and footprint telemetry in multiple stacked readouts inside one card.Recovery summary cards should keep one dominant metric with one short supportband so the strip scans at the same speed as infrastructure and workloadsinstead of behaving like a recovery-only executive summary.-That support band should stay genuinely short, usually one or two compact-rows rather than four-item micro reports, so the operator can scan the summary-as orientation instead of reading each card like a dense checklist.-When a second support row does not materially change triage, recovery should-prefer a single support row over filling the card just because there is room.+That support band should stay genuinely short, ideally one compact support line+and only occasionally two, so the operator can scan the summary as orientation+instead of reading each card like a dense checklist.+When a second support line does not materially change triage, recovery should+prefer a single support line over filling the card just because there is room.Those support rows should also stay signal-driven. Recovery summary cardsshould omit zero-value or low-value support rows like `Primary Item` or `PeakDay` when they do not materially improve operator triage, so the top stripdiff --git a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsxindex b138bc18af..46d896333b 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx@@ -61,14 +61,12 @@ describe('RecoverySummary', () => {expect(screen.getAllByText(/attention/i).length).toBeGreaterThan(0);expect(screen.getByText(/recovery points/i)).toBeInTheDocument();expect(screen.getByText(/item types/i)).toBeInTheDocument();- expect(screen.getByText('Platforms')).toBeInTheDocument();- expect(screen.getByText('Healthy')).toBeInTheDocument();- expect(screen.getByText('Failed')).toBeInTheDocument();- expect(screen.getByText('>7d')).toBeInTheDocument();+ expect(screen.getByText('Platforms 2')).toBeInTheDocument();+ expect(screen.getByText('Healthy 1 · Failed 1')).toBeInTheDocument();+ expect(screen.getByText('>7d 1 · Never Succeeded 1')).toBeInTheDocument();expect(screen.getByText('fresh in 24h')).toBeInTheDocument();- expect(screen.getByText('Latest Activity')).toBeInTheDocument();+ expect(screen.getByText('Latest Activity Mar 9')).toBeInTheDocument();expect(screen.getByText('2 protected')).toBeInTheDocument();- expect(screen.getAllByText(/Never Succeeded/i).length).toBeGreaterThan(0);expect(screen.getByText('need attention')).toBeInTheDocument();expect(screen.queryByText('protected items')).not.toBeInTheDocument();expect(screen.queryByText('Running')).not.toBeInTheDocument();@@ -83,6 +81,9 @@ describe('RecoverySummary', () => {expect(screen.queryByText('Peak Throughput')).not.toBeInTheDocument();expect(screen.queryByText('Peak Day')).not.toBeInTheDocument();expect(screen.queryByText('stale items')).not.toBeInTheDocument();+ expect(screen.queryByText(/^Platforms$/)).not.toBeInTheDocument();+ expect(screen.queryByText(/^Healthy$/)).not.toBeInTheDocument();+ expect(screen.queryByText(/^Failed$/)).not.toBeInTheDocument();});it('uses the shared default summary density rather than a recovery-only compact override', () => {diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsxindex 0a142ffc80..a252a19e33 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx@@ -1,4 +1,4 @@-import { Component, For, Show, createMemo } from 'solid-js';+import { Component, Show, createMemo } from 'solid-js';import { SummaryPanel } from '@/components/shared/SummaryPanel';import { SummaryMetricCard } from '@/components/shared/SummaryMetricCard';import type { ProtectionRollup, RecoveryOutcome, RecoveryPointsSeriesBucket } from '@/types/recovery';@@ -101,6 +101,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {return rows.slice(0, 2);},);+ const postureSupportLine = createMemo(() =>+ postureRows()+ .map((row) => `${row.label} ${row.value}`)+ .join(' · '),+ );const freshWithin24hCount = createMemo(() =>(freshnessBuckets().find((bucket) => bucket.key === 'under1h')?.count ?? 0) +@@ -131,35 +136,18 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {return rows.slice(0, 2);},);+ const freshnessSupportLine = createMemo(() =>+ freshnessRows()+ .map((row) => `${row.label} ${row.value}`)+ .join(' · '),+ );- const footprintRows = createMemo(() => {- return [- { label: 'Platforms', value: platformCoverage().platformCount },- ];- });-- const historyRows = createMemo(() => {- if (activity().latestLabel) {- return [{ label: 'Latest Activity', value: activity().latestLabel }];- }- return [{ label: 'Days Active', value: activity().activeDays }];- });+ const footprintSupportLine = createMemo(() => `Platforms ${platformCoverage().platformCount}`);- const MetricRows = (rowProps: {- rows: Array<{ label: string; value: string | number; valueClass?: string }>;- }) => (- <dl class="space-y-1 text-[11px]">- <For each={rowProps.rows}>- {(row) => (- <div class="flex items-center justify-between gap-3">- <dt class="text-muted">{row.label}</dt>- <dd class={`font-semibold tabular-nums text-base-content ${row.valueClass ?? ''}`.trim()}>- {row.value}- </dd>- </div>- )}- </For>- </dl>+ const historySupportLine = createMemo(() =>+ activity().latestLabel+ ? `Latest Activity ${activity().latestLabel}`+ : `Days Active ${activity().activeDays}`,);return (@@ -176,44 +164,42 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {class="overflow-hidden"><SummaryMetricCard label="Recovery Posture" loaded={true} hasData={hasRollups()}>- <div class="flex h-full flex-col gap-2">+ <div class="flex h-full flex-col gap-1.5"><div><div class={`text-xl font-semibold tabular-nums ${primaryPostureMetric().valueClass}`}>{primaryPostureMetric().value}</div><div class="text-[11px] text-muted">{primaryPostureMetric().label}</div></div>- <div class="border-t border-border-subtle pt-1.5">- <MetricRows rows={postureRows()} />- </div>+ <Show when={postureSupportLine()}>+ <div class="text-[11px] text-muted">{postureSupportLine()}</div>+ </Show></div></SummaryMetricCard><SummaryMetricCard label="Freshness" loaded={true} hasData={hasRollups()}>- <div class="flex h-full flex-col gap-2">+ <div class="flex h-full flex-col gap-1.5"><div><div class="text-xl font-semibold tabular-nums text-emerald-600 dark:text-emerald-400">{freshWithin24hCount()}</div><div class="text-[11px] text-muted">fresh in 24h</div></div>- <div class="border-t border-border-subtle pt-1.5">- <MetricRows rows={freshnessRows()} />- </div>+ <Show when={freshnessSupportLine()}>+ <div class="text-[11px] text-muted">{freshnessSupportLine()}</div>+ </Show></div></SummaryMetricCard><SummaryMetricCard label="Protected Footprint" loaded={true} hasData={hasRollups()}>- <div class="flex h-full flex-col gap-2">+ <div class="flex h-full flex-col gap-1.5"><div><div class="text-xl font-semibold tabular-nums text-base-content">{itemCoverage().itemTypeCount}</div><div class="text-[11px] text-muted">item types</div></div>- <div class="border-t border-border-subtle pt-1.5">- <MetricRows rows={footprintRows()} />- </div>+ <div class="text-[11px] text-muted">{footprintSupportLine()}</div></div></SummaryMetricCard>@@ -223,16 +209,14 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {hasData={activity().hasData}emptyMessage={props.seriesFailed?.() ? 'Trend data unavailable' : 'No recovery activity yet'}>- <div class="flex h-full flex-col gap-2">+ <div class="flex h-full flex-col gap-1.5"><div><div class="text-xl font-semibold tabular-nums text-base-content">{activity().totalEvents}</div><div class="text-[11px] text-muted">recovery points</div></div>- <div class="border-t border-border-subtle pt-1.5">- <MetricRows rows={historyRows()} />- </div>+ <div class="text-[11px] text-muted">{historySupportLine()}</div></div></SummaryMetricCard></SummaryPanel>