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
Promote TrueNAS native inline details
rcourtman5bc952043eb8
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsxindex 38b4513262..1196accabe 100644--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx@@ -117,6 +117,26 @@ const TrueNASDetailSectionTables: Component<{</div>);+const TrueNASDetailsDisclosure: Component<{+ drawer: UseResourceDetailDrawerStateResult;+ class?: string;+ contentClass?: string;+}> = (props) => (+ <SupportDisclosure+ title="TrueNAS"+ summary={props.drawer.trueNASDetailsSummary()}+ expanded={props.drawer.showTrueNASDetails()}+ onToggle={() => props.drawer.setShowTrueNASDetails((value) => !value)}+ showLabel="Show TrueNAS"+ hideLabel="Hide TrueNAS"+ class={props.class}+ contentClass={props.contentClass ?? 'mt-3 space-y-3'}+ dataTestId="resource-truenas-details-section"+ >+ <TrueNASDetailSectionTables sections={props.drawer.trueNASDetailSections()} />+ </SupportDisclosure>+);+const pbsEvidenceBadgeClass = (tone: string): string => {switch (tone) {case 'danger':@@ -179,9 +199,14 @@ export const ResourceDetailDrawerOverviewTab: Component<ResourceDetailDrawerOverdrawer.sortedActionAudits().length > 0 ||drawer.actionAuditCount() > 0 ||Boolean(drawer.actionAuditError()));+ const shouldPromoteTrueNASDetails = () => compactTableRow() && drawer.hasTrueNASDetails();return (<div class="space-y-3">+ <Show when={shouldPromoteTrueNASDetails()}>+ <TrueNASDetailsDisclosure drawer={drawer} class="space-y-2" contentClass="space-y-2" />+ </Show>+<Showwhen={compactTableRow()}fallback={@@ -493,20 +518,8 @@ export const ResourceDetailDrawerOverviewTab: Component<ResourceDetailDrawerOverdata-testid="resource-support-sections"class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(50%-0.375rem)] [&>*]:min-w-[260px] [&>*]:max-w-full [&>*]:overflow-hidden">- <Show when={drawer.hasTrueNASDetails()}>- <SupportDisclosure- title="TrueNAS"- summary={drawer.trueNASDetailsSummary()}- expanded={drawer.showTrueNASDetails()}- onToggle={() => drawer.setShowTrueNASDetails((value) => !value)}- showLabel="Show TrueNAS"- hideLabel="Hide TrueNAS"- class="h-full"- contentClass="mt-3 space-y-3"- dataTestId="resource-truenas-details-section"- >- <TrueNASDetailSectionTables sections={drawer.trueNASDetailSections()} />- </SupportDisclosure>+ <Show when={drawer.hasTrueNASDetails() && !shouldPromoteTrueNASDetails()}>+ <TrueNASDetailsDisclosure drawer={drawer} class="h-full" /></Show><Show when={drawer.hasAccessContext()}>diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.truenas-details.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.truenas-details.test.tsxindex e4a8ae3560..87ba0d9113 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.truenas-details.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.truenas-details.test.tsx@@ -97,7 +97,12 @@ describe('ResourceDetailDrawer TrueNAS details', () => {));expect(getByRole('button', { name: 'Hide TrueNAS' })).toBeInTheDocument();- const section = within(getByTestId('resource-truenas-details-section'));+ const trueNASSection = getByTestId('resource-truenas-details-section');+ const summary = getByTestId('resource-summary-section');+ expect(+ trueNASSection.compareDocumentPosition(summary) & Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();+ const section = within(trueNASSection);expect(section.getByText('System')).toBeInTheDocument();expect(section.getByText('Storage Health')).toBeInTheDocument();expect(section.getAllByText('Services').length).toBeGreaterThan(1);@@ -234,8 +239,12 @@ describe('ResourceDetailDrawer TrueNAS details', () => {expect(getByTestId('resource-identity-section').tagName).toBe('TBODY');expect(summary.querySelector('[class*="shadow-sm"]')).toBeNull();expect(getByRole('button', { name: 'Hide TrueNAS' })).toBeInTheDocument();- const section = within(getByTestId('resource-truenas-details-section'));- expect(getByTestId('resource-truenas-details-section').querySelector('table')).toBeTruthy();+ const trueNASSection = getByTestId('resource-truenas-details-section');+ expect(+ trueNASSection.compareDocumentPosition(summary) & Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();+ const section = within(trueNASSection);+ expect(trueNASSection.querySelector('table')).toBeTruthy();expect(getByTestId('resource-truenas-details-section').querySelector('[class*="cyan"]'),).toBeNull();