Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

fix(ui): integrate TrueNAS protection attention

rcourtman41e4f09c045c
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 093152de0b..95a3ba9f1e 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -5515,6 +5515,11 @@ Protection table controls continue to compose shared filter, table, status,
counter, loading, error, disclosure, and inline-detail primitives. The bounded
batch hook retains fulfilled values during refresh and issues at most one
request per 200 resource rows, rather than placing a request under each row.
+TrueNAS protection history keeps issue prominence inside that existing control
+rail: the Attention filter carries the compact failed/warning count, and the
+built-in row order places failed then warning outcomes ahead of routine recency.
+It must not add a page-level posture summary card above the toolbar; running
+replication remains an ordinary event state rather than page-level alarm copy.
### Operational Trust attention interaction boundary
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index e0a1997495..101ecae7ff 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -2241,6 +2241,10 @@ their forensic backup detail. That presentation state is not a fifth server
posture and must not be counted as unknown provider evidence. Unified resources
own row identity only; they do not derive backup
freshness, provider completeness, verification, or protection state.
+`TrueNASProtectionTable` likewise consumes storage/recovery-owned event
+outcomes without turning its compact failed/warning attention count into a
+canonical workload `ProtectionPosture`; that count is event-history navigation,
+not a second protection-truth projection.
### APT Product Trust browser projection
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index b753386007..75b8d94685 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,77 +1,33 @@
{
"version": 1,
- "base_sha": "7d066f1d5c2f8921695cae5cf5bddf2e2b8e7151",
- "verified_at": "2026-08-05T12:07:34Z",
+ "base_sha": "fed7179c92b30211035ad9651c52a5b038519e5c",
+ "verified_at": "2026-08-05T12:22:01Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/features/docker/DockerNetworksTable.tsx",
- "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx",
- "frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx",
- "frontend-modern/src/features/vmware/VsphereNetworksTable.tsx"
+ "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx",
+ "frontend-modern/src/features/truenas/truenasPageModel.ts"
],
"content_sha256": {
- "frontend-modern/src/features/docker/DockerNetworksTable.tsx": "a5a10d77fc0f575d05fb5754d7b65840692c9fde7a726899f1a4814c2b5cd2b1",
- "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx": "9571289310a518495c88860089cd0ba191c69cd4821c7ba90163e97a42217c12",
- "frontend-modern/src/features/truenas/TrueNASVirtualMachinesTable.tsx": "1ec149f222086b4e9433d07b15699775cb6eca5a20ee968eaf817f030f4f3ac1",
- "frontend-modern/src/features/vmware/VsphereNetworksTable.tsx": "7c2580565602b9e7927ea4a16548f104d0144ec37ec93f692cc882171b1f9b57"
+ "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx": "21f999c1e8cdb0d7656c9becaecc936da49d9a048af6a9abc5407e255a9a656a",
+ "frontend-modern/src/features/truenas/truenasPageModel.ts": "3fc3ea385e59c6deb7e2d971adda673ea131d837496d1f9113416c2dc703a5bc"
},
"routes": [
- "/proxmox/overview",
- "/proxmox/storage",
- "/proxmox/replication",
- "/proxmox/backups",
- "/proxmox/ceph",
- "/proxmox/mail",
- "/docker/overview",
- "/docker/images",
- "/docker/storage",
- "/docker/networks",
- "/docker/swarm",
- "/kubernetes/overview",
- "/kubernetes/nodes",
- "/kubernetes/workloads",
- "/kubernetes/services",
- "/kubernetes/storage",
- "/kubernetes/configuration",
- "/kubernetes/events",
- "/truenas/overview",
- "/truenas/storage",
- "/truenas/services",
- "/truenas/apps",
- "/truenas/vms",
- "/truenas/shares",
- "/truenas/protection",
- "/vmware/overview",
- "/vmware/storage",
- "/vmware/networks",
- "/vmware/health",
- "/vmware/activity",
- "/standalone/machines",
- "/standalone/availability"
+ "/truenas/protection"
],
"viewports": [
- { "width": 320, "height": 900 },
- { "width": 375, "height": 900 },
- { "width": 768, "height": 900 },
- { "width": 1024, "height": 900 },
- { "width": 1280, "height": 900 },
- { "width": 1600, "height": 900 }
+ { "width": 390, "height": 844 },
+ { "width": 1440, "height": 1000 }
],
"states": [
- "Rendered every audited platform table at phone, tablet, laptop, desktop, and wide-desktop widths without document overflow",
- "Kept Proxmox replication guest names readable by prioritizing Guest over Job, Fails, and Error while progressively revealing operational columns",
- "Prioritized Docker network attachment summaries over the compact Attention field and retained useful network, subnet, driver, and host context as space increased",
- "Displayed TrueNAS VM state, CPU, and memory at phone width while deferring secondary Flags metadata until tablet width",
- "Displayed vSphere network VM impact at phone width alongside network name and type, with hosts and datacenter returning at wider layouts",
- "Kept representative expanded detail rows aligned to the actual visible summary columns after resizing in both directions",
- "Matched Proxmox, Docker, Kubernetes, TrueNAS, vSphere, and Machines page, tab, panel, and table bounds at 1280 pixels"
+ "Default protection history with one failed event, one running event, and healthy events",
+ "Attention filter selected with one matching failed event",
+ "Filters expanded and collapsed at the narrow viewport",
+ "All events restored through Clear filters"
],
"interactions": [
- "Expanded representative healthy, degraded, stopped, pending, warning, and failed rows across Proxmox, Docker, Kubernetes, TrueNAS, vSphere, and Machines",
- "Resized each audited table repeatedly through 320, 375, 768, 1024, 1280, and 1600 pixel widths while representative details remained open",
- "Switched Proxmox backup views and storage tabs to exercise their independent table layouts",
- "Verified final TrueNAS VM detail colspans changed from 4 compact columns to 7 desktop columns",
- "Verified final vSphere network detail colspans changed from 3 compact columns to 5 expanded columns",
- "Measured every visible header allocation against its table width and checked for horizontal document overflow"
+ "Selected the Attention 1 filter and verified the table narrowed from 10 events to the failed event",
+ "Cleared filters and verified all 10 events returned",
+ "Expanded the narrow filter rail and repeated the Attention filter interaction",
+ "Reloaded the route at the narrow viewport and confirmed the failed event remained first in default order"
]
}
diff --git a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx
index b11490fad4..5df828da3f 100644
--- a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx
+++ b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx
@@ -1,9 +1,8 @@
import { For, Show, createMemo, type Component, type JSX } from 'solid-js';
-import { Button } from '@/components/shared/Button';
import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';
+import { MetadataBadge } from '@/components/shared/MetadataBadge';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell, TableRow } from '@/components/shared/Table';
-import { PlatformAttentionSummary } from '@/features/platformPage/PlatformAttentionSummary';
import {
getRecoveryOutcomeBadgeClass,
getRecoveryOutcomeLabel,
@@ -53,16 +52,39 @@ import {
type DetailValueTone,
} from '@/components/shared/DetailSectionTable';
-const TRUENAS_PROTECTION_STATUS_OPTIONS: PlatformTableFilterOption<TrueNASProtectionStatusFilter>[] =
- [
- { value: 'all', label: 'All' },
- { value: 'attention', label: 'Attention', compactLabel: 'Issues', tone: 'warning' },
- { value: 'success', label: 'Healthy', compactLabel: 'OK', tone: 'success' },
- { value: 'warning', label: 'Warning', compactLabel: 'Warn', tone: 'warning' },
- { value: 'failed', label: 'Failed', compactLabel: 'Fail', tone: 'danger' },
- { value: 'running', label: 'Running', compactLabel: 'Run', tone: 'info' },
- { value: 'unknown', label: 'Unknown', compactLabel: 'Unk', tone: 'muted' },
- ];
+const getTrueNASProtectionStatusOptions = (
+ attention: number,
+ failed: number,
+): PlatformTableFilterOption<TrueNASProtectionStatusFilter>[] => [
+ { value: 'all', label: 'All' },
+ {
+ value: 'attention',
+ label: 'Attention',
+ ariaLabel:
+ attention > 0 ? `Attention, ${attention} issue${attention === 1 ? '' : 's'}` : 'Attention',
+ title:
+ attention > 0
+ ? `Show ${attention} protection issue${attention === 1 ? '' : 's'}`
+ : 'Show protection issues',
+ compactLabel: 'Issues',
+ tone: failed > 0 ? 'danger' : 'warning',
+ visualLabel: (
+ <>
+ <span>Attention</span>
+ {attention > 0 ? (
+ <MetadataBadge tone={failed > 0 ? 'danger' : 'warning'} size="xs" aria-hidden="true">
+ {attention}
+ </MetadataBadge>
+ ) : null}
+ </>
+ ),
+ },
+ { value: 'success', label: 'Healthy', compactLabel: 'OK', tone: 'success' },
+ { value: 'warning', label: 'Warning', compactLabel: 'Warn', tone: 'warning' },
+ { value: 'failed', label: 'Failed', compactLabel: 'Fail', tone: 'danger' },
+ { value: 'running', label: 'Running', compactLabel: 'Run', tone: 'info' },
+ { value: 'unknown', label: 'Unknown', compactLabel: 'Unk', tone: 'muted' },
+];
const detailString = (point: RecoveryPoint, key: string): string =>
asTrimmedString(point.details?.[key]) || '';
@@ -353,6 +375,9 @@ export const TrueNASProtectionTable: Component<{
}> = (props) => {
const rows = createMemo(() => sortTrueNASProtectionPoints(props.points));
const posture = createMemo(() => buildTrueNASProtectionPosture(rows()));
+ const statusOptions = createMemo(() =>
+ getTrueNASProtectionStatusOptions(posture().attention, posture().failed),
+ );
const detail = createPlatformResourceDetailState({ idPrefix: 'truenas-protection-detail' });
const tableState = createPlatformTableFilterState({
resources: rows,
@@ -399,44 +424,6 @@ export const TrueNASProtectionTable: Component<{
}
>
<div class="space-y-3">
- <Show when={posture().attention > 0 || posture().running > 0}>
- <PlatformAttentionSummary
- title="Protection posture"
- headline={
- posture().attention > 0
- ? `${posture().attention} protection issue${posture().attention === 1 ? '' : 's'} ${posture().attention === 1 ? 'needs' : 'need'} review`
- : `${posture().running} replication task${posture().running === 1 ? '' : 's'} running`
- }
- description={
- posture().attention > 0
- ? 'Review failed or warning replication outcomes first; successful snapshots remain available in the full event history.'
- : 'No failed protection outcomes are reported. Monitor the active replication task until it completes.'
- }
- tone={
- posture().failed > 0 ? 'danger' : posture().attention > 0 ? 'warning' : 'info'
- }
- metrics={[
- { label: 'failed', value: posture().failed },
- { label: 'warning', value: posture().warning },
- { label: 'running', value: posture().running },
- ]}
- actions={
- <Show when={posture().attention > 0}>
- <Button
- variant="secondary"
- size="sm"
- onClick={() =>
- tableState.setStatus(
- tableState.status() === 'attention' ? 'all' : 'attention',
- )
- }
- >
- {tableState.status() === 'attention' ? 'Show all events' : 'Show issues'}
- </Button>
- </Show>
- }
- />
- </Show>
<Show when={props.showToolbar !== false}>
<PlatformTableToolbar
search={tableState.search}
@@ -444,7 +431,7 @@ export const TrueNASProtectionTable: Component<{
searchPlaceholder="Search snapshots or replication"
status={tableState.status()}
onStatusChange={tableState.setStatus}
- statusOptions={TRUENAS_PROTECTION_STATUS_OPTIONS}
+ statusOptions={statusOptions()}
visible={tableState.visible()}
total={tableState.total()}
rowNoun="events"
diff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx
index 1d39e00d0b..a6aa5b5b98 100644
--- a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx
+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.test.tsx
@@ -19,7 +19,7 @@ afterEach(() => {
});
describe('TrueNASProtectionTable', () => {
- it('summarizes protection issues and filters directly to attention outcomes', async () => {
+ it('keeps the issue count in the filters and filters directly to attention outcomes', async () => {
render(() => (
<TrueNASProtectionTable
points={[
@@ -43,14 +43,22 @@ describe('TrueNASProtectionTable', () => {
/>
));
- expect(screen.getByRole('region', { name: 'Protection posture' })).toHaveTextContent(
- '1 protection issue needs review',
+ expect(screen.queryByRole('region', { name: 'Protection posture' })).not.toBeInTheDocument();
+ expect(document.querySelector('[data-truenas-protection-row]')).toHaveAttribute(
+ 'data-truenas-protection-row',
+ 'failed',
);
- await fireEvent.click(screen.getByRole('button', { name: 'Show issues' }));
+
+ const attentionFilter = screen.getByRole('button', { name: 'Attention, 1 issue' });
+ expect(attentionFilter).toHaveTextContent('Attention');
+ expect(attentionFilter).toHaveTextContent('1');
+ await fireEvent.click(attentionFilter);
expect(document.querySelectorAll('[data-truenas-protection-row]')).toHaveLength(1);
expect(document.querySelector('[data-truenas-protection-row="failed"]')).not.toBeNull();
- expect(screen.getByRole('button', { name: 'Show all events' })).toBeInTheDocument();
+
+ await fireEvent.click(screen.getByRole('button', { name: 'All' }));
+ expect(document.querySelectorAll('[data-truenas-protection-row]')).toHaveLength(3);
});
it('opens inline table details for a TrueNAS replication recovery point', async () => {
diff --git a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
index 3ef8542566..0d8607b970 100644
--- a/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
+++ b/frontend-modern/src/features/truenas/__tests__/truenasPageModel.test.ts
@@ -952,6 +952,34 @@ describe('truenasPageModel', () => {
]);
});
+ it('orders failed and warning protection events ahead of newer routine activity', () => {
+ const healthy = makeRecoveryPoint({
+ id: 'newer-healthy-snapshot',
+ kind: 'snapshot',
+ mode: 'snapshot',
+ outcome: 'success',
+ completedAt: '2026-05-21T00:00:00Z',
+ });
+ const warning = makeRecoveryPoint({
+ id: 'warning-replication',
+ kind: 'backup',
+ mode: 'remote',
+ outcome: 'warning',
+ completedAt: '2026-05-19T00:00:00Z',
+ });
+ const failed = makeRecoveryPoint({
+ id: 'failed-replication',
+ kind: 'backup',
+ mode: 'remote',
+ outcome: 'failed',
+ completedAt: '2026-05-18T00:00:00Z',
+ });
+
+ expect(
+ sortTrueNASProtectionPoints([healthy, warning, failed]).map((point) => point.id),
+ ).toEqual(['failed-replication', 'warning-replication', 'newer-healthy-snapshot']);
+ });
+
it('deduplicates a native alert projected onto multiple resources and keeps the most specific subject', () => {
const nativeIncident = {
provider: 'truenas',
diff --git a/frontend-modern/src/features/truenas/truenasPageModel.ts b/frontend-modern/src/features/truenas/truenasPageModel.ts
index 02ee6fca9f..44fea6b67a 100644
--- a/frontend-modern/src/features/truenas/truenasPageModel.ts
+++ b/frontend-modern/src/features/truenas/truenasPageModel.ts
@@ -812,8 +812,18 @@ const trueNASProtectionSearchTokens = (point: RecoveryPoint): string[] => {
].filter((value): value is string => typeof value === 'string' && value.trim().length > 0);
};
+const trueNASProtectionAttentionRank = (point: RecoveryPoint): number => {
+ const status = mapTrueNASProtectionStatus(point);
+ if (status === 'failed') return 0;
+ if (status === 'warning') return 1;
+ return 2;
+};
+
export function sortTrueNASProtectionPoints(points: readonly RecoveryPoint[]): RecoveryPoint[] {
return [...points].sort((left, right) => {
+ const attentionDelta =
+ trueNASProtectionAttentionRank(left) - trueNASProtectionAttentionRank(right);
+ if (attentionDelta !== 0) return attentionDelta;
const timeDelta = getRecoveryPointTimestampMs(right) - getRecoveryPointTimestampMs(left);
if (timeDelta !== 0) return timeDelta;
const leftLabel =