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.

Move PMG freshness into support context

rcourtmanca56378231d5
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 4dc49f8db2..05220e0336 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -304,6 +304,9 @@ descriptive chrome.
Within that same PMG opened state, queue and backlog remain the primary metric
tiles while node count moves into quieter support context beneath them, so the
first read stays on mail-flow state instead of cluster metadata.
+That support context also owns PMG freshness metadata now, so `Updated` does
+not compete with queue and mail breakdown entries inside the mail-detail
+accordion.
The Docker service card now follows the same rule: its opened state uses
compact labels (`Docker runtime`, `Updates`, `Checked`, `Show actions`,
`Check now`, `Update all`) and short queued/confirm feedback so action
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index 024762cc05..3e361f218b 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -1479,15 +1479,29 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</div>
</div>
</div>
- <Show when={pmg().nodeCount}>
+ <Show when={pmg().nodeCount || pmgUpdatedRelative()}>
<div
data-testid="pmg-support-context"
- class="flex items-center justify-between gap-2 rounded border border-dashed border-rose-200 bg-surface px-2 py-1.5 text-[10px] dark:border-rose-700"
+ class="space-y-1.5 rounded border border-dashed border-rose-200 bg-surface px-2 py-1.5 text-[10px] dark:border-rose-700"
>
- <span class="text-muted">Nodes</span>
- <span class="font-medium text-base-content">
- {formatInteger(pmg().nodeCount)}
- </span>
+ <Show when={pmg().nodeCount}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Nodes</span>
+ <span class="font-medium text-base-content">
+ {formatInteger(pmg().nodeCount)}
+ </span>
+ </div>
+ </Show>
+ <Show when={pmgUpdatedRelative()}>
+ <div
+ class={`flex items-center justify-between gap-2 ${pmg().nodeCount ? 'border-t border-rose-200 pt-1.5 dark:border-rose-700' : ''}`}
+ >
+ <span class="text-muted">Updated</span>
+ <span class="font-medium text-base-content">
+ {pmgUpdatedRelative()}
+ </span>
+ </div>
+ </Show>
</div>
</Show>
<details class="rounded border border-rose-200 bg-surface px-2 py-1.5 dark:border-rose-700">
@@ -1527,12 +1541,6 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
)}
</For>
</div>
- <Show when={pmgUpdatedRelative()}>
- <div class="mt-2 flex items-center justify-between gap-2 border-t border-rose-200 pt-2 text-[10px] dark:border-rose-700">
- <span class="text-muted">Updated</span>
- <span class="font-medium text-base-content">{pmgUpdatedRelative()}</span>
- </div>
- </Show>
</details>
</div>
</Show>
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
index f85ebd5855..e8991571b2 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -404,6 +404,7 @@ describe('ResourceDetailDrawer change history section', () => {
hostname: 'pmg-main.local',
connectionHealth: 'online',
nodeCount: 1,
+ lastUpdated: '2026-03-19T23:00:00Z',
queueTotal: 519,
queueDeferred: 12,
queueHold: 4,
@@ -422,6 +423,7 @@ describe('ResourceDetailDrawer change history section', () => {
expect(screen.getByText('Backlog')).toBeInTheDocument();
const supportContext = within(screen.getByTestId('pmg-support-context'));
expect(supportContext.getByText('Nodes')).toBeInTheDocument();
+ expect(supportContext.getByText('Updated')).toBeInTheDocument();
expect(screen.getByText('Queue detail')).toBeInTheDocument();
expect(screen.getByText('Mail detail')).toBeInTheDocument();
});
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
index 23c51bf5db..8847972c1c 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
@@ -127,6 +127,7 @@ describe('ResourceDetailDrawer service cards', () => {
hostname: 'pmg-main.local',
connectionHealth: 'online',
nodeCount: 1,
+ lastUpdated: '2026-03-19T23:00:00Z',
queueTotal: 519,
queueDeferred: 12,
queueHold: 4,
@@ -161,6 +162,7 @@ describe('ResourceDetailDrawer service cards', () => {
expect(getByText('Backlog')).toBeInTheDocument();
const pmgSupportContext = within(getByTestId('pmg-support-context'));
expect(pmgSupportContext.getByText('Nodes')).toBeInTheDocument();
+ expect(pmgSupportContext.getByText('Updated')).toBeInTheDocument();
expect(getByText('Queue detail')).toBeInTheDocument();
expect(getByText('Mail detail')).toBeInTheDocument();
expect(getByRole('link', { name: /open pmg thresholds/i })).toHaveAttribute(
@@ -169,6 +171,37 @@ describe('ResourceDetailDrawer service cards', () => {
);
});
+ it('keeps PMG freshness in support context even without a node count', () => {
+ const resource = baseResource({
+ id: 'pmg-2',
+ type: 'pmg',
+ name: 'pmg-edge',
+ displayName: 'PMG Edge',
+ platformId: 'pmg-edge',
+ platformType: 'proxmox-pmg',
+ platformData: {
+ sources: ['pmg'],
+ pmg: {
+ hostname: 'pmg-edge.local',
+ connectionHealth: 'online',
+ lastUpdated: '2026-03-19T23:00:00Z',
+ queueTotal: 12,
+ mailCountTotal: 320,
+ },
+ },
+ });
+
+ const { getByRole, getByTestId } = render(() => (
+ <ResourceDetailDrawer resource={resource} />
+ ));
+
+ fireEvent.click(getByRole('button', { name: 'Show service details' }));
+ fireEvent.click(getByRole('button', { name: 'Show mail flow' }));
+ const pmgSupportContext = within(getByTestId('pmg-support-context'));
+ expect(pmgSupportContext.queryByText('Nodes')).toBeNull();
+ expect(pmgSupportContext.getByText('Updated')).toBeInTheDocument();
+ });
+
it('keeps docker update controls behind a secondary reveal', () => {
const resource = baseResource({
id: 'docker-host-1',