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
Align TrueNAS page with Proxmox/Docker layout
rcourtman97067b644778
diff --git a/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx b/frontend-modern/src/features/truenas/TrueNASPageSurface.tsxindex faf8e602e2..24ad1ac735 100644--- a/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx+++ b/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx@@ -128,27 +128,6 @@ export function TrueNASPageSurface() {forcedSourceFilter={TRUENAS_PLATFORM_FILTER}/></Show>- <Show when={activeTab() === 'disks'}>- <TrueNASDisksTable- resources={model().disks}- emptyIcon={truenasIcon()}- emptyTitle="No TrueNAS disks reported"- emptyDescription="Physical disks appear here once a TrueNAS connection enumerates them."- />- </Show>- <Show when={activeTab() === 'apps'}>- <WorkloadsSurface- vms={[]}- containers={[]}- nodes={[]}- useWorkloads- embedded- tableOnly- showFilterToolbar- suppressPlatformFilter- forcedPlatform={TRUENAS_PLATFORM_FILTER}- />- </Show></Show></Show></Show>diff --git a/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx b/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsxindex 8f95e2969c..34a6d735f1 100644--- a/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASSystemsTable.tsx@@ -1,7 +1,9 @@import { For, Show, createMemo, type Component, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';+import { ResponsiveMetricCell } from '@/components/shared/responsive';import { TableCard } from '@/components/shared/TableCard';import { TableCardHeader } from '@/components/shared/TableCardHeader';+import { StackedMemoryBar } from '@/components/Workloads/StackedMemoryBar';import {Table,TableBody,@@ -12,6 +14,7 @@ import {} from '@/components/shared/Table';import { getSimpleStatusIndicator } from '@/utils/status';import { asTrimmedString } from '@/utils/stringUtils';+import { buildMetricKeyForUnifiedResource } from '@/utils/metricsKeys';import {PLATFORM_TABLE_BODY_CLASS,PLATFORM_TABLE_CARD_CLASS,@@ -70,6 +73,17 @@ const formatTemperature = (celsius: number | undefined): JSX.Element => {return <span class="tabular-nums">{celsius.toFixed(1)}°C</span>;};+const finiteMetric = (value: number | undefined): number | undefined =>+ typeof value === 'number' && Number.isFinite(value) ? value : undefined;++const metricFallback = () => (+ <div class="flex justify-center">+ <span class="text-xs text-muted" aria-hidden="true">+ —+ </span>+ </div>+);+export const TrueNASSystemsTable: Component<{systems: Resource[];// Full TrueNAS resource scope so we can count pools / datasets / apps@@ -194,6 +208,15 @@ export const TrueNASSystemsTable: Component<{? `${formatBytes(system.disk.used)} / ${formatBytes(system.disk.total)}`: formatPercent(storagePercent());const c = counts();+ const metricsKey = () => buildMetricKeyForUnifiedResource(system);+ const cpuPercent = () => finiteMetric(system.cpu?.current);+ const memoryTotal = () => finiteMetric(system.memory?.total) ?? 0;+ const memoryUsed = () => finiteMetric(system.memory?.used) ?? 0;+ const memoryPercentOnly = () =>+ memoryTotal() > 0 ? undefined : finiteMetric(system.memory?.current);+ const hasMemoryMetric = () =>+ memoryTotal() > 0 || memoryPercentOnly() !== undefined;+ const canRenderMetrics = () => indicator().variant !== 'muted';return (<TableRow class="text-[11px] sm:text-xs"><TableCell class={getPlatformTableCellClass()}>@@ -220,14 +243,30 @@ export const TrueNASSystemsTable: Component<{{formatUptime(system.uptime)}</TableCell><TableCell- class={`${getPlatformTableCellClass('right')} text-base-content`}+ class={`${getPlatformTableCellClass('right')} w-[20%] md:w-auto`}>- {formatPercent(system.cpu?.current)}+ <ResponsiveMetricCell+ class="w-full"+ value={cpuPercent() ?? 0}+ type="cpu"+ resourceId={metricsKey()}+ isRunning={canRenderMetrics() && cpuPercent() !== undefined}+ showMobile={false}+ /></TableCell><TableCell- class={`${getPlatformTableCellClass('right')} text-base-content`}+ class={`${getPlatformTableCellClass('right')} w-[20%] md:w-auto`}>- {formatPercent(system.memory?.current)}+ <Show+ when={canRenderMetrics() && hasMemoryMetric()}+ fallback={metricFallback()}+ >+ <StackedMemoryBar+ used={memoryUsed()}+ total={memoryTotal()}+ percentOnly={memoryPercentOnly()}+ />+ </Show></TableCell><TableCellclass={`${getPlatformTableCellClass('right')} text-base-content`}diff --git a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.tsindex 28a4ce3ef6..c11edbd406 100644--- a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts+++ b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts@@ -14,13 +14,8 @@ const makeResource = (resource: Partial<Resource> & Pick<Resource, 'id' | 'type'});describe('truenasPageModel', () => {- it('declares the TrueNAS section set with Systems, Storage, Disks, and Apps', () => {- expect(TRUENAS_TAB_SPECS.map((tab) => tab.id)).toEqual([- 'overview',- 'storage',- 'disks',- 'apps',- ]);+ it('declares the TrueNAS section set as Overview + Storage', () => {+ expect(TRUENAS_TAB_SPECS.map((tab) => tab.id)).toEqual(['overview', 'storage']);});it('buckets systems, disks, apps, storage while ignoring non-TrueNAS resources', () => {diff --git a/frontend-modern/src/features/truenas/truenasPageModel.ts b/frontend-modern/src/features/truenas/truenasPageModel.tsindex e75ac64c21..b865456d3c 100644--- a/frontend-modern/src/features/truenas/truenasPageModel.ts+++ b/frontend-modern/src/features/truenas/truenasPageModel.ts@@ -1,7 +1,7 @@import { resolveResourcePlatformType } from '@/utils/sourcePlatforms';import type { Resource, ResourceType } from '@/types/resource';-export type TrueNASPageTabId = 'overview' | 'storage' | 'disks' | 'apps';+export type TrueNASPageTabId = 'overview' | 'storage';export type TrueNASTabSpec = {id: TrueNASPageTabId;@@ -9,11 +9,15 @@ export type TrueNASTabSpec = {path: string;};+// The Overview tab mirrors Proxmox / vSphere: systems table on top with the+// pools-only StorageSurface, physical disks, and apps stacked beneath. The+// standalone Disks and Apps tabs that used to live here were pure+// duplicates — the Workloads filter inside Overview owns app+// search/grouping, and the Storage tab provides the full StorageSurface+// (pools + disks toggle, with toolbar) for richer storage exploration.export const TRUENAS_TAB_SPECS: readonly TrueNASTabSpec[] = [- { id: 'overview', label: 'Systems', path: '/truenas/overview' },+ { id: 'overview', label: 'Overview', path: '/truenas/overview' },{ id: 'storage', label: 'Storage', path: '/truenas/storage' },- { id: 'disks', label: 'Disks', path: '/truenas/disks' },- { id: 'apps', label: 'Apps', path: '/truenas/apps' },] as const;const TRUENAS_RESOURCE_TYPES = new Set<ResourceType>([diff --git a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts b/frontend-modern/src/routing/__tests__/resourceLinks.test.tsindex dc9e0d3eb8..9c6f0ce7e0 100644--- a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts+++ b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts@@ -54,7 +54,7 @@ describe('resource link routing contract', () => {expect(TRUENAS_PATH).toBe('/truenas');expect(buildTrueNASPath()).toBe('/truenas/overview');- expect(buildTrueNASPath('apps')).toBe('/truenas/apps');+ expect(buildTrueNASPath('storage')).toBe('/truenas/storage');expect(VMWARE_PATH).toBe('/vmware');expect(buildVmwarePath()).toBe('/vmware/overview');