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
feat(recovery): surface platform coverage in summary
rcourtmane3b3ca850ee2
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 200ba128f0..34a9ad6106 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -314,6 +314,12 @@ The summary remains additive to the inventory-first workflow rather than areplacement for it: Proxmox-heavy operators still land on protected items bydefault, but the first visible framing now reflects the whole multi-platformrecovery system instead of a single backup table metaphor.+That same summary contract now also includes platform-coverage framing through+`frontend-modern/src/utils/recoverySummaryPresentation.ts`, so the first+visible recovery overview explicitly shows how many provider platforms are in+scope, which provider families dominate the current protected set, and how+many protected subjects already span multiple providers instead of leaving the+multi-platform model implicit in row-level badges alone.The recovery table presentation helper now owns the canonical subject-typelabel fallback for recovery rows and delegates its title-casing to the shared`frontend-modern/src/utils/textPresentation.ts` helper rather than keeping adiff --git a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsxindex af7ae3d3ac..33e645b236 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx@@ -52,11 +52,13 @@ describe('RecoverySummary', () => {expect(screen.getByTestId('recovery-summary')).toBeInTheDocument();expect(screen.getByText('Recovery Posture')).toBeInTheDocument();+ expect(screen.getByText('Platform Coverage')).toBeInTheDocument();expect(screen.getByText('Freshness')).toBeInTheDocument();expect(screen.getByText('Recent History')).toBeInTheDocument();expect(screen.getByText('Attention Queue')).toBeInTheDocument();expect(screen.getByText('Recovery Points')).toBeInTheDocument();expect(screen.getByText('2 protected')).toBeInTheDocument();+ expect(screen.getByText('2 platforms')).toBeInTheDocument();expect(screen.getByText('1 healthy')).toBeInTheDocument();expect(screen.getByText('Never succeeded')).toBeInTheDocument();});diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsxindex 6e6804bfa3..cf13d92ebd 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx@@ -5,6 +5,7 @@ import {buildRecoveryActivitySummary,buildRecoveryAttentionItems,buildRecoveryFreshnessBuckets,+ buildRecoveryPlatformCoverage,buildRecoveryPostureSegments,buildRecoveryPostureSummary,getRecoveryAttentionChipClass,@@ -37,6 +38,7 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {const postureSummary = createMemo(() => buildRecoveryPostureSummary(props.rollups()));const postureSegments = createMemo(() => buildRecoveryPostureSegments(props.rollups()));const freshnessBuckets = createMemo(() => buildRecoveryFreshnessBuckets(props.rollups()));+ const platformCoverage = createMemo(() => buildRecoveryPlatformCoverage(props.rollups()));const activity = createMemo(() => buildRecoveryActivitySummary(props.series()));const attentionItems = createMemo(() => buildRecoveryAttentionItems(summary()));@@ -50,6 +52,10 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {<div class="flex flex-wrap items-center justify-between gap-2 border-b border-border-subtle px-1 pb-2 text-[11px]"><div class="flex flex-wrap items-center gap-3"><span class="font-medium text-base-content">{summary().total} protected</span>+ <span class="text-sky-300">+ {platformCoverage().platformCount} platform+ {platformCoverage().platformCount === 1 ? '' : 's'}+ </span><span class="text-emerald-400">{healthyCount()} healthy</span><Show when={attentionCount() > 0}><span class="text-amber-300">{attentionCount()} attention</span>@@ -75,7 +81,7 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {</Show></div>- <div class="grid gap-3 xl:grid-cols-[minmax(0,1.4fr)_minmax(0,0.9fr)_minmax(0,1fr)]">+ <div class="grid gap-3 xl:grid-cols-2 2xl:grid-cols-4"><section class="rounded-md border border-border bg-surface-hover/40 p-3"><div class="text-[11px] font-semibold uppercase tracking-wide text-muted">Recovery Posture@@ -124,6 +130,46 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {</div></section>+ <section class="rounded-md border border-border bg-surface-hover/40 p-3">+ <div class="text-[11px] font-semibold uppercase tracking-wide text-muted">+ Platform Coverage+ </div>+ <div class="mt-3 grid gap-3 sm:grid-cols-3">+ <div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Platforms</div>+ <div class="mt-1 text-2xl font-semibold text-base-content">+ {platformCoverage().platformCount}+ </div>+ </div>+ <div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Multi-source</div>+ <div class="mt-1 text-2xl font-semibold text-base-content">+ {platformCoverage().mixedCount}+ </div>+ </div>+ <div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Primary</div>+ <div class="mt-1 text-xl font-semibold text-base-content">+ {platformCoverage().primaryLabel ?? 'n/a'}+ </div>+ </div>+ </div>++ <div class="mt-4 flex flex-wrap gap-2">+ <For each={platformCoverage().items.slice(0, 6)}>+ {(item) => (+ <div class="inline-flex items-center gap-2 rounded-md border border-border-subtle bg-surface/60 px-2.5 py-1.5 text-xs">+ <span class={`rounded px-1.5 py-0.5 text-[10px] font-medium ${item.toneClass}`}>+ {item.label}+ </span>+ <span class="tabular-nums text-base-content">{item.count}</span>+ <span class="text-muted">{item.percent}%</span>+ </div>+ )}+ </For>+ </div>+ </section>+<section class="rounded-md border border-border bg-surface-hover/40 p-3"><div class="text-[11px] font-semibold uppercase tracking-wide text-muted">Freshnessdiff --git a/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts b/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.tsindex 473fe35ce2..1f70bbd934 100644--- a/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts@@ -4,6 +4,7 @@ import {buildRecoveryAttentionItems,buildRecoveryFreshnessBuckets,buildRecoveryOutcomeSegments,+ buildRecoveryPlatformCoverage,buildRecoveryPostureSegments,buildRecoveryPostureSummary,getRecoveryAttentionChipClass,@@ -15,10 +16,11 @@ import {describe('recoverySummaryPresentation', () => {it('exposes canonical recovery summary time ranges and labels', () => {- expect(RECOVERY_SUMMARY_TIME_RANGES).toEqual(['7d', '30d', '90d']);+ expect(RECOVERY_SUMMARY_TIME_RANGES).toEqual(['7d', '30d', '90d', '365d']);expect(RECOVERY_SUMMARY_TIME_RANGE_LABELS['7d']).toBe('7d');expect(RECOVERY_SUMMARY_TIME_RANGE_LABELS['30d']).toBe('30d');expect(RECOVERY_SUMMARY_TIME_RANGE_LABELS['90d']).toBe('90d');+ expect(RECOVERY_SUMMARY_TIME_RANGE_LABELS['365d']).toBe('365d');});it('exposes canonical freshness bucket presentation', () => {@@ -96,6 +98,24 @@ describe('recoverySummaryPresentation', () => {]);});+ it('builds provider coverage from rollups and mixed-provider subjects', () => {+ const coverage = buildRecoveryPlatformCoverage([+ { rollupId: 'a', providers: ['proxmox-pbs'] },+ { rollupId: 'b', providers: ['proxmox-pve', 'kubernetes'] },+ { rollupId: 'c', providers: [] },+ ]);++ expect(coverage.platformCount).toBe(4);+ expect(coverage.mixedCount).toBe(1);+ expect(coverage.primaryLabel).toBe('K8s');+ expect(coverage.items).toMatchObject([+ { key: 'kubernetes', label: 'K8s', count: 1, percent: 33 },+ { key: 'proxmox-pbs', label: 'PBS', count: 1, percent: 33 },+ { key: 'proxmox-pve', label: 'PVE', count: 1, percent: 33 },+ { key: 'generic', label: 'Generic', count: 1, percent: 33 },+ ]);+ });+it('summarizes activity bars and headline metrics', () => {const activity = buildRecoveryActivitySummary([{ day: '2026-03-07', total: 0, snapshot: 0, local: 0, remote: 0 },diff --git a/frontend-modern/src/utils/recoverySummaryPresentation.ts b/frontend-modern/src/utils/recoverySummaryPresentation.tsindex d98f17f936..c50a4d19d8 100644--- a/frontend-modern/src/utils/recoverySummaryPresentation.ts+++ b/frontend-modern/src/utils/recoverySummaryPresentation.ts@@ -6,6 +6,11 @@ import {normalizeRecoveryOutcome,} from '@/utils/recoveryOutcomePresentation';import { isRecoveryRollupStale } from '@/utils/recoveryTablePresentation';+import {+ getSourcePlatformLabel,+ getSourcePlatformPresentation,+ normalizeSourcePlatformQueryValue,+} from '@/utils/sourcePlatforms';export const RECOVERY_SUMMARY_TIME_RANGES = ['7d', '30d', '90d', '365d'] as const;@@ -99,6 +104,21 @@ export interface RecoveryAttentionItem {detail: string;}+export interface RecoveryPlatformCoverageItem {+ key: string;+ label: string;+ count: number;+ percent: number;+ toneClass: string;+}++export interface RecoveryPlatformCoverageSummary {+ platformCount: number;+ mixedCount: number;+ primaryLabel: string | null;+ items: RecoveryPlatformCoverageItem[];+}+export function getRecoveryAttentionChipClass(tone: RecoveryAttentionItem['tone'],): string {@@ -327,6 +347,53 @@ export function buildRecoveryFreshnessBuckets(}));}+export function buildRecoveryPlatformCoverage(+ rollups: ProtectionRollup[],+): RecoveryPlatformCoverageSummary {+ const counts = new Map<string, number>();+ let mixedCount = 0;++ for (const rollup of rollups) {+ const providers = Array.from(+ new Set(+ (rollup.providers || [])+ .map((provider) => normalizeSourcePlatformQueryValue(String(provider || '').trim()))+ .filter(Boolean),+ ),+ );+ const resolvedProviders = providers.length > 0 ? providers : ['generic'];+ if (resolvedProviders.length > 1) mixedCount += 1;++ for (const provider of resolvedProviders) {+ counts.set(provider, (counts.get(provider) || 0) + 1);+ }+ }++ const items = Array.from(counts.entries())+ .map(([key, count]) => ({+ key,+ label: getSourcePlatformLabel(key),+ count,+ percent: toPercent(count, rollups.length),+ toneClass:+ getSourcePlatformPresentation(key)?.tone ||+ 'bg-surface-alt text-base-content dark:bg-surface-alt dark:text-base-content',+ }))+ .sort((left, right) => {+ if (left.count !== right.count) return right.count - left.count;+ if (left.key === 'generic' && right.key !== 'generic') return 1;+ if (right.key === 'generic' && left.key !== 'generic') return -1;+ return left.label.localeCompare(right.label);+ });++ return {+ platformCount: items.length,+ mixedCount,+ primaryLabel: items[0]?.label || null,+ items,+ };+}+export function buildRecoveryActivitySummary(series: RecoveryPointsSeriesBucket[],): RecoveryActivitySummary {