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
Move reporting guidance into catalog
rcourtman78ba7dcc2a45
diff --git a/docs/API.md b/docs/API.mdindex 09236d54dc..7a2fe09208 100644--- a/docs/API.md+++ b/docs/API.md@@ -403,7 +403,7 @@ Triggers a test alert to all configured channels.### Advanced Reporting (Pro)- `GET /api/admin/reports/catalog` (admin, `settings:read`)- - Returns the canonical reporting catalog for the settings surface, including locked-state teaser copy, performance-report options, and the nested VM inventory export definition.+ - Returns the canonical reporting catalog for the settings surface, including locked-state teaser copy, enabled-surface guidance copy, performance-report options, and the nested VM inventory export definition.- Metadata route: readable without the `advanced_reporting` feature so locked admin surfaces can render the same reporting definition before upsell.- `GET /api/admin/reports/generate` (admin, `settings:read`)- Query params: `format` (pdf/csv, default `pdf`), `resourceType`, `resourceId`, `metricType` (optional), `start`/`end` (RFC3339, optional; defaults to last 24h), `title` (optional)diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 1d59071803..d6eacb7a21 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -228,8 +228,9 @@ first-class surface separate from historical metrics reports.own `/api/admin/reports/catalog` as the canonical operator-facing reportingcatalog plus `/api/admin/reports/inventory/vms/export` as the stable VMinventory sub-contract. The catalog endpoint owns the reporting panel title,-description, locked-shell teaser copy, historical performance report options,-and nested VM inventory definition, while the export endpoint remains the+description, locked-shell teaser copy, enabled-shell guidance copy,+historical performance report options, and nested VM inventory definition,+while the export endpoint remains thespreadsheet-shaped CSV transport. Thatexport is intentionally not comment-prefixed like the legacy metrics CSV, andit now carries Proxmox pool membership from the canonical unified VM runtimediff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 47522054b7..304b77b4bc 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -206,6 +206,11 @@ That same catalog-owned contract also includes the locked teaser copy itself:`ReportingPanel.tsx` may style or place the paywall content, but the lockedtitle and description must come from the parsed reporting catalog instead ofhardcoded component strings.+That same reporting catalog also owns the enabled-shell guidance callout that+explains when to use performance reports versus VM inventory export.+`ReportingPanel.tsx` may choose the presentation primitive, but the callout+title and description must come from the parsed catalog instead of a+frontend-local explainer paragraph.The shared updates settings owner also defines the user-facing framing forrc-tagged builds. `frontend-modern/src/components/Settings/updatesSettingsModel.ts`and `frontend-modern/src/utils/updatesPresentation.ts` must present thatdiff --git a/frontend-modern/src/components/Settings/ReportingPanel.tsx b/frontend-modern/src/components/Settings/ReportingPanel.tsxindex eb68671c0c..7fd767cc39 100644--- a/frontend-modern/src/components/Settings/ReportingPanel.tsx+++ b/frontend-modern/src/components/Settings/ReportingPanel.tsx@@ -70,6 +70,7 @@ export function ReportingPanel() {const performanceReport = () => reportingCatalog()?.performanceReport ?? null;const inventoryDefinition = () => reportingCatalog()?.vmInventoryExport ?? null;const lockedState = () => reportingCatalog()?.lockedState ?? null;+ const guidance = () => reportingCatalog()?.guidance ?? null;const supportsMetricFilter = () => performanceReport()?.supportsMetricFilter ?? false;const supportsCustomTitle = () => performanceReport()?.supportsCustomTitle ?? false;const selectedRange = (): ReportingRangeValue => range() ?? performanceReport()!.defaultRange;@@ -304,12 +305,16 @@ export function ReportingPanel() {</div></OperationsPanel>- <CalloutCard- icon={<BarChart size={24} />}- title="Advanced Insights"- description="Performance reports come from the historical metrics store, while VM inventory export captures the current runtime state for spreadsheet-friendly fleet reviews. Use reports for trends and the inventory export for current allocation and usage snapshots."- padding="lg"- />+ <Show when={guidance()}>+ {(card) => (+ <CalloutCard+ icon={<BarChart size={24} />}+ title={card().title}+ description={card().description}+ padding="lg"+ />+ )}+ </Show></Show></div>);diff --git a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsxindex 54f788dc3f..a488e0f1fe 100644--- a/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/ReportingPanel.test.tsx@@ -27,6 +27,10 @@ const baseCatalog = {title: 'Advanced Reporting (Pro)',description: 'Canonical locked reporting teaser',},+ guidance: {+ title: 'Advanced Insights',+ description: 'Catalog-owned reporting guidance',+ },performanceReport: {id: 'performance_reports',title: 'Performance Reports',@@ -151,4 +155,25 @@ describe('ReportingPanel', () => {expect(screen.getByText('Reporting for Paid Workflows')).toBeInTheDocument();expect(screen.getByText('Catalog-owned locked teaser copy')).toBeInTheDocument();});++ it('uses catalog-owned guidance copy for the enabled explainer callout', () => {+ useReportingPanelStateMock.mockReturnValue(+ buildState({+ reportingCatalog: () => ({+ ...baseCatalog,+ guidance: {+ title: 'Inventory Versus Trends',+ description: 'Catalog-owned explainer for when to use each reporting surface.',+ },+ }),+ }),+ );++ render(() => <ReportingPanel />);++ expect(screen.getByText('Inventory Versus Trends')).toBeInTheDocument();+ expect(+ screen.getByText('Catalog-owned explainer for when to use each reporting surface.'),+ ).toBeInTheDocument();+ });});diff --git a/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts b/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.tsindex b08db8d05c..551a7a339e 100644--- a/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/reportingCatalogModel.test.ts@@ -12,6 +12,10 @@ const baseCatalogPayload = {title: 'Advanced Reporting (Pro)',description: 'Canonical locked reporting teaser',},+ guidance: {+ title: 'Advanced Insights',+ description: 'Catalog-owned reporting guidance',+ },performanceReport: {id: 'performance_reports',title: 'Performance Reports',@@ -66,6 +70,7 @@ describe('reporting catalog model', () => {const catalog = parseReportingCatalog(baseCatalogPayload);expect(catalog.lockedState.title).toBe('Advanced Reporting (Pro)');+ expect(catalog.guidance.title).toBe('Advanced Insights');expect(catalog.performanceReport.defaultFormat).toBe('pdf');expect(catalog.performanceReport.ranges[0].windowHours).toBe(24);expect(catalog.vmInventoryExport.exportEndpoint).toBe(@@ -116,4 +121,15 @@ describe('reporting catalog model', () => {}),).toThrow('Invalid reporting catalog payload');});++ it('rejects a catalog whose guidance copy is incomplete', () => {+ expect(() =>+ parseReportingCatalog({+ ...baseCatalogPayload,+ guidance: {+ title: 'Advanced Insights',+ },+ }),+ ).toThrow('Invalid reporting catalog payload');+ });});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 2434d5a63c..d444a5f366 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -1105,7 +1105,12 @@ describe('Settings architecture guardrails', () => {expect(reportingCatalogModelSource).toContain('export function buildReportingCatalogRequest');expect(reportingCatalogModelSource).toContain('export function parseReportingCatalog');expect(reportingCatalogModelSource).toContain('interface ReportingLockedStateDefinition');+ expect(reportingCatalogModelSource).toContain('interface ReportingGuidanceDefinition');expect(reportingPanelSource).not.toContain('Advanced Reporting (Pro)');+ expect(reportingPanelSource).not.toContain('Advanced Insights');+ expect(reportingPanelSource).not.toContain(+ 'Performance reports come from the historical metrics store',+ );expect(reportingPanelModelSource).toContain('export function getReportingRangeStart');expect(reportingPanelModelSource).toContain('export function buildReportingRequest');expect(reportingPanelModelSource).toContain('export function buildReportingFilename');diff --git a/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts b/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.tsindex a5e823b8c8..3ccd78a98d 100644--- a/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts@@ -18,6 +18,10 @@ const catalogPayload = {title: 'Advanced Reporting (Pro)',description: 'Canonical locked reporting teaser',},+ guidance: {+ title: 'Advanced Insights',+ description: 'Catalog-owned reporting guidance',+ },performanceReport: {id: 'performance_reports',title: 'Performance Reports',diff --git a/frontend-modern/src/components/Settings/reportingCatalogModel.ts b/frontend-modern/src/components/Settings/reportingCatalogModel.tsindex 85622f5df1..2c5852309f 100644--- a/frontend-modern/src/components/Settings/reportingCatalogModel.ts+++ b/frontend-modern/src/components/Settings/reportingCatalogModel.ts@@ -39,11 +39,17 @@ export interface ReportingLockedStateDefinition {description: string;}+export interface ReportingGuidanceDefinition {+ title: string;+ description: string;+}+export interface ReportingCatalog {id: string;title: string;description: string;lockedState: ReportingLockedStateDefinition;+ guidance: ReportingGuidanceDefinition;performanceReport: ReportingPerformanceReportDefinition;vmInventoryExport: ReportingInventoryExportDefinition;}@@ -167,6 +173,21 @@ function parseReportingLockedStateDefinition(input: unknown): ReportingLockedSta};}+function parseReportingGuidanceDefinition(input: unknown): ReportingGuidanceDefinition {+ if (!input || typeof input !== 'object') {+ throw new Error('Invalid reporting catalog payload');+ }+ const candidate = input as Partial<ReportingGuidanceDefinition>;+ if (typeof candidate.title !== 'string' || typeof candidate.description !== 'string') {+ throw new Error('Invalid reporting catalog payload');+ }++ return {+ title: candidate.title,+ description: candidate.description,+ };+}+export function parseReportingCatalog(input: unknown): ReportingCatalog {if (!input || typeof input !== 'object') {throw new Error('Invalid reporting catalog payload');@@ -185,6 +206,7 @@ export function parseReportingCatalog(input: unknown): ReportingCatalog {title: candidate.title,description: candidate.description,lockedState: parseReportingLockedStateDefinition(candidate.lockedState),+ guidance: parseReportingGuidanceDefinition(candidate.guidance),performanceReport: parseReportingPerformanceReportDefinition(candidate.performanceReport),vmInventoryExport: parseVMInventoryExportDefinition(candidate.vmInventoryExport),};diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex c49b7972f1..5bbe0a4583 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -353,6 +353,10 @@ func TestContract_ReportingCatalogJSONSnapshot(t *testing.T) {"title":"Advanced Reporting (Pro)","description":"Generate PDF and CSV performance reports plus current-state VM inventory exports across infrastructure and workload resources."},+ "guidance":{+ "title":"Advanced Insights",+ "description":"Performance reports come from the historical metrics store, while VM inventory export captures the current runtime state for spreadsheet-friendly fleet reviews. Use reports for trends and the inventory export for current allocation and usage snapshots."+ },"performanceReport":{"id":"performance_reports","title":"Performance Reports",diff --git a/pkg/reporting/catalog.go b/pkg/reporting/catalog.goindex 916966aa54..5b60a45ef8 100644--- a/pkg/reporting/catalog.go+++ b/pkg/reporting/catalog.go@@ -44,11 +44,17 @@ type ReportingLockedStateDefinition struct {Description string `json:"description"`}+type ReportingGuidanceDefinition struct {+ Title string `json:"title"`+ Description string `json:"description"`+}+type ReportingCatalog struct {ID string `json:"id"`Title string `json:"title"`Description string `json:"description"`LockedState ReportingLockedStateDefinition `json:"lockedState"`+ Guidance ReportingGuidanceDefinition `json:"guidance"`PerformanceReport PerformanceReportDefinition `json:"performanceReport"`VMInventoryExport VMInventoryExportDefinition `json:"vmInventoryExport"`}@@ -114,6 +120,10 @@ func DescribeReportingCatalog() ReportingCatalog {Title: "Advanced Reporting (Pro)",Description: "Generate PDF and CSV performance reports plus current-state VM inventory exports across infrastructure and workload resources.",},+ Guidance: ReportingGuidanceDefinition{+ Title: "Advanced Insights",+ Description: "Performance reports come from the historical metrics store, while VM inventory export captures the current runtime state for spreadsheet-friendly fleet reviews. Use reports for trends and the inventory export for current allocation and usage snapshots.",+ },PerformanceReport: DescribePerformanceReport(),VMInventoryExport: DescribeVMInventoryExport(),}diff --git a/pkg/reporting/catalog_test.go b/pkg/reporting/catalog_test.goindex bb6da8d16d..6c68ac024e 100644--- a/pkg/reporting/catalog_test.go+++ b/pkg/reporting/catalog_test.go@@ -17,6 +17,9 @@ func TestDescribeReportingCatalog_DefinesCanonicalSurfaces(t *testing.T) {if catalog.LockedState.Title != "Advanced Reporting (Pro)" {t.Fatalf("locked state title = %q, want Advanced Reporting (Pro)", catalog.LockedState.Title)}+ if catalog.Guidance.Title != "Advanced Insights" {+ t.Fatalf("guidance title = %q, want Advanced Insights", catalog.Guidance.Title)+ }if catalog.PerformanceReport.MultiResourceMax != 50 {t.Fatalf("multi-resource max = %d, want 50", catalog.PerformanceReport.MultiResourceMax)}