Label the standalone alert thresholds tab "Machines"

The alert thresholds platform toggle and its sections still used the
older "Systems" / "System Disks" vocabulary while the rest of the
product (top nav, the standalone page, the AgentMachine data model)
settled on "Machines". Align the toggle, section titles, override
summary, and empty states so the thresholds page matches the canonical
nav term. Internal tab keys, routes, and the resourceType payload are
unchanged.
This commit is contained in:
rcourtman
2026-05-28 22:33:03 +01:00
parent 2636699383
commit 256b1f2fc7
5 changed files with 22 additions and 22 deletions
@@ -32,7 +32,7 @@ export function ThresholdsTable(props: ThresholdsTableProps) {
{ value: 'kubernetes', label: 'Kubernetes', icon: getPlatformIcon('kubernetes') },
{ value: 'truenas', label: 'TrueNAS', icon: getPlatformIcon('truenas') },
{ value: 'vmware', label: 'vSphere', icon: getPlatformIcon('vmware') },
{ value: 'systems', label: 'Systems', icon: getPlatformIcon('systems') },
{ value: 'systems', label: 'Machines', icon: getPlatformIcon('systems') },
],
},
{
@@ -396,7 +396,7 @@ describe('ThresholdsTable navigation and redirection', () => {
render(() => <ThresholdsTable {...(baseProps() as any)} agents={[host]} />);
await waitFor(() => {
expect(screen.getByTestId('resource-table-Systems')).toBeInTheDocument();
expect(screen.getByTestId('resource-table-Machines')).toBeInTheDocument();
});
});
@@ -409,10 +409,10 @@ describe('ThresholdsTable navigation and redirection', () => {
if (proxmoxTab) fireEvent.click(proxmoxTab);
expect(mockNavigate).toHaveBeenCalledWith('/alerts/thresholds/proxmox');
const systemsTab = screen
const machinesTab = screen
.getAllByRole('button')
.find((el) => el.textContent?.includes('Systems'));
if (systemsTab) fireEvent.click(systemsTab);
.find((el) => el.textContent?.includes('Machines'));
if (machinesTab) fireEvent.click(machinesTab);
expect(mockNavigate).toHaveBeenCalledWith('/alerts/thresholds/systems');
const vmwareTab = screen
@@ -438,10 +438,10 @@ describe('ThresholdsTable Resource Rendering', () => {
render(() => <ThresholdsTable {...(baseProps() as any)} agents={[host]} />);
await waitFor(() => {
expect(screen.getByTestId('resource-table-Systems')).toBeInTheDocument();
expect(screen.getByTestId('resource-table-Machines')).toBeInTheDocument();
});
expect(screen.getByTestId('resource-count-Systems')).toHaveTextContent('1');
expect(screen.getByTestId('resource-count-Machines')).toHaveTextContent('1');
expect(screen.getByTestId('resource-name-h1')).toHaveTextContent('Host 1');
});
@@ -468,7 +468,7 @@ describe('ThresholdsTable Resource Rendering', () => {
render(() => <ThresholdsTable {...(baseProps() as any)} agents={[host]} />);
await waitFor(() => {
expect(screen.getByTestId('resource-table-Systems')).toBeInTheDocument();
expect(screen.getByTestId('resource-table-Machines')).toBeInTheDocument();
});
expect(screen.getByTestId('resource-name-h2')).toHaveTextContent('Secret Host');
@@ -492,14 +492,14 @@ export function useThresholdsTableState(props: ThresholdsTableProps) {
},
{
key: 'agents',
label: 'Systems',
label: 'Machines',
overrides: countOverrides(agentsWithOverrides()),
tab: 'systems',
total: props.agents?.length ?? 0,
},
{
key: 'agentDisks',
label: 'System Disks',
label: 'Machine Disks',
overrides: countOverrides(agentDisksWithOverrides()),
tab: 'systems',
total: agentDisksWithOverrides().length,
@@ -73,9 +73,9 @@ describe('alertThresholdsPresentation', () => {
'No mail gateways configured yet. Add a Proxmox Mail Gateway connection in Settings → Infrastructure to manage thresholds.',
);
expect(PMG_THRESHOLDS_FILTER_EMPTY_STATE).toBe('No mail gateways match the current filters.');
expect(AGENT_THRESHOLDS_FILTER_EMPTY_STATE).toBe('No systems match the current filters.');
expect(AGENT_DISKS_EMPTY_STATE).toContain('Systems with mounted filesystems will appear here.');
expect(AGENT_DISKS_FILTER_EMPTY_STATE).toBe('No system disks match the current filters.');
expect(AGENT_THRESHOLDS_FILTER_EMPTY_STATE).toBe('No machines match the current filters.');
expect(AGENT_DISKS_EMPTY_STATE).toContain('Machines with mounted filesystems will appear here.');
expect(AGENT_DISKS_FILTER_EMPTY_STATE).toBe('No machine disks match the current filters.');
expect(CONTAINER_RUNTIMES_FILTER_EMPTY_STATE).toBe('No container runtimes match the current filters.');
expect(CONTAINERS_FILTER_EMPTY_STATE).toBe('No containers match the current filters.');
});
@@ -179,8 +179,8 @@ describe('alertThresholdsPresentation', () => {
expect(ALERT_THRESHOLDS_SECTION_TITLE_SNAPSHOTS).toBe('Snapshot Age');
expect(ALERT_THRESHOLDS_SECTION_TITLE_STORAGE).toBe('Storage Devices');
expect(ALERT_THRESHOLDS_SECTION_TITLE_PMG).toBe('Mail Gateway Thresholds');
expect(ALERT_THRESHOLDS_SECTION_TITLE_AGENTS).toBe('Systems');
expect(ALERT_THRESHOLDS_SECTION_TITLE_AGENT_DISKS).toBe('System Disks');
expect(ALERT_THRESHOLDS_SECTION_TITLE_AGENTS).toBe('Machines');
expect(ALERT_THRESHOLDS_SECTION_TITLE_AGENT_DISKS).toBe('Machine Disks');
expect(ALERT_THRESHOLDS_SECTION_TITLE_DOCKER_HOSTS).toBe('Container Runtimes');
expect(ALERT_THRESHOLDS_SECTION_TITLE_DOCKER_CONTAINERS).toBe('Containers');
expect(getAlertThresholdsSectionTitles()).toEqual({
@@ -192,8 +192,8 @@ describe('alertThresholdsPresentation', () => {
snapshots: 'Snapshot Age',
storage: 'Storage Devices',
pmg: 'Mail Gateway Thresholds',
agents: 'Systems',
agentDisks: 'System Disks',
agents: 'Machines',
agentDisks: 'Machine Disks',
dockerHosts: 'Container Runtimes',
dockerContainers: 'Containers',
});
@@ -13,10 +13,10 @@ export const STORAGE_THRESHOLDS_FILTER_EMPTY_STATE = 'No storage devices match t
export const PMG_THRESHOLDS_EMPTY_STATE =
`No mail gateways configured yet. Add a Proxmox Mail Gateway connection in ${getInfrastructureSettingsLocationLabel()} to manage thresholds.`;
export const PMG_THRESHOLDS_FILTER_EMPTY_STATE = 'No mail gateways match the current filters.';
export const AGENT_THRESHOLDS_FILTER_EMPTY_STATE = 'No systems match the current filters.';
export const AGENT_THRESHOLDS_FILTER_EMPTY_STATE = 'No machines match the current filters.';
export const AGENT_DISKS_EMPTY_STATE =
'No system disks found. Systems with mounted filesystems will appear here.';
export const AGENT_DISKS_FILTER_EMPTY_STATE = 'No system disks match the current filters.';
'No machine disks found. Machines with mounted filesystems will appear here.';
export const AGENT_DISKS_FILTER_EMPTY_STATE = 'No machine disks match the current filters.';
export const CONTAINER_RUNTIMES_FILTER_EMPTY_STATE =
'No container runtimes match the current filters.';
export const CONTAINERS_FILTER_EMPTY_STATE = 'No containers match the current filters.';
@@ -71,8 +71,8 @@ export const ALERT_THRESHOLDS_SECTION_TITLE_BACKUPS = 'Recovery';
export const ALERT_THRESHOLDS_SECTION_TITLE_SNAPSHOTS = 'Snapshot Age';
export const ALERT_THRESHOLDS_SECTION_TITLE_STORAGE = 'Storage Devices';
export const ALERT_THRESHOLDS_SECTION_TITLE_PMG = 'Mail Gateway Thresholds';
export const ALERT_THRESHOLDS_SECTION_TITLE_AGENTS = 'Systems';
export const ALERT_THRESHOLDS_SECTION_TITLE_AGENT_DISKS = 'System Disks';
export const ALERT_THRESHOLDS_SECTION_TITLE_AGENTS = 'Machines';
export const ALERT_THRESHOLDS_SECTION_TITLE_AGENT_DISKS = 'Machine Disks';
export const ALERT_THRESHOLDS_SECTION_TITLE_DOCKER_HOSTS = 'Container Runtimes';
export const ALERT_THRESHOLDS_SECTION_TITLE_DOCKER_CONTAINERS = 'Containers';