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): tighten events workspace shell

rcourtman5a470d8b5aaf
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 21503f1586..13118dc058 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -717,6 +717,16 @@ pattern as the protected inventory surface, not a separate large titled header
bar plus another full toolbar slab. Event filter labels should also stay on the
canonical short Pulse vocabulary like `Platform` and `Status` instead of
recovery-only variants such as `History platform` or `History status`.
+That same events-shell contract should avoid repeating page-state bookkeeping
+ahead of the history grid. Recovery events should surface workspace context,
+event count, and day grouping in the status row, while current page and other
+table bookkeeping stay in the table footer instead of competing with the scan
+path above the filters.
+That same activity panel should stay compact and analytical rather than
+becoming a second dashboard header. `RecoveryActivitySection.tsx` should keep a
+single slim telemetry header, compact active-filter chips, and a shorter chart
+frame so the events workspace hands off quickly from activity context to the
+history table.
That same events-table contract should also keep the default column set on a
monitoring-style scan path rather than a report-export path. Recovery events
should default to the concise columns operators need to triage quickly, while
diff --git a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
index 436b432246..5d45a3752f 100644
--- a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
@@ -83,31 +83,27 @@ const rangeOptions: Array<7 | 30 | 90 | 365> = [7, 30, 90, 365];
export const RecoveryActivitySection: Component<RecoveryActivitySectionProps> = (props) => (
<Card
padding="sm"
- class="h-full border-border bg-surface shadow-[0_10px_24px_rgba(2,6,23,0.1)]"
+ class="h-full border-border-subtle bg-surface"
>
- <div class="mb-3 flex flex-col gap-3">
- <div class="flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between">
- <div class="flex flex-col gap-2">
+ <div class="mb-2.5 flex flex-col gap-2.5">
+ <div class="flex flex-col gap-2 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-slate-400">
+ <div class="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted">
Recovery Activity
</div>
- <div class="text-sm text-muted">
+ <div class="text-xs text-muted">
Daily recovery points across the selected history window.
</div>
</div>
- <div class="flex flex-wrap items-center gap-2 text-xs">
- <span class="rounded-full border border-border-subtle bg-surface-alt/40 px-2.5 py-1 text-base-content">
+ <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>
- <span class="rounded-full border border-border-subtle bg-surface-alt/40 px-2.5 py-1 text-base-content">
- {props.activitySummary().averagePerDay.toFixed(1)} per day
- </span>
- <span class="rounded-full border border-border-subtle bg-surface-alt/40 px-2.5 py-1 text-base-content">
- {props.activitySummary().activeDays} active days
- </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="rounded-full border border-amber-500/25 bg-amber-500/8 px-2.5 py-1 text-amber-200">
+ <span class="font-medium text-amber-600 dark:text-amber-400">
{props.overallRollupsSummary().stale} stale
</span>
</Show>
@@ -235,9 +231,9 @@ export const RecoveryActivitySection: Component<RecoveryActivitySectionProps> =
</div>
</Show>
- <div class="rounded-xl border border-border-subtle bg-surface-alt/35 p-3">
- <div class={`mb-3 flex flex-wrap items-center justify-between gap-3 ${RECOVERY_TIMELINE_RANGE_GROUP_CLASS}`}>
- <div class="text-xs font-semibold uppercase tracking-wide text-muted">Selected range</div>
+ <div class="rounded-lg border border-border-subtle bg-surface-alt/25 p-2.5">
+ <div class={`mb-2.5 flex flex-wrap items-center justify-between gap-3 ${RECOVERY_TIMELINE_RANGE_GROUP_CLASS}`}>
+ <div class="text-[11px] text-muted">Range</div>
<div class={RECOVERY_TIMELINE_RANGE_GROUP_CLASS}>
<For each={rangeOptions}>
{(range) => (
@@ -256,7 +252,7 @@ export const RecoveryActivitySection: Component<RecoveryActivitySectionProps> =
<Show
when={!props.loading() && props.timeline().points.length > 0}
fallback={
- <div class="flex h-52 items-center justify-center text-sm text-muted">
+ <div class="flex h-40 items-center justify-center text-sm text-muted">
{props.loading()
? getRecoveryActivityLoadingState().text
: getRecoveryActivityEmptyState().text}
@@ -264,30 +260,23 @@ export const RecoveryActivitySection: Component<RecoveryActivitySectionProps> =
}
>
<div class="relative">
- <div class="mb-2 flex flex-wrap items-center justify-between gap-2 text-[10px] text-muted">
- <Show when={props.selectedDateKey()}>
- <span class="rounded-full border border-border-subtle bg-surface px-2 py-1">
- {props.selectedDateLabel()}
- </span>
- </Show>
+ <div class="mb-2 flex flex-wrap items-center justify-end gap-3 text-[10px] 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="flex flex-wrap items-center gap-3">
- <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 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-28 flex-col justify-between text-[10px] text-muted">
+ <div class="flex h-24 flex-col justify-between text-[10px] text-muted">
<For each={[0, 1, 2, 3, 4]}>
{(step) => {
const value = Math.round((props.timeline().axisMax * (4 - step)) / 4);
@@ -296,7 +285,7 @@ export const RecoveryActivitySection: Component<RecoveryActivitySectionProps> =
</For>
</div>
- <div class="relative h-32">
+ <div class="relative h-28">
<div
data-testid="recovery-activity-bars"
class="absolute inset-x-0 bottom-4 top-0 flex items-stretch gap-[3px]"
diff --git a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
index 8dd3438e9b..7bd607fbad 100644
--- a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
@@ -130,7 +130,7 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p
return (
<Card padding="none" tone="card" class="overflow-hidden border-border-subtle bg-surface">
- <div class="border-b border-border-subtle/80 bg-surface px-4 py-2.5">
+ <div class="border-b border-border-subtle/80 bg-surface px-4 py-2">
<div class="flex flex-col gap-2 lg:flex-row lg:items-center lg:justify-between">
<div class="flex min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:gap-3">
<Show when={props.workspaceControls}>
@@ -141,9 +141,6 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p
{props.recoveryPoints.meta().total} event
{props.recoveryPoints.meta().total === 1 ? '' : 's'}
</span>
- <span>
- {props.currentPage()} / {props.totalPages()}
- </span>
<Show when={props.groupedByDay().length > 0}>
<span>
{props.groupedByDay().length} day group
@@ -155,7 +152,7 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p
</div>
</div>
<Show when={!props.kioskMode}>
- <div class="border-b border-border-subtle/80 bg-surface px-4 py-3">
+ <div class="border-b border-border-subtle/80 bg-surface px-4 py-2.5">
<PageControls
search={
<SearchInput
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index a89608826c..e38f1a4c86 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -246,6 +246,8 @@ describe('Recovery', () => {
expect(screen.getAllByRole('table')).toHaveLength(1);
});
const historyTable = screen.getAllByRole('table')[0];
+ expect(screen.getByText(/1 event/i)).toBeInTheDocument();
+ expect(screen.getByText(/1 day group/i)).toBeInTheDocument();
expect(within(historyTable).getByText('Item Type')).toBeInTheDocument();
expect(within(historyTable).getByText('Item')).toBeInTheDocument();
expect(within(historyTable).getByText('Platform')).toBeInTheDocument();
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.json
index 27577557a0..dadb1bb7f9 100644
--- a/internal/cloudcp/portal/dist/build_manifest.json
+++ b/internal/cloudcp/portal/dist/build_manifest.json
@@ -1,5 +1,5 @@
{
- "source_hash": "f20a81dba7e73bc00840ea960b09f0739ead059c9c449204e64481e5ec400b8e",
+ "source_hash": "517df302389970a34b00bd0f8b1a9b60432958a8efd5ce497d64524763740606",
"build_inputs": [
"package.json",
"tsconfig.json",
diff --git a/internal/cloudcp/portal/dist/portal_app.css b/internal/cloudcp/portal/dist/portal_app.css
index 7b8b92d761..d1a4e9efcb 100644
--- a/internal/cloudcp/portal/dist/portal_app.css
+++ b/internal/cloudcp/portal/dist/portal_app.css
@@ -373,30 +373,6 @@ header .logout-btn:hover,
background: rgba(120, 182, 192, 0.12);
box-shadow: inset 3px 0 0 #78b6c0;
}
-.portal-shell-nav-footer {
- margin-top: auto;
- padding: 16px 18px 18px;
- border-top: 1px solid var(--nav-line);
- background: rgba(255, 255, 255, 0.03);
-}
-.portal-shell-nav-footer-label {
- font-size: 11px;
- font-weight: 800;
- letter-spacing: 0.12em;
- text-transform: uppercase;
- color: #78b6c0;
-}
-.portal-shell-nav-footer-link {
- display: inline-block;
- margin-top: 8px;
- font-size: 12px;
- line-height: 1.5;
- color: #d9f4fb;
- text-decoration: none;
-}
-.portal-shell-nav-footer-link:hover {
- text-decoration: underline;
-}
.portal-shell-nav-label {
display: block;
font-size: 14px;
diff --git a/internal/cloudcp/portal/dist/portal_app.js b/internal/cloudcp/portal/dist/portal_app.js
index e49e118a84..e1725da590 100644
--- a/internal/cloudcp/portal/dist/portal_app.js
+++ b/internal/cloudcp/portal/dist/portal_app.js
@@ -1791,7 +1791,7 @@
}
function renderShellNavigation(accounts, supportEmail, activeSection) {
var hosted = hasHostedAccounts(accounts);
- return '<aside class="portal-shell-nav" aria-label="Pulse Account sections"><div class="portal-shell-nav-header"><div class="portal-shell-nav-eyebrow">Pulse Account</div><div class="portal-shell-nav-title">' + (hosted ? "Operator console" : "Account console") + '</div><div class="portal-shell-nav-support">' + (hosted ? "Hosted operations and account services" : "Commercial account services and support") + '</div></div><div class="portal-shell-nav-group">' + shellSectionButton("overview", activeSection, "Overview", hosted ? "Posture, accounts, and quick actions" : "Account summary and access state") + shellSectionButton("workspaces", activeSection, hosted ? "Workspaces" : "Hosted access", hosted ? "Hosted fleet and lifecycle actions" : "No hosted workspaces are attached yet") + shellSectionButton("team", activeSection, "Team", hosted ? "Access and operator roster" : "Account membership") + shellSectionButton("services", activeSection, "Account services", "Licenses, billing, refunds, and privacy") + shellSectionButton("support", activeSection, "Support", supportEmail || "Support contact") + '</div><div class="portal-shell-nav-footer"><div class="portal-shell-nav-footer-label">Need help?</div><a class="portal-shell-nav-footer-link" href="mailto:' + escapeAttr(supportEmail || "[email protected]") + '">' + escapeHTML(supportEmail || "[email protected]") + "</a></div></aside>";
+ return '<aside class="portal-shell-nav" aria-label="Pulse Account sections"><div class="portal-shell-nav-header"><div class="portal-shell-nav-eyebrow">Pulse Account</div><div class="portal-shell-nav-title">' + (hosted ? "Operator console" : "Account console") + '</div><div class="portal-shell-nav-support">' + (hosted ? "Hosted operations and account services" : "Commercial account services and support") + '</div></div><div class="portal-shell-nav-group">' + shellSectionButton("overview", activeSection, "Overview", hosted ? "Posture, accounts, and quick actions" : "Account summary and access state") + shellSectionButton("workspaces", activeSection, hosted ? "Workspaces" : "Hosted access", hosted ? "Hosted fleet and lifecycle actions" : "No hosted workspaces are attached yet") + shellSectionButton("team", activeSection, "Team", hosted ? "Access and operator roster" : "Account membership") + shellSectionButton("services", activeSection, "Account services", "Licenses, billing, refunds, and privacy") + shellSectionButton("support", activeSection, "Support", hosted ? "Escalation and account support" : supportEmail || "Support contact") + "</div></aside>";
}
function renderWorkspaceCard(account, workspace, accountAPIBasePath) {
var status = workspaceHealthState(workspace);
diff --git a/internal/cloudcp/portal/frontend/src/shell_view.ts b/internal/cloudcp/portal/frontend/src/shell_view.ts
index a92af9bcb7..d291956f03 100644
--- a/internal/cloudcp/portal/frontend/src/shell_view.ts
+++ b/internal/cloudcp/portal/frontend/src/shell_view.ts
@@ -268,11 +268,7 @@ function renderShellNavigation(accounts: PortalAccountSummary[], supportEmail: s
shellSectionButton('workspaces', activeSection, hosted ? 'Workspaces' : 'Hosted access', hosted ? 'Hosted fleet and lifecycle actions' : 'No hosted workspaces are attached yet') +
shellSectionButton('team', activeSection, 'Team', hosted ? 'Access and operator roster' : 'Account membership') +
shellSectionButton('services', activeSection, 'Account services', 'Licenses, billing, refunds, and privacy') +
- shellSectionButton('support', activeSection, 'Support', supportEmail || 'Support contact') +
- '</div>' +
- '<div class="portal-shell-nav-footer">' +
- '<div class="portal-shell-nav-footer-label">Need help?</div>' +
- '<a class="portal-shell-nav-footer-link" href="mailto:' + escapeAttr(supportEmail || '[email protected]') + '">' + escapeHTML(supportEmail || '[email protected]') + '</a>' +
+ shellSectionButton('support', activeSection, 'Support', hosted ? 'Escalation and account support' : (supportEmail || 'Support contact')) +
'</div>' +
'</aside>'
);
diff --git a/internal/cloudcp/portal/frontend/src/styles.css b/internal/cloudcp/portal/frontend/src/styles.css
index cd79ab82c5..c5d593afcd 100644
--- a/internal/cloudcp/portal/frontend/src/styles.css
+++ b/internal/cloudcp/portal/frontend/src/styles.css
@@ -389,34 +389,6 @@ header .logout-btn:hover,
box-shadow: inset 3px 0 0 #78b6c0;
}
-.portal-shell-nav-footer {
- margin-top: auto;
- padding: 16px 18px 18px;
- border-top: 1px solid var(--nav-line);
- background: rgba(255, 255, 255, 0.03);
-}
-
-.portal-shell-nav-footer-label {
- font-size: 11px;
- font-weight: 800;
- letter-spacing: 0.12em;
- text-transform: uppercase;
- color: #78b6c0;
-}
-
-.portal-shell-nav-footer-link {
- display: inline-block;
- margin-top: 8px;
- font-size: 12px;
- line-height: 1.5;
- color: #d9f4fb;
- text-decoration: none;
-}
-
-.portal-shell-nav-footer-link:hover {
- text-decoration: underline;
-}
-
.portal-shell-nav-label {
display: block;
font-size: 14px;