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.

Share grouped table row styling

rcourtman235f72f20d40
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 1c569b3c66..ff691fa71c 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -450,7 +450,7 @@ work extends shared components instead of creating new local variants.
reset action stays as one compact header-level `Clear` control with an
accessible `Clear selection` label, not a second page-level scope strip,
search-row accessory, or filter-bar badge.
-13. Keep summary-linked table row emphasis on the shared primitive contract. Workloads, infrastructure, and storage rows that mirror the active summary entity must expose that state through `data-summary-row-active` and let the shared presentation in `frontend-modern/src/index.css` render the row emphasis, rather than carrying page-local sky or blue fill classes inside each row renderer. Group-scoped preview and pin must use that same shared presentation boundary: child rows that belong to a hovered or pinned summary group should expose `data-summary-group-member-active="preview|pinned"` so the block-level emphasis stays subtle, consistent, and reversible instead of each table inventing its own outline, badge, or full-strength fill treatment. Storage-backed reusable row presenters under `frontend-modern/src/features/storageBackups/` must also keep row height and alert accents on class/data-attribute presentation instead of runtime inline style maps, so the shared table contract stays CSP-safe on both steady-state and alert-highlighted routes.
+13. Keep summary-linked table row emphasis on the shared primitive contract. Workloads, infrastructure, and storage rows that mirror the active summary entity must expose that state through `data-summary-row-active` and let the shared presentation in `frontend-modern/src/index.css` render the row emphasis, rather than carrying page-local sky or blue fill classes inside each row renderer. Group-scoped preview and pin must use that same shared presentation boundary: child rows that belong to a hovered or pinned summary group should expose `data-summary-group-member-active="preview|pinned"` so the block-level emphasis stays subtle, consistent, and reversible instead of each table inventing its own outline, badge, or full-strength fill treatment. Static grouped row headers on workloads, infrastructure, storage, recovery, and future grouped tables must use `frontend-modern/src/components/shared/groupedTableRowPresentation.ts` plus the `.grouped-table-row` CSS contract in `frontend-modern/src/index.css`, rather than rebuilding local `bg-surface-alt` variants with subtly different light/dark behavior. Storage-backed reusable row presenters under `frontend-modern/src/features/storageBackups/` must also keep row height and alert accents on class/data-attribute presentation instead of runtime inline style maps, so the shared table contract stays CSP-safe on both steady-state and alert-highlighted routes.
14. Keep retained-value data loading honest at the ownership boundary. Helpers
that prevent a feature surface from falling through the app-level Suspense
boundary during in-flight refresh should stay feature-local until multiple
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
index f99ccf1d0e..797d7b2ea3 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -218,6 +218,12 @@ regression protection.
is previewed or pinned, member rows should take a restrained shared
preview/pinned wash via `data-summary-group-member-active` rather than
per-surface outlines, secondary buttons, or full-strength row fills.
+ Static grouped-row header emphasis on the same workload and infrastructure
+ tables must route through
+ `frontend-modern/src/components/shared/groupedTableRowPresentation.ts` and
+ the shared `.grouped-table-row` CSS contract in `frontend-modern/src/index.css`,
+ rather than local `bg-surface-alt` or hover-fill variants that drift between
+ pages.
Infrastructure table responsive behavior belongs to that same hot-path
owner. `frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts`
must derive column visibility from the measured table surface width, with
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 7705a4b9bc..971f2c1da1 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -647,6 +647,11 @@ querying, and the operator-facing storage health presentation layer.
users still must not inherit synthetic hover branches, and storage must
not keep a special trailing expand column once the shared leading action
contract exists.
+ Static subgroup header emphasis for storage group rows and recovery history
+ day headers must also route through
+ `frontend-modern/src/components/shared/groupedTableRowPresentation.ts` and
+ the shared `.grouped-table-row` CSS contract in `frontend-modern/src/index.css`,
+ rather than storage- or recovery-local background classes.
Storage pool rows must also keep sizing and alert accents on canonical
class/data-attribute presentation rather than row-local inline style maps,
so the public storage page stays CSP-safe under both normal and
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 968533402d..8643c795e3 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -358,6 +358,10 @@ AI-only summary payloads, or page-local heuristics.
emphasis through `data-summary-group-member-active`, so the whole cluster
block reads as the active scope without inventing a second infrastructure-
local outline or banner treatment.
+ Static grouped cluster-header emphasis must route through
+ `frontend-modern/src/components/shared/groupedTableRowPresentation.ts` and
+ the shared `.grouped-table-row` CSS contract in `frontend-modern/src/index.css`,
+ rather than infrastructure-local background or hover-fill classes.
Summary-linked infrastructure rows and cluster headers must also route
pointer preview and focus preview through
`frontend-modern/src/components/shared/summaryInteractionA11y.ts`, while
diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.ts
index c2e10acf68..91869943d6 100644
--- a/frontend-modern/src/__tests__/App.architecture.test.ts
+++ b/frontend-modern/src/__tests__/App.architecture.test.ts
@@ -21,7 +21,7 @@ describe('App architecture', () => {
expect(appSource).toContain(
"import { dialogStackHasBlockingDialog } from './components/shared/useDialogState';",
);
- expect(appSource).toContain("import {");
+ expect(appSource).toContain('import {');
expect(appSource).toContain("} from '@/utils/appShellScrollRestoration';");
expect(appSource).toContain('const runtime = useAppRuntimeState();');
expect(appSource).toContain('pendingAppShellRestoreTop');
@@ -41,7 +41,9 @@ describe('App architecture', () => {
expect(appSource).toContain("import RuntimeHomePage from '@/pages/RuntimeHome';");
expect(appSource).toContain('<Route path="/login" component={RuntimeHomePage} />');
expect(appSource).toContain('<Route path="/" component={RuntimeHomePage} />');
- expect(appSource).toContain('<Route path={`${ROOT_PATROL_PATH}/*`} component={AIIntelligencePage} />');
+ expect(appSource).toContain(
+ '<Route path={`${ROOT_PATROL_PATH}/*`} component={AIIntelligencePage} />',
+ );
expect(appSource).toContain('<Route path="/ai/*" component={LegacyPatrolRouteRedirect} />');
expect(appSource).toContain(
"const PricingHandoffPage = lazy(() => import('./pages/PricingHandoff'));",
@@ -59,7 +61,9 @@ describe('App architecture', () => {
expect(appSource).not.toContain(
"const WorkloadsView = lazy(() => import('./components/Dashboard/Dashboard'));",
);
- expect(appSource).not.toContain("const RecoveryRoute = lazy(() => import('./pages/RecoveryRoute'));");
+ expect(appSource).not.toContain(
+ "const RecoveryRoute = lazy(() => import('./pages/RecoveryRoute'));",
+ );
expect(appSource).not.toContain("const PricingPage = lazy(() => import('./pages/PricingV6'));");
expect(appSource).not.toContain('function ConnectionStatusBadge(');
expect(appSource).not.toContain('function AppLayout(');
@@ -70,7 +74,9 @@ describe('App architecture', () => {
expect(appSource).not.toContain('const [activeOrgID, setActiveOrgID] = createSignal(');
expect(appSource).not.toContain("import('./api/ai')");
expect(appSource).not.toContain('AIAPI.getSettings()');
- expect(appSource).toContain('if (dialogStackHasBlockingDialog() && aiChatStore.isOpenSignal()) {');
+ expect(appSource).toContain(
+ 'if (dialogStackHasBlockingDialog() && aiChatStore.isOpenSignal()) {',
+ );
expect(appSource).toContain("if (e.key === 'Escape' && aiChatStore.isOpen) {");
expect(appSource).toContain('<AIChat onClose={() => aiChatStore.close()} />');
expect(appSource).toContain('showOrgSwitcher={runtime.showOrgSwitcher}');
@@ -79,14 +85,18 @@ describe('App architecture', () => {
it('keeps authenticated chrome in AppLayout and hosted bootstrap in useAppRuntimeState', () => {
expect(appLayoutSource).toContain('export function AppLayout(props: AppLayoutProps)');
- expect(appLayoutSource).toContain("import { preloadRouteModule } from '@/routing/routePreload';");
+ expect(appLayoutSource).toContain(
+ "import { preloadRouteModule } from '@/routing/routePreload';",
+ );
expect(appLayoutSource).toContain("import { aiChatStore } from '@/stores/aiChat';");
expect(appLayoutSource).toContain(
"import { dialogStackHasBlockingDialog } from '@/components/shared/useDialogState';",
);
expect(appLayoutSource).toContain('<OrgSwitcher');
expect(appLayoutSource).toContain('const status = () => props.connectionStatus();');
- expect(appLayoutSource).toContain("status().kind === 'sync-reconnecting' || status().kind === 'reconnecting'");
+ expect(appLayoutSource).toContain(
+ "status().kind === 'sync-reconnecting' || status().kind === 'reconnecting'",
+ );
expect(appLayoutSource).toContain("props.connectionStatus().tone === 'healthy'");
expect(appLayoutSource).toContain('const brandMotionActive = createMemo(');
expect(appLayoutSource).toContain('pulse-brand-lockup');
@@ -110,6 +120,9 @@ describe('App architecture', () => {
expect(appStylesSource).toContain(
'animation: pulse-brand-ring var(--pulse-brand-cycle) ease-in-out infinite;',
);
+ expect(appStylesSource).toContain('tr.grouped-table-row > td');
+ expect(appStylesSource).toContain('--color-grouped-table-row-bg');
+ expect(appStylesSource).toContain('--color-grouped-table-row-accent');
expect(appStylesSource).not.toContain('@keyframes pulse-brand-wordmark');
expect(appStylesSource).not.toContain('text-shadow');
expect(appLayoutSource).toContain("props.versionInfo()?.channel === 'rc'");
@@ -128,7 +141,7 @@ describe('App architecture', () => {
expect(appLayoutSource).not.toContain('props.connected()');
expect(appLayoutSource).toContain('const utilityTabs = createMemo(() =>');
expect(appLayoutSource).toContain(
- "type MobileNavBarPlatformTab as PlatformTab,\n type MobileNavBarUtilityTab as UtilityTab,",
+ 'type MobileNavBarPlatformTab as PlatformTab,\n type MobileNavBarUtilityTab as UtilityTab,',
);
expect(appLayoutSource).toContain("const NAV_TAB_ICON_CLASS = 'w-4 h-4 shrink-0';");
expect(appLayoutSource).toContain('function getDesktopUtilityTabAriaLabel(tab: UtilityTab)');
@@ -138,13 +151,17 @@ describe('App architecture', () => {
expect(appLayoutSource).toContain('const Icon = tab.icon;');
expect(appLayoutSource).toContain('aria-label={platform.label}');
expect(appLayoutSource).toContain('aria-label={getDesktopUtilityTabAriaLabel(tab)}');
- expect(appLayoutSource).toContain('<span aria-hidden="true" class="inline-flex items-center justify-center">');
+ expect(appLayoutSource).toContain(
+ '<span aria-hidden="true" class="inline-flex items-center justify-center">',
+ );
expect(appLayoutSource).toContain('<Icon class={NAV_TAB_ICON_CLASS} />');
expect(appLayoutSource).not.toContain('type PlatformTab = {');
expect(appLayoutSource).not.toContain('type UtilityTab = {');
expect(appLayoutSource).not.toContain('const platformTabsDesktop = createMemo(() =>');
expect(appLayoutSource).not.toContain('const platformTabsMobile = createMemo(() =>');
- expect(appLayoutSource).not.toContain("import { isMultiTenantEnabled } from '@/stores/license';");
+ expect(appLayoutSource).not.toContain(
+ "import { isMultiTenantEnabled } from '@/stores/license';",
+ );
expect(appLayoutSource).not.toContain('loadCommercialPosture');
expect(appLayoutSource).not.toContain('buildReleaseNotesUrl');
expect(appLayoutSource).not.toContain('buildV6RcFeedbackUrl');
@@ -155,16 +172,12 @@ describe('App architecture', () => {
expect(appLayoutSource).toContain('await preloadRouteModule(targetRoute);');
expect(appLayoutSource).toContain('await preloadRouteModule(tab.route);');
expect(appLayoutSource).toContain('onMouseEnter={() => warmNavigationTarget(');
- expect(appLayoutSource).toContain(
- 'aiChatStore.enabled === true &&',
- );
+ expect(appLayoutSource).toContain('aiChatStore.enabled === true &&');
expect(appLayoutSource).toContain('!dialogStackHasBlockingDialog()');
expect(appLayoutSource).toContain('onClick={() => aiChatStore.toggle()}');
expect(appLayoutSource).toContain('getAIChatLauncherTitle');
expect(appLayoutSource).toContain('const AI_CHAT_LAUNCHER_BUTTON_CLASS =');
- expect(appLayoutSource).toContain(
- 'bottom-[calc(5rem+env(safe-area-inset-bottom,0px))]',
- );
+ expect(appLayoutSource).toContain('bottom-[calc(5rem+env(safe-area-inset-bottom,0px))]');
expect(appLayoutSource).toContain('lg:top-1/2');
expect(appLayoutSource).toContain('lg:bottom-auto');
expect(appLayoutSource).not.toContain('sm:top-1/2');
@@ -176,11 +189,15 @@ describe('App architecture', () => {
expect(appLayoutSource).not.toContain("apiFetch('/api/security/status')");
expect(appRuntimeStateSource).toContain('export const useAppRuntimeState = () =>');
expect(appRuntimeStateSource).toContain("import { aiChatStore } from '@/stores/aiChat';");
- expect(appRuntimeStateSource).toContain('const connectionStatus = createMemo<AppConnectionStatus>(() => {');
+ expect(appRuntimeStateSource).toContain(
+ 'const connectionStatus = createMemo<AppConnectionStatus>(() => {',
+ );
expect(appRuntimeStateSource).toContain('const showOrgSwitcher = createMemo(() => {');
expect(appRuntimeStateSource).toContain('const beginAuthenticatedRuntime = async () =>');
- expect(appRuntimeStateSource).toContain("const [backendHealthy, setBackendHealthy] = createSignal(false);");
- expect(appRuntimeStateSource).toContain("const checkBackendHealth = async () => {");
+ expect(appRuntimeStateSource).toContain(
+ 'const [backendHealthy, setBackendHealthy] = createSignal(false);',
+ );
+ expect(appRuntimeStateSource).toContain('const checkBackendHealth = async () => {');
expect(appRuntimeStateSource).toContain('const loadOrganizations = async () =>');
expect(appRuntimeStateSource).toContain('const handleOrgSwitch = (nextOrgID: string) =>');
expect(appRuntimeStateSource).toContain('const handleOrganizationsChanged = () => {');
@@ -197,33 +214,37 @@ describe('App architecture', () => {
"import { loadCommercialPosture } from '@/stores/licenseCommercial';",
);
expect(appRuntimeStateSource).toContain('presentationPolicyHidesOrganizationSurfaces');
- expect(appRuntimeStateSource).toContain(
- 'const [activeOrgID, setActiveOrgID] = createSignal(',
- );
+ expect(appRuntimeStateSource).toContain('const [activeOrgID, setActiveOrgID] = createSignal(');
expect(appRuntimeStateSource).toContain('onMount(() => {');
expect(appRuntimeStateSource).toContain('onMount(async () => {');
expect(appRuntimeStateSource).toContain('void loadCommercialPosture();');
expect(appRuntimeStateSource).toContain('const hasLocalAuthBootstrapHint = (): boolean => {');
expect(appRuntimeStateSource).toContain(
- "const isPreAuthLoginBootstrapPath = (pathname: string): boolean =>",
+ 'const isPreAuthLoginBootstrapPath = (pathname: string): boolean =>',
);
expect(appRuntimeStateSource).toContain(
- "if (isPreAuthLoginBootstrapPath(window.location.pathname) && !hasLocalAuthBootstrapHint()) {",
+ 'if (isPreAuthLoginBootstrapPath(window.location.pathname) && !hasLocalAuthBootstrapHint()) {',
);
expect(appRuntimeStateSource).toContain('aiChatStore.setEnabled(');
- expect(appRuntimeStateSource).toContain("eventBus.on('theme_changed', handleRemoteThemeChange);");
+ expect(appRuntimeStateSource).toContain(
+ "eventBus.on('theme_changed', handleRemoteThemeChange);",
+ );
expect(appRuntimeStateSource).toContain(
"eventBus.on('websocket_reconnected', handleWebSocketReconnected);",
);
expect(appRuntimeStateSource).toContain("const ROOT_DASHBOARD_PATH = '/dashboard';");
expect(appRuntimeStateSource).toContain('if (pathname === ROOT_DASHBOARD_PATH) return false;');
- expect(appRuntimeStateSource).not.toContain("import { startMetricsCollector } from '@/stores/metricsCollector';");
+ expect(appRuntimeStateSource).not.toContain(
+ "import { startMetricsCollector } from '@/stores/metricsCollector';",
+ );
expect(appRuntimeStateSource).not.toContain('startMetricsCollector();');
expect(appRuntimeStateSource).not.toContain('function AppLayout(');
expect(routePreloadSource).toContain('const ROUTE_PRELOADERS: readonly RoutePreloader[] = [');
expect(routePreloadSource).toContain("id: 'recovery',");
expect(routePreloadSource).toContain("id: 'patrol',");
- expect(routePreloadSource).toContain('const routePreloadCache = new Map<string, Promise<void>>();');
+ expect(routePreloadSource).toContain(
+ 'const routePreloadCache = new Map<string, Promise<void>>();',
+ );
expect(routePreloadSource).toContain("import('@/pages/Workloads')");
expect(routePreloadSource).toContain("import('@/pages/Recovery')");
expect(routePreloadSource).not.toContain("import('@/components/Dashboard/Dashboard')");
diff --git a/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx
index 5042ed03d2..c300ec9bcf 100644
--- a/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx
+++ b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx
@@ -1,10 +1,9 @@
import { createMemo, Index, Show } from 'solid-js';
import { ComponentErrorBoundary } from '@/components/ErrorBoundary';
+import { getInteractiveGroupedTableRowClass } from '@/components/shared/groupedTableRowPresentation';
import { NodeGroupHeader } from '@/components/shared/NodeGroupHeader';
-import {
- createSummaryInteractiveRowPreviewHandlers,
-} from '@/components/shared/summaryInteractionA11y';
+import { createSummaryInteractiveRowPreviewHandlers } from '@/components/shared/summaryInteractionA11y';
import { buildSummaryDisclosureControlsId } from '@/components/shared/summaryInteractionA11y';
import { TableBody, TableCell, TableRow } from '@/components/shared/Table';
import { getAlertStyles } from '@/utils/alerts';
@@ -109,9 +108,11 @@ export function WorkloadPanel(props: WorkloadPanelProps) {
when={node()}
fallback={
<TableRow
- class="cursor-pointer bg-surface-alt transition-colors duration-150 hover:bg-surface-hover"
+ class={getInteractiveGroupedTableRowClass()}
data-summary-group-id={groupKey()}
- data-summary-group-series-count={String(groupSummaryScope()?.seriesIds.length ?? 0)}
+ data-summary-group-series-count={String(
+ groupSummaryScope()?.seriesIds.length ?? 0,
+ )}
data-summary-row-active={isSummaryGroupHighlighted() ? 'true' : 'false'}
onClick={handleGroupFocusToggle}
{...groupRowInteraction}
@@ -137,21 +138,21 @@ export function WorkloadPanel(props: WorkloadPanelProps) {
</TableRow>
}
>
- <NodeGroupHeader
- node={node()!}
- renderAs="tr"
- colspan={props.totalColumns()}
- trClass="cursor-pointer transition-colors duration-150 hover:bg-surface-hover"
- trProps={{
- 'data-summary-group-id': groupKey(),
- 'data-summary-group-series-count': String(
- groupSummaryScope()?.seriesIds.length ?? 0,
- ),
- 'data-summary-row-active': isSummaryGroupHighlighted() ? 'true' : 'false',
- onClick: handleGroupFocusToggle,
- ...groupRowInteraction,
- }}
- />
+ <NodeGroupHeader
+ node={node()!}
+ renderAs="tr"
+ colspan={props.totalColumns()}
+ trClass="cursor-pointer select-none duration-150"
+ trProps={{
+ 'data-summary-group-id': groupKey(),
+ 'data-summary-group-series-count': String(
+ groupSummaryScope()?.seriesIds.length ?? 0,
+ ),
+ 'data-summary-row-active': isSummaryGroupHighlighted() ? 'true' : 'false',
+ onClick: handleGroupFocusToggle,
+ ...groupRowInteraction,
+ }}
+ />
</Show>
</Show>
<Index each={groupGuests()} fallback={<></>}>
diff --git a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
index 729da45eb3..083ac16c99 100644
--- a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx
@@ -575,7 +575,9 @@ describe('Dashboard performance contract', () => {
makeGuest(1, { id: 'raw-a', instance: 'shared', node: 'node-x', vmid: 42 }) as any,
);
- const { container } = render(() => <Dashboard vms={[]} containers={[]} nodes={[]} useWorkloads />);
+ const { container } = render(() => (
+ <Dashboard vms={[]} containers={[]} nodes={[]} useWorkloads />
+ ));
await waitFor(() => {
expect(container.querySelector('table')).toBeInTheDocument();
@@ -624,16 +626,22 @@ describe('Dashboard performance contract', () => {
expect(dashboardStateSource).not.toContain('useGroupedTableWindowing');
expect(dashboardGuestMetadataStateSource).toContain('GuestMetadataAPI.getAllMetadata()');
expect(dashboardGuestMetadataStateSource).toContain("eventBus.on('org_switched'");
- expect(dashboardGuestMetadataStateSource).toContain("window.addEventListener('pulse:metadata-changed'");
+ expect(dashboardGuestMetadataStateSource).toContain(
+ "window.addEventListener('pulse:metadata-changed'",
+ );
expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadUrlSync');
expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadFilterOptions');
expect(dashboardWorkloadRouteStateSource).not.toContain('buildWorkloadsPath({');
expect(dashboardWorkloadRouteStateSource).not.toContain('normalizeWorkloadViewModeParam');
- expect(dashboardWorkloadRouteStateSource).not.toContain('const [handledTypeParam, setHandledTypeParam]');
expect(dashboardWorkloadRouteStateSource).not.toContain(
- "const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)",
+ 'const [handledTypeParam, setHandledTypeParam]',
+ );
+ expect(dashboardWorkloadRouteStateSource).not.toContain(
+ 'const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)',
+ );
+ expect(dashboardWorkloadRouteStateSource).not.toContain(
+ 'const workloadNodeOptions = createMemo',
);
- expect(dashboardWorkloadRouteStateSource).not.toContain('const workloadNodeOptions = createMemo');
expect(dashboardWorkloadRouteStateSource).not.toContain(
'const containerRuntimeFilterConfig = createMemo',
);
@@ -643,9 +651,7 @@ describe('Dashboard performance contract', () => {
expect(dashboardWorkloadRouteStateSource).toContain(
'resolveDashboardWorkloadNodeSelection({',
);
- expect(dashboardWorkloadRouteStateSource).toContain(
- 'DASHBOARD_WORKLOAD_ROUTE_RESET_STATE',
- );
+ expect(dashboardWorkloadRouteStateSource).toContain('DASHBOARD_WORKLOAD_ROUTE_RESET_STATE');
expect(dashboardWorkloadRouteStateSource).toContain('isWorkloadsRoute,');
expect(dashboardWorkloadFilterOptionsSource).toContain(
"from './dashboardWorkloadFilterConfigModel'",
@@ -699,12 +705,8 @@ describe('Dashboard performance contract', () => {
expect(dashboardWorkloadUrlSyncSource).not.toContain('buildWorkloadsPath({');
expect(dashboardWorkloadUrlSyncSource).not.toContain('normalizeWorkloadViewModeParam');
expect(dashboardWorkloadUrlSyncSource).not.toContain('parseWorkloadsLinkSearch');
- expect(dashboardWorkloadUrlSyncSource).toContain(
- "from './dashboardWorkloadRouteModel'",
- );
- expect(dashboardWorkloadUrlSyncSource).toContain(
- "from './dashboardWorkloadUrlSyncModel'",
- );
+ expect(dashboardWorkloadUrlSyncSource).toContain("from './dashboardWorkloadRouteModel'");
+ expect(dashboardWorkloadUrlSyncSource).toContain("from './dashboardWorkloadUrlSyncModel'");
expect(dashboardWorkloadUrlSyncSource).toContain(
'const [handledTypeParam, setHandledTypeParam]',
);
@@ -717,9 +719,7 @@ describe('Dashboard performance contract', () => {
expect(dashboardWorkloadUrlSyncModelSource).toContain(
'resolveDashboardManagedWorkloadsNavigateTarget',
);
- expect(dashboardWorkloadUrlSyncModelSource).toContain(
- 'resolveDashboardWorkloadRuntimeParam',
- );
+ expect(dashboardWorkloadUrlSyncModelSource).toContain('resolveDashboardWorkloadRuntimeParam');
expect(dashboardWorkloadUrlSyncModelSource).toContain(
'normalizeWorkloadViewModeParam(params.type)',
);
@@ -746,8 +746,12 @@ describe('Dashboard performance contract', () => {
expect(dashboardWorkloadRouteModelSource).toContain("from './workloadTopology'");
expect(dashboardWorkloadRouteModelSource).toContain('workloadNodeScopeId');
expect(dashboardWorkloadRouteModelSource).toContain('getKubernetesContextKey');
- expect(dashboardSelectionStateSource).toContain('const [selectedGuestId, setSelectedGuestIdRaw]');
- expect(dashboardSelectionStateSource).toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');
+ expect(dashboardSelectionStateSource).toContain(
+ 'const [selectedGuestId, setSelectedGuestIdRaw]',
+ );
+ expect(dashboardSelectionStateSource).toContain(
+ 'const [hoveredWorkloadId, setHoveredWorkloadId]',
+ );
expect(dashboardSelectionStateSource).toContain('setHandledResourceId(null)');
expect(dashboardSelectionStateSource).toContain("from './dashboardSelectionModel'");
expect(dashboardSelectionStateSource).not.toContain('parseWorkloadsLinkSearch');
@@ -766,12 +770,12 @@ describe('Dashboard performance contract', () => {
expect(dashboardStateSource).not.toContain('const DEFAULT_ENABLE_THRESHOLD =');
expect(dashboardStateSource).not.toContain('const DEFAULT_OVERSCAN_ROWS =');
expect(dashboardSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))');
- expect(workloadPanelSource).toContain(
- 'createMemo(() => getCanonicalWorkloadId(guest()))',
- );
+ expect(workloadPanelSource).toContain('createMemo(() => getCanonicalWorkloadId(guest()))');
expect(workloadPanelSource).toContain('buildWorkloadSummaryGroupScope');
expect(workloadPanelSource).toContain('data-summary-group-id');
expect(workloadPanelSource).toContain('setHoveredWorkloadGroupScope');
+ expect(workloadPanelSource).toContain('getInteractiveGroupedTableRowClass');
+ expect(workloadPanelSource).not.toContain('cursor-pointer bg-surface-alt');
expect(dashboardWorkloadTableSource).not.toContain(
'createMemo(() => getCanonicalWorkloadId(guest()))',
);
@@ -804,7 +808,9 @@ describe('Dashboard performance contract', () => {
expect(dashboardFilterStateSource).toContain('DEFAULT_DASHBOARD_SORT_KEY');
expect(dashboardFilterModelSource).toContain('export const countActiveDashboardFilters');
expect(dashboardFilterModelSource).toContain('export const hasActiveDashboardFilters');
- expect(dashboardFilterModelSource).toContain("DEFAULT_DASHBOARD_SORT_KEY: DashboardSortKey = 'type'");
+ expect(dashboardFilterModelSource).toContain(
+ "DEFAULT_DASHBOARD_SORT_KEY: DashboardSortKey = 'type'",
+ );
expect(dashboardFilterModelSource).toContain('searchTrailing?: JSX.Element;');
expect(dashboardFilterModelSource).toContain('utilityActions?: JSX.Element;');
expect(dashboardFilterModelSource).toContain('mobileTrailing?: JSX.Element;');
@@ -843,7 +849,9 @@ describe('Dashboard performance contract', () => {
expect(stackedDiskBarSource).not.toContain('const SEGMENT_COLORS =');
expect(stackedDiskBarStateSource).toContain('new ResizeObserver');
expect(stackedDiskBarStateSource).toContain('useTooltip');
- expect(stackedDiskBarModelSource).toContain('export function buildStackedDiskBarPresentation');
+ expect(stackedDiskBarModelSource).toContain(
+ 'export function buildStackedDiskBarPresentation',
+ );
expect(stackedDiskBarModelSource).toContain('const SEGMENT_COLORS');
expect(stackedDiskBarModelSource).toContain('tooltipTitle');
});
@@ -908,7 +916,7 @@ describe('Dashboard performance contract', () => {
expect(guestRowStateSource).toContain('buildMetricKey');
expect(guestRowStateSource).toContain("from '@/routing/resourceLinks'");
expect(guestRowStateSource).toContain("from './workloadTopology'");
- expect(guestRowStateSource).not.toContain("./infrastructureLink");
+ expect(guestRowStateSource).not.toContain('./infrastructureLink');
expect(guestRowStateSource).not.toContain('rowStyle');
expect(guestRowStateSource).not.toContain('box-shadow');
expect(guestRowStateSource).toContain('getWorkloadTypeBadge');
@@ -929,7 +937,7 @@ describe('Dashboard performance contract', () => {
expect(guestDrawerStateSource).toContain('buildInfrastructureHrefForWorkload');
expect(guestDrawerStateSource).toContain("from '@/routing/resourceLinks'");
expect(guestDrawerStateSource).toContain("from './workloadTopology'");
- expect(guestDrawerStateSource).not.toContain("./infrastructureLink");
+ expect(guestDrawerStateSource).not.toContain('./infrastructureLink');
expect(guestDrawerStateSource).toContain('getDiscoveryResourceTypeForWorkload');
expect(guestDrawerStateSource).toContain('getWebInterfaceTargetLabelForWorkload');
expect(guestDrawerStateSource).toContain('guestOsSummary');
@@ -962,7 +970,7 @@ describe('Dashboard performance contract', () => {
expect(dashboardWorkloadTableSource).not.toContain('NodeGroupHeader');
expect(dashboardWorkloadTableSource).not.toContain('GuestDrawer');
expect(workloadTableHeaderSource).toContain('TableHead');
- expect(workloadTableHeaderSource).toContain("col.sortKey as WorkloadSortKey");
+ expect(workloadTableHeaderSource).toContain('col.sortKey as WorkloadSortKey');
expect(workloadTableHeaderSource).toContain('style={getGuestColumnStyle(');
expect(workloadTableHeaderSource).toContain('props.workloadTableLayoutMode()');
expect(workloadTableHeaderSource).toContain('props.workloadTableVisibleColumnIds()');
@@ -973,6 +981,7 @@ describe('Dashboard performance contract', () => {
expect(workloadPanelSource).toContain('createMemo(() => getCanonicalWorkloadId(guest()))');
expect(workloadPanelSource).toContain('createSummaryInteractiveRowPreviewHandlers');
expect(workloadPanelSource).toContain('resolveSummaryGroupMemberInteractionState');
+ expect(workloadPanelSource).toContain('getInteractiveGroupedTableRowClass');
expect(workloadPanelSource).not.toContain('style={{');
expect(workloadPanelSource).not.toContain('style={');
expect(workloadPanelSource).not.toContain('kind="scope"');
@@ -982,8 +991,12 @@ describe('Dashboard performance contract', () => {
expect(dashboardSelectionStateSource).toContain('setHoveredWorkloadGroupScope');
expect(dashboardWorkloadTableSource).toContain('focusedSummaryWorkloadGroupScope');
expect(dashboardWorkloadTableSource).toContain('hoveredSummaryWorkloadGroupScope');
- expect(dashboardSource).toContain('hoveredGroupScope={state.hoveredSummaryWorkloadGroupScope()}');
- expect(dashboardSource).toContain('focusedGroupScope={state.focusedSummaryWorkloadGroupScope()}');
+ expect(dashboardSource).toContain(
+ 'hoveredGroupScope={state.hoveredSummaryWorkloadGroupScope()}',
+ );
+ expect(dashboardSource).toContain(
+ 'focusedGroupScope={state.focusedSummaryWorkloadGroupScope()}',
+ );
expect(workloadPanelSource).not.toContain('TableHead');
expect(dashboardStateCardsSource).toContain('dashboardInfrastructureEmptyState().title');
expect(dashboardStateCardsSource).toContain('dashboardDisconnectedState().actionLabel');
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx
index a5000703de..883ad54281 100644
--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx
+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx
@@ -4,6 +4,7 @@ import type { Disk } from '@/types/api';
import { formatBytes, formatSpeed, formatUptime, normalizeDiskArray } from '@/utils/format';
import { formatTemperature } from '@/utils/temperature';
import { Card } from '@/components/shared/Card';
+import { getInteractiveGroupedTableRowClass } from '@/components/shared/groupedTableRowPresentation';
import { SummaryTableCardHeader } from '@/components/shared/SummaryTableCardHeader';
import {
Table,
@@ -180,7 +181,7 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCar
});
return (
<TableRow
- class="cursor-pointer bg-surface-alt transition-colors duration-150 hover:bg-surface-hover"
+ class={getInteractiveGroupedTableRowClass()}
data-summary-group-id={groupSummaryScope()?.id ?? undefined}
data-summary-group-series-count={String(
groupSummaryScope()?.seriesIds.length ?? 0,
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
index fde56315c7..02fc881ccb 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx
@@ -491,6 +491,8 @@ describe('UnifiedResourceTable performance contract', () => {
expect(frontendIndexCssSource).toContain("tr[data-summary-row-active='true'] > td");
expect(frontendIndexCssSource).toContain('--color-summary-row-bg');
expect(frontendIndexCssSource).toContain('--color-summary-row-accent');
+ expect(frontendIndexCssSource).toContain('tr.grouped-table-row > td');
+ expect(frontendIndexCssSource).toContain('--color-grouped-table-row-bg');
expect(summaryInteractionA11ySource).toContain('createSummaryInteractiveRowPreviewHandlers');
expect(summaryInteractionA11ySource).toContain(
'createSummaryInteractiveActionKeydownHandler',
@@ -513,6 +515,8 @@ describe('UnifiedResourceTable performance contract', () => {
}
expect(unifiedResourceHostTableCardSource).not.toContain('kind="scope"');
+ expect(unifiedResourceHostTableCardSource).toContain('getInteractiveGroupedTableRowClass');
+ expect(unifiedResourceHostTableCardSource).not.toContain('cursor-pointer bg-surface-alt');
expect(unifiedResourceHostTableCardSource).toContain('SummaryTableCardHeader');
expect(unifiedResourceHostTableCardSource).toContain(
'onClear={tableProps.clearPinnedSummaryScope}',
diff --git a/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx b/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx
index 73c33421eb..7c6ac14515 100644
--- a/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx
@@ -48,6 +48,7 @@ describe('StorageGroupRow', () => {
));
expect(screen.getByText('tower')).toBeInTheDocument();
+ expect(screen.getByText('tower').closest('tr')).toHaveClass('grouped-table-row');
expect(screen.getByText('2 pools')).toBeInTheDocument();
expect(screen.getByText('40%')).toBeInTheDocument();
expect(container.querySelector('.bg-green-500')).toBeInTheDocument();
diff --git a/frontend-modern/src/components/shared/NodeGroupHeader.tsx b/frontend-modern/src/components/shared/NodeGroupHeader.tsx
index 985fac0d79..c78feed6a2 100644
--- a/frontend-modern/src/components/shared/NodeGroupHeader.tsx
+++ b/frontend-modern/src/components/shared/NodeGroupHeader.tsx
@@ -3,6 +3,7 @@ import type { Node } from '@/types/api';
import { getNodeDisplayName, hasAlternateDisplayName } from '@/utils/nodes';
import { StatusDot } from '@/components/shared/StatusDot';
import { getNodeStatusIndicator } from '@/utils/status';
+import { getGroupedTableRowClass } from './groupedTableRowPresentation';
interface NodeGroupHeaderProps {
node: Node;
@@ -81,7 +82,7 @@ export const NodeGroupHeader: Component<NodeGroupHeaderProps> = (props) => {
</div>
}
>
- <tr class={`bg-surface-alt ${props.trClass ?? ''}`.trim()} {...props.trProps}>
+ <tr class={getGroupedTableRowClass(props.trClass)} {...props.trProps}>
<td
colspan={props.colspan}
class="py-0.5 pr-2 pl-4 text-[12px] sm:text-sm font-semibold text-base-content"
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 683dab17b7..986a57cb3a 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -64,6 +64,7 @@ import summaryRowActionButtonSource from '@/components/shared/SummaryRowActionBu
import summaryInteractionA11ySource from '@/components/shared/summaryInteractionA11y.ts?raw';
import summaryTableCardHeaderSource from '@/components/shared/SummaryTableCardHeader.tsx?raw';
import summaryTableFocusSource from '@/components/shared/summaryTableFocus.ts?raw';
+import groupedTableRowPresentationSource from '@/components/shared/groupedTableRowPresentation.ts?raw';
import infrastructureSummaryTableSource from '@/components/shared/InfrastructureSummaryTable.tsx?raw';
import infrastructureSummaryTableRowSource from '@/components/shared/InfrastructureSummaryTableRow.tsx?raw';
import infrastructureSelectorModelSource from '@/components/shared/infrastructureSelectorModel.ts?raw';
@@ -121,10 +122,12 @@ import unifiedResourcePBSTableSectionSource from '@/components/Infrastructure/Un
import unifiedResourcePMGTableSectionSource from '@/components/Infrastructure/UnifiedResourcePMGTableSection.tsx?raw';
import nodeGroupHeaderSource from '@/components/shared/NodeGroupHeader.tsx?raw';
import storageGroupRowSource from '@/components/Storage/StorageGroupRow.tsx?raw';
+import storageGroupPresentationSource from '@/features/storageBackups/groupPresentation.ts?raw';
import storagePoolRowSource from '@/components/Storage/StoragePoolRow.tsx?raw';
import diskListSource from '@/components/Storage/DiskList.tsx?raw';
import storageSummarySource from '@/components/Storage/StorageSummary.tsx?raw';
import workloadsSummarySource from '@/components/Workloads/WorkloadsSummary.tsx?raw';
+import recoveryTablePresentationSource from '@/utils/recoveryTablePresentation.ts?raw';
import resourceDetailDrawerOverviewSource from '@/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx?raw';
import aiSettingsDialogsSource from '@/components/Settings/AISettingsDialogs.tsx?raw';
import generalSettingsPanelSource from '@/components/Settings/GeneralSettingsPanel.tsx?raw';
@@ -382,6 +385,9 @@ describe('shared primitive guardrails', () => {
expect(frontendIndexCssSource).toContain("tr[data-summary-group-member-active='preview'] > td");
expect(frontendIndexCssSource).toContain("tr[data-summary-group-member-active='pinned'] > td");
expect(frontendIndexCssSource).toContain('--color-summary-group-member-pinned-accent');
+ expect(frontendIndexCssSource).toContain('tr.grouped-table-row > td');
+ expect(frontendIndexCssSource).toContain('--color-grouped-table-row-bg');
+ expect(groupedTableRowPresentationSource).toContain('GROUPED_TABLE_ROW_CLASS');
expect(guestRowSource).toContain('data-summary-row-active');
expect(guestRowSource).toContain('data-summary-group-member-active');
@@ -403,6 +409,12 @@ describe('shared primitive guardrails', () => {
}
expect(storagePoolRowSource).toContain('data-summary-group-member-active');
+ expect(storageGroupRowSource).toContain('STORAGE_GROUP_ROW_CLASS');
+ expect(storageGroupPresentationSource).toContain('getInteractiveGroupedTableRowClass');
+ expect(nodeGroupHeaderSource).toContain('getGroupedTableRowClass');
+ expect(workloadPanelSource).toContain('getInteractiveGroupedTableRowClass');
+ expect(unifiedResourceHostTableCardSource).toContain('getInteractiveGroupedTableRowClass');
+ expect(recoveryTablePresentationSource).toContain('GROUPED_TABLE_ROW_BASE_CLASS');
expect(unifiedResourceHostTableCardSource).toContain('data-summary-group-member-active');
});
@@ -893,7 +905,9 @@ describe('shared primitive guardrails', () => {
expect(historyChartOverlaySource).toContain(
'Historical data beyond {props.chart.lockDays()} days is not enabled on this instance.',
);
- expect(historyChartOverlaySource).not.toContain('Unlock {props.chart.lockTierLabel()} Features');
+ expect(historyChartOverlaySource).not.toContain(
+ 'Unlock {props.chart.lockTierLabel()} Features',
+ );
expect(historyChartOverlaySource).not.toContain('free 14-day trial');
expect(historyChartOverlaySource).not.toContain('ChartsAPI.getMetricsHistory');
expect(historyChartOverlaySource).not.toContain('setupCanvasDPR');
diff --git a/frontend-modern/src/components/shared/groupedTableRowPresentation.ts b/frontend-modern/src/components/shared/groupedTableRowPresentation.ts
new file mode 100644
index 0000000000..9d7b5b6303
--- /dev/null
+++ b/frontend-modern/src/components/shared/groupedTableRowPresentation.ts
@@ -0,0 +1,9 @@
+export const GROUPED_TABLE_ROW_CLASS = 'grouped-table-row';
+export const GROUPED_TABLE_ROW_BASE_CLASS = `${GROUPED_TABLE_ROW_CLASS} transition-colors`;
+export const GROUPED_TABLE_ROW_INTERACTIVE_CLASS = `${GROUPED_TABLE_ROW_BASE_CLASS} cursor-pointer select-none duration-150`;
+
+export const getGroupedTableRowClass = (className = ''): string =>
+ `${GROUPED_TABLE_ROW_BASE_CLASS} ${className}`.trim();
+
+export const getInteractiveGroupedTableRowClass = (className = ''): string =>
+ `${GROUPED_TABLE_ROW_INTERACTIVE_CLASS} ${className}`.trim();
diff --git a/frontend-modern/src/features/storageBackups/groupPresentation.ts b/frontend-modern/src/features/storageBackups/groupPresentation.ts
index bcd628ed2a..e00ddf8cc0 100644
--- a/frontend-modern/src/features/storageBackups/groupPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/groupPresentation.ts
@@ -1,4 +1,5 @@
import { formatPercent } from '@/utils/format';
+import { getInteractiveGroupedTableRowClass } from '@/components/shared/groupedTableRowPresentation';
import type { NormalizedHealth } from './models';
import type { StorageGroupedRecords } from '@/components/Storage/useStorageModel';
import { getStorageHealthPresentation } from './healthPresentation';
@@ -19,14 +20,14 @@ export interface StorageGroupRowPresentation {
healthCounts: StorageGroupHealthCountPresentation[];
}
-export const STORAGE_GROUP_ROW_CLASS =
- 'cursor-pointer select-none bg-surface-alt hover:bg-surface-hover transition-colors border-b border-border';
+export const STORAGE_GROUP_ROW_CLASS = getInteractiveGroupedTableRowClass('border-b border-border');
export const STORAGE_GROUP_ROW_CELL_CLASS = 'px-1.5 sm:px-2 py-0.5';
export const STORAGE_GROUP_ROW_CONTENT_CLASS = 'flex items-center gap-3';
export const STORAGE_GROUP_ROW_LABEL_CLASS =
'text-[11px] font-semibold text-base-content w-[140px] flex-shrink-0 truncate';
export const STORAGE_GROUP_ROW_USAGE_WRAP_CLASS = 'w-48 flex-shrink-0 hidden sm:block';
-export const STORAGE_GROUP_ROW_USAGE_LABEL_CLASS = 'text-xs font-medium text-muted hidden sm:inline';
+export const STORAGE_GROUP_ROW_USAGE_LABEL_CLASS =
+ 'text-xs font-medium text-muted hidden sm:inline';
export const STORAGE_GROUP_ROW_POOL_COUNT_CLASS = 'text-xs text-muted whitespace-nowrap';
export const STORAGE_GROUP_ROW_HEALTH_WRAP_CLASS = 'flex items-center gap-1.5 ml-auto';
export const STORAGE_GROUP_ROW_HEALTH_ITEM_CLASS = 'flex items-center gap-0.5';
diff --git a/frontend-modern/src/index.css b/frontend-modern/src/index.css
index c0f78e449a..555f136835 100644
--- a/frontend-modern/src/index.css
+++ b/frontend-modern/src/index.css
@@ -85,6 +85,10 @@
--color-summary-group-member-pinned-bg: rgba(14, 165, 233, 0.04);
--color-summary-group-member-pinned-bg-hover: rgba(14, 165, 233, 0.055);
--color-summary-group-member-pinned-accent: rgba(14, 165, 233, 0.22);
+ --color-grouped-table-row-bg: theme('colors.slate.200');
+ --color-grouped-table-row-bg-hover: theme('colors.slate.300');
+ --color-grouped-table-row-border: theme('colors.slate.300');
+ --color-grouped-table-row-accent: theme('colors.slate.400');
}
.dark {
@@ -107,6 +111,10 @@
--color-summary-group-member-pinned-bg: rgba(56, 189, 248, 0.07);
--color-summary-group-member-pinned-bg-hover: rgba(56, 189, 248, 0.09);
--color-summary-group-member-pinned-accent: rgba(56, 189, 248, 0.28);
+ --color-grouped-table-row-bg: theme('colors.slate.900');
+ --color-grouped-table-row-bg-hover: theme('colors.slate.800');
+ --color-grouped-table-row-border: theme('colors.slate.700');
+ --color-grouped-table-row-accent: theme('colors.slate.500');
}
body {
@@ -207,6 +215,44 @@
box-shadow: inset 4px 0 0 0 #9ca3af;
}
+ tr.grouped-table-row > td,
+ tr.grouped-table-row > th {
+ background-color: var(--color-grouped-table-row-bg);
+ box-shadow:
+ inset 0 1px 0 var(--color-grouped-table-row-border),
+ inset 0 -1px 0 var(--color-grouped-table-row-border);
+ }
+
+ tr.grouped-table-row:hover > td,
+ tr.grouped-table-row:hover > th {
+ background-color: var(--color-grouped-table-row-bg-hover);
+ }
+
+ tr.grouped-table-row > td:first-child,
+ tr.grouped-table-row > th:first-child {
+ box-shadow:
+ inset 3px 0 0 var(--color-grouped-table-row-accent),
+ inset 0 1px 0 var(--color-grouped-table-row-border),
+ inset 0 -1px 0 var(--color-grouped-table-row-border);
+ }
+
+ tr.grouped-table-row > td:last-child,
+ tr.grouped-table-row > th:last-child {
+ box-shadow:
+ inset -1px 0 0 var(--color-grouped-table-row-border),
+ inset 0 1px 0 var(--color-grouped-table-row-border),
+ inset 0 -1px 0 var(--color-grouped-table-row-border);
+ }
+
+ tr.grouped-table-row > td:first-child:last-child,
+ tr.grouped-table-row > th:first-child:last-child {
+ box-shadow:
+ inset 3px 0 0 var(--color-grouped-table-row-accent),
+ inset -1px 0 0 var(--color-grouped-table-row-border),
+ inset 0 1px 0 var(--color-grouped-table-row-border),
+ inset 0 -1px 0 var(--color-grouped-table-row-border);
+ }
+
tr[data-summary-group-member-active='preview'] > td,
tr[data-summary-group-member-active='preview'] > th {
background-color: var(--color-summary-group-member-preview-bg);
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 16c9861d54..b96cdbbcbe 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -720,9 +720,7 @@ describe('frontend resource type boundaries', () => {
expect(dashboardSource).not.toContain('function normalizeViewModeParam');
expect(dashboardSource).not.toContain('workloadSummaryGuestId');
expect(dashboardSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))');
- expect(workloadPanelSource).toContain(
- 'createMemo(() => getCanonicalWorkloadId(guest()))',
- );
+ expect(workloadPanelSource).toContain('createMemo(() => getCanonicalWorkloadId(guest()))');
expect(dashboardWorkloadTableSource).not.toContain(
'createMemo(() => getCanonicalWorkloadId(guest()))',
);
@@ -742,20 +740,22 @@ describe('frontend resource type boundaries', () => {
expect(dashboardStateSource).not.toContain('buildNodeByInstance(');
expect(dashboardStateSource).not.toContain('buildGuestParentNodeMap(');
expect(dashboardWorkloadRouteStateSource).not.toContain('buildWorkloadsPath({');
- expect(dashboardWorkloadRouteStateSource).not.toContain('const workloadNodeOptions = createMemo');
+ expect(dashboardWorkloadRouteStateSource).not.toContain(
+ 'const workloadNodeOptions = createMemo',
+ );
expect(dashboardWorkloadRouteStateSource).not.toContain(
'const containerRuntimeFilterConfig = createMemo',
);
- expect(dashboardWorkloadRouteStateSource).not.toContain('const [handledTypeParam, setHandledTypeParam]');
expect(dashboardWorkloadRouteStateSource).not.toContain(
- "const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)",
+ 'const [handledTypeParam, setHandledTypeParam]',
);
- expect(dashboardWorkloadRouteStateSource).toContain(
- "from './dashboardWorkloadRouteStateModel'",
+ expect(dashboardWorkloadRouteStateSource).not.toContain(
+ 'const [workloadsRouteActive, setWorkloadsRouteActive] = createSignal(false)',
);
expect(dashboardWorkloadRouteStateSource).toContain(
- 'resolveDashboardWorkloadNodeSelection({',
+ "from './dashboardWorkloadRouteStateModel'",
);
+ expect(dashboardWorkloadRouteStateSource).toContain('resolveDashboardWorkloadNodeSelection({');
expect(dashboardWorkloadRouteStateSource).toContain('DASHBOARD_WORKLOAD_ROUTE_RESET_STATE');
expect(dashboardWorkloadUrlSyncSource).not.toContain('buildWorkloadsPath({');
expect(dashboardWorkloadUrlSyncSource).not.toContain('normalizeWorkloadViewModeParam');
@@ -774,9 +774,7 @@ describe('frontend resource type boundaries', () => {
expect(dashboardWorkloadUrlSyncModelSource).toContain(
'resolveDashboardManagedWorkloadsNavigateTarget',
);
- expect(dashboardWorkloadUrlSyncModelSource).toContain(
- 'resolveDashboardWorkloadRuntimeParam',
- );
+ expect(dashboardWorkloadUrlSyncModelSource).toContain('resolveDashboardWorkloadRuntimeParam');
expect(dashboardWorkloadUrlSyncModelSource).toContain(
'normalizeWorkloadViewModeParam(params.type)',
);
@@ -799,9 +797,7 @@ describe('frontend resource type boundaries', () => {
'buildDashboardContainerRuntimeFilterConfig({',
);
expect(dashboardWorkloadFilterOptionsSource).toContain('buildDashboardHostFilterConfig({');
- expect(dashboardWorkloadFilterOptionsSource).toContain(
- 'buildDashboardNamespaceFilterConfig({',
- );
+ expect(dashboardWorkloadFilterOptionsSource).toContain('buildDashboardNamespaceFilterConfig({');
expect(dashboardWorkloadFilterConfigModelSource).toContain(
'export const buildDashboardContainerRuntimeFilterConfig',
);
@@ -846,8 +842,12 @@ describe('frontend resource type boundaries', () => {
expect(dashboardWorkloadRouteModelSource).toContain('workloadNodeScopeId');
expect(dashboardWorkloadRouteModelSource).toContain('getKubernetesContextKey');
expect(dashboardWorkloadRouteStateSource).toContain('isWorkloadsRoute,');
- expect(dashboardSelectionStateSource).toContain('const [selectedGuestId, setSelectedGuestIdRaw]');
- expect(dashboardSelectionStateSource).toContain('const [hoveredWorkloadId, setHoveredWorkloadId]');
+ expect(dashboardSelectionStateSource).toContain(
+ 'const [selectedGuestId, setSelectedGuestIdRaw]',
+ );
+ expect(dashboardSelectionStateSource).toContain(
+ 'const [hoveredWorkloadId, setHoveredWorkloadId]',
+ );
expect(dashboardSelectionStateSource).toContain('setHandledResourceId(null)');
expect(dashboardSelectionStateSource).toContain("from './dashboardSelectionModel'");
expect(dashboardSelectionStateSource).not.toContain('parseWorkloadsLinkSearch');
@@ -867,7 +867,9 @@ describe('frontend resource type boundaries', () => {
expect(dashboardFilterStateSource).toContain('DEFAULT_DASHBOARD_SORT_KEY');
expect(dashboardFilterModelSource).toContain('export const countActiveDashboardFilters');
expect(dashboardFilterModelSource).toContain('export const hasActiveDashboardFilters');
- expect(dashboardFilterModelSource).toContain("DEFAULT_DASHBOARD_SORT_KEY: DashboardSortKey = 'type'");
+ expect(dashboardFilterModelSource).toContain(
+ "DEFAULT_DASHBOARD_SORT_KEY: DashboardSortKey = 'type'",
+ );
expect(dashboardStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');
expect(dashboardStateSource).not.toContain('useGroupedTableWindowing');
expect(dashboardWorkloadRouteStateSource).toContain('useDashboardWorkloadUrlSync');
@@ -906,7 +908,9 @@ describe('frontend resource type boundaries', () => {
expect(thresholdSliderStateSource).toContain('document.addEventListener');
expect(thresholdSliderStateSource).toContain('onCleanup');
expect(thresholdSliderModelSource).toContain('export function getThresholdSliderPosition');
- expect(thresholdSliderModelSource).toContain('export function getThresholdSliderThumbTransform');
+ expect(thresholdSliderModelSource).toContain(
+ 'export function getThresholdSliderThumbTransform',
+ );
expect(thresholdSliderModelSource).toContain('export function getThresholdSliderTitle');
expect(thresholdSliderModelSource).toContain('export function getThresholdSliderLabel');
expect(stackedDiskBarSource).toContain('useStackedDiskBarState');
@@ -961,7 +965,7 @@ describe('frontend resource type boundaries', () => {
expect(infrastructureSummaryStateSource).not.toContain(
'const match = allSeries.find((series) => series.id === focused);',
);
- expect(infrastructureSummaryStateSource).not.toContain("displaySeries().map((series) => ({");
+ expect(infrastructureSummaryStateSource).not.toContain('displaySeries().map((series) => ({');
expect(infrastructureSummaryStateSource).not.toContain(
"isAwaitingFirstSample() ? 'Gathering first sample…' : 'Building trend history…'",
);
@@ -977,7 +981,7 @@ describe('frontend resource type boundaries', () => {
expect(guestRowSource).not.toContain('function OSInfoCell(');
expect(guestRowStateSource).toContain('getCanonicalWorkloadId');
expect(guestRowStateSource).toContain("from '@/routing/resourceLinks'");
- expect(guestRowStateSource).not.toContain("./infrastructureLink");
+ expect(guestRowStateSource).not.toContain('./infrastructureLink');
expect(guestRowModelSource).toContain('export const GUEST_COLUMNS');
expect(guestRowCellsSource).toContain('function NetworkInfoCell(');
expect(guestRowCellsSource).toContain('function OSInfoCell(');
@@ -988,12 +992,14 @@ describe('frontend resource type boundaries', () => {
expect(resourceDetailDrawerOverviewSource).not.toContain(
"from '@/components/Dashboard/TagBadges'",
);
- expect(resourceDetailDrawerShellSource).toContain(
- "from './ResourceDetailDrawerOverviewTab'",
- );
+ expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerOverviewTab'");
expect(resourceDetailDrawerShellSource).toContain("from './ResourceDetailDrawerDebugTab'");
- expect(resourceDetailDrawerStateSource).toContain("from './useResourceDetailDrawerHistoryState'");
- expect(resourceDetailDrawerStateSource).toContain("from './useResourceDetailDrawerDerivedState'");
+ expect(resourceDetailDrawerStateSource).toContain(
+ "from './useResourceDetailDrawerHistoryState'",
+ );
+ expect(resourceDetailDrawerStateSource).toContain(
+ "from './useResourceDetailDrawerDerivedState'",
+ );
expect(resourceDetailDrawerStateSource).toContain(
"from './useResourceDetailDrawerDockerActionsState'",
);
@@ -1032,7 +1038,9 @@ describe('frontend resource type boundaries', () => {
expect(resourceDetailDrawerOverviewSource).not.toContain('MonitoringAPI.');
expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateCheck');
expect(resourceDetailDrawerOverviewSource).toContain('drawer.queueDockerUpdateAll');
- expect(resourceDetailDrawerDockerActionsStateSource).toContain('MonitoringAPI.checkDockerUpdates');
+ expect(resourceDetailDrawerDockerActionsStateSource).toContain(
+ 'MonitoringAPI.checkDockerUpdates',
+ );
expect(resourceDetailDrawerDockerActionsStateSource).toContain(
'MonitoringAPI.updateAllDockerContainers',
);
@@ -1040,7 +1048,7 @@ describe('frontend resource type boundaries', () => {
expect(guestDrawerSource).toContain('GuestDrawerOverview');
expect(guestDrawerStateSource).toContain('getCanonicalWorkloadId');
expect(guestDrawerStateSource).toContain("from '@/routing/resourceLinks'");
- expect(guestDrawerStateSource).not.toContain("./infrastructureLink");
+ expect(guestDrawerStateSource).not.toContain('./infrastructureLink');
expect(guestDrawerStateSource).toContain('guestOsSummary');
expect(guestDrawerSource).not.toContain('const guestId = () => {');
expect(guestDrawerSource).not.toContain('WebInterfaceUrlField');
@@ -1053,7 +1061,7 @@ describe('frontend resource type boundaries', () => {
expect(dashboardWorkloadTableSource).not.toContain('NodeGroupHeader');
expect(dashboardWorkloadTableSource).not.toContain('GuestDrawer');
expect(workloadTableHeaderSource).toContain('TableHead');
- expect(workloadTableHeaderSource).toContain("col.sortKey as WorkloadSortKey");
+ expect(workloadTableHeaderSource).toContain('col.sortKey as WorkloadSortKey');
expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');
expect(workloadPanelSource).toContain('NodeGroupHeader');
expect(workloadPanelSource).toContain('GuestDrawer');
@@ -1248,6 +1256,7 @@ describe('frontend resource type boundaries', () => {
expect(recoveryTablePresentationSource).toContain(
'export function getRecoveryArtifactColumnHeaderClass',
);
+ expect(recoveryTablePresentationSource).toContain('GROUPED_TABLE_ROW_BASE_CLASS');
expect(recoveryTablePresentationSource).toContain('getRecoveryItemTypeLabel');
expect(recoveryTablePresentationSource).toContain('getRecoveryLocationFacetLabel');
expect(recoveryTablePresentationSource).not.toContain('const titleize =');
@@ -1463,7 +1472,9 @@ describe('frontend resource type boundaries', () => {
expect(settingsSystemPanelsSource).toContain('backupPollingEnabled:');
expect(settingsInfrastructurePanelPropsSource).toContain('pbsInstanceFromResource');
expect(settingsInfrastructurePanelPropsSource).toContain('pmgInstanceFromResource');
- expect(settingsInfrastructurePanelPropsSource).toContain('const agentStateResources = createMemo');
+ expect(settingsInfrastructurePanelPropsSource).toContain(
+ 'const agentStateResources = createMemo',
+ );
expect(settingsInfrastructurePanelPropsSource).toContain('getInfrastructurePanelProps');
expect(discoverySettingsStateSource).toContain('export function useDiscoverySettingsState');
expect(discoverySettingsStateSource).toContain('normalizeSubnetList');
@@ -1507,13 +1518,13 @@ describe('frontend resource type boundaries', () => {
expect(organizationAccessMembersSectionSource).toContain(
'@/utils/organizationRolePresentation',
);
- expect(organizationAccessManagementSectionSource).toContain(
- 'ORGANIZATION_MEMBER_ROLE_OPTIONS',
- );
+ expect(organizationAccessManagementSectionSource).toContain('ORGANIZATION_MEMBER_ROLE_OPTIONS');
expect(organizationAccessPanelSource).not.toContain(
'const roleOptions: Array<{ value: OrganizationRole; label: string }> = [',
);
- expect(organizationSharingCreateSectionSource).toContain('@/utils/organizationRolePresentation');
+ expect(organizationSharingCreateSectionSource).toContain(
+ '@/utils/organizationRolePresentation',
+ );
expect(organizationSharingCreateSectionSource).toContain('ORGANIZATION_SHARE_ROLE_OPTIONS');
expect(organizationOutgoingSharesSectionSource).toContain('normalizeOrganizationShareRole');
expect(organizationIncomingSharesSectionSource).toContain('normalizeOrganizationShareRole');
@@ -1864,6 +1875,7 @@ describe('frontend resource type boundaries', () => {
expect(storageGroupRowSource).toContain('buildStorageGroupRowPresentation');
expect(storageGroupRowSource).toContain('STORAGE_GROUP_ROW_CLASS');
expect(storageGroupRowSource).not.toContain('cursor-pointer select-none bg-surface-alt');
+ expect(workloadPanelSource).toContain('getInteractiveGroupedTableRowClass');
expect(storageGroupPresentationSource).toContain(
'export const getStorageGroupHealthCountPresentation',
);
@@ -2764,7 +2776,9 @@ describe('frontend resource type boundaries', () => {
expect(pulseDataGridModelSource).toContain('target.closest(');
expect(searchFieldSource).toContain('useSearchFieldState');
expect(searchFieldSource).not.toContain('let inputEl: HTMLInputElement');
- expect(searchFieldSource).not.toContain("if (props.hasTrailingControls) return 'pr-14 sm:pr-20'");
+ expect(searchFieldSource).not.toContain(
+ "if (props.hasTrailingControls) return 'pr-14 sm:pr-20'",
+ );
expect(searchFieldSource).not.toContain("if (e.key === 'Escape'");
expect(searchFieldStateSource).toContain('let inputEl: HTMLInputElement');
expect(searchFieldStateSource).toContain("if (event.key === 'Escape'");
@@ -3045,9 +3059,7 @@ describe('frontend resource type boundaries', () => {
expect(collapsibleSearchInputStateSource).toContain('useTypeToSearch');
expect(collapsibleSearchInputStateSource).toContain('queueMicrotask');
expect(collapsibleSearchInputModelSource).toContain('getCollapsibleSearchTriggerLabel');
- expect(collapsibleSearchInputModelSource).toContain(
- 'shouldShowCollapsibleSearchExpanded',
- );
+ expect(collapsibleSearchInputModelSource).toContain('shouldShowCollapsibleSearchExpanded');
expect(collapsibleSearchInputModelSource).toContain('getCollapsibleSearchRootClass');
expect(infrastructureSummaryModelSource).not.toContain(
'const asTrimmedString = (value: unknown): string | null => {',
@@ -3082,15 +3094,9 @@ describe('frontend resource type boundaries', () => {
expect(infrastructureSelectorStateSource).toContain('createSignal');
expect(infrastructureSelectorStateSource).toContain('document.addEventListener');
expect(infrastructureSelectorModelSource).toContain('buildInfrastructureSelectorAgents');
- expect(infrastructureSelectorModelSource).toContain(
- 'buildInfrastructureSelectorBackupCounts',
- );
- expect(infrastructureSelectorModelSource).toContain(
- 'buildInfrastructureSelectorUnifiedNodes',
- );
- expect(infrastructureSelectorModelSource).toContain(
- 'isAgentFacetInfrastructureResource',
- );
+ expect(infrastructureSelectorModelSource).toContain('buildInfrastructureSelectorBackupCounts');
+ expect(infrastructureSelectorModelSource).toContain('buildInfrastructureSelectorUnifiedNodes');
+ expect(infrastructureSelectorModelSource).toContain('isAgentFacetInfrastructureResource');
expect(infrastructureSelectorModelSource).not.toContain("resource.type === 'truenas'");
expect(interactiveSparklineSource).toContain('useInteractiveSparklineState');
expect(interactiveSparklineSource).not.toContain('scheduleSparkline');
@@ -3099,9 +3105,7 @@ describe('frontend resource type boundaries', () => {
expect(interactiveSparklineStateSource).toContain('scheduleSparkline');
expect(interactiveSparklineStateSource).toContain('createSignal');
expect(interactiveSparklineModelSource).toContain('buildInteractiveSparklineChartData');
- expect(interactiveSparklineModelSource).toContain(
- 'computeInteractiveSparklineHoverState',
- );
+ expect(interactiveSparklineModelSource).toContain('computeInteractiveSparklineHoverState');
expect(densityMapSource).toContain('useDensityMapState');
expect(densityMapSource).not.toContain('timeRangeToMs');
expect(densityMapSource).not.toContain('createSignal');
@@ -3132,7 +3136,9 @@ describe('frontend resource type boundaries', () => {
expect(historyChartHeaderSource).toContain('formatHistoryChartTooltipValue');
expect(historyChartOverlaySource).toContain('Collecting data... History will appear here.');
expect(historyChartOverlaySource).not.toContain('presentationPolicyHidesUpgradePrompts');
- expect(historyChartOverlaySource).not.toContain('Unlock {props.chart.lockTierLabel()} Features');
+ expect(historyChartOverlaySource).not.toContain(
+ 'Unlock {props.chart.lockTierLabel()} Features',
+ );
expect(historyChartOverlaySource).toContain('is not enabled on this');
expect(historyChartTooltipSource).toContain('formatHistoryChartTooltipValue');
expect(containerUpdateBadgeSource).toContain('useContainerUpdateButtonState');
@@ -3172,9 +3178,7 @@ describe('frontend resource type boundaries', () => {
);
expect(infrastructureDetailsDrawerSource).not.toContain('createSignal');
expect(infrastructureDetailsDrawerSource).not.toContain('getInfrastructureMetadataId');
- expect(infrastructureDetailsDrawerSource).not.toContain(
- 'getInfrastructureDiscoveryHostname',
- );
+ expect(infrastructureDetailsDrawerSource).not.toContain('getInfrastructureDiscoveryHostname');
expect(infrastructureDetailsDrawerStateSource).toContain('createSignal');
expect(infrastructureDetailsDrawerStateSource).toContain(
"type InfrastructureDetailsDrawerTab = 'overview' | 'discovery'",
@@ -3186,9 +3190,7 @@ describe('frontend resource type boundaries', () => {
'resolveInfrastructureDetailsDrawerDiscoveryHostname',
);
expect(infrastructureDetailsDrawerModelSource).toContain('getInfrastructureMetadataId');
- expect(infrastructureDetailsDrawerModelSource).toContain(
- 'getInfrastructureDiscoveryHostname',
- );
+ expect(infrastructureDetailsDrawerModelSource).toContain('getInfrastructureDiscoveryHostname');
expect(useUnifiedResourcesSource).not.toContain('normalizeResourcePolicyAISafeSummary(');
expect(useUnifiedResourcesSource).not.toContain('normalizeResourcePolicy(');
expect(useUnifiedResourcesSource).not.toContain('const resolvePolicySensitivity =');
@@ -3204,19 +3206,27 @@ describe('frontend resource type boundaries', () => {
expect(unifiedResourceTableSource).toContain('UnifiedResourceServiceInfrastructureCard');
expect(unifiedResourceTableSource).not.toContain('const split = createMemo(() =>');
expect(unifiedResourceTableSource).not.toContain('const sortedPBSResources = createMemo(() =>');
- expect(unifiedResourceTableSource).not.toContain('const resourceColumnStyle = createMemo(() =>');
+ expect(unifiedResourceTableSource).not.toContain(
+ 'const resourceColumnStyle = createMemo(() =>',
+ );
expect(unifiedResourceTableSource).not.toContain('getServiceHealthSummaryPresentation');
expect(unifiedResourceTableSource).not.toContain('const getOutlierEmphasis =');
expect(unifiedResourceTableSource).not.toContain('const summarizeServiceHealthTone =');
- expect(unifiedResourceTableStateSource).toContain('export function useUnifiedResourceTableState');
+ expect(unifiedResourceTableStateSource).toContain(
+ 'export function useUnifiedResourceTableState',
+ );
expect(unifiedResourceTableStateSource).toContain("from './unifiedResourceTableStateModel'");
expect(unifiedResourceTableStateSource).toContain('buildHostTableItems');
expect(unifiedResourceTableStateSource).toContain('getUnifiedResourceTableColumnPresentations');
expect(unifiedResourceTableStateSource).toContain('getUnifiedResourceTableShellClass');
expect(unifiedResourceTableStateSource).toContain('useTableWindowing');
expect(unifiedResourceTableStateSource).toContain('useUnifiedResourceTableViewportSync');
- expect(unifiedResourceTableStateSource).not.toContain('const resourceColumnStyle = createMemo(() =>');
- expect(unifiedResourceTableStateSource).not.toContain("const showGroupHeaders = props.groupingMode === 'grouped'");
+ expect(unifiedResourceTableStateSource).not.toContain(
+ 'const resourceColumnStyle = createMemo(() =>',
+ );
+ expect(unifiedResourceTableStateSource).not.toContain(
+ "const showGroupHeaders = props.groupingMode === 'grouped'",
+ );
expect(unifiedResourceTableStateSource).not.toContain('const items: HostTableItem[] = [];');
expect(unifiedResourceTableStateSource).not.toContain('window.addEventListener');
expect(unifiedResourceTableStateSource).not.toContain('getBoundingClientRect');
@@ -3545,7 +3555,9 @@ describe('frontend resource type boundaries', () => {
expect(alertDestinationsModelSource).toContain('export function buildAppriseConfigPayload');
expect(alertDestinationsModelSource).toContain('formatAppriseTargets');
expect(alertDestinationsModelSource).toContain('parseAppriseTargets');
- expect(alertDestinationsTabStateSource).toContain('export function useAlertDestinationsTabState');
+ expect(alertDestinationsTabStateSource).toContain(
+ 'export function useAlertDestinationsTabState',
+ );
expect(alertDestinationsTabStateSource).toContain('NotificationsAPI.testNotification');
expect(alertDestinationsTabStateSource).toContain('useAlertWebhookDestinationsState');
expect(alertDestinationsTabStateSource).not.toContain('NotificationsAPI.getWebhooks');
@@ -3555,9 +3567,7 @@ describe('frontend resource type boundaries', () => {
);
expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.getWebhooks');
expect(alertWebhookDestinationsStateSource).toContain('NotificationsAPI.createWebhook');
- expect(alertWebhookDestinationsStateSource).toContain(
- 'getAlertDestinationsWebhookLoadError',
- );
+ expect(alertWebhookDestinationsStateSource).toContain('getAlertDestinationsWebhookLoadError');
expect(alertDestinationsTabSource).toContain('useAlertDestinationsTabState');
expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadingState');
expect(alertDestinationsTabSource).toContain('AlertDestinationsLoadErrorCard');
@@ -3605,9 +3615,15 @@ describe('frontend resource type boundaries', () => {
expect(alertResourceIncidentsPanelSource).toContain('IncidentTimelineEventCard');
expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentCardClass');
expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentSummaryRowClass');
- expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentToggleButtonClass');
- expect(alertResourceIncidentsPanelSource).toContain('getAlertResourceIncidentTruncatedEventsLabel');
- expect(alertResourceIncidentsPanelSource).not.toContain('getAlertIncidentTimelineEventCardClass');
+ expect(alertResourceIncidentsPanelSource).toContain(
+ 'getAlertResourceIncidentToggleButtonClass',
+ );
+ expect(alertResourceIncidentsPanelSource).toContain(
+ 'getAlertResourceIncidentTruncatedEventsLabel',
+ );
+ expect(alertResourceIncidentsPanelSource).not.toContain(
+ 'getAlertIncidentTimelineEventCardClass',
+ );
expect(alertResourceIncidentsPanelSource).not.toContain('getAlertIncidentTimelineDetailClass');
expect(alertResourceIncidentsPanelSource).not.toContain('getAlertIncidentTimelineCommandClass');
expect(alertHistoryTableSectionSource).toContain('AlertHistoryTableGroupRow');
@@ -3673,24 +3689,36 @@ describe('frontend resource type boundaries', () => {
expect(alertThresholdsTabSource).toContain('guestDefaults={props.guestDefaults()}');
expect(thresholdsTabModelSource).toContain('export interface ThresholdsTabProps');
expect(thresholdsTabModelSource).not.toContain('export function buildThresholdsTableProps');
- expect(thresholdsTabModelSource).toContain("guestDefaults: Accessor<ThresholdsTableProps['guestDefaults']>");
+ expect(thresholdsTabModelSource).toContain(
+ "guestDefaults: Accessor<ThresholdsTableProps['guestDefaults']>",
+ );
expect(thresholdsTabModelSource).not.toContain('hasUnsavedChanges');
expect(thresholdsTableSource).toContain(
"import { useThresholdsTableState } from '@/features/alerts/thresholds/hooks/useThresholdsTableState';",
);
- expect(thresholdsTableSource).toContain("import { ThresholdsTableProxmoxTab } from './ThresholdsTableProxmoxTab';");
- expect(thresholdsTableSource).toContain("import { ThresholdsTablePMGTab } from './ThresholdsTablePMGTab';");
- expect(thresholdsTableSource).toContain("import { ThresholdsTableAgentsTab } from './ThresholdsTableAgentsTab';");
- expect(thresholdsTableSource).toContain("import { ThresholdsTableDockerTab } from './ThresholdsTableDockerTab';");
+ expect(thresholdsTableSource).toContain(
+ "import { ThresholdsTableProxmoxTab } from './ThresholdsTableProxmoxTab';",
+ );
+ expect(thresholdsTableSource).toContain(
+ "import { ThresholdsTablePMGTab } from './ThresholdsTablePMGTab';",
+ );
+ expect(thresholdsTableSource).toContain(
+ "import { ThresholdsTableAgentsTab } from './ThresholdsTableAgentsTab';",
+ );
+ expect(thresholdsTableSource).toContain(
+ "import { ThresholdsTableDockerTab } from './ThresholdsTableDockerTab';",
+ );
expect(thresholdsTableSource).not.toContain('const [searchTerm, setSearchTerm] = createSignal');
expect(thresholdsTableSource).not.toContain('const handleTabClick =');
- expect(thresholdsTableSource).not.toContain("groupedResources={state.guestsGroupedByNode()}");
+ expect(thresholdsTableSource).not.toContain('groupedResources={state.guestsGroupedByNode()}');
expect(thresholdsTableSource).not.toContain('dockerIgnoredPrefixesPresentation.title');
expect(thresholdsTableProxmoxTabSource).toContain('export function ThresholdsTableProxmoxTab');
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxNodesSection');
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPBSSection');
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestsSection');
- expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestFilteringSection');
+ expect(thresholdsTableProxmoxTabSource).toContain(
+ 'ThresholdsTableProxmoxGuestFilteringSection',
+ );
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxBackupsSection');
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxSnapshotsSection');
expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxStorageSection');
@@ -3731,7 +3759,9 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsTableDockerContainersSectionSource).toContain(
'export function ThresholdsTableDockerContainersSection',
);
- expect(thresholdsTableSectionPropsSource).toContain('export interface ThresholdsTableSectionProps');
+ expect(thresholdsTableSectionPropsSource).toContain(
+ 'export interface ThresholdsTableSectionProps',
+ );
expect(thresholdsTableProxmoxNodesSectionSource).toContain(
'export function ThresholdsTableProxmoxNodesSection',
);
@@ -3760,7 +3790,9 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsDataHookSource).toContain('useThresholdsGuestData(inputs)');
expect(thresholdsDataHookSource).toContain('useThresholdsInfrastructureData(inputs)');
expect(thresholdsDataHookSource).not.toContain('const hostOverrideIdCandidates =');
- expect(thresholdsDataHookSource).not.toContain('const dockerContainersGroupedByHost = createMemo');
+ expect(thresholdsDataHookSource).not.toContain(
+ 'const dockerContainersGroupedByHost = createMemo',
+ );
expect(thresholdsHostDataHookSource).toContain('export function useThresholdsHostData');
expect(thresholdsDockerDataHookSource).toContain('export function useThresholdsDockerData');
expect(thresholdsGuestDataHookSource).toContain('export function useThresholdsGuestData');
@@ -3772,11 +3804,15 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsResourceModelSource).toContain('export const normalizeStorageStatus');
expect(thresholdsTableStateHookSource).toContain('export function useThresholdsTableState');
expect(thresholdsTableStateHookSource).toContain('useCollapsedSections()');
- expect(thresholdsTableStateHookSource).toContain('useThresholdsData(props, editingId, searchTerm)');
+ expect(thresholdsTableStateHookSource).toContain(
+ 'useThresholdsData(props, editingId, searchTerm)',
+ );
expect(thresholdsTableStateHookSource).toContain('useThresholdsRecoveryDefaultsState(props)');
expect(thresholdsTableStateHookSource).toContain('useThresholdsOverrideMutations');
expect(thresholdsTableStateHookSource).toContain('useThresholdsAvailabilityMutations');
- expect(thresholdsTableStateHookSource).not.toContain('const saveEdit = (resourceId: string) => {');
+ expect(thresholdsTableStateHookSource).not.toContain(
+ 'const saveEdit = (resourceId: string) => {',
+ );
expect(thresholdsTableStateHookSource).not.toContain(
'const toggleNodeConnectivity = (resourceId: string, forceState?: boolean) => {',
);
@@ -3790,7 +3826,9 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsOverrideMutationsHookSource).toContain(
'export function useThresholdsOverrideMutations',
);
- expect(thresholdsOverrideMutationsHookSource).toContain('const saveEdit = (resourceId: string) => {');
+ expect(thresholdsOverrideMutationsHookSource).toContain(
+ 'const saveEdit = (resourceId: string) => {',
+ );
expect(thresholdsOverrideMutationsHookSource).toContain(
'const handleSaveBulkEdit = (thresholds: Record<string, number | undefined>) => {',
);
@@ -3809,9 +3847,7 @@ describe('frontend resource type boundaries', () => {
'const setOfflineState = (resourceId: string, state: OfflineState) => {',
);
expect(thresholdsOverrideMutationModelSource).toContain('export const upsertOverride =');
- expect(thresholdsOverrideMutationModelSource).toContain(
- 'export const withThresholdEntries =',
- );
+ expect(thresholdsOverrideMutationModelSource).toContain('export const withThresholdEntries =');
expect(thresholdsOverrideMutationModelSource).toContain('export const stripStateKeys =');
expect(alertsPageSource).not.toContain('getAlertConfigUnsavedChangesLabel');
expect(alertsConfigurationSurfaceSource).toContain('getAlertConfigUnsavedChangesLabel');
@@ -4242,7 +4278,7 @@ describe('frontend resource type boundaries', () => {
expect(updateInstallGuideSource).toContain('@/components/Settings/CopyCommandBlock');
expect(updateInstallGuideSource).toContain('buildUpdateInstallGuide');
expect(copyCommandBlockSource).toContain('export function CopyCommandBlock');
- expect(copyCommandBlockSource).toContain("aria-label=\"Copy to clipboard\"");
+ expect(copyCommandBlockSource).toContain('aria-label="Copy to clipboard"');
expect(updatesSettingsModelSource).toContain('export function getUpdateChannelCardOptions');
expect(updatesSettingsModelSource).toContain('export function buildUpdateInstallGuide');
expect(reportingPanelStateSource).toContain('buildReportingRequest');
@@ -4298,7 +4334,9 @@ describe('frontend resource type boundaries', () => {
expect(aiSettingsSource).not.toContain("'Failed to save Pulse Assistant settings'");
expect(aiSettingsSource).not.toContain("'Failed to clear credentials'");
expect(aiSettingsSource).not.toContain("'Failed to update Pulse Assistant setting'");
- expect(aiSettingsShellSource).not.toContain('const [loading, setLoading] = createSignal(false);');
+ expect(aiSettingsShellSource).not.toContain(
+ 'const [loading, setLoading] = createSignal(false);',
+ );
expect(aiSettingsShellSource).not.toContain('const handleSave = async (event?: Event) =>');
expect(aiSettingsShellSource).not.toContain('Chat Session Maintenance');
expect(aiSettingsShellSource).not.toContain('Discovery Settings');
@@ -4310,13 +4348,15 @@ describe('frontend resource type boundaries', () => {
expect(aiSettingsStateSource).toContain('export type AISettingsState =');
expect(aiSettingsStateSource).toContain('const [loading, setLoading] = createSignal(false);');
expect(aiSettingsStateSource).toContain('const handleSave = async (event?: Event) =>');
- expect(aiSettingsStateSource).toContain('const handleEnabledToggle = async (newValue: boolean) =>');
+ expect(aiSettingsStateSource).toContain(
+ 'const handleEnabledToggle = async (newValue: boolean) =>',
+ );
expect(aiIntelligenceSource).toContain(
"import { PatrolIntelligenceSurface } from '@/features/patrol/PatrolIntelligenceSurface';",
);
expect(aiIntelligenceSource).not.toContain('getPatrolSummaryPresentation');
expect(aiIntelligenceSource).not.toContain('getAIQuickstartCreditsPresentation');
- expect(patrolIntelligenceSurfaceSource).toContain("./usePatrolIntelligenceState");
+ expect(patrolIntelligenceSurfaceSource).toContain('./usePatrolIntelligenceState');
expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceHeader');
expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceBanners');
expect(patrolIntelligenceSurfaceSource).toContain('./PatrolIntelligenceSummary');
@@ -4335,7 +4375,9 @@ describe('frontend resource type boundaries', () => {
"import { Navigate, useLocation } from '@solidjs/router';",
);
expect(operationsPageRouteSource).toContain('buildLegacyOperationsSettingsPath');
- expect(operationsPageRouteSource).toContain('<Navigate href={`${canonicalPath}${location.search ?? \'\'}`} />');
+ expect(operationsPageRouteSource).toContain(
+ "<Navigate href={`${canonicalPath}${location.search ?? ''}`} />",
+ );
expect(operationsPageRouteSource).not.toContain('OperationsPageSurface');
expect(settingsNavigationModelSource).toContain(
'export function buildLegacyOperationsSettingsPath',
@@ -4483,10 +4525,16 @@ describe('frontend resource type boundaries', () => {
expect(aiCostPresentationSource).toContain('export const AI_COST_PANEL_TITLE');
expect(aiCostPresentationSource).toContain('export const AI_COST_PANEL_DESCRIPTION');
expect(aiCostPresentationSource).toContain('export function getAICostRefreshErrorMessage');
- expect(aiCostPresentationSource).toContain('export function getAICostResetHistoryConfirmationMessage');
- expect(aiCostPresentationSource).toContain('export function getAICostResetHistorySuccessMessage');
+ expect(aiCostPresentationSource).toContain(
+ 'export function getAICostResetHistoryConfirmationMessage',
+ );
+ expect(aiCostPresentationSource).toContain(
+ 'export function getAICostResetHistorySuccessMessage',
+ );
expect(aiCostPresentationSource).toContain('export function getAICostResetHistoryErrorMessage');
- expect(aiCostPresentationSource).toContain('export function getAICostExportHistoryErrorMessage');
+ expect(aiCostPresentationSource).toContain(
+ 'export function getAICostExportHistoryErrorMessage',
+ );
expect(modelSelectorSource).toContain('AI_CHAT_MODEL_SELECTOR_EMPTY_STATE');
expect(modelSelectorSource).not.toContain('No matching models.');
expect(aiChatPresentationSource).toContain('export const AI_CHAT_MODEL_SELECTOR_EMPTY_STATE');
@@ -4712,7 +4760,9 @@ describe('frontend resource type boundaries', () => {
expect(alertOverviewAlertCardSource).toContain('getAlertOverviewStartedAtClass');
expect(alertOverviewAlertCardSource).toContain('getAlertOverviewPrimaryActionClass');
expect(alertOverviewAlertCardSource).toContain('getAlertOverviewSecondaryActionClass');
- expect(alertAcknowledgementStateSource).toContain('export function useAlertAcknowledgementState');
+ expect(alertAcknowledgementStateSource).toContain(
+ 'export function useAlertAcknowledgementState',
+ );
expect(alertAcknowledgementStateSource).toContain('AlertsAPI.bulkAcknowledge');
expect(alertAcknowledgementStateSource).toContain('AlertsAPI.acknowledge');
expect(alertAcknowledgementStateSource).toContain('AlertsAPI.unacknowledge');
@@ -4942,24 +4992,20 @@ describe('frontend resource type boundaries', () => {
expect(alertResourceTableStateSource).toContain('export function useAlertResourceTableState');
expect(alertResourceTableStateSource).toContain('toggleAll');
expect(alertResourceTableStateSource).toContain('clearSelectedIds');
- expect(alertResourceGroupHeaderSource).toContain(
- 'export function AlertResourceGroupHeader',
- );
+ expect(alertResourceGroupHeaderSource).toContain('export function AlertResourceGroupHeader');
expect(alertResourceGroupHeaderSource).toContain('meta?.clusterName');
- expect(alertResourceTableDesktopSource).toContain(
- 'export function AlertResourceTableDesktop',
- );
+ expect(alertResourceTableDesktopSource).toContain('export function AlertResourceTableDesktop');
expect(alertResourceTableDesktopSource).toContain('AlertResourceTableRow');
expect(alertResourceTableDesktopSource).toContain('AlertResourceGroupHeader');
expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableCustomBadgeLabel');
- expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableResetFactoryDefaultsLabel');
+ expect(alertResourceTableDesktopSource).toContain(
+ 'getAlertResourceTableResetFactoryDefaultsLabel',
+ );
expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableAlertDelayLabel');
expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableMetricInputTitle');
expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableEmptyState');
expect(alertResourceTableDesktopSource).toContain('getAlertResourceTableNoResultsState');
- expect(alertResourceTableMobileSource).toContain(
- 'export function AlertResourceTableMobile',
- );
+ expect(alertResourceTableMobileSource).toContain('export function AlertResourceTableMobile');
expect(alertResourceTableMobileSource).toContain('AlertResourceGroupHeader');
expect(alertResourceTableMobileSource).toContain('buildAlertResourceEditPayload');
expect(alertResourceTableMobileSource).toContain('getAlertResourceTableCustomBadgeLabel');
@@ -4976,9 +5022,7 @@ describe('frontend resource type boundaries', () => {
expect(alertResourceTableModelSource).toContain(
'export function getAlertResourceMetricDisplayValue',
);
- expect(alertResourceTableModelSource).toContain(
- 'export function alertResourceSupportsMetric',
- );
+ expect(alertResourceTableModelSource).toContain('export function alertResourceSupportsMetric');
expect(alertResourceTableModelSource).toContain(
'export function buildAlertResourceEditPayload',
);
@@ -5036,9 +5080,7 @@ describe('frontend resource type boundaries', () => {
expect(webhookConfigSource).not.toContain('NotificationsAPI.getWebhookTemplates');
expect(webhookConfigSource).not.toContain('const saveWebhook = () => {');
expect(webhookConfigSource).not.toContain('const editWebhook = (webhook: Webhook) => {');
- expect(webhookConfigSource).not.toContain(
- 'const toggleAllWebhooks = (enabled: boolean) => {',
- );
+ expect(webhookConfigSource).not.toContain('const toggleAllWebhooks = (enabled: boolean) => {');
expect(webhookConfigSource).not.toContain('Custom webhook endpoint');
expect(webhookConfigSource).not.toContain('Discord server webhook');
expect(webhookConfigSource).not.toContain('My Webhook');
@@ -5064,9 +5106,7 @@ describe('frontend resource type boundaries', () => {
expect(webhookConfigFormSource).toContain('getAlertWebhookServices');
expect(webhookConfigFormSource).toContain('getAlertWebhookNamePlaceholder');
expect(webhookConfigFormSource).toContain('getAlertWebhookUrlPlaceholder');
- expect(webhookConfigFormSource).toContain(
- 'getAlertWebhookMentionPlaceholderFromTemplates',
- );
+ expect(webhookConfigFormSource).toContain('getAlertWebhookMentionPlaceholderFromTemplates');
expect(webhookConfigFormSource).toContain('getAlertWebhookMentionHelpFromTemplates');
expect(webhookConfigFormSource).toContain('hasAlertWebhookMentionSupportFromTemplates');
expect(webhookConfigFormSource).toContain('getAlertWebhookTestLabel');
@@ -5100,5 +5140,4 @@ describe('frontend resource type boundaries', () => {
expect(alertWebhookPresentationSource).toContain('export function getAlertWebhookTestLabel');
expect(alertWebhookPresentationSource).toContain('export function getAlertWebhookSubmitLabel');
});
-
});
diff --git a/frontend-modern/src/utils/__tests__/recoveryTablePresentation.test.ts b/frontend-modern/src/utils/__tests__/recoveryTablePresentation.test.ts
index 183bd29b28..d52a8aa945 100644
--- a/frontend-modern/src/utils/__tests__/recoveryTablePresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/recoveryTablePresentation.test.ts
@@ -29,7 +29,7 @@ import {
describe('recoveryTablePresentation', () => {
it('exposes shared recovery table classes', () => {
- expect(RECOVERY_GROUP_HEADER_ROW_CLASS).toContain('bg-surface-alt');
+ expect(RECOVERY_GROUP_HEADER_ROW_CLASS).toContain('grouped-table-row');
expect(RECOVERY_GROUP_HEADER_TEXT_CLASS).toContain('font-medium');
expect(RECOVERY_ADVANCED_FILTER_LABEL_CLASS).toContain('text-muted');
expect(RECOVERY_ADVANCED_FILTER_FIELD_CLASS).toContain('focus:border-blue-500');
diff --git a/frontend-modern/src/utils/recoveryTablePresentation.ts b/frontend-modern/src/utils/recoveryTablePresentation.ts
index 2acd8d0161..ded0d64c0f 100644
--- a/frontend-modern/src/utils/recoveryTablePresentation.ts
+++ b/frontend-modern/src/utils/recoveryTablePresentation.ts
@@ -1,3 +1,4 @@
+import { GROUPED_TABLE_ROW_BASE_CLASS } from '@/components/shared/groupedTableRowPresentation';
import type { ProtectionRollup, RecoveryOutcome, RecoveryPoint } from '@/types/recovery';
import {
getRecoveryItemTypeBadgeClass,
@@ -14,7 +15,7 @@ import type { RecoveryIssueTone } from '@/utils/recoveryIssuePresentation';
export const STALE_ISSUE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1000;
export const AGING_THRESHOLD_MS = 2 * 24 * 60 * 60 * 1000;
-export const RECOVERY_GROUP_HEADER_ROW_CLASS = 'bg-surface-alt/55 hover:bg-surface-alt/55';
+export const RECOVERY_GROUP_HEADER_ROW_CLASS = GROUPED_TABLE_ROW_BASE_CLASS;
export const RECOVERY_GROUP_HEADER_TEXT_CLASS =
'py-1 pr-3 pl-4 text-[11px] font-medium text-base-content';
export const RECOVERY_ADVANCED_FILTER_LABEL_CLASS = 'text-[11px] font-medium text-muted';
@@ -24,8 +25,7 @@ export const RECOVERY_GROUP_NO_TIMESTAMP_LABEL = 'No Timestamp';
export const RECOVERY_PROTECTED_SEARCH_PLACEHOLDER = 'Search protected items...';
export const RECOVERY_HISTORY_SEARCH_PLACEHOLDER = 'Search recovery history...';
export const RECOVERY_SEARCH_HISTORY_EMPTY_MESSAGE = 'Recent searches appear here.';
-export const RECOVERY_ARTIFACT_METADATA_TEXT_CLASS =
- 'text-[11px] font-medium text-base-content/80';
+export const RECOVERY_ARTIFACT_METADATA_TEXT_CLASS = 'text-[11px] font-medium text-base-content/80';
export const RECOVERY_ARTIFACT_COLUMN_LABELS: Record<string, string> = {
cluster: getRecoveryLocationFacetLabel('cluster'),
nodeAgent: getRecoveryLocationFacetLabel('node'),
@@ -44,22 +44,23 @@ export type RecoveryRollupInventoryStatus =
| 'never-succeeded'
| 'unknown';
-const RECOVERY_ARTIFACT_COLUMN_SPECS: Record<string, { headerClass: string; minWidthPx: number }> = {
- time: { headerClass: 'w-[76px] text-right', minWidthPx: 76 },
- type: { headerClass: 'w-[96px] text-center', minWidthPx: 96 },
- item: { headerClass: 'w-[248px]', minWidthPx: 248 },
- platform: { headerClass: 'w-[78px] text-center', minWidthPx: 78 },
- entityId: { headerClass: 'w-[84px]', minWidthPx: 84 },
- cluster: { headerClass: 'w-[120px]', minWidthPx: 120 },
- nodeAgent: { headerClass: 'w-[120px]', minWidthPx: 120 },
- namespace: { headerClass: 'w-[120px]', minWidthPx: 120 },
- verified: { headerClass: 'w-[56px] text-center', minWidthPx: 56 },
- size: { headerClass: 'w-[92px] text-right', minWidthPx: 92 },
- method: { headerClass: 'w-[84px] text-center', minWidthPx: 84 },
- repository: { headerClass: 'w-[160px]', minWidthPx: 160 },
- details: { headerClass: 'w-[220px]', minWidthPx: 220 },
- outcome: { headerClass: 'w-[88px] text-center', minWidthPx: 88 },
-};
+const RECOVERY_ARTIFACT_COLUMN_SPECS: Record<string, { headerClass: string; minWidthPx: number }> =
+ {
+ time: { headerClass: 'w-[76px] text-right', minWidthPx: 76 },
+ type: { headerClass: 'w-[96px] text-center', minWidthPx: 96 },
+ item: { headerClass: 'w-[248px]', minWidthPx: 248 },
+ platform: { headerClass: 'w-[78px] text-center', minWidthPx: 78 },
+ entityId: { headerClass: 'w-[84px]', minWidthPx: 84 },
+ cluster: { headerClass: 'w-[120px]', minWidthPx: 120 },
+ nodeAgent: { headerClass: 'w-[120px]', minWidthPx: 120 },
+ namespace: { headerClass: 'w-[120px]', minWidthPx: 120 },
+ verified: { headerClass: 'w-[56px] text-center', minWidthPx: 56 },
+ size: { headerClass: 'w-[92px] text-right', minWidthPx: 92 },
+ method: { headerClass: 'w-[84px] text-center', minWidthPx: 84 },
+ repository: { headerClass: 'w-[160px]', minWidthPx: 160 },
+ details: { headerClass: 'w-[220px]', minWidthPx: 220 },
+ outcome: { headerClass: 'w-[88px] text-center', minWidthPx: 88 },
+ };
export function getRecoveryEventTimeTextClass(
timestamp: number,
@@ -173,9 +174,7 @@ export function getRecoveryRollupInventoryStatus(
const successMs = rollup.lastSuccessAt ? Date.parse(rollup.lastSuccessAt) : 0;
const attemptMs = rollup.lastAttemptAt ? Date.parse(rollup.lastAttemptAt) : 0;
const neverSucceeded =
- (!Number.isFinite(successMs) || successMs <= 0) &&
- Number.isFinite(attemptMs) &&
- attemptMs > 0;
+ (!Number.isFinite(successMs) || successMs <= 0) && Number.isFinite(attemptMs) && attemptMs > 0;
const outcome: RecoveryOutcome = normalizeRecoveryOutcome(rollup.lastOutcome);
if (neverSucceeded) return 'never-succeeded';
@@ -209,10 +208,7 @@ export function getRecoveryRollupInventoryPriority(
}
}
-export function getRecoveryRollupAgeTextClass(
- rollup: ProtectionRollup,
- nowMs: number,
-): string {
+export function getRecoveryRollupAgeTextClass(rollup: ProtectionRollup, nowMs: number): string {
const ts = getRecoveryRollupTimestampMs(rollup);
if (!ts || ts <= 0) return 'text-muted';
const ageMs = nowMs - ts;