From dc7c83a3889fa2fa4c3035a7b58a0e422f1fa759 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 16 May 2026 21:44:51 +0100 Subject: [PATCH] proxmox(nodes-table): drop the per-table search and status chip strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v5's NodeSummaryTable rendered the rows directly without a search box or status filter — node lists are typically short enough that visual scan is faster than typing, and the Workloads filter below already covers the place where filtering actually matters. Strip the SearchInput + FilterButtonGroup + visible/total summary line so the table sits flush under its section header, matching v5 more faithfully. Removes the search/status signals, the filterPlatformResources call, and the now-unused FilterButtonGroup / SearchInput / PlatformResourceStatusFilter / FilterOption imports. The empty-state fallback for "no nodes at all" stays; the "no nodes match current filters" fallback is gone with the filters that produced it. --- .../features/proxmox/ProxmoxNodesTable.tsx | 64 +++---------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx index 462cdf23d..87aa476f3 100644 --- a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx +++ b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx @@ -1,8 +1,6 @@ -import { For, Show, createMemo, createSignal, type Component, type JSX } from 'solid-js'; +import { For, Show, type Component, type JSX } from 'solid-js'; import { Card } from '@/components/shared/Card'; import { EmptyState } from '@/components/shared/EmptyState'; -import { FilterButtonGroup, type FilterOption } from '@/components/shared/FilterButtonGroup'; -import { SearchInput } from '@/components/shared/SearchInput'; import { StatusDot } from '@/components/shared/StatusDot'; import { ResponsiveMetricCell } from '@/components/shared/responsive'; import { StackedMemoryBar } from '@/components/Workloads/StackedMemoryBar'; @@ -20,10 +18,6 @@ import { getSimpleStatusIndicator } from '@/utils/status'; import { asTrimmedString } from '@/utils/stringUtils'; import { normalizeDiskArray } from '@/utils/format'; import { buildMetricKeyForUnifiedResource } from '@/utils/metricsKeys'; -import { - filterPlatformResources, - type PlatformResourceStatusFilter, -} from '@/features/platformPage/sharedPlatformPage'; import type { Disk } from '@/types/api'; import type { Resource } from '@/types/resource'; import { @@ -36,14 +30,10 @@ import { // top, the canonical Workloads filter + guest table below. The nodes table // uses the canonical metric primitives (ResponsiveMetricCell / StackedMemoryBar // / StackedDiskBar / TemperatureGauge) so the bars, severity coloring, and -// sparkline overlays match the rest of the platform-first surfaces. - -const STATUS_FILTER_OPTIONS: FilterOption[] = [ - { value: 'all', label: 'All' }, - { value: 'online', label: 'Healthy' }, - { value: 'degraded', label: 'Degraded' }, - { value: 'offline', label: 'Offline' }, -]; +// sparkline overlays match the rest of the platform-first surfaces. v5's +// NodeSummaryTable didn't have a search box or status chip strip — node lists +// are short and the Workloads filter below covers the place where filtering +// actually matters, so this table renders the rows directly. const formatUptime = (seconds: number | undefined): { label: string; warn: boolean } => { if (!seconds || seconds <= 0) return { label: '—', warn: false }; @@ -84,13 +74,6 @@ export const ProxmoxNodesTable: Component<{ emptyTitle: string; emptyDescription: string; }> = (props) => { - const [search, setSearch] = createSignal(''); - const [status, setStatus] = createSignal('all'); - - const filtered = createMemo(() => filterPlatformResources(props.nodes, search(), status())); - const visible = createMemo(() => filtered().length); - const total = createMemo(() => props.nodes.length); - return ( 0} @@ -104,36 +87,7 @@ export const ProxmoxNodesTable: Component<{ } > -
-
-
- -
- - - {total()} nodes}> - {visible()} of {total()} nodes - - -
- - 0} - fallback={ - - - - } - > - + @@ -150,7 +104,7 @@ export const ProxmoxNodesTable: Component<{ - + {(node) => { const name = () => asTrimmedString(node.name) || node.id; const version = () => asTrimmedString(getResourceVersion(node)); @@ -286,9 +240,7 @@ export const ProxmoxNodesTable: Component<{
-
-
-
+
); };