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.

Open the guest an alert names from the Alerts overview

rcourtman7f5f13868ba1
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 52bb4266f1..38ccbdd1c4 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -4045,6 +4045,22 @@ through `aria-controls` only while that region is rendered. This is
presentation only: acknowledgement, snooze, investigation and policy
handlers are unchanged.
+### A guest alert's name opens that guest
+
+On the overview, a VM or container alert whose platform page is Proxmox or
+vSphere links its resource name to that page with `?resource=` set to the
+alert's own resource id. The shared workloads table resolves that id
+(including a Proxmox source id such as `<cluster>-<node>-<vmid>`) through
+the resource registry, opens the guest's drawer and reveals it, so a
+notification reaches the affected guest in one tap instead of the top of a
+page with every guest on it. Other alerts (hosts, storage, Docker
+containers, Kubernetes, TrueNAS, Pulse system alerts) keep their platform
+page link, because their pages do not read `?resource=`. So do a guest's
+per-filesystem alerts (`<guest>-disk-<key>`, marked by `mountpoint` or
+`diskIndex` metadata) and orphaned backup alerts (`backup-subject:...`),
+whose ids name no resource the registry can open. The platform used
+for the monitoring policy menu is still read from the page path alone.
+
### Thresholds lead with each group's default limits
The Thresholds page answers "what will alert me, and at what limits" before
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 61289cebba..11ccbbe661 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -8685,6 +8685,15 @@ listener of its own. Snooze never moves, so its dialog state survives a
breakpoint crossing. The More button keeps its existing catalog labels and
sets `aria-controls` only while its region is rendered.
+### Alert cards deep-link guests through the workloads route search
+
+`AlertOverviewAlertCard` builds a guest alert's link with
+`buildWorkloadsRouteSearch({ resource })` and passes the alert's resource id
+unchanged. It adds no identity mapping of its own: the workloads selection
+state resolves non-row ids through the resource registry, and the summary
+focus bridge reveals the selected row, so the alert link and every other
+`?resource=` link share one resolution and reveal path.
+
### Alert groups use the shared localization boundary
Alert group disclosure and group acknowledgement copy routes through
diff --git a/frontend-modern/browser-verification/c1fd06198765e0e2.json b/frontend-modern/browser-verification/c1fd06198765e0e2.json
new file mode 100644
index 0000000000..c29ed77a6f
--- /dev/null
+++ b/frontend-modern/browser-verification/c1fd06198765e0e2.json
@@ -0,0 +1,39 @@
+{
+ "version": 1,
+ "base_sha": "25978a7d49221f6f0ee0d8a15d84f666506857a3",
+ "verified_at": "2026-10-13T01:20:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx": "177ebc8f769597fbe865c5ce4f51be30939510d6037420cb4c636eeac824a2e9"
+ },
+ "routes": [
+ "/alerts/overview",
+ "/proxmox/overview",
+ "/vmware/overview"
+ ],
+ "viewports": [
+ {
+ "width": 1280,
+ "height": 800
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "embedded production build of origin/main 421a784783 plus this change (card content identical on 25978a7d49), private mock stack (PULSE_MOCK_MODE, 8 nodes, 66 Proxmox guests, vSphere mock), compared with an unchanged origin/main build",
+ "Alerts overview: the three guest alerts (dev-portal-01 LXC, postgres-replica-01 and -18 VMs) link to /proxmox/overview?resource=<alert resource id>; the other 16 alerts (storage, ZFS, disks, Docker, TrueNAS, vSphere hosts and datastores, agent) keep their platform page link",
+ "375px: the guest row opens with its drawer and is revealed in view (row at y=173 to 303), Needs attention lists the same powered-off alert",
+ "1280px: the guest drawer opens and the focus bridge scrolls to the row (scrollTo top 1361); the test browser pane was hidden so smooth scroll did not animate, and with smooth forced to instant the row landed at y=269 with its drawer in view",
+ "/vmware/overview?resource=<vSphere source id> and ?resource=<unified id> both open client-portal-01",
+ "no console errors"
+ ],
+ "interactions": [
+ "375px: real tap on dev-portal-01 and on postgres-replica-18 alert names navigates to the Proxmox page with that guest open and in view",
+ "1280px: click on dev-portal-01 alert name opens that guest; browser Back returns to /alerts/overview"
+ ]
+}
diff --git a/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx b/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
index 2dfac2e89c..c022d022e7 100644
--- a/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
+++ b/frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx
@@ -55,6 +55,7 @@ import {
buildStandalonePath,
buildTrueNASPath,
buildVmwarePath,
+ buildWorkloadsRouteSearch,
} from '@/routing/resourceLinks';
import {
PRIMARY_PLATFORM_NAV_IDS,
@@ -103,6 +104,19 @@ const THRESHOLD_UNIT_BY_ALERT_TYPE: Record<string, string> = {
'disk-wearout': '%',
};
+// Guest alerts whose platform page lists them in the shared workloads table.
+// That table opens the guest named by ?resource=, resolving source ids such
+// as a Proxmox alert's through the resource registry, and scrolls to it.
+const GUEST_ALERT_RESOURCE_TYPES = new Set([
+ 'vm',
+ 'qemu',
+ 'container',
+ 'lxc',
+ 'system-container',
+ 'oci-container',
+]);
+const GUEST_WORKLOAD_PAGE_PATHS = [PROXMOX_PATH, VMWARE_PATH];
+
const platformPagePath = (platform: string | undefined): string | undefined => {
if (!platform) return undefined;
const navId = PRIMARY_PLATFORM_NAV_IDS.find((id) =>
@@ -222,7 +236,31 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
return resolvePlatformTypeFromSources(sources);
};
+ // The name opens the guest an alert is about; other resources keep their
+ // platform page.
const resourceLink = (): string => {
+ const page = platformLink();
+ const resourceId = props.alert.resourceId?.trim();
+ const resourceType = props.alert.metadata?.resourceType;
+ // A per-filesystem alert names `<guest>-disk-<key>` and an orphaned backup
+ // names `backup-subject:...`; neither is a resource the registry can open.
+ const namesSubResource =
+ props.alert.metadata?.mountpoint !== undefined ||
+ props.alert.metadata?.diskIndex !== undefined ||
+ Boolean(resourceId?.startsWith('backup-subject:'));
+ if (
+ !resourceId ||
+ namesSubResource ||
+ typeof resourceType !== 'string' ||
+ !GUEST_ALERT_RESOURCE_TYPES.has(resourceType.trim().toLowerCase()) ||
+ !GUEST_WORKLOAD_PAGE_PATHS.some((path) => page.startsWith(path))
+ ) {
+ return page;
+ }
+ return `${page}${buildWorkloadsRouteSearch({ resource: resourceId })}`;
+ };
+
+ const platformLink = (): string => {
const platformPage = platformPagePath(metadataPlatform());
if (platformPage) return platformPage;
const rid = props.alert.resourceId ?? '';
@@ -257,7 +295,7 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
const platformTypeForPolicy = (): string | undefined => {
const platform = metadataPlatform();
if (platform) return platform;
- const link = resourceLink();
+ const link = platformLink();
if (link.startsWith(PROXMOX_PATH)) return 'proxmox';
if (link.startsWith(DOCKER_PATH)) return 'docker';
if (link.startsWith(KUBERNETES_PATH)) return 'kubernetes';
@@ -274,7 +312,7 @@ export function AlertOverviewAlertCard(props: AlertOverviewAlertCardProps) {
if (resourceId.startsWith('agent:')) return 'agent';
if (resourceId.includes('docker')) return 'app-container';
if (resourceId.includes('k8s') || resourceId.includes('kubernetes')) return 'pod';
- if (resourceLink() === buildProxmoxPath()) return 'vm';
+ if (platformLink() === buildProxmoxPath()) return 'vm';
return undefined;
};
diff --git a/frontend-modern/src/features/alerts/__tests__/AlertOverviewAlertCard.system-scope.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertOverviewAlertCard.system-scope.test.tsx
index 41c70316c1..77e6fdb5c8 100644
--- a/frontend-modern/src/features/alerts/__tests__/AlertOverviewAlertCard.system-scope.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/AlertOverviewAlertCard.system-scope.test.tsx
@@ -272,7 +272,8 @@ describe('Pulse system-alert overview scope', () => {
incidentCode: 'vmware_alarm_state',
resourceSources: ['vmware'],
},
- href: '/vmware/overview',
+ // A guest alert also names the guest for the workloads table to open.
+ href: '/vmware/overview?resource=vm%3Avc-1%3Avm-2041',
platformType: 'vmware-vsphere',
},
{
@@ -377,7 +378,7 @@ describe('Pulse system-alert overview scope', () => {
resourceId: 'docker-01:docker-01:100',
resourceType: 'vm',
message: "VM 'billing-db-01' is powered off",
- href: '/proxmox/overview',
+ href: '/proxmox/overview?resource=docker-01%3Adocker-01%3A100',
platformType: 'proxmox',
},
{
@@ -385,7 +386,7 @@ describe('Pulse system-alert overview scope', () => {
resourceId: 'agent:pve1:100',
resourceType: 'VM',
message: 'VM CPU at 95%',
- href: '/proxmox/overview',
+ href: '/proxmox/overview?resource=agent%3Apve1%3A100',
platformType: 'proxmox',
},
{
@@ -393,7 +394,7 @@ describe('Pulse system-alert overview scope', () => {
resourceId: 'lab:pve1:101',
resourceType: 'vm',
message: "VM 'vmware-test' is powered off",
- href: '/proxmox/overview',
+ href: '/proxmox/overview?resource=lab%3Apve1%3A101',
platformType: 'proxmox',
},
{
@@ -533,4 +534,84 @@ describe('Pulse system-alert overview scope', () => {
expect(screen.getByRole('button', { name: 'Snooze' })).toBe(snooze);
});
});
+
+ describe('resource links', () => {
+ const linkFor = (overrides: Parameters<typeof makeSystemAlert>[1]) => {
+ const alert = makeSystemAlert('powered-off', {
+ id: `${overrides?.resourceId}::powered-state`,
+ ...overrides,
+ });
+ render(() => (
+ <AlertOverviewAlertCard alert={alert} state={state} timelineState={timelineState} />
+ ));
+ return screen.getByRole('link', { name: alert.resourceName }).getAttribute('href');
+ };
+
+ it('opens the Proxmox guest a VM or container alert is about', () => {
+ // The workloads table resolves the alert's source id through the
+ // resource registry, opens that guest and scrolls to it.
+ expect(
+ linkFor({
+ resourceId: 'mock-cluster-1-pve1-105',
+ resourceName: 'postgres-replica-01',
+ metadata: { resourceType: 'vm' },
+ }),
+ ).toBe('/proxmox/overview?resource=mock-cluster-1-pve1-105');
+ cleanup();
+ expect(
+ linkFor({
+ resourceId: 'mock-cluster-1-pve2-121',
+ resourceName: 'dev-portal-01',
+ metadata: { resourceType: 'container' },
+ }),
+ ).toBe('/proxmox/overview?resource=mock-cluster-1-pve2-121');
+ });
+
+ it('opens a vSphere VM on the vSphere page', () => {
+ expect(
+ linkFor({
+ resourceId: 'vm-vsphere-42',
+ resourceName: 'web-01',
+ metadata: { resourceType: 'vm', platformType: 'vmware-vsphere' },
+ }),
+ ).toBe('/vmware/overview?resource=vm-vsphere-42');
+ });
+
+ it('keeps the platform page for a guest filesystem or an orphaned backup', () => {
+ // Per-filesystem alerts name `<guest>-disk-<key>`, which no row answers to.
+ expect(
+ linkFor({
+ resourceId: 'mock-cluster-1-pve1-105-disk-root',
+ resourceName: 'postgres-replica-01 (/)',
+ metadata: { resourceType: 'vm', mountpoint: '/', diskIndex: 0 },
+ }),
+ ).toBe('/proxmox/overview');
+ cleanup();
+ expect(
+ linkFor({
+ resourceId: 'backup-subject:pve:ct:404',
+ resourceName: 'retired-ct',
+ metadata: { resourceType: 'system-container' },
+ }),
+ ).toBe('/proxmox/overview');
+ });
+
+ it('keeps the platform page for resources the workloads table does not list', () => {
+ expect(
+ linkFor({
+ resourceId: 'docker:nebula-1-mock/nebula-1-c94124aef15b',
+ resourceName: 'grafana-agent',
+ metadata: { resourceType: 'app-container' },
+ }),
+ ).toBe('/docker/overview');
+ cleanup();
+ expect(
+ linkFor({
+ resourceId: 'mock-cluster-1-pve1-local',
+ resourceName: 'west-a-iso-library',
+ metadata: { resourceType: 'storage' },
+ }),
+ ).toBe('/proxmox/overview');
+ });
+ });
});