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 activity strip handoff
rcourtmane795b0c9cc5f
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 250d6f72c3..64ae6119b1 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -819,7 +819,10 @@ becoming a second dashboard header. `RecoveryActivitySection.tsx` should keep asingle slim telemetry header, compact active-filter chips, a shorter chartframe, reduced vertical insets, and a smaller legend footprint so the eventsworkspace hands off quickly from activity context to the history table instead-of spending a disproportionate slice of the screen on chart chrome.+of spending a disproportionate slice of the screen on chart chrome. The range+picker and legend should share one compact control row, and the activity strip+should not burn a separate descriptive subtitle row once the headline metrics+already explain the chart context.That same events-table contract should also keep the default column set on amonitoring-style scan path rather than a report-export path. Recovery eventsshould default to the concise columns operators need to triage quickly, whilediff --git a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsxindex 90fed131e5..de774f285d 100644--- a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx@@ -84,29 +84,22 @@ const rangeOptions: Array<7 | 30 | 90 | 365> = [7, 30, 90, 365];function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JSX.Element {return (<>- <div class="mb-2 flex flex-col gap-2">+ <div class="mb-2 flex flex-col gap-1.5"><div class="flex flex-col gap-1.5 lg:flex-row lg:items-center lg:justify-between">- <div class="flex min-w-0 flex-col gap-1.5">- <div class="flex flex-wrap items-baseline gap-x-2 gap-y-1">- <div class="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted">- Recovery Activity- </div>- <div class="text-xs text-muted">- Daily recovery points across the selected history window.- </div>+ <div class="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-muted">+ <div class="font-semibold uppercase tracking-[0.18em] text-muted">+ Recovery Activity</div>- <div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-muted">- <span class="font-medium text-base-content">- {props.activitySummary().totalPoints} recovery points+ <span class="font-medium text-base-content">+ {props.activitySummary().totalPoints} recovery points+ </span>+ <span>{props.activitySummary().activeDays} active days</span>+ <span>{props.activitySummary().averagePerDay.toFixed(1)} / day</span>+ <Show when={props.overallRollupsSummary().stale > 0}>+ <span class="font-medium text-amber-600 dark:text-amber-400">+ {props.overallRollupsSummary().stale} stale</span>- <span>{props.activitySummary().averagePerDay.toFixed(1)} per day</span>- <span>{props.activitySummary().activeDays} active days</span>- <Show when={props.overallRollupsSummary().stale > 0}>- <span class="font-medium text-amber-600 dark:text-amber-400">- {props.overallRollupsSummary().stale} stale- </span>- </Show>- </div>+ </Show></div><div class="flex flex-wrap items-center gap-2"><Show when={props.selectedHistoryItemLabel()}>@@ -231,8 +224,9 @@ function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JS</Show><div class="rounded-lg border border-border-subtle bg-surface-alt/25 p-2">- <div class={`mb-2 flex flex-wrap items-center justify-between gap-3 ${RECOVERY_TIMELINE_RANGE_GROUP_CLASS}`}>- <div class="text-[11px] text-muted">Range</div>+ <div+ class={`mb-1.5 flex flex-wrap items-center justify-between gap-3 ${RECOVERY_TIMELINE_RANGE_GROUP_CLASS}`}+ ><div class={RECOVERY_TIMELINE_RANGE_GROUP_CLASS}><For each={rangeOptions}>{(range) => (@@ -246,6 +240,20 @@ function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JS)}</For></div>+ <div class="flex flex-wrap items-center gap-2 text-[9px] text-muted">+ <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>+ <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('snapshot').segmentClassName}`} />+ {getRecoveryArtifactModePresentation('snapshot').aggregateLabel}+ </div>+ <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>+ <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('local').segmentClassName}`} />+ {getRecoveryArtifactModePresentation('local').aggregateLabel}+ </div>+ <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>+ <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('remote').segmentClassName}`} />+ {getRecoveryArtifactModePresentation('remote').aggregateLabel}+ </div>+ </div></div><Show@@ -259,21 +267,6 @@ function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JS}><div class="relative">- <div class="mb-1.5 flex flex-wrap items-center justify-end gap-2 text-[9px] text-muted">- <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>- <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('snapshot').segmentClassName}`} />- {getRecoveryArtifactModePresentation('snapshot').aggregateLabel}- </div>- <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>- <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('local').segmentClassName}`} />- {getRecoveryArtifactModePresentation('local').aggregateLabel}- </div>- <div class={RECOVERY_TIMELINE_LEGEND_ITEM_CLASS}>- <span class={`h-2.5 w-2.5 rounded ${getRecoveryArtifactModePresentation('remote').segmentClassName}`} />- {getRecoveryArtifactModePresentation('remote').aggregateLabel}- </div>- </div>-<div class="grid grid-cols-[auto_minmax(0,1fr)] gap-3"><div class="flex h-20 flex-col justify-between text-[10px] text-muted"><For each={[0, 1, 2, 3, 4]}>diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex d00dd80b2d..c1002e25cd 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -294,6 +294,10 @@ describe('Recovery', () => {).not.toBe(0);const activityHeading = screen.getByText('Recovery Activity');expect(activityBars.parentElement?.className).toContain('h-24');+ expect(+ screen.queryByText('Daily recovery points across the selected history window.'),+ ).not.toBeInTheDocument();+ expect(screen.queryByText(/^Range$/)).not.toBeInTheDocument();expect(eventsWorkspaceCard).toContainElement(activityHeading);expect(eventsWorkspaceCard).toContainElement(historyControls);expect(eventsWorkspaceCard).toContainElement(historyTable);diff --git a/frontend-modern/src/components/Recovery/__tests__/RecoveryActivitySection.test.tsx b/frontend-modern/src/components/Recovery/__tests__/RecoveryActivitySection.test.tsxindex a3871f69a2..98206a1075 100644--- a/frontend-modern/src/components/Recovery/__tests__/RecoveryActivitySection.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/RecoveryActivitySection.test.tsx@@ -44,6 +44,10 @@ describe('RecoveryActivitySection', () => {const bars = screen.getByTestId('recovery-activity-bars');expect(bars.className).toContain('items-stretch');expect(bars.parentElement?.className).toContain('h-24');+ expect(+ screen.queryByText('Daily recovery points across the selected history window.'),+ ).not.toBeInTheDocument();+ expect(screen.queryByText(/^Range$/)).not.toBeInTheDocument();expect(screen.getAllByRole('button', { name: /recovery points/i })).toHaveLength(2);});});