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
Let TrueNAS record drawers open the object they are about
[email protected]3704f006f3c0
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex dc2495e166..f7e5b4a197 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -10048,3 +10048,11 @@ attention card's subject wraps instead of truncating.`features/platformPage/platformDetailTimestampRow.ts` is the one drawer row fora reported timestamp (absolute time and age, wrapping, an optional sentinelyear), replacing three copies.++Platform tables that a page drives from the URL pass the page's search through+`createPlatformTableFilterState`'s `externalSearch`/`onExternalSearchChange`+rather than a table-local signal: the TrueNAS Storage, Apps, VMs, Shares,+Services and Protection tables now do this for `?q=`, as the Kubernetes tables+already did, so `RecordOwnerLink` can land on a narrowed tab whose own search+box shows and clears the filter. `ArtifactSourceBadge` takes the opt-in+`MetadataBadge` `wrap` for drawer use; table rows keep the one-line badge.diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 3eb530f37a..9c049725a9 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -7142,3 +7142,8 @@ Storage tab, and the old disk detail, its local history range catalogue,metric cards, key/value rows and the storage detail presentation classes thatonly it used are removed. Storage group and spacer rows span the table'svisible columns, so pool rows and drawers fill the table on phones.++The Coverage drawer's restore evidence wraps long source labels (snapshot and+archive names) instead of cutting them with an ellipsis: `ArtifactSourceBadge`+takes an opt-in `wrap` that the drawer passes, while table rows keep the label+on one line. Coverage, restore evidence and recovery rules are unchanged.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex be83843243..75c22dcc81 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -8643,3 +8643,16 @@ Proxmox node and Docker host drawers gain the guest drawer's Open action,Docker host readings are withheld while it is offline or stale, its Managelists operator state first and shows its action history, and a guest's ownagent reports its physical disks' temperature alerts inside the guest drawer.++TrueNAS tabs keep their table search in the URL (`TRUENAS_QUERY_PARAMS.query`,+`?q=`), read and written by the Storage, Apps, VMs, Shares, Services and+Protection tables through the shared filter state's external search, so a link+can open a tab already narrowed to one object and the table's own search box+shows and clears it. `buildResourcePagePath` emits that filter for TrueNAS+pools, datasets, disks, apps, VMs and shares (a disk named only by an alert,+with no registry resource, gets none, as on Proxmox), which gives the TrueNAS+alert and protection record drawers the same "Open <name>" owner link as the+other platforms. A TrueNAS system still opens the Overview tab unfiltered,+because its table has no search box, so service drawers keep no owner link.+The Overview alerts table keeps its own search. No resource identity, status+or alert rule changes.diff --git a/frontend-modern/browser-tests/disk-live-refresh.cjs b/frontend-modern/browser-tests/disk-live-refresh.cjsindex 11f7d22373..6a018642ac 100644--- a/frontend-modern/browser-tests/disk-live-refresh.cjs+++ b/frontend-modern/browser-tests/disk-live-refresh.cjs@@ -62,6 +62,9 @@ const { chromium, webkit } = require('playwright'););const fixture = page.getByTestId('disk-live-refresh-fixture');const row = fixture.locator('[data-row-id="disk-one"]');+ // A phone-width health column shows the short verdict+ // (getPhysicalDiskHealthCompactLabel); the full one stays in the DOM, hidden.+ const shownReplaceLabel = scenario.name === 'webkit' ? 'Replace' : 'Replace Now';await row.getByText('Healthy', { exact: true }).waitFor();await row.getByText('Archive SSD', { exact: true }).click();const disclosure = row.getByRole('button', { name: 'Collapse Archive SSD', exact: true });@@ -93,7 +96,7 @@ const { chromium, webkit } = require('playwright');fixture.screenshot({ path: path.join(artifacts, `${scenario.name}-${state}.png`) });await snapshot('fault');- await row.getByText('Replace Now', { exact: true }).waitFor();+ await row.getByText(shownReplaceLabel, { exact: true }).waitFor();for (const text of ['Archive SSD (fault)', '4%', '63°C'])assert.equal(await row.getByText(text, { exact: true }).count(), 1);assert.equal(await row.getByText('Healthy', { exact: true }).count(), 0);@@ -128,7 +131,7 @@ const { chromium, webkit } = require('playwright');await screenshot('recovered');await snapshot('fault');- await row.getByText('Replace Now', { exact: true }).waitFor();+ await row.getByText(shownReplaceLabel, { exact: true }).waitFor();await page.locator('[data-filter="attention"]').evaluate((button) => button.click());assert.equal(await row.getByText('Replace Now', { exact: true }).count(), 1);await snapshot('healthy');diff --git a/frontend-modern/browser-verification/d599fefcc70f28a3.json b/frontend-modern/browser-verification/d599fefcc70f28a3.jsonnew file mode 100644index 0000000000..9fa8c7c085--- /dev/null+++ b/frontend-modern/browser-verification/d599fefcc70f28a3.json@@ -0,0 +1,68 @@+{+ "version": 1,+ "base_sha": "df7a9004bde5c7f470da6851b38488429db2b364",+ "verified_at": "2026-10-22T16:52:27Z",+ "result": "passed",+ "changed_paths": [+ "frontend-modern/src/features/platformNavigation/resourcePagePath.ts",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx",+ "frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx",+ "frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASAppsTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASPageSurface.tsx",+ "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASServicesTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx",+ "frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx",+ "frontend-modern/src/routing/resourceLinks.ts"+ ],+ "content_sha256": {+ "frontend-modern/src/features/platformNavigation/resourcePagePath.ts": "a45d5f3047e6ecfd7b5488b2569e5f836cd0b1a652575d6e9fc2d0a0b19f2a5d",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx": "aa804dab439ced91961393d2bfc3b22cf6c0284511d4fccf8693ac233269d4ec",+ "frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx": "103951c5b8b8ff0aa83f2f80db868b3ead2a57e63cf1a6786919b30b8932da62",+ "frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx": "d6014d3517db0c5834cc94d113d517eea5e2f48fbe2d28e58157417004a09986",+ "frontend-modern/src/features/truenas/TrueNASAppsTable.tsx": "c6774dce5cdb7490dd1eace76fd5ced0827972c47c64640ffb1400db5362f2e2",+ "frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx": "c24436255d6a397cabb88696ba5ca64942f25d294d473bdbdf5bea578da3231d",+ "frontend-modern/src/features/truenas/TrueNASPageSurface.tsx": "0f970cc1519f7040df14e60a7e0bd5f2a39b7628f1711b88b8c3c90168e8ee73",+ "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx": "8a455e47e4e7b84d0fe4822de7d3c0dd0fd9dc63b3569c8583a7b530df780207",+ "frontend-modern/src/features/truenas/TrueNASServicesTable.tsx": "6619780245bb88b9ab4c838516034add894c1c50e75a4ebbab8aff8b0d34aec5",+ "frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx": "28095a70ff866610206aa44a61bdbe4704139c0e90cbc66757db8b1ad542e766",+ "frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx": "c931a28d6612ac748c492b7e5c7f30e482b6ccf55934f75942b9c064715a0100",+ "frontend-modern/src/routing/resourceLinks.ts": "31e328d30d7c67d3c3cda9dd9ea271ed0ff641cd5b6b0c2750b30732ba1314de"+ },+ "routes": [+ "/truenas/overview",+ "/truenas/protection",+ "/truenas/storage?q=sdc",+ "/truenas/storage?q=archive%2Fbackups",+ "/proxmox/backups/coverage"+ ],+ "viewports": [+ {+ "width": 1440,+ "height": 900+ },+ {+ "width": 390,+ "height": 844+ }+ ],+ "states": [+ "Embedded production build of this change on the full mock estate, signed in through the real login",+ "TrueNAS alert drawer for disk sdc shows an \"Open sdc\" header link to /truenas/storage?q=sdc; following it lands on the Storage tab with sdc in the search box and the table narrowed to the disk under its pool",+ "TrueNAS protection drawer for archive/backups links to /truenas/storage?q=archive%2Fbackups and lands narrowed to that dataset",+ "Proxmox Coverage drawer restore evidence (11 rows) has no clipped values; long snapshot source labels wrap",+ "No console or page errors at either width; disk-live-refresh browser proof passes in desktop Chromium and phone WebKit"+ ],+ "interactions": [+ "Disclosure opens the record drawer; clicking the owner link navigates in-app",+ "The Storage tab's search box shows the URL filter and its clear button clears it"+ ],+ "browser": {+ "client": "playwright 1.62.1",+ "engine": "Chromium",+ "version": "chromium-1234 headless"+ },+ "scope": "Full authenticated application on a mock estate; mock data, not live provider connections."+}diff --git a/frontend-modern/src/features/platformNavigation/__tests__/resourcePagePath.test.ts b/frontend-modern/src/features/platformNavigation/__tests__/resourcePagePath.test.tsindex 90ac6ae716..8889b8498a 100644--- a/frontend-modern/src/features/platformNavigation/__tests__/resourcePagePath.test.ts+++ b/frontend-modern/src/features/platformNavigation/__tests__/resourcePagePath.test.ts@@ -55,7 +55,7 @@ describe('buildResourcePagePath', () => {type: 'truenas-dataset',resource: resource({ id: 'storage-23a2', type: 'storage', sources: ['truenas'] }),}),- ).toBe('/truenas/storage');+ ).toBe('/truenas/storage?q=res-1');});it('filters a physical disk by the registry name and a machine by its own name', () => {@@ -108,7 +108,14 @@ describe('buildResourcePagePath', () => {'/kubernetes/workloads?q=api-7f',);expect(buildResourcePagePath({ id: 'ds-1', type: 'truenas-dataset' })).toBe('/truenas/storage');+ // TrueNAS tabs filter to a named pool, dataset, app, VM or share.+ expect(buildResourcePagePath({ id: 'ds-1', name: 'tank/apps', type: 'truenas-dataset' })).toBe(+ '/truenas/storage?q=tank%2Fapps',+ );// A disk name from an alert is not known to match the disk table.+ expect(buildResourcePagePath({ id: 'sdc', name: 'sdc', type: 'truenas-disk' })).toBe(+ '/truenas/storage',+ );expect(buildResourcePagePath({id: 'pve5:disk:nvme0',@@ -126,7 +133,7 @@ describe('buildResourcePagePath', () => {id: 'app-1',resource: resource({ id: 'app-1', type: 'app-container', sources: ['truenas'] }),}),- ).toBe('/truenas/apps');+ ).toBe('/truenas/apps?q=res-1');expect(buildResourcePagePath({id: 'disk-1',@@ -137,7 +144,7 @@ describe('buildResourcePagePath', () => {sources: ['truenas'],}),}),- ).toBe('/truenas/storage');+ ).toBe('/truenas/storage?q=res-1');});it('opens the Docker or Kubernetes tab that lists the resource kind', () => {@@ -205,7 +212,7 @@ describe('buildResourcePagePath', () => {sources: ['truenas'],}),}),- ).toBe('/truenas/shares');+ ).toBe('/truenas/shares?q=res-1');});it('opens the storage a ZFS pool or device record belongs to', () => {expect(diff --git a/frontend-modern/src/features/platformNavigation/resourcePagePath.ts b/frontend-modern/src/features/platformNavigation/resourcePagePath.tsindex 1416e95d17..d8c6a32cb8 100644--- a/frontend-modern/src/features/platformNavigation/resourcePagePath.ts+++ b/frontend-modern/src/features/platformNavigation/resourcePagePath.ts@@ -12,6 +12,7 @@ import {DOCKER_QUERY_PARAMS,KUBERNETES_QUERY_PARAMS,STANDALONE_QUERY_PARAMS,+ TRUENAS_QUERY_PARAMS,type AlertThresholdsTab,} from '@/routing/resourceLinks';import { getPreferredInfrastructureDisplayName } from '@/utils/resourceIdentity';@@ -218,8 +219,9 @@ export function buildResourceThresholdsPath(subject: ResourcePageSubject): strin/*** The page that shows a resource, selecting or filtering to it where that* page can: `?resource=` on workload and Proxmox storage tables (resolved- * through the registry), a name filter on Docker containers, Kubernetes and- * Machines, and the owning tab elsewhere. Returns null when nothing names a+ * through the registry), a name filter on Docker containers, Kubernetes,+ * TrueNAS storage, apps, VMs and shares, and Machines, and the owning tab+ * elsewhere. Returns null when nothing names a* platform.*/export function buildResourcePagePath(subject: ResourcePageSubject): string | null {@@ -264,10 +266,20 @@ export function buildResourcePagePath(subject: ResourcePageSubject): string | nuif (isNetwork) return buildVmwarePath('networks');return buildVmwarePath();case 'truenas':- if (isStorage || isDisk) return buildTrueNASPath('storage');- if (type === 'app-container') return buildTrueNASPath('apps');- if (isGuest) return buildTrueNASPath('vms');- if (type === 'network-share') return buildTrueNASPath('shares');+ // Each tab's table reads the name filter; the systems table on Overview+ // has no search box, so a system opens the tab unfiltered. As on+ // Proxmox, a disk name from an alert alone is not known to match a row.+ if (isStorage || isDisk)+ return withQuery(+ buildTrueNASPath('storage'),+ TRUENAS_QUERY_PARAMS.query,+ isDisk && !resource ? undefined : name,+ );+ if (type === 'app-container')+ return withQuery(buildTrueNASPath('apps'), TRUENAS_QUERY_PARAMS.query, name);+ if (isGuest) return withQuery(buildTrueNASPath('vms'), TRUENAS_QUERY_PARAMS.query, name);+ if (type === 'network-share')+ return withQuery(buildTrueNASPath('shares'), TRUENAS_QUERY_PARAMS.query, name);return buildTrueNASPath();case 'docker': {const tab = DOCKER_TAB_BY_TYPE[type];diff --git a/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsx b/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsxindex 7562e5819e..db02c876d5 100644--- a/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsx+++ b/frontend-modern/src/features/platformPage/__tests__/RecordOwnerLink.test.tsx@@ -26,12 +26,15 @@ describe('buildRecordOwnerPath', () => {expect(buildRecordOwnerPath({ id: 'ctr-1', name: 'redis', type: 'app-container' })).toBe('/docker/overview?q=redis',);+ expect(buildRecordOwnerPath({ id: 'ds-1', name: 'tank/apps', type: 'truenas-dataset' })).toBe(+ '/truenas/storage?q=tank%2Fapps',+ );});it('omits the link where the owning page can only show a whole tab', () => {- expect(buildRecordOwnerPath({ id: 'ds-1', name: 'tank/apps', type: 'truenas-dataset' })).toBe(- null,- );+ expect(+ buildRecordOwnerPath({ id: 'nas-1', name: 'truenas-main', type: 'truenas-system' }),+ ).toBe(null);expect(buildRecordOwnerPath({ id: 'host-1', name: 'esxi-01', type: 'vmware-host' })).toBe(null);expect(buildRecordOwnerPath({ id: 'img-1', name: 'nginx', type: 'docker-image' })).toBe(null);expect(buildRecordOwnerPath({ id: 'pbs-1', name: 'pbs', type: 'pbs' })).toBe(null);@@ -66,7 +69,7 @@ describe('RecordOwnerLink', () => {<Routepath="/*"component={() => (- <RecordOwnerLink subject={{ id: 'ds-1', name: 'tank', type: 'truenas-dataset' }} />+ <RecordOwnerLink subject={{ id: 'host-1', name: 'esxi-01', type: 'vmware-host' }} />)}/></Router>diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsxindex d424a93ae2..8a0fca1ab6 100644--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx@@ -617,7 +617,7 @@ export function ProxmoxCoverageTable(props: {<TableCellclass={getPlatformTableCellClassForKind('name')}>- <ArtifactSourceBadge artifact={artifact} />+ <ArtifactSourceBadge artifact={artifact} wrap /></TableCell><Showwhen={isCoverageEvidenceColumnVisible(diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsxindex a8b8d1804b..b3e72cb59e 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx@@ -224,6 +224,10 @@ describe('ProxmoxCoverageTable column visibility', () => {const location = panel.querySelector('[data-coverage-evidence-location]');expect(location).toHaveClass('wrap-anywhere');expect(location).not.toHaveClass('truncate');+ // The source label wraps in the drawer too; a long snapshot name is not cut.+ expect(within(panel).getByText('PBS', { selector: 'td span' })).toHaveClass(+ 'whitespace-normal',+ );expect(panel.querySelector('.grid')).toBeNull();expect(within(panel).getByText('Provider evidence', { selector: 'th' })).toBeInTheDocument();diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx b/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsxindex 099548660f..0d3c5b49d6 100644--- a/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx+++ b/frontend-modern/src/features/proxmox/proxmoxBackupsTableShared.tsx@@ -326,7 +326,9 @@ export function ArtifactStateBadge(props: { artifact: RecoverableArtifact; label);}-export function ArtifactSourceBadge(props: { artifact: RecoverableArtifact }) {+// Table rows keep the label on one line; a drawer passes `wrap` so a long+// snapshot or archive name stays readable on a phone, which cannot hover.+export function ArtifactSourceBadge(props: { artifact: RecoverableArtifact; wrap?: boolean }) {const presentation = () => getProxmoxBackupSourcePresentation(props.artifact.sourceKind);const title = () => props.artifact.sourceTitle ?? presentation().sourceTitle;@@ -335,6 +337,7 @@ export function ArtifactSourceBadge(props: { artifact: RecoverableArtifact }) {{...PROXMOX_BACKUP_METADATA_BADGE_PROPS}tone={presentation().badgeTone}title={title()}+ wrap={props.wrap}>{props.artifact.sourceLabel}</MetadataBadge>diff --git a/frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx b/frontend-modern/src/features/truenas/TrueNASAlertsTable.tsxindex 6ac44f9d2c..5f2b304fe7 100644--- a/frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASAlertsTable.tsx@@ -45,6 +45,7 @@ import {getAlertSeverityDetailTone,getAlertSeverityIndicator,} from '@/utils/alertSeverityPresentation';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';const TRUENAS_INCIDENT_STATUS_OPTIONS =getPlatformAlertSeverityFilterOptions<TrueNASIncidentSeverityFilter>();@@ -101,6 +102,16 @@ const AlertDetailTable: Component<{ incident: TrueNASIncidentRow; onClose: () =>title={props.incident.resourceName || formatPlatformAlertCode(props.incident.code, 'truenas')}status={getAlertSeverityIndicator(props.incident.severity, props.incident.severityBucket)}summary={props.incident.summary || props.incident.label}+ actions={+ <RecordOwnerLink+ subject={{+ id: props.incident.resourceId,+ name: props.incident.resourceName,+ type: props.incident.resourceType,+ resource: props.incident.resource,+ }}+ />+ }sections={buildAlertDetailSections(props.incident)}detailAttributes={{ 'data-truenas-alert-detail-for': props.incident.id }}onClose={props.onClose}diff --git a/frontend-modern/src/features/truenas/TrueNASAppsTable.tsx b/frontend-modern/src/features/truenas/TrueNASAppsTable.tsxindex 5f033b0109..5786900cc0 100644--- a/frontend-modern/src/features/truenas/TrueNASAppsTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASAppsTable.tsx@@ -187,12 +187,17 @@ export const TrueNASAppsTable: Component<{emptyTitle: string;emptyDescription: string;showToolbar?: boolean;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {const alertsActivation = useAlertsActivation();const tableState = createPlatformTableFilterState({resources: () => props.apps,initialStatus: 'all' as TrueNASAppStatusFilter,filter: filterTrueNASApps,+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const drawer = createPlatformResourceDetailState({ idPrefix: 'truenas-app-drawer' });const resolveResourceLabel = createPlatformResourceLabelResolver(() => props.scope);diff --git a/frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx b/frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsxindex 7635b2835c..3ca7c75cfe 100644--- a/frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASNetworkSharesTable.tsx@@ -129,11 +129,16 @@ export const TrueNASNetworkSharesTable: Component<{emptyTitle: string;emptyDescription: string;showToolbar?: boolean;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.shares,initialStatus: 'all' as TrueNASShareStatusFilter,filter: filterTrueNASShares,+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const drawer = createPlatformResourceDetailState({ idPrefix: 'truenas-share-drawer' });const resolveResourceLabel = createPlatformResourceLabelResolver(() => props.scope);diff --git a/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx b/frontend-modern/src/features/truenas/TrueNASPageSurface.tsxindex 60fd759874..684c5521d3 100644--- a/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx+++ b/frontend-modern/src/features/truenas/TrueNASPageSurface.tsx@@ -8,6 +8,7 @@ import {formatAgentVersionDisplay,} from '@/features/platformPage/agentVersion';import { useRecoveryPoints } from '@/hooks/useRecoveryPoints';+import { TRUENAS_QUERY_PARAMS } from '@/routing/resourceLinks';import { useUnifiedResources, type UnifiedResourceFacets } from '@/hooks/useUnifiedResources';import { updateStore } from '@/stores/updates';import type { Resource } from '@/types/resource';@@ -140,6 +141,15 @@ export function TrueNASPageSurface() {};const setStorageKindFilter = (value: TrueNASStorageKindFilter) =>setSearchParams({ kind: value === 'all' ? null : value }, { replace: true });+ // Each tab's table search lives in the URL, so a link from a drawer or an+ // alert can open a tab already narrowed to one pool, app, VM or share.+ const search = () => {+ const value = searchParams[TRUENAS_QUERY_PARAMS.query];+ return typeof value === 'string' ? value : '';+ };+ const setSearch = (value: string) =>+ setSearchParams({ [TRUENAS_QUERY_PARAMS.query]: value || null }, { replace: true });+ const tableSearch = { search, onSearchChange: setSearch };const agentUpdateTargetVersion = createMemo(() => updateStore.versionInfo()?.agentUpdateTargetVersion,);@@ -202,24 +212,25 @@ export function TrueNASPageSurface() {<Show when={activeTab() === 'storage'}><TrueNASStoragemodel={model}+ {...tableSearch}kindFilter={storageKindFilter()}onKindFilterChange={setStorageKindFilter}/></Show><Show when={activeTab() === 'services'}>- <TrueNASServices model={model} />+ <TrueNASServices model={model} {...tableSearch} /></Show><Show when={activeTab() === 'apps'}>- <TrueNASApps model={model} />+ <TrueNASApps model={model} {...tableSearch} /></Show><Show when={activeTab() === 'vms'}>- <TrueNASVMs model={model} />+ <TrueNASVMs model={model} {...tableSearch} /></Show><Show when={activeTab() === 'shares'}>- <TrueNASShares model={model} />+ <TrueNASShares model={model} {...tableSearch} /></Show><Show when={activeTab() === 'protection'}>- <TrueNASProtection recoveryPoints={protection} />+ <TrueNASProtection recoveryPoints={protection} {...tableSearch} /></Show></Show></Show>@@ -232,7 +243,14 @@ interface TrueNASOverviewProps {model: Accessor<TrueNASPageModel>;}-interface TrueNASStorageProps extends TrueNASOverviewProps {+interface TrueNASTableSearchProps {+ search?: () => string;+ onSearchChange?: (value: string) => void;+}++type TrueNASTabProps = TrueNASOverviewProps & TrueNASTableSearchProps;++interface TrueNASStorageProps extends TrueNASTabProps {kindFilter: TrueNASStorageKindFilter;onKindFilterChange: (value: TrueNASStorageKindFilter) => void;}@@ -240,6 +258,8 @@ interface TrueNASStorageProps extends TrueNASOverviewProps {function TrueNASStorage(props: TrueNASStorageProps) {return (<TrueNASStorageTopologyTable+ search={props.search}+ onSearchChange={props.onSearchChange}resources={props.model().resources}scope={props.model().resources}emptyIcon={truenasIcon()}@@ -251,9 +271,11 @@ function TrueNASStorage(props: TrueNASStorageProps) {);}-function TrueNASApps(props: TrueNASOverviewProps) {+function TrueNASApps(props: TrueNASTabProps) {return (<TrueNASAppsTable+ search={props.search}+ onSearchChange={props.onSearchChange}apps={props.model().apps}scope={props.model().resources}emptyIcon={truenasIcon()}@@ -263,9 +285,11 @@ function TrueNASApps(props: TrueNASOverviewProps) {);}-function TrueNASServices(props: TrueNASOverviewProps) {+function TrueNASServices(props: TrueNASTabProps) {return (<TrueNASServicesTable+ search={props.search}+ onSearchChange={props.onSearchChange}services={props.model().services}emptyIcon={truenasIcon()}emptyTitle="No TrueNAS services"@@ -274,9 +298,11 @@ function TrueNASServices(props: TrueNASOverviewProps) {);}-function TrueNASVMs(props: TrueNASOverviewProps) {+function TrueNASVMs(props: TrueNASTabProps) {return (<TrueNASVirtualMachinesTable+ search={props.search}+ onSearchChange={props.onSearchChange}vms={props.model().vms}scope={props.model().resources}emptyIcon={truenasIcon()}@@ -286,9 +312,11 @@ function TrueNASVMs(props: TrueNASOverviewProps) {);}-function TrueNASShares(props: TrueNASOverviewProps) {+function TrueNASShares(props: TrueNASTabProps) {return (<TrueNASNetworkSharesTable+ search={props.search}+ onSearchChange={props.onSearchChange}shares={props.model().shares}scope={props.model().resources}emptyIcon={truenasIcon()}@@ -298,9 +326,13 @@ function TrueNASShares(props: TrueNASOverviewProps) {);}-function TrueNASProtection(props: { recoveryPoints: ReturnType<typeof useRecoveryPoints> }) {+function TrueNASProtection(+ props: { recoveryPoints: ReturnType<typeof useRecoveryPoints> } & TrueNASTableSearchProps,+) {return (<TrueNASProtectionTable+ search={props.search}+ onSearchChange={props.onSearchChange}points={props.recoveryPoints.points()}loading={props.recoveryPoints.response.loading}error={props.recoveryPoints.response.error}diff --git a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsxindex 334951d78e..3963696b2c 100644--- a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx@@ -52,6 +52,7 @@ import {type DetailSection,type DetailValueTone,} from '@/components/shared/DetailSectionTable';+import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';const TRUENAS_PROTECTION_STATUS_OPTIONS: PlatformTableFilterOption<TrueNASProtectionStatusFilter>[] =[@@ -340,6 +341,15 @@ const ProtectionDetailTable: Component<{ point: RecoveryPoint; onClose: () => volabel: getRecoveryOutcomeLabel(normalizeRecoveryOutcome(props.point.outcome)),}}summary={`${kindLabel(mapTrueNASProtectionKind(props.point))} on ${hostLabel(props.point)}`}+ actions={+ <RecordOwnerLink+ subject={{+ id: asTrimmedString(props.point.itemRef?.id) || datasetLabel(props.point),+ name: datasetLabel(props.point),+ type: 'truenas-dataset',+ }}+ />+ }sections={buildProtectionDetailSections(props.point)}detailAttributes={{ 'data-truenas-protection-detail-for': props.point.id }}onClose={props.onClose}@@ -355,6 +365,9 @@ export const TrueNASProtectionTable: Component<{emptyTitle: string;emptyDescription: string;showToolbar?: boolean;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {const rows = createMemo(() => sortTrueNASProtectionPoints(props.points));const posture = createMemo(() => buildTrueNASProtectionPosture(rows()));@@ -363,6 +376,8 @@ export const TrueNASProtectionTable: Component<{resources: rows,initialStatus: 'all' as TrueNASProtectionStatusFilter,filter: filterTrueNASProtectionPoints,+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const statusOptions = createMemo(() =>withPlatformStatusCounts(TRUENAS_PROTECTION_STATUS_OPTIONS, tableState.countForStatus, {diff --git a/frontend-modern/src/features/truenas/TrueNASServicesTable.tsx b/frontend-modern/src/features/truenas/TrueNASServicesTable.tsxindex 32b34eaf5f..44ca0925aa 100644--- a/frontend-modern/src/features/truenas/TrueNASServicesTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASServicesTable.tsx@@ -224,11 +224,16 @@ export const TrueNASServicesTable: Component<{emptyTitle: string;emptyDescription: string;showToolbar?: boolean;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.services,initialStatus: 'all' as TrueNASServiceStatusFilter,filter: filterTrueNASServices,+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const detail = createPlatformResourceDetailState({ idPrefix: 'truenas-service-detail' });const sort = createPlatformTableSortState({diff --git a/frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx b/frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsxindex 3d9e649601..6979745a3d 100644--- a/frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx@@ -390,6 +390,9 @@ export const TrueNASStorageTopologyTable: Component<{showToolbar?: boolean;kindFilter?: TrueNASStorageKindFilter;onKindFilterChange?: (value: TrueNASStorageKindFilter) => void;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {// Disk heat follows the thresholds each disk's temperature alert fires at:// its own override, the TrueNAS-wide value, then its type's policy.@@ -412,6 +415,8 @@ export const TrueNASStorageTopologyTable: Component<{initialStatus: 'all' as TrueNASStorageStatusFilter,filter: (rows, search, status) =>filterTrueNASStorageTopologyRows(rows, search, status, getTrueNASDiskTemperatureThresholds),+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const kindFilters = createMemo<FilterDef[]>(() => [{diff --git a/frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx b/frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsxindex 35372a1eff..6a8eec382f 100644--- a/frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx@@ -157,11 +157,16 @@ export const TrueNASVirtualMachinesTable: Component<{emptyTitle: string;emptyDescription: string;showToolbar?: boolean;+ /** The page's URL search, when it owns one; the table then reads and writes it. */+ search?: () => string;+ onSearchChange?: (value: string) => void;}> = (props) => {const tableState = createPlatformTableFilterState({resources: () => props.vms,initialStatus: 'all' as TrueNASVMStatusFilter,filter: filterTrueNASVMs,+ externalSearch: props.search,+ onExternalSearchChange: props.onSearchChange,});const drawer = createPlatformResourceDetailState({ idPrefix: 'truenas-vm-drawer' });const resolveResourceLabel = createPlatformResourceLabelResolver(() => props.scope);diff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASAlertsTable.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASAlertsTable.test.tsxindex 38b74342de..1344d810a7 100644--- a/frontend-modern/src/features/truenas/__tests__/TrueNASAlertsTable.test.tsx+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASAlertsTable.test.tsx@@ -1,11 +1,20 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';-import { createSignal } from 'solid-js';+import { Route, Router } from '@solidjs/router';+import { createSignal, type JSX } from 'solid-js';import { afterEach, describe, expect, it } from 'vitest';import { TrueNASAlertsTable } from '@/features/truenas/TrueNASAlertsTable';import { buildTrueNASIncidentRows } from '@/features/truenas/truenasPageModel';import type { Resource } from '@/types/resource';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeDisk = (overrides: Partial<Resource> = {}): Resource =>({id: 'disk-sdc',@@ -45,7 +54,7 @@ describe('TrueNASAlertsTable', () => {it('refreshes an expanded incident through critical escalation and recovery', async () => {const disk = makeDisk();const [resources, setResources] = createSignal([disk]);- render(() => (+ renderInRouter(() => (<TrueNASAlertsTableincidents={buildTrueNASIncidentRows(resources())}scope={resources()}@@ -100,7 +109,7 @@ describe('TrueNASAlertsTable', () => {],});const [resources, setResources] = createSignal([disk, otherDisk]);- render(() => (+ renderInRouter(() => (<TrueNASAlertsTableincidents={buildTrueNASIncidentRows(resources())}scope={resources()}@@ -132,7 +141,7 @@ describe('TrueNASAlertsTable', () => {const disk = makeDisk();const incidents = buildTrueNASIncidentRows([disk]);- render(() => (+ renderInRouter(() => (<TrueNASAlertsTableincidents={incidents}scope={[disk]}@@ -158,6 +167,11 @@ describe('TrueNASAlertsTable', () => {expect(screen.queryByTestId('resource-detail-drawer')).not.toBeInTheDocument();const detail = within(screen.getByTestId('truenas-alert-detail'));expect(detail.getByRole('heading', { level: 2 })).toHaveTextContent('sdc');+ // The drawer opens the Storage tab narrowed to the disk the alert is about.+ expect(detail.getByRole('link', { name: /^Open / })).toHaveAttribute(+ 'href',+ expect.stringMatching(/^\/truenas\/storage\?q=/),+ );expect(detail.getByText('Alert')).toBeInTheDocument();expect(detail.getByText('Source')).toBeInTheDocument();expect(detail.getByText('Affected resource')).toBeInTheDocument();diff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASPageSurface.contract.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASPageSurface.contract.test.tsxindex 76ba104b4a..b17164c35f 100644--- a/frontend-modern/src/features/truenas/__tests__/TrueNASPageSurface.contract.test.tsx+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASPageSurface.contract.test.tsx@@ -106,15 +106,21 @@ vi.mock('../TrueNASStorageTopologyTable', () => ({resources: Resource[];kindFilter: string;onKindFilterChange: (value: string) => void;+ search?: () => string;+ onSearchChange?: (value: string) => void;}) => (<divdata-testid="storage-table"data-rows={props.resources.length}data-kind-filter={props.kindFilter}+ data-search={props.search?.() ?? ''}><button type="button" onClick={() => props.onKindFilterChange('disks')}>Show physical disks</button>+ <button type="button" onClick={() => props.onSearchChange?.('')}>+ Clear search+ </button></div>),}));@@ -247,4 +253,24 @@ describe('TrueNASPageSurface contract', () => {screen.getByRole('button', { name: 'Show physical disks' }).click();expect(mockSetSearchParams).toHaveBeenCalledWith({ kind: 'disks' }, { replace: true });});++ // A drawer's "Open <name>" link lands on a tab already narrowed to the+ // pool or dataset it names; the table's own search box shows and clears it.+ it('round-trips the tab table search through the route query', () => {+ mockPathname.mockReturnValue('/truenas/storage');+ mockSearchParams.value = { q: 'tank/apps' };+ setResources([+ makeResource({+ id: 'pool:tank',+ type: 'storage',+ storage: { topology: 'pool', platform: 'truenas' },+ }),+ ]);++ render(() => <TrueNASPageSurface />);++ expect(screen.getByTestId('storage-table')).toHaveAttribute('data-search', 'tank/apps');+ screen.getByRole('button', { name: 'Clear search' }).click();+ expect(mockSetSearchParams).toHaveBeenCalledWith({ q: null }, { replace: true });+ });});diff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsxindex b2b6419e55..7951c7c798 100644--- a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx@@ -1,9 +1,19 @@import { cleanup, fireEvent, render, screen, within } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';+import type { JSX } from 'solid-js';import { afterEach, describe, expect, it } from 'vitest';import { TrueNASProtectionTable } from '@/features/truenas/TrueNASProtectionTable';import type { RecoveryPoint } from '@/types/recovery';+// Record drawers link to the object they are about, which needs a router.+const renderInRouter = (component: () => JSX.Element) =>+ render(() => (+ <Router>+ <Route path="/*" component={component} />+ </Router>+ ));+const makeRecoveryPoint = (point: Partial<RecoveryPoint> & Pick<RecoveryPoint, 'id' | 'kind' | 'mode'>,): RecoveryPoint => ({@@ -20,7 +30,7 @@ afterEach(() => {describe('TrueNASProtectionTable', () => {it('keeps the issue count in the filters and filters directly to attention outcomes', async () => {- render(() => (+ renderInRouter(() => (<TrueNASProtectionTablepoints={[makeRecoveryPoint({ id: 'healthy', kind: 'snapshot', mode: 'snapshot' }),@@ -90,7 +100,7 @@ describe('TrueNASProtectionTable', () => {},});- render(() => (+ renderInRouter(() => (<TrueNASProtectionTablepoints={[replication]}emptyIcon={<span />}diff --git a/frontend-modern/src/routing/resourceLinks.ts b/frontend-modern/src/routing/resourceLinks.tsindex 420b72c469..854b0e27dc 100644--- a/frontend-modern/src/routing/resourceLinks.ts+++ b/frontend-modern/src/routing/resourceLinks.ts@@ -44,6 +44,12 @@ export const KUBERNETES_PATH = '/kubernetes';export const KUBERNETES_DEFAULT_TAB = 'overview';export const TRUENAS_PATH = '/truenas';export const TRUENAS_DEFAULT_TAB = 'overview';+// The storage tab's kind filter, and the search each tab's table reads, so a+// link can open a tab already narrowed to one pool, app, VM or share.+export const TRUENAS_QUERY_PARAMS = {+ kind: 'kind',+ query: 'q',+} as const;export const VMWARE_PATH = '/vmware';export const VMWARE_DEFAULT_TAB = 'overview';export const ALERT_THRESHOLDS_PATH = '/alerts/thresholds';