Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Split dashboard workload table shell owners
rcourtmanc532958d61da
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 3370281f8b..9f9b59fb69 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -29,64 +29,66 @@ regression protection.7. `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`8. `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx`9. `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`-10. `frontend-modern/src/components/Dashboard/useDashboardState.ts`-11. `frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts`-12. `frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts`-13. `frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts`-14. `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`-15. `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts`-16. `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`-17. `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`-18. `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts`-19. `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts`-20. `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`-21. `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts`-22. `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts`-23. `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`-24. `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts`-25. `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts`-26. `frontend-modern/src/components/Dashboard/MetricBar.tsx`-27. `frontend-modern/src/components/Dashboard/metricBarModel.ts`-28. `frontend-modern/src/components/Dashboard/useMetricBarState.ts`-29. `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`-30. `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts`-31. `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts`-32. `frontend-modern/src/components/Dashboard/DiskList.tsx`-33. `frontend-modern/src/components/Dashboard/diskListModel.ts`-34. `frontend-modern/src/components/Dashboard/useDiskListState.ts`-35. `frontend-modern/src/components/Dashboard/GuestRow.tsx`-36. `frontend-modern/src/components/Dashboard/GuestRowCells.tsx`-37. `frontend-modern/src/components/Dashboard/guestRowModel.tsx`-38. `frontend-modern/src/components/Dashboard/useGuestRowState.ts`-39. `frontend-modern/src/components/Dashboard/GuestDrawer.tsx`-40. `frontend-modern/src/components/Dashboard/GuestDrawerOverview.tsx`-41. `frontend-modern/src/components/Dashboard/guestDrawerModel.ts`-42. `frontend-modern/src/components/Dashboard/useGuestDrawerState.ts`-43. `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`-44. `frontend-modern/src/components/Dashboard/workloadSelectors.ts`-45. `frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx`-46. `frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts`-47. `frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts`-48. `frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts`-49. `frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx`-50. `frontend-modern/src/components/Dashboard/__tests__/DashboardFilter.test.tsx`-51. `frontend-modern/src/components/Dashboard/__tests__/useDashboardFilterState.test.ts`-52. `frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts`-53. `frontend-modern/src/components/Dashboard/MetricBar.test.tsx`-54. `frontend-modern/src/components/Dashboard/__tests__/useMetricBarState.test.tsx`-55. `frontend-modern/src/components/Dashboard/__tests__/EnhancedCPUBar.test.tsx`-56. `frontend-modern/src/components/Dashboard/__tests__/useEnhancedCPUBarState.test.tsx`-57. `frontend-modern/src/components/Dashboard/ThresholdSlider.test.tsx`-58. `frontend-modern/src/components/Dashboard/__tests__/useThresholdSliderState.test.ts`-59. `frontend-modern/src/components/Dashboard/__tests__/StackedDiskBar.test.tsx`-60. `frontend-modern/src/components/Dashboard/__tests__/useStackedDiskBarState.test.tsx`-61. `frontend-modern/src/components/Dashboard/StackedMemoryBar.test.tsx`-62. `frontend-modern/src/components/Dashboard/__tests__/useStackedMemoryBarState.test.tsx`-63. `frontend-modern/src/components/Dashboard/__tests__/DiskList.test.tsx`-64. `frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx`-65. `frontend-modern/src/components/Dashboard/GuestDrawer.test.tsx`-66. `frontend-modern/src/components/Dashboard/__tests__/useGroupedTableWindowing.test.ts`-67. `frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx`+10. `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx`+11. `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx`+12. `frontend-modern/src/components/Dashboard/useDashboardState.ts`+13. `frontend-modern/src/components/Dashboard/useDashboardGuestMetadataState.ts`+14. `frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts`+15. `frontend-modern/src/components/Dashboard/useDashboardWorkloadRouteState.ts`+16. `frontend-modern/src/components/Dashboard/DashboardFilter.tsx`+17. `frontend-modern/src/components/Dashboard/dashboardFilterModel.ts`+18. `frontend-modern/src/components/Dashboard/useDashboardFilterState.ts`+19. `frontend-modern/src/components/Dashboard/ThresholdSlider.tsx`+20. `frontend-modern/src/components/Dashboard/thresholdSliderModel.ts`+21. `frontend-modern/src/components/Dashboard/useThresholdSliderState.ts`+22. `frontend-modern/src/components/Dashboard/StackedDiskBar.tsx`+23. `frontend-modern/src/components/Dashboard/stackedDiskBarModel.ts`+24. `frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts`+25. `frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx`+26. `frontend-modern/src/components/Dashboard/stackedMemoryBarModel.ts`+27. `frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts`+28. `frontend-modern/src/components/Dashboard/MetricBar.tsx`+29. `frontend-modern/src/components/Dashboard/metricBarModel.ts`+30. `frontend-modern/src/components/Dashboard/useMetricBarState.ts`+31. `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`+32. `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts`+33. `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts`+34. `frontend-modern/src/components/Dashboard/DiskList.tsx`+35. `frontend-modern/src/components/Dashboard/diskListModel.ts`+36. `frontend-modern/src/components/Dashboard/useDiskListState.ts`+37. `frontend-modern/src/components/Dashboard/GuestRow.tsx`+38. `frontend-modern/src/components/Dashboard/GuestRowCells.tsx`+39. `frontend-modern/src/components/Dashboard/guestRowModel.tsx`+40. `frontend-modern/src/components/Dashboard/useGuestRowState.ts`+41. `frontend-modern/src/components/Dashboard/GuestDrawer.tsx`+42. `frontend-modern/src/components/Dashboard/GuestDrawerOverview.tsx`+43. `frontend-modern/src/components/Dashboard/guestDrawerModel.ts`+44. `frontend-modern/src/components/Dashboard/useGuestDrawerState.ts`+45. `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts`+46. `frontend-modern/src/components/Dashboard/workloadSelectors.ts`+47. `frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx`+48. `frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts`+49. `frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts`+50. `frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts`+51. `frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx`+52. `frontend-modern/src/components/Dashboard/__tests__/DashboardFilter.test.tsx`+53. `frontend-modern/src/components/Dashboard/__tests__/useDashboardFilterState.test.ts`+54. `frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts`+55. `frontend-modern/src/components/Dashboard/MetricBar.test.tsx`+56. `frontend-modern/src/components/Dashboard/__tests__/useMetricBarState.test.tsx`+57. `frontend-modern/src/components/Dashboard/__tests__/EnhancedCPUBar.test.tsx`+58. `frontend-modern/src/components/Dashboard/__tests__/useEnhancedCPUBarState.test.tsx`+59. `frontend-modern/src/components/Dashboard/ThresholdSlider.test.tsx`+60. `frontend-modern/src/components/Dashboard/__tests__/useThresholdSliderState.test.ts`+61. `frontend-modern/src/components/Dashboard/__tests__/StackedDiskBar.test.tsx`+62. `frontend-modern/src/components/Dashboard/__tests__/useStackedDiskBarState.test.tsx`+63. `frontend-modern/src/components/Dashboard/StackedMemoryBar.test.tsx`+64. `frontend-modern/src/components/Dashboard/__tests__/useStackedMemoryBarState.test.tsx`+65. `frontend-modern/src/components/Dashboard/__tests__/DiskList.test.tsx`+66. `frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx`+67. `frontend-modern/src/components/Dashboard/GuestDrawer.test.tsx`+68. `frontend-modern/src/components/Dashboard/__tests__/useGroupedTableWindowing.test.ts`+69. `frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx`## Shared Boundaries@@ -120,6 +122,7 @@ regression protection.20. Extend enhanced CPU bar usage/anomaly presentation and tooltip runtime through `frontend-modern/src/components/Dashboard/enhancedCpuBarModel.ts` and `frontend-modern/src/components/Dashboard/useEnhancedCPUBarState.ts` rather than rebuilding tooltip-local state and CPU-threshold formatting inside `frontend-modern/src/components/Dashboard/EnhancedCPUBar.tsx`21. Extend grouped dashboard row windowing, reveal-index clamping, overscan math, and per-group visible-slice derivation through `frontend-modern/src/components/Dashboard/useGroupedTableWindowing.ts` rather than rebuilding scroll handlers, mounted-row budgets, or group-slice math inside `frontend-modern/src/components/Dashboard/useDashboardState.ts`22. Extend dashboard shell rendering through `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`, `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`, and `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx` rather than accreting loading cards, workload table markup, or stats-strip presentation back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`+23. Extend dashboard workload table shell ownership through `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx` and `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx` rather than rebuilding sortable header markup, grouped node rows, row expansion, or guest-drawer rendering inside `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`## Forbidden Pathsdiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 8e816ef859..e69535ee8f 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -2591,7 +2591,9 @@"frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts","frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts","frontend-modern/src/components/Dashboard/useThresholdSliderState.ts",+ "frontend-modern/src/components/Dashboard/WorkloadPanel.tsx","frontend-modern/src/components/Dashboard/workloadSelectors.ts",+ "frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx","frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts","frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts","frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx",@@ -2687,7 +2689,9 @@"frontend-modern/src/components/Dashboard/useStackedDiskBarState.ts","frontend-modern/src/components/Dashboard/useStackedMemoryBarState.ts","frontend-modern/src/components/Dashboard/useThresholdSliderState.ts",+ "frontend-modern/src/components/Dashboard/WorkloadPanel.tsx","frontend-modern/src/components/Dashboard/workloadSelectors.ts",+ "frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx","frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts","frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts","frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx",diff --git a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsxindex 68c2740af9..6cf4d8a784 100644--- a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx+++ b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx@@ -1,23 +1,10 @@-import { createMemo, For, Index, Show } from 'solid-js';-import { ComponentErrorBoundary } from '@/components/ErrorBoundary';import { Card } from '@/components/shared/Card';-import { NodeGroupHeader } from '@/components/shared/NodeGroupHeader';-import {- Table,- TableBody,- TableCell,- TableHead,- TableHeader,- TableRow,-} from '@/components/shared/Table';-import { getAlertStyles } from '@/utils/alerts';-import { isNodeOnline } from '@/utils/status';-import { getCanonicalWorkloadId } from '@/utils/workloads';+import { Table } from '@/components/shared/Table';-import { GuestDrawer } from './GuestDrawer';-import { GuestRow } from './GuestRow';-import type { DashboardState, WorkloadSortKey } from './useDashboardState';+import type { DashboardState } from './useDashboardState';+import { WorkloadPanel } from './WorkloadPanel';+import { WorkloadTableHeader } from './WorkloadTableHeader';type DashboardWorkloadTableProps = Pick<DashboardState,@@ -69,179 +56,39 @@ export function DashboardWorkloadTable(props: DashboardWorkloadTableProps) {'min-width': props.isMobile() ? '100%' : 'max-content',}}>- <TableHeader>- <TableRow class="bg-surface-alt text-muted border-b border-border">- <For each={props.mobileVisibleColumns()}>- {(col) => {- const isFirst = () => col.id === props.visibleColumns()[0]?.id;- const sortKeyForCol = col.sortKey as WorkloadSortKey | undefined;- const isSortable = !!sortKeyForCol;- const isSorted = () => sortKeyForCol && props.sortKey() === sortKeyForCol;-- return (- <TableHead- class={`py-0.5 text-[11px] sm:text-xs font-medium uppercase tracking-wider whitespace-nowrap- ${isFirst() ? 'pl-2 sm:pl-3 pr-1.5 sm:pr-2 text-left' : 'px-1.5 sm:px-2 text-center'}- ${isSortable ? 'cursor-pointer hover:bg-surface-hover' : ''}`}- style={{- ...(['cpu', 'memory', 'disk'].includes(col.id)- ? { width: props.isMobile() ? '70px' : '140px' }- : ['netIo', 'diskIo'].includes(col.id)- ? { width: '170px' }- : props.isMobile() && col.id === 'name'- ? { width: '100%', 'min-width': '120px' }- : col.width- ? { width: col.width }- : {}),- 'vertical-align': 'middle',- }}- onClick={() => isSortable && props.handleSort(sortKeyForCol!)}- title={col.icon ? col.label : undefined}- >- <div- class={`flex items-center gap-0.5 ${isFirst() ? 'justify-start' : 'justify-center'}`}- style={{ 'min-height': '14px' }}- >- {col.icon ? (- <span class="flex items-center">{col.icon}</span>- ) : (- col.label- )}- {isSorted() && (props.sortDirection() === 'asc' ? ' ▲' : ' ▼')}- </div>- </TableHead>- );- }}- </For>- </TableRow>- </TableHeader>- <TableBody ref={props.setTableBodyRef} class="divide-y divide-border">- <Show when={props.groupedWindowing.isWindowed() && props.topSpacerHeight() > 0}>- <TableRow aria-hidden="true">- <TableCell- colspan={props.totalColumns()}- style={{ height: `${props.topSpacerHeight()}px`, padding: '0', border: '0' }}- />- </TableRow>- </Show>- <For each={props.visibleGroupKeys()} fallback={<></>}>- {(groupKey) => {- const groupGuests = () => props.windowedGroupedGuests()[groupKey] || [];- const fullGroupGuests = () => props.groupedGuests()[groupKey] || [];- const node = () => props.nodeByInstance()[groupKey];-- return (- <>- <Show when={props.groupingMode() === 'grouped'}>- <Show- when={node()}- fallback={- <TableRow class="bg-surface-alt">- <TableCell- colspan={props.totalColumns()}- class="py-0.5 pr-1.5 sm:pr-2 pl-2 sm:pl-3 text-[12px] sm:text-sm font-semibold text-base-content"- >- {(() => {- const label = props.getGroupLabel(groupKey, fullGroupGuests());- return (- <div class="flex items-center gap-3">- <span>{label.name}</span>- <Show when={label.type}>- <span class="inline-flex items-center rounded px-2 py-0.5 text-[10px] font-medium whitespace-nowrap bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300">- {label.type}- </span>- </Show>- </div>- );- })()}- </TableCell>- </TableRow>- }- >- <NodeGroupHeader- node={node()!}- renderAs="tr"- colspan={props.totalColumns()}- />- </Show>- </Show>- <Index each={groupGuests()} fallback={<></>}>- {(guest) => {- const guestId = createMemo(() => getCanonicalWorkloadId(guest()));- const metadata = () =>- props.guestMetadata()[guestId()] ||- props.guestMetadata()[- `${guest().instance}:${guest().node}:${guest().vmid}`- ];- const parentNode = () =>- node() ?? props.guestParentNodeMap()[guestId()];- const parentNodeOnline = () => {- const pn = parentNode();- return pn ? isNodeOnline(pn) : true;- };-- return (- <ComponentErrorBoundary name="GuestRow">- <GuestRow- guest={guest()}- alertStyles={getAlertStyles(- guestId(),- props.activeAlerts,- props.alertsEnabled(),- )}- customUrl={metadata()?.customUrl}- onTagClick={props.handleTagClick}- activeSearch={props.search()}- parentNodeOnline={parentNodeOnline()}- onCustomUrlUpdate={props.handleCustomUrlUpdate}- isGroupedView={props.groupingMode() === 'grouped'}- visibleColumnIds={props.mobileVisibleColumnIds()}- onClick={() =>- props.setSelectedGuestId(- props.selectedGuestId() === guestId() ? null : guestId(),- )- }- isExpanded={props.selectedGuestId() === guestId()}- ioEmphasis={props.workloadIOEmphasis()}- onHoverChange={props.setHoveredWorkloadId}- />- <Show when={props.selectedGuestId() === guestId()}>- <TableRow>- <TableCell- colspan={props.totalColumns()}- class="p-0 border-b border-border bg-surface-alt"- >- <div- class="px-2 sm:px-4 py-3 sm:py-4"- onClick={(event) => event.stopPropagation()}- >- <GuestDrawer- guest={guest()}- onClose={() => props.setSelectedGuestId(null)}- customUrl={metadata()?.customUrl}- onCustomUrlChange={props.handleCustomUrlUpdate}- />- </div>- </TableCell>- </TableRow>- </Show>- </ComponentErrorBoundary>- );- }}- </Index>- </>- );- }}- </For>- <Show when={props.groupedWindowing.isWindowed() && props.bottomSpacerHeight() > 0}>- <TableRow aria-hidden="true">- <TableCell- colspan={props.totalColumns()}- style={{ height: `${props.bottomSpacerHeight()}px`, padding: '0', border: '0' }}- />- </TableRow>- </Show>- </TableBody>+ <WorkloadTableHeader+ handleSort={props.handleSort}+ isMobile={props.isMobile}+ mobileVisibleColumns={props.mobileVisibleColumns}+ sortDirection={props.sortDirection}+ sortKey={props.sortKey}+ visibleColumns={props.visibleColumns}+ />+ <WorkloadPanel+ activeAlerts={props.activeAlerts}+ alertsEnabled={props.alertsEnabled}+ bottomSpacerHeight={props.bottomSpacerHeight}+ getGroupLabel={props.getGroupLabel}+ groupedGuests={props.groupedGuests}+ groupedWindowing={props.groupedWindowing}+ guestMetadata={props.guestMetadata}+ guestParentNodeMap={props.guestParentNodeMap}+ groupingMode={props.groupingMode}+ handleCustomUrlUpdate={props.handleCustomUrlUpdate}+ handleTagClick={props.handleTagClick}+ mobileVisibleColumnIds={props.mobileVisibleColumnIds}+ nodeByInstance={props.nodeByInstance}+ search={props.search}+ selectedGuestId={props.selectedGuestId}+ setHoveredWorkloadId={props.setHoveredWorkloadId}+ setSelectedGuestId={props.setSelectedGuestId}+ setTableBodyRef={props.setTableBodyRef}+ topSpacerHeight={props.topSpacerHeight}+ totalColumns={props.totalColumns}+ visibleGroupKeys={props.visibleGroupKeys}+ windowedGroupedGuests={props.windowedGroupedGuests}+ workloadIOEmphasis={props.workloadIOEmphasis}+ /></Table></div></Card>diff --git a/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsxnew file mode 100644index 0000000000..bd2e850b33--- /dev/null+++ b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx@@ -0,0 +1,164 @@+import { createMemo, Index, Show } from 'solid-js';++import { ComponentErrorBoundary } from '@/components/ErrorBoundary';+import { NodeGroupHeader } from '@/components/shared/NodeGroupHeader';+import { TableBody, TableCell, TableRow } from '@/components/shared/Table';+import { getAlertStyles } from '@/utils/alerts';+import { isNodeOnline } from '@/utils/status';+import { getCanonicalWorkloadId } from '@/utils/workloads';++import { GuestDrawer } from './GuestDrawer';+import { GuestRow } from './GuestRow';+import type { DashboardState } from './useDashboardState';++type WorkloadPanelProps = Pick<+ DashboardState,+ | 'activeAlerts'+ | 'alertsEnabled'+ | 'bottomSpacerHeight'+ | 'getGroupLabel'+ | 'groupedGuests'+ | 'groupedWindowing'+ | 'guestMetadata'+ | 'guestParentNodeMap'+ | 'groupingMode'+ | 'handleCustomUrlUpdate'+ | 'handleTagClick'+ | 'mobileVisibleColumnIds'+ | 'nodeByInstance'+ | 'search'+ | 'selectedGuestId'+ | 'setHoveredWorkloadId'+ | 'setSelectedGuestId'+ | 'setTableBodyRef'+ | 'topSpacerHeight'+ | 'totalColumns'+ | 'visibleGroupKeys'+ | 'windowedGroupedGuests'+ | 'workloadIOEmphasis'+>;++export function WorkloadPanel(props: WorkloadPanelProps) {+ return (+ <TableBody ref={props.setTableBodyRef} class="divide-y divide-border">+ <Show when={props.groupedWindowing.isWindowed() && props.topSpacerHeight() > 0}>+ <TableRow aria-hidden="true">+ <TableCell+ colspan={props.totalColumns()}+ style={{ height: `${props.topSpacerHeight()}px`, padding: '0', border: '0' }}+ />+ </TableRow>+ </Show>+ <Index each={props.visibleGroupKeys()} fallback={<></>}>+ {(groupKey) => {+ const groupGuests = () => props.windowedGroupedGuests()[groupKey()] || [];+ const fullGroupGuests = () => props.groupedGuests()[groupKey()] || [];+ const node = () => props.nodeByInstance()[groupKey()];++ return (+ <>+ <Show when={props.groupingMode() === 'grouped'}>+ <Show+ when={node()}+ fallback={+ <TableRow class="bg-surface-alt">+ <TableCell+ colspan={props.totalColumns()}+ class="py-0.5 pr-1.5 sm:pr-2 pl-2 sm:pl-3 text-[12px] sm:text-sm font-semibold text-base-content"+ >+ {(() => {+ const label = props.getGroupLabel(groupKey(), fullGroupGuests());+ return (+ <div class="flex items-center gap-3">+ <span>{label.name}</span>+ <Show when={label.type}>+ <span class="inline-flex items-center rounded px-2 py-0.5 text-[10px] font-medium whitespace-nowrap bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300">+ {label.type}+ </span>+ </Show>+ </div>+ );+ })()}+ </TableCell>+ </TableRow>+ }+ >+ <NodeGroupHeader node={node()!} renderAs="tr" colspan={props.totalColumns()} />+ </Show>+ </Show>+ <Index each={groupGuests()} fallback={<></>}>+ {(guest) => {+ const guestId = createMemo(() => getCanonicalWorkloadId(guest()));+ const metadata = () =>+ props.guestMetadata()[guestId()] ||+ props.guestMetadata()[`${guest().instance}:${guest().node}:${guest().vmid}`];+ const parentNode = () => node() ?? props.guestParentNodeMap()[guestId()];+ const parentNodeOnline = () => {+ const pn = parentNode();+ return pn ? isNodeOnline(pn) : true;+ };++ return (+ <ComponentErrorBoundary name="GuestRow">+ <GuestRow+ guest={guest()}+ alertStyles={getAlertStyles(+ guestId(),+ props.activeAlerts,+ props.alertsEnabled(),+ )}+ customUrl={metadata()?.customUrl}+ onTagClick={props.handleTagClick}+ activeSearch={props.search()}+ parentNodeOnline={parentNodeOnline()}+ onCustomUrlUpdate={props.handleCustomUrlUpdate}+ isGroupedView={props.groupingMode() === 'grouped'}+ visibleColumnIds={props.mobileVisibleColumnIds()}+ onClick={() =>+ props.setSelectedGuestId(+ props.selectedGuestId() === guestId() ? null : guestId(),+ )+ }+ isExpanded={props.selectedGuestId() === guestId()}+ ioEmphasis={props.workloadIOEmphasis()}+ onHoverChange={props.setHoveredWorkloadId}+ />+ <Show when={props.selectedGuestId() === guestId()}>+ <TableRow>+ <TableCell+ colspan={props.totalColumns()}+ class="p-0 border-b border-border bg-surface-alt"+ >+ <div+ class="px-2 sm:px-4 py-3 sm:py-4"+ onClick={(event) => event.stopPropagation()}+ >+ <GuestDrawer+ guest={guest()}+ onClose={() => props.setSelectedGuestId(null)}+ customUrl={metadata()?.customUrl}+ onCustomUrlChange={props.handleCustomUrlUpdate}+ />+ </div>+ </TableCell>+ </TableRow>+ </Show>+ </ComponentErrorBoundary>+ );+ }}+ </Index>+ </>+ );+ }}+ </Index>+ <Show when={props.groupedWindowing.isWindowed() && props.bottomSpacerHeight() > 0}>+ <TableRow aria-hidden="true">+ <TableCell+ colspan={props.totalColumns()}+ style={{ height: `${props.bottomSpacerHeight()}px`, padding: '0', border: '0' }}+ />+ </TableRow>+ </Show>+ </TableBody>+ );+}diff --git a/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx b/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsxnew file mode 100644index 0000000000..691026dafa--- /dev/null+++ b/frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx@@ -0,0 +1,62 @@+import { For } from 'solid-js';++import { TableHead, TableHeader, TableRow } from '@/components/shared/Table';++import type { DashboardState, WorkloadSortKey } from './useDashboardState';++type WorkloadTableHeaderProps = Pick<+ DashboardState,+ | 'handleSort'+ | 'isMobile'+ | 'mobileVisibleColumns'+ | 'sortDirection'+ | 'sortKey'+ | 'visibleColumns'+>;++export function WorkloadTableHeader(props: WorkloadTableHeaderProps) {+ return (+ <TableHeader>+ <TableRow class="bg-surface-alt text-muted border-b border-border">+ <For each={props.mobileVisibleColumns()}>+ {(col) => {+ const isFirst = () => col.id === props.visibleColumns()[0]?.id;+ const sortKeyForCol = col.sortKey as WorkloadSortKey | undefined;+ const isSortable = !!sortKeyForCol;+ const isSorted = () => sortKeyForCol && props.sortKey() === sortKeyForCol;++ return (+ <TableHead+ class={`py-0.5 text-[11px] sm:text-xs font-medium uppercase tracking-wider whitespace-nowrap+ ${isFirst() ? 'pl-2 sm:pl-3 pr-1.5 sm:pr-2 text-left' : 'px-1.5 sm:px-2 text-center'}+ ${isSortable ? 'cursor-pointer hover:bg-surface-hover' : ''}`}+ style={{+ ...(['cpu', 'memory', 'disk'].includes(col.id)+ ? { width: props.isMobile() ? '70px' : '140px' }+ : ['netIo', 'diskIo'].includes(col.id)+ ? { width: '170px' }+ : props.isMobile() && col.id === 'name'+ ? { width: '100%', 'min-width': '120px' }+ : col.width+ ? { width: col.width }+ : {}),+ 'vertical-align': 'middle',+ }}+ onClick={() => isSortable && props.handleSort(sortKeyForCol!)}+ title={col.icon ? col.label : undefined}+ >+ <div+ class={`flex items-center gap-0.5 ${isFirst() ? 'justify-start' : 'justify-center'}`}+ style={{ 'min-height': '14px' }}+ >+ {col.icon ? <span class="flex items-center">{col.icon}</span> : col.label}+ {isSorted() && (props.sortDirection() === 'asc' ? ' ▲' : ' ▼')}+ </div>+ </TableHead>+ );+ }}+ </For>+ </TableRow>+ </TableHeader>+ );+}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.tsxindex 1b984ed1f1..dc8ca77358 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@@ -8,6 +8,8 @@ import dashboardStateCardsSource from '../DashboardStateCards.tsx?raw';import dashboardStatsStripSource from '../DashboardStatsStrip.tsx?raw';import dashboardFilterSource from '../DashboardFilter.tsx?raw';import dashboardWorkloadTableSource from '../DashboardWorkloadTable.tsx?raw';+import workloadPanelSource from '../WorkloadPanel.tsx?raw';+import workloadTableHeaderSource from '../WorkloadTableHeader.tsx?raw';import dashboardFilterModelSource from '../dashboardFilterModel.ts?raw';import dashboardGuestMetadataStateSource from '../useDashboardGuestMetadataState.ts?raw';import dashboardSelectionStateSource from '../useDashboardSelectionState.ts?raw';@@ -531,7 +533,10 @@ 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(dashboardWorkloadTableSource).toContain(+ expect(workloadPanelSource).toContain(+ 'createMemo(() => getCanonicalWorkloadId(guest()))',+ );+ expect(dashboardWorkloadTableSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))',);expect(dashboardStateSource).not.toContain('const guestId = () => {');@@ -665,11 +670,20 @@ describe('Dashboard performance contract', () => {expect(dashboardSource).toContain('DashboardWorkloadTable');expect(dashboardSource).not.toContain('TableHeader');expect(dashboardSource).not.toContain('NodeGroupHeader');+ expect(dashboardWorkloadTableSource).toContain('WorkloadTableHeader');+ expect(dashboardWorkloadTableSource).toContain('WorkloadPanel');+ expect(dashboardWorkloadTableSource).not.toContain('<TableHead');+ expect(dashboardWorkloadTableSource).not.toContain('NodeGroupHeader');+ expect(dashboardWorkloadTableSource).not.toContain('GuestDrawer');+ expect(workloadTableHeaderSource).toContain('TableHead');+ expect(workloadTableHeaderSource).toContain("col.sortKey as WorkloadSortKey");+ expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');+ expect(workloadPanelSource).toContain('NodeGroupHeader');+ expect(workloadPanelSource).toContain('GuestDrawer');+ expect(workloadPanelSource).toContain('createMemo(() => getCanonicalWorkloadId(guest()))');+ expect(workloadPanelSource).not.toContain('TableHead');expect(dashboardStateCardsSource).toContain('dashboardInfrastructureEmptyState().title');expect(dashboardStateCardsSource).toContain('dashboardDisconnectedState().actionLabel');- expect(dashboardWorkloadTableSource).toContain('TableHeader');- expect(dashboardWorkloadTableSource).toContain('NodeGroupHeader');- expect(dashboardWorkloadTableSource).toContain('GuestDrawer');expect(dashboardStatsStripSource).toContain('totalStats().running');expect(dashboardStatsStripSource).toContain('totalStats().stopped');});diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 17342bbc06..444071fca3 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -84,6 +84,8 @@ import dashboardStateCardsSource from '@/components/Dashboard/DashboardStateCardimport dashboardStatsStripSource from '@/components/Dashboard/DashboardStatsStrip.tsx?raw';import dashboardFilterSource from '@/components/Dashboard/DashboardFilter.tsx?raw';import dashboardWorkloadTableSource from '@/components/Dashboard/DashboardWorkloadTable.tsx?raw';+import workloadPanelSource from '@/components/Dashboard/WorkloadPanel.tsx?raw';+import workloadTableHeaderSource from '@/components/Dashboard/WorkloadTableHeader.tsx?raw';import dashboardFilterModelSource from '@/components/Dashboard/dashboardFilterModel.ts?raw';import dashboardGuestMetadataStateSource from '@/components/Dashboard/useDashboardGuestMetadataState.ts?raw';import dashboardSelectionStateSource from '@/components/Dashboard/useDashboardSelectionState.ts?raw';@@ -524,7 +526,10 @@ describe('frontend resource type boundaries', () => {expect(dashboardSource).not.toContain('function normalizeViewModeParam');expect(dashboardSource).not.toContain('workloadSummaryGuestId');expect(dashboardSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))');- expect(dashboardWorkloadTableSource).toContain(+ expect(workloadPanelSource).toContain(+ 'createMemo(() => getCanonicalWorkloadId(guest()))',+ );+ expect(dashboardWorkloadTableSource).not.toContain('createMemo(() => getCanonicalWorkloadId(guest()))',);expect(dashboardGuestMetadataStateSource).toContain('normalizeOrgScope(getOrgID())');@@ -654,8 +659,18 @@ describe('frontend resource type boundaries', () => {expect(guestDrawerOverviewSource).toContain('WebInterfaceUrlField');expect(guestDrawerOverviewSource).toContain('DiskList');expect(dashboardStateCardsSource).toContain('dashboardDisconnectedState().actionLabel');- expect(dashboardWorkloadTableSource).toContain('NodeGroupHeader');- expect(dashboardWorkloadTableSource).toContain('GuestDrawer');+ expect(dashboardWorkloadTableSource).toContain('WorkloadTableHeader');+ expect(dashboardWorkloadTableSource).toContain('WorkloadPanel');+ expect(dashboardWorkloadTableSource).not.toContain('<TableHead');+ expect(dashboardWorkloadTableSource).not.toContain('NodeGroupHeader');+ expect(dashboardWorkloadTableSource).not.toContain('GuestDrawer');+ expect(workloadTableHeaderSource).toContain('TableHead');+ expect(workloadTableHeaderSource).toContain("col.sortKey as WorkloadSortKey");+ expect(workloadTableHeaderSource).not.toContain('NodeGroupHeader');+ expect(workloadPanelSource).toContain('NodeGroupHeader');+ expect(workloadPanelSource).toContain('GuestDrawer');+ expect(workloadPanelSource).toContain('createMemo(() => getCanonicalWorkloadId(guest()))');+ expect(workloadPanelSource).not.toContain('TableHead');expect(dashboardStatsStripSource).toContain('totalStats().running');expect(emptyStateSource).toContain('getEmptyStatePresentation');expect(emptyStateSource).not.toContain('const iconBgClass: Record<EmptyStateTone, string> =');diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 767ec25d82..4c8e764bc5 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -1989,6 +1989,58 @@ class SubsystemLookupTest(unittest.TestCase):"dashboard-workload-hot-path",)+ def test_lookup_paths_assigns_dashboard_workload_panel_runtime_to_performance_and_scalability(+ self,+ ) -> None:+ result = lookup_paths(["frontend-modern/src/components/Dashboard/WorkloadPanel.tsx"])+ self.assertEqual(result["unowned_runtime_files"], [])+ self.assertEqual(+ {item["subsystem"] for item in result["impacted_subsystems"]},+ {"performance-and-scalability"},+ )+ file_entry = result["files"][0]+ self.assertEqual(file_entry["classification"], "runtime")+ self.assertEqual(+ {match["subsystem"] for match in file_entry["matches"]},+ {"performance-and-scalability"},+ )+ match = file_entry["matches"][0]+ self.assertEqual(+ match["contract"],+ "docs/release-control/v6/internal/subsystems/performance-and-scalability.md",+ )+ self.assertEqual(+ match["verification_requirement"]["id"],+ "dashboard-workload-hot-path",+ )++ def test_lookup_paths_assigns_dashboard_workload_header_runtime_to_performance_and_scalability(+ self,+ ) -> None:+ result = lookup_paths(+ ["frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx"]+ )+ self.assertEqual(result["unowned_runtime_files"], [])+ self.assertEqual(+ {item["subsystem"] for item in result["impacted_subsystems"]},+ {"performance-and-scalability"},+ )+ file_entry = result["files"][0]+ self.assertEqual(file_entry["classification"], "runtime")+ self.assertEqual(+ {match["subsystem"] for match in file_entry["matches"]},+ {"performance-and-scalability"},+ )+ match = file_entry["matches"][0]+ self.assertEqual(+ match["contract"],+ "docs/release-control/v6/internal/subsystems/performance-and-scalability.md",+ )+ self.assertEqual(+ match["verification_requirement"]["id"],+ "dashboard-workload-hot-path",+ )+def test_lookup_paths_assigns_dashboard_selection_runtime_to_performance_and_scalability(self,) -> None: