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.

Normalize alert override display labels

rcourtmanc43dc60d4611
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 843ea6f97d..5335279149 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -103,9 +103,10 @@ presentation now also route through
`frontend-modern/src/utils/alertIncidentPresentation.ts` instead of remaining
duplicated inline across the alerts page and overview timeline surfaces.
-Alert resource tables now route resource labels and row action labels through
-the shared policy-aware resource identity helper so governed resources do not
-fall back to raw names inside the alerts surface.
+Alert resource tables, grouped node headers, and alert override reconstruction
+now route resource-backed names through the shared policy-aware alerts helper
+so governed resources do not fall back to raw names when the thresholds editor
+rebuilds, saves, or re-renders override rows.
Alert threshold tables now route their visible resource row labels, search
labels, and persisted override display names through the same shared helper
so governed agent, guest, and storage rows do not leak raw names when the
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index ad40df71a1..720bf4e367 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -159,6 +159,14 @@ Active alert card state and action-button presentation must also route through
feature-local alert card styling inside
`frontend-modern/src/features/alerts/OverviewTab.tsx`.
+Alert resource display labels used by the thresholds editor and alerts page
+must now route through the shared helper in
+`frontend-modern/src/features/alerts/helpers.ts` instead of rebuilding
+resource display-name fallback chains inline. Governed resources must preserve
+their canonical policy-aware label across grouped node headers, docker host
+grouping, and saved override rows rather than collapsing back to raw names or
+friendly-name truncation.
+
Shared search inputs must now keep their forwarded keyboard, blur, and clear
handlers as explicit callable functions instead of relying on loose Solid
event-handler unions. Shared search primitives still need to accept the real
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTable.tsx b/frontend-modern/src/components/Alerts/ThresholdsTable.tsx
index 7e7e9c48ea..115fd975a4 100644
--- a/frontend-modern/src/components/Alerts/ThresholdsTable.tsx
+++ b/frontend-modern/src/components/Alerts/ThresholdsTable.tsx
@@ -16,6 +16,7 @@ import Mail from 'lucide-solid/icons/mail';
import Users from 'lucide-solid/icons/users';
import Boxes from 'lucide-solid/icons/boxes';
import { unwrap } from 'solid-js/store';
+import { requiresGovernedResourceDisplay } from '@/types/resource';
import type { Resource } from '@/types/resource';
import {
getAgentDiscoveryResourceId,
@@ -88,10 +89,8 @@ import {
DEFAULT_BACKUP_FRESH_HOURS,
DEFAULT_BACKUP_STALE_HOURS,
} from '@/features/alerts/thresholds/constants';
-import {
- normalizeDockerIgnoredInput,
- formatMetricValue,
-} from '@/features/alerts/thresholds/helpers';
+import { getAlertResourceDisplayLabel } from '@/features/alerts/helpers';
+import { normalizeDockerIgnoredInput, formatMetricValue } from '@/features/alerts/thresholds/helpers';
export function ThresholdsTable(props: ThresholdsTableProps) {
const navigate = useNavigate();
@@ -327,6 +326,11 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
return base;
};
+ const getFriendlyAlertNodeName = (
+ value: string,
+ policy?: Resource['policy'],
+ clusterName?: string,
+ ): string => (requiresGovernedResourceDisplay(policy) ? value : getFriendlyNodeName(value, clusterName));
const buildNodeHeaderMeta = (node: Resource) => {
const data = pd(node);
@@ -334,8 +338,8 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
const isClusterMember =
(data?.isClusterMember as boolean | undefined) ?? Boolean(node.clusterId);
- const originalDisplayName = node.displayName?.trim() || node.name;
- const friendlyName = getFriendlyNodeName(originalDisplayName, clusterName);
+ const originalDisplayName = getAlertResourceDisplayLabel(node);
+ const friendlyName = getFriendlyAlertNodeName(originalDisplayName, node.policy, clusterName);
// Prioritize guestURL over host (same as NodeGroupHeader)
const guestUrlValue =
@@ -404,7 +408,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
const hasNote = Boolean(note && note.trim().length > 0);
const originalDisplayName = getPreferredResourceDisplayName(node);
- const friendlyName = getFriendlyNodeName(originalDisplayName, clusterName);
+ const friendlyName = getFriendlyAlertNodeName(originalDisplayName, node.policy, clusterName);
const rawName = node.name;
const sanitizedName = friendlyName || originalDisplayName || rawName.split('.')[0] || rawName;
// Build a best-effort management URL for the node
@@ -479,7 +483,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
);
});
- const displayName = getPreferredResourceDisplayName(agentResource);
+ const displayName = getAlertResourceDisplayLabel(agentResource);
const status = agentResource.status;
const data = pd(agentResource);
const agentData = asRecord(data?.agent);
@@ -493,7 +497,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
rawName: agentResource.identity?.hostname ?? agentResource.name,
type: 'agent' as const,
resourceType: 'Agent',
- node: agentResource.identity?.hostname ?? agentResource.name,
+ node: displayName,
instance:
asString(agentData?.platform) ||
asString(agentData?.osName) ||
@@ -567,11 +571,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
// Extract disks from all agents
(props.agents ?? []).forEach((agentResource) => {
- const agentDisplayName =
- agentResource.displayName?.trim() ||
- agentResource.identity?.hostname ||
- agentResource.name ||
- agentResource.id;
+ const agentDisplayName = getAlertResourceDisplayLabel(agentResource);
const agentIdCandidates = hostOverrideIdCandidates(agentResource);
const agentIdForActions = hostActionId(agentResource);
const platformData = pd(agentResource);
@@ -696,7 +696,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
const hosts: TableResource[] = (props.dockerHosts ?? []).map((host) => {
const idCandidates = dockerHostOverrideIdCandidates(host);
const originalName = getPreferredResourceDisplayName(host);
- const friendlyName = getFriendlyNodeName(originalName);
+ const friendlyName = getFriendlyAlertNodeName(originalName, host.policy);
const override = findOverrideByCandidates(overridesMap, idCandidates);
const resourceId = override?.id || idCandidates[0] || host.id;
const disableConnectivity = override?.disableConnectivity || false;
@@ -727,7 +727,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
.filter((override) => override.type === 'dockerHost' && !seen.has(override.id))
.forEach((override) => {
const originalName = override.name || override.id;
- const friendlyName = getFriendlyNodeName(originalName);
+ const friendlyName = originalName;
hosts.push({
id: override.id,
name: friendlyName,
@@ -783,7 +783,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
const dockerHostIds = dockerHostOverrideIdCandidates(host);
const dockerHostIdForActions = dockerHostIds[0] || host.id;
const hostLabel = getPreferredResourceDisplayName(host);
- const friendlyHostName = getFriendlyNodeName(hostLabel);
+ const friendlyHostName = getFriendlyAlertNodeName(hostLabel, host.policy);
const hostLabelLower = hostLabel.toLowerCase();
const friendlyHostNameLower = friendlyHostName.toLowerCase();
@@ -818,7 +818,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
overrideSeverity !== undefined ||
false;
- const containerName = container.name?.replace(/^\/+/, '') || shortId;
+ const containerName = getAlertResourceDisplayLabel(container, shortId);
const containerNameLower = containerName.toLowerCase();
const image = (pd(container)?.image as string) ?? '';
const imageLower = image.toLowerCase();
@@ -919,7 +919,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
const meta: Record<string, GroupHeaderMeta> = {};
(props.dockerHosts ?? []).forEach((host) => {
const originalName = getPreferredResourceDisplayName(host);
- const friendlyName = getFriendlyNodeName(originalName);
+ const friendlyName = getFriendlyAlertNodeName(originalName, host.policy);
const headerMeta: GroupHeaderMeta = {
displayName: friendlyName,
rawName: originalName,
diff --git a/frontend-modern/src/components/Alerts/__tests__/ThresholdsTable.test.tsx b/frontend-modern/src/components/Alerts/__tests__/ThresholdsTable.test.tsx
index 51a90a3530..d8de1366a7 100644
--- a/frontend-modern/src/components/Alerts/__tests__/ThresholdsTable.test.tsx
+++ b/frontend-modern/src/components/Alerts/__tests__/ThresholdsTable.test.tsx
@@ -24,6 +24,7 @@ vi.mock('../ResourceTable', () => ({
title?: string;
resources?: any[];
groupedResources?: Record<string, any[]>;
+ groupHeaderMeta?: Record<string, { displayName?: string; rawName?: string }>;
formatMetricValue?: (metric: string, value: number | undefined) => string;
onToggleDisabled?: (id: string, forceState?: boolean) => void;
onToggleNodeConnectivity?: (id: string, forceState?: boolean) => void;
@@ -32,35 +33,48 @@ vi.mock('../ResourceTable', () => ({
props.resources ||
(props.groupedResources ? Object.values(props.groupedResources).flat() : []);
const title = props.title ?? 'unnamed';
+ const renderRow = (r: any) => (
+ <div data-testid={`resource-row-${r.id}`}>
+ <div data-testid={`resource-name-${r.id}`}>{r.name}</div>
+ {r.node ? <div data-testid={`resource-node-${r.id}`}>{r.node}</div> : null}
+ <div data-testid={`resource-cpu-${r.id}`}>
+ {props.formatMetricValue && r.thresholds
+ ? props.formatMetricValue('cpu', r.thresholds.cpu)
+ : (r.thresholds?.cpu ?? '')}
+ </div>
+ {props.onToggleDisabled ? (
+ <button
+ data-testid={`toggle-disabled-${r.id}`}
+ onClick={() => props.onToggleDisabled?.(r.id, true)}
+ >
+ Disable
+ </button>
+ ) : null}
+ {props.onToggleNodeConnectivity ? (
+ <button
+ data-testid={`toggle-connectivity-${r.id}`}
+ onClick={() => props.onToggleNodeConnectivity?.(r.id, true)}
+ >
+ Disable connectivity
+ </button>
+ ) : null}
+ </div>
+ );
return (
<div data-testid={`resource-table-${title}`}>
<div data-testid={`resource-count-${title}`}>{resources.length}</div>
- {resources.map((r: any) => (
- <div data-testid={`resource-row-${r.id}`}>
- <div data-testid={`resource-name-${r.id}`}>{r.name}</div>
- <div data-testid={`resource-cpu-${r.id}`}>
- {props.formatMetricValue && r.thresholds
- ? props.formatMetricValue('cpu', r.thresholds.cpu)
- : (r.thresholds?.cpu ?? '')}
- </div>
- {props.onToggleDisabled ? (
- <button
- data-testid={`toggle-disabled-${r.id}`}
- onClick={() => props.onToggleDisabled?.(r.id, true)}
- >
- Disable
- </button>
- ) : null}
- {props.onToggleNodeConnectivity ? (
- <button
- data-testid={`toggle-connectivity-${r.id}`}
- onClick={() => props.onToggleNodeConnectivity?.(r.id, true)}
- >
- Disable connectivity
- </button>
- ) : null}
- </div>
- ))}
+ {props.groupedResources
+ ? Object.entries(props.groupedResources).map(([group, groupResources], index) => (
+ <div data-testid={`resource-group-${index}`}>
+ <div data-testid={`group-header-${index}`}>
+ {props.groupHeaderMeta?.[group]?.displayName ||
+ props.groupHeaderMeta?.[group]?.rawName ||
+ group}
+ </div>
+ {groupResources.map(renderRow)}
+ </div>
+ ))
+ : resources.map(renderRow)}
</div>
);
},
@@ -387,6 +401,42 @@ describe('ThresholdsTable Resource Rendering', () => {
expect(screen.getByTestId('resource-name-guest2')).not.toHaveTextContent('secret-vm-2');
});
+ it('renders governed guest groups with the policy-aware node header label', async () => {
+ setPathname('/alerts/thresholds/proxmox');
+ const node = {
+ id: 'node-governed',
+ name: 'secret-node',
+ displayName: 'Secret Node',
+ status: 'online',
+ policy: {
+ sensitivity: 'restricted',
+ routing: { scope: 'local-only', redact: ['hostname'] },
+ },
+ aiSafeSummary: 'redacted by policy',
+ } as any;
+ const guest = {
+ id: 'guest-grouped',
+ name: 'vm-grouped',
+ vmid: 101,
+ status: 'running',
+ platformData: {
+ node: 'secret-node',
+ instance: 'secret-node',
+ },
+ } as any;
+
+ render(() => (
+ <ThresholdsTable {...(baseProps() as any)} nodes={[node]} allGuests={() => [guest]} />
+ ));
+
+ await waitFor(() => {
+ expect(screen.getByTestId('group-header-0')).toBeInTheDocument();
+ });
+
+ expect(screen.getByTestId('group-header-0')).toHaveTextContent('redacted by policy');
+ expect(screen.getByTestId('group-header-0')).not.toHaveTextContent('secret-node');
+ });
+
it('renders governed storage with the policy-aware display label', async () => {
setPathname('/alerts/thresholds/proxmox');
const storage = {
@@ -411,6 +461,93 @@ describe('ThresholdsTable Resource Rendering', () => {
expect(screen.getByTestId('resource-name-storage1')).toHaveTextContent('redacted by policy');
expect(screen.getByTestId('resource-name-storage1')).not.toHaveTextContent('secret-datastore');
});
+
+ it('renders governed docker containers with the policy-aware display label', async () => {
+ setPathname('/alerts/thresholds/containers');
+ const dockerHost = {
+ id: 'docker-host-1',
+ type: 'docker-host',
+ name: 'docker-parent',
+ displayName: 'Docker Parent',
+ platformId: 'docker-platform-parent',
+ platformType: 'docker',
+ sourceType: 'agent',
+ status: 'online',
+ lastSeen: 789,
+ } as any;
+ const container = {
+ id: 'container-governed',
+ parentId: 'docker-host-1',
+ type: 'app-container',
+ name: '/secret-nginx',
+ displayName: 'Secret Nginx',
+ platformId: 'docker-platform-parent',
+ platformType: 'docker',
+ sourceType: 'agent',
+ status: 'running',
+ lastSeen: 789,
+ policy: {
+ sensitivity: 'restricted',
+ routing: { scope: 'local-only', redact: ['hostname'] },
+ },
+ aiSafeSummary: 'redacted by policy',
+ } as any;
+
+ render(() => (
+ <ThresholdsTable
+ {...(baseProps() as any)}
+ dockerHosts={[dockerHost]}
+ allResources={[container]}
+ />
+ ));
+
+ await waitFor(() => {
+ expect(screen.getByTestId('resource-name-docker:docker-host-1/container-governed')).toBeTruthy();
+ });
+
+ expect(
+ screen.getByTestId('resource-name-docker:docker-host-1/container-governed'),
+ ).toHaveTextContent('redacted by policy');
+ expect(
+ screen.getByTestId('resource-name-docker:docker-host-1/container-governed'),
+ ).not.toHaveTextContent('secret-nginx');
+ });
+
+ it('renders governed agent disk node labels with the policy-aware display label', async () => {
+ setPathname('/alerts/thresholds/agents');
+ const host = {
+ id: 'agent-governed',
+ type: 'agent',
+ name: 'secret-host',
+ displayName: 'Secret Host',
+ status: 'online',
+ lastSeen: 123,
+ memory: { total: 100, used: 50, free: 50, usage: 50 },
+ platformData: {
+ agent: {
+ disks: [{ mountpoint: '/var/lib', type: 'ext4' }],
+ },
+ },
+ policy: {
+ sensitivity: 'restricted',
+ routing: { scope: 'local-only', redact: ['hostname'] },
+ },
+ aiSafeSummary: 'redacted by policy',
+ } as any;
+
+ render(() => <ThresholdsTable {...(baseProps() as any)} agents={[host]} />);
+
+ await waitFor(() => {
+ expect(screen.getByTestId('resource-node-agent:agent-governed/disk:var-lib')).toBeTruthy();
+ });
+
+ expect(screen.getByTestId('resource-node-agent:agent-governed/disk:var-lib')).toHaveTextContent(
+ 'redacted by policy',
+ );
+ expect(
+ screen.getByTestId('resource-node-agent:agent-governed/disk:var-lib'),
+ ).not.toHaveTextContent('secret-host');
+ });
});
describe('ThresholdsTable Metric Formatting', () => {
diff --git a/frontend-modern/src/features/alerts/helpers.ts b/frontend-modern/src/features/alerts/helpers.ts
index 66ba84a378..35c4602039 100644
--- a/frontend-modern/src/features/alerts/helpers.ts
+++ b/frontend-modern/src/features/alerts/helpers.ts
@@ -2,6 +2,7 @@ import type { EmailConfig } from '@/api/notifications';
import type { Resource, ResourceType } from '@/types/resource';
import type { RawOverrideConfig, HysteresisThreshold } from '@/types/alerts';
import { getResourceTypeLabel } from '@/utils/resourceTypePresentation';
+import { getPreferredResourceDisplayName } from '@/utils/resourceIdentity';
import {
MAX_ALERTS_MIN,
MAX_ALERTS_MAX,
@@ -330,3 +331,12 @@ export const guessNumericId = (value: string): number => {
const match = value.match(/(\d+)\s*$/);
return match ? parseInt(match[1], 10) : 0;
};
+
+export const getAlertResourceDisplayLabel = (resource: Resource, fallback?: string): string =>
+ (() => {
+ const preferred = getPreferredResourceDisplayName(resource);
+ if (preferred && preferred !== resource.id) {
+ return preferred;
+ }
+ return fallback || preferred || resource.id;
+ })();
diff --git a/frontend-modern/src/pages/Alerts.tsx b/frontend-modern/src/pages/Alerts.tsx
index ede4f8e0a4..6200b47991 100644
--- a/frontend-modern/src/pages/Alerts.tsx
+++ b/frontend-modern/src/pages/Alerts.tsx
@@ -307,6 +307,7 @@ import {
alertTypeDisplayLabel,
platformData,
guessNumericId,
+ getAlertResourceDisplayLabel,
DEFAULT_DELAY_SECONDS,
} from '@/features/alerts/helpers';
@@ -690,11 +691,7 @@ export function Alerts() {
if (dockerHost) {
overridesList.push({
id: key,
- name:
- dockerHost.displayName?.trim() ||
- dockerHost.identity?.hostname ||
- dockerHost.name ||
- dockerHost.id,
+ name: getAlertResourceDisplayLabel(dockerHost),
type: 'dockerHost',
resourceType: 'Container Runtime',
disableConnectivity: thresholds.disableConnectivity || false,
@@ -707,14 +704,14 @@ export function Alerts() {
const dockerContainer = dockerContainerMap.get(key);
if (dockerContainer) {
const { host, container, containerShortId } = dockerContainer;
- const containerName = container.name?.replace(/^\/+/, '') || containerShortId;
+ const containerName = getAlertResourceDisplayLabel(container, containerShortId);
overridesList.push({
id: key,
name: containerName,
type: 'dockerContainer',
resourceType: 'Container',
- node: host.identity?.hostname ?? host.name,
- instance: host.displayName,
+ node: getAlertResourceDisplayLabel(host),
+ instance: getAlertResourceDisplayLabel(host),
disabled: thresholds.disabled || false,
disableConnectivity: thresholds.disableConnectivity || false,
poweredOffSeverity:
@@ -776,7 +773,7 @@ export function Alerts() {
name: displayName,
type: 'agentDisk',
resourceType: 'Agent Disk',
- node: agent?.displayName?.trim() || agent?.identity?.hostname || agent?.name || agentId,
+ node: agent ? getAlertResourceDisplayLabel(agent) : agentId,
disabled: thresholds.disabled || false,
thresholds: extractTriggerValues(thresholds),
});
@@ -786,11 +783,7 @@ export function Alerts() {
// Agent override stored by agent ID
const agentResource = agentMap.get(key);
if (agentResource) {
- const displayName =
- agentResource.displayName?.trim() ||
- agentResource.identity?.hostname ||
- agentResource.name ||
- agentResource.id;
+ const displayName = getAlertResourceDisplayLabel(agentResource);
const data = pd(agentResource);
const agent = asRecord(data?.agent);
@@ -799,7 +792,7 @@ export function Alerts() {
name: displayName,
type: 'agent',
resourceType: 'Agent',
- node: agentResource.identity?.hostname ?? agentResource.name,
+ node: displayName,
instance:
asString(agent?.platform) ||
asString(agent?.osName) ||
@@ -832,7 +825,7 @@ export function Alerts() {
if (node) {
overridesList.push({
id: key,
- name: node.name,
+ name: getAlertResourceDisplayLabel(node),
type: 'agent',
resourceType: 'Agent',
disableConnectivity: thresholds.disableConnectivity || false,
@@ -845,7 +838,7 @@ export function Alerts() {
const coords = storageCoords(storage);
overridesList.push({
id: key,
- name: storage.name,
+ name: getAlertResourceDisplayLabel(storage),
type: 'storage',
resourceType: 'Storage',
node: coords.node,
@@ -862,7 +855,7 @@ export function Alerts() {
const data = pd(guest);
overridesList.push({
id: key,
- name: guest.name,
+ name: getAlertResourceDisplayLabel(guest),
type: 'guest',
resourceType: guest.type === 'vm' ? 'VM' : 'Container',
vmid: (data?.vmid as number | undefined) ?? guessNumericId(guest.id),
diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
index 44a2be4181..6a6e76cc36 100644
--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
@@ -15,6 +15,7 @@ import {
createDefaultQuietHours,
fallbackMaxAlertsPerHour,
extractTriggerValues,
+ getAlertResourceDisplayLabel,
getTriggerValue,
normalizeEmailConfigFromAPI,
normalizeMetricDelayMap,
@@ -43,7 +44,7 @@ import {
getAlertQuietSuppressCheckboxClass,
} from '@/utils/alertSchedulePresentation';
import type { RawOverrideConfig } from '@/types/alerts';
-import type { ResourceType } from '@/types/resource';
+import type { Resource, ResourceType } from '@/types/resource';
describe('normalizeMetricDelayMap', () => {
it('returns empty object when input is nullish', () => {
@@ -93,6 +94,37 @@ describe('normalizeMetricDelayMap', () => {
});
});
+describe('alert resource display labels', () => {
+ it('uses the governed aiSafeSummary when policy requires redaction', () => {
+ const resource = {
+ id: 'resource-1',
+ name: 'secret-host',
+ displayName: 'Secret Host',
+ type: 'agent',
+ policy: {
+ sensitivity: 'restricted',
+ routing: {
+ scope: 'local-only',
+ redact: ['hostname'],
+ },
+ },
+ aiSafeSummary: 'redacted by policy',
+ } as unknown as Resource;
+
+ expect(getAlertResourceDisplayLabel(resource)).toBe('redacted by policy');
+ });
+
+ it('falls back to the provided alert-specific fallback when needed', () => {
+ const resource = {
+ id: 'docker:agent-1/container-abc123',
+ name: '',
+ type: 'app-container',
+ } as unknown as Resource;
+
+ expect(getAlertResourceDisplayLabel(resource, 'abc123')).toBe('abc123');
+ });
+});
+
describe('tab path helpers', () => {
it('maps tab to path', () => {
expect(pathForTab('overview')).toBe('/alerts/overview');