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.

Split Proxmox thresholds section owners

rcourtman86d39a0c1d32
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 41c28de9d5..53e2bd4d03 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -159,6 +159,19 @@ tab render owners live in
threshold row grouping, override-ID compatibility, resource normalization,
thresholds-table controller logic, or per-tab runtime should land in those
feature hooks and tab owners rather than being rebuilt inside the shell.
+Within the Proxmox tab, render-heavy ownership now further routes through
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx`,
+and `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx`
+with the shared section contract in
+`frontend-modern/src/features/alerts/thresholds/thresholdsTableSectionProps.ts`.
+Future Proxmox thresholds presentation work should extend those section owners
+instead of expanding `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx`
+back into a mixed render surface.
The alert resource thresholds editor now follows the same shape: shared metric
normalization, bounds, value-resolution, and override-label logic live in
`frontend-modern/src/components/Alerts/alertResourceTableModel.ts`, shared group
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index c4ea217605..818abf6b67 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -438,6 +438,19 @@ and the tab render owners live in
`frontend-modern/src/components/Alerts/ThresholdsTablePMGTab.tsx`,
`frontend-modern/src/components/Alerts/ThresholdsTableAgentsTab.tsx`, and
`frontend-modern/src/components/Alerts/ThresholdsTableDockerTab.tsx`.
+The Proxmox tab is itself now a shell that composes
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx`,
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx`,
+and `frontend-modern/src/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx`
+using the shared contract in
+`frontend-modern/src/features/alerts/thresholds/thresholdsTableSectionProps.ts`.
+Future Proxmox thresholds presentation changes should extend those section
+surfaces rather than restoring mixed JSX ownership to
+`frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx`.
Canonical threshold row shaping now routes through
`frontend-modern/src/features/alerts/thresholds/thresholdsResourceModel.ts`
plus the family-owned feature hooks
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx
new file mode 100644
index 0000000000..020225596c
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx
@@ -0,0 +1,167 @@
+import { Show } from 'solid-js';
+import Archive from 'lucide-solid/icons/archive';
+
+import { Card } from '@/components/shared/Card';
+import Toggle from '@/components/shared/Toggle';
+import { TagInput } from '@/components/shared/TagInput';
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import {
+ DEFAULT_BACKUP_FRESH_HOURS,
+ DEFAULT_BACKUP_STALE_HOURS,
+} from '@/features/alerts/thresholds/constants';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxBackupsSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('backups')}>
+ <CollapsibleSection
+ id="backups"
+ title={state.sectionTitles.backups}
+ collapsed={state.isCollapsed('backups')}
+ onToggle={() => state.toggleSection('backups')}
+ icon={<Archive class="w-5 h-5" />}
+ isGloballyDisabled={!tableProps.backupDefaults().enabled}
+ emptyMessage={state.BACKUP_THRESHOLDS_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('backups')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ resources={[
+ {
+ id: 'backups-defaults',
+ name: 'Global Defaults',
+ thresholds: state.backupDefaultsRecord(),
+ defaults: state.backupDefaultsRecord(),
+ editable: true,
+ editScope: 'backup',
+ },
+ ]}
+ columns={[
+ 'Fresh Hours',
+ 'Stale Hours',
+ 'Warning Days',
+ 'Critical Days',
+ 'Warning Size (GiB)',
+ 'Critical Size (GiB)',
+ ]}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage=""
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ showOfflineAlertsColumn={true}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %'])}
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={state.backupDefaultsRecord()}
+ setGlobalDefaults={(value) => {
+ state.updateBackupDefaults((prev) => {
+ const currentRecord = {
+ 'fresh hours': prev.freshHours ?? DEFAULT_BACKUP_FRESH_HOURS,
+ 'stale hours': prev.staleHours ?? DEFAULT_BACKUP_STALE_HOURS,
+ 'warning days': prev.warningDays ?? 0,
+ 'critical days': prev.criticalDays ?? 0,
+ };
+ const nextRecord =
+ typeof value === 'function' ? value(currentRecord) : { ...currentRecord, ...value };
+ return {
+ ...prev,
+ freshHours:
+ typeof nextRecord['fresh hours'] === 'number'
+ ? nextRecord['fresh hours']
+ : prev.freshHours,
+ staleHours:
+ typeof nextRecord['stale hours'] === 'number'
+ ? nextRecord['stale hours']
+ : prev.staleHours,
+ warningDays:
+ typeof nextRecord['warning days'] === 'number'
+ ? nextRecord['warning days']
+ : prev.warningDays,
+ criticalDays:
+ typeof nextRecord['critical days'] === 'number'
+ ? nextRecord['critical days']
+ : prev.criticalDays,
+ };
+ });
+ }}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={() => !tableProps.backupDefaults().enabled}
+ onToggleGlobalDisable={() =>
+ state.updateBackupDefaults((prev) => ({
+ ...prev,
+ enabled: !prev.enabled,
+ }))
+ }
+ factoryDefaults={state.backupFactoryDefaultsRecord()}
+ onResetDefaults={() => {
+ if (tableProps.resetBackupDefaults) {
+ tableProps.resetBackupDefaults();
+ tableProps.setHasUnsavedChanges(true);
+ } else {
+ state.updateBackupDefaults(state.backupFactoryConfig());
+ }
+ }}
+ />
+
+ <Card padding="md" tone="card" class="mt-6">
+ <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
+ <div>
+ <h3 class="text-sm font-semibold text-base-content">
+ {state.backupOrphanedPresentation.title}
+ </h3>
+ <p class="mt-1 text-xs text-muted">{state.backupOrphanedPresentation.description}</p>
+ </div>
+ <Toggle
+ checked={tableProps.backupDefaults().alertOrphaned ?? true}
+ onToggle={() =>
+ state.updateBackupDefaults((prev) => ({
+ ...prev,
+ alertOrphaned: !(prev.alertOrphaned ?? true),
+ }))
+ }
+ label={
+ <span class="text-sm font-medium text-base-content">
+ {state.backupOrphanedPresentation.toggleLabel}
+ </span>
+ }
+ description={
+ <span class="text-xs text-muted">
+ {state.backupOrphanedPresentation.toggleDescription}
+ </span>
+ }
+ size="sm"
+ />
+ </div>
+ <div class="mt-4">
+ <label class="text-xs font-medium uppercase tracking-wide text-muted">
+ {state.backupOrphanedPresentation.ignoreVmidsLabel}
+ </label>
+ <p class="mt-1 text-xs text-muted">
+ {state.backupOrphanedPresentation.ignoreVmidsDescription}
+ </p>
+ <TagInput
+ tags={tableProps.backupDefaults().ignoreVMIDs ?? []}
+ onChange={(tags) => {
+ state.updateBackupDefaults((prev) => ({ ...prev, ignoreVMIDs: tags }));
+ tableProps.setHasUnsavedChanges(true);
+ }}
+ placeholder={state.backupOrphanedPresentation.ignoreVmidsPlaceholder}
+ />
+ </div>
+ </Card>
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx
new file mode 100644
index 0000000000..c98edc5ae7
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx
@@ -0,0 +1,80 @@
+import Monitor from 'lucide-solid/icons/monitor';
+
+import { Card } from '@/components/shared/Card';
+import { TagInput } from '@/components/shared/TagInput';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxGuestFilteringSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <CollapsibleSection
+ id="guest-filtering"
+ title={state.sectionTitles.guestFiltering}
+ collapsed={state.isCollapsed('guest-filtering')}
+ onToggle={() => state.toggleSection('guest-filtering')}
+ icon={<Monitor class="w-5 h-5" />}
+ emptyMessage={state.GUEST_FILTERING_EMPTY_STATE}
+ >
+ <div class="grid grid-cols-1 gap-6 p-4 xl:grid-cols-3">
+ <Card padding="md" tone="card">
+ <div class="mb-2">
+ <h3 class="text-sm font-semibold text-base-content">
+ {state.guestFilterPresentation.ignoredPrefixes.title}
+ </h3>
+ <p class="text-xs text-muted">
+ {state.guestFilterPresentation.ignoredPrefixes.description}
+ </p>
+ </div>
+ <TagInput
+ tags={tableProps.ignoredGuestPrefixes()}
+ onChange={(tags) => {
+ tableProps.setIgnoredGuestPrefixes(tags);
+ tableProps.setHasUnsavedChanges(true);
+ }}
+ placeholder={state.guestFilterPresentation.ignoredPrefixes.placeholder}
+ />
+ </Card>
+
+ <Card padding="md" tone="card">
+ <div class="mb-2">
+ <h3 class="text-sm font-semibold text-base-content">
+ {state.guestFilterPresentation.tagWhitelist.title}
+ </h3>
+ <p class="text-xs text-muted">
+ {state.guestFilterPresentation.tagWhitelist.description}
+ </p>
+ </div>
+ <TagInput
+ tags={tableProps.guestTagWhitelist()}
+ onChange={(tags) => {
+ tableProps.setGuestTagWhitelist(tags);
+ tableProps.setHasUnsavedChanges(true);
+ }}
+ placeholder={state.guestFilterPresentation.tagWhitelist.placeholder}
+ />
+ </Card>
+
+ <Card padding="md" tone="card">
+ <div class="mb-2">
+ <h3 class="text-sm font-semibold text-base-content">
+ {state.guestFilterPresentation.tagBlacklist.title}
+ </h3>
+ <p class="text-xs text-muted">
+ {state.guestFilterPresentation.tagBlacklist.description}
+ </p>
+ </div>
+ <TagInput
+ tags={tableProps.guestTagBlacklist()}
+ onChange={(tags) => {
+ tableProps.setGuestTagBlacklist(tags);
+ tableProps.setHasUnsavedChanges(true);
+ }}
+ placeholder={state.guestFilterPresentation.tagBlacklist.placeholder}
+ />
+ </Card>
+ </div>
+ </CollapsibleSection>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx
new file mode 100644
index 0000000000..3bf15be73b
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx
@@ -0,0 +1,104 @@
+import { Show } from 'solid-js';
+import Monitor from 'lucide-solid/icons/monitor';
+
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxGuestsSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('guests')}>
+ <CollapsibleSection
+ id="guests"
+ title={state.sectionTitles.guests}
+ resourceCount={tableProps.allGuests().length}
+ collapsed={state.isCollapsed('guests')}
+ onToggle={() => state.toggleSection('guests')}
+ icon={<Monitor class="w-5 h-5" />}
+ isGloballyDisabled={tableProps.disableAllGuests()}
+ emptyMessage={state.GUEST_THRESHOLDS_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('guests')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ groupedResources={state.guestsGroupedByNode()}
+ groupHeaderMeta={state.guestGroupHeaderMeta()}
+ columns={[
+ 'CPU %',
+ 'Memory %',
+ 'Disk %',
+ 'Backup',
+ 'Snapshot',
+ 'Disk R MB/s',
+ 'Disk W MB/s',
+ 'Net In MB/s',
+ 'Net Out MB/s',
+ ]}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage={state.GUEST_THRESHOLDS_FILTER_EMPTY_STATE}
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ onToggleDisabled={state.toggleDisabled}
+ onToggleNodeConnectivity={state.toggleNodeConnectivity}
+ onToggleBackup={state.toggleBackup}
+ onToggleSnapshot={state.toggleSnapshot}
+ showOfflineAlertsColumn={true}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) =>
+ state.handleBulkEdit(ids, [
+ 'CPU %',
+ 'Memory %',
+ 'Disk %',
+ 'Disk R MB/s',
+ 'Disk W MB/s',
+ 'Net In MB/s',
+ 'Net Out MB/s',
+ ])
+ }
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={tableProps.guestDefaults}
+ setGlobalDefaults={tableProps.setGuestDefaults}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={tableProps.disableAllGuests}
+ onToggleGlobalDisable={() =>
+ tableProps.setDisableAllGuests(!tableProps.disableAllGuests())
+ }
+ globalDisableOfflineFlag={() => tableProps.guestDisableConnectivity()}
+ onToggleGlobalDisableOffline={() =>
+ tableProps.setGuestDisableConnectivity(!tableProps.guestDisableConnectivity())
+ }
+ globalOfflineSeverity={tableProps.guestPoweredOffSeverity()}
+ onSetGlobalOfflineState={(nextState) => {
+ if (nextState === 'off') {
+ tableProps.setGuestDisableConnectivity(true);
+ } else {
+ tableProps.setGuestDisableConnectivity(false);
+ tableProps.setGuestPoweredOffSeverity(
+ nextState === 'critical' ? 'critical' : 'warning',
+ );
+ }
+ tableProps.setHasUnsavedChanges(true);
+ }}
+ onSetOfflineState={state.setOfflineState}
+ showDelayColumn={true}
+ globalDelaySeconds={tableProps.timeThresholds().guest}
+ metricDelaySeconds={tableProps.metricTimeThresholds().guest ?? {}}
+ onMetricDelayChange={(metric, value) => state.updateMetricDelay('guest', metric, value)}
+ factoryDefaults={tableProps.factoryGuestDefaults}
+ onResetDefaults={tableProps.resetGuestDefaults}
+ />
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx
new file mode 100644
index 0000000000..f026d9f774
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx
@@ -0,0 +1,70 @@
+import { Show } from 'solid-js';
+import Server from 'lucide-solid/icons/server';
+
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxNodesSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('nodes')}>
+ <CollapsibleSection
+ id="nodes"
+ title={state.sectionTitles.nodes}
+ resourceCount={state.nodesWithOverrides().length}
+ collapsed={state.isCollapsed('nodes')}
+ onToggle={() => state.toggleSection('nodes')}
+ icon={<Server class="w-5 h-5" />}
+ isGloballyDisabled={tableProps.disableAllNodes()}
+ emptyMessage={state.NODE_THRESHOLDS_FILTER_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('nodes')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ resources={state.nodesWithOverrides()}
+ columns={['CPU %', 'Memory %', 'Disk %', 'Temp °C']}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage={state.NODE_THRESHOLDS_FILTER_EMPTY_STATE}
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ onToggleDisabled={state.toggleDisabled}
+ onToggleNodeConnectivity={state.toggleNodeConnectivity}
+ showOfflineAlertsColumn={true}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) =>
+ state.handleBulkEdit(ids, ['CPU %', 'Memory %', 'Disk %', 'Temp °C'])
+ }
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={tableProps.nodeDefaults}
+ setGlobalDefaults={tableProps.setNodeDefaults}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={tableProps.disableAllNodes}
+ onToggleGlobalDisable={() =>
+ tableProps.setDisableAllNodes(!tableProps.disableAllNodes())
+ }
+ globalDisableOfflineFlag={tableProps.disableAllNodesOffline}
+ onToggleGlobalDisableOffline={() =>
+ tableProps.setDisableAllNodesOffline(!tableProps.disableAllNodesOffline())
+ }
+ showDelayColumn={true}
+ globalDelaySeconds={tableProps.timeThresholds().node}
+ metricDelaySeconds={tableProps.metricTimeThresholds().node ?? {}}
+ onMetricDelayChange={(metric, value) => state.updateMetricDelay('node', metric, value)}
+ factoryDefaults={tableProps.factoryNodeDefaults}
+ onResetDefaults={tableProps.resetNodeDefaults}
+ />
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx
new file mode 100644
index 0000000000..ae8daed389
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx
@@ -0,0 +1,75 @@
+import { Show } from 'solid-js';
+import Database from 'lucide-solid/icons/database';
+
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxPBSSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('pbs')}>
+ <CollapsibleSection
+ id="pbs"
+ title={state.sectionTitles.pbs}
+ resourceCount={state.pbsServersWithOverrides().length}
+ collapsed={state.isCollapsed('pbs')}
+ onToggle={() => state.toggleSection('pbs')}
+ icon={<Database class="w-5 h-5" />}
+ isGloballyDisabled={tableProps.disableAllPBS()}
+ emptyMessage={state.PBS_THRESHOLDS_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('pbs')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ resources={state.pbsServersWithOverrides()}
+ columns={['CPU %', 'Memory %']}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage={state.PBS_THRESHOLDS_FILTER_EMPTY_STATE}
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ onToggleDisabled={state.toggleDisabled}
+ onToggleNodeConnectivity={state.toggleNodeConnectivity}
+ showOfflineAlertsColumn={true}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) =>
+ state.handleBulkEdit(ids, [
+ 'CPU %',
+ 'Memory %',
+ 'Disk R MB/s',
+ 'Disk W MB/s',
+ 'Net In MB/s',
+ 'Net Out MB/s',
+ ])
+ }
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={tableProps.pbsDefaults ?? { cpu: 80, memory: 85 }}
+ setGlobalDefaults={tableProps.setPBSDefaults}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={tableProps.disableAllPBS}
+ onToggleGlobalDisable={() => tableProps.setDisableAllPBS(!tableProps.disableAllPBS())}
+ globalDisableOfflineFlag={tableProps.disableAllPBSOffline}
+ onToggleGlobalDisableOffline={() =>
+ tableProps.setDisableAllPBSOffline(!tableProps.disableAllPBSOffline())
+ }
+ showDelayColumn={true}
+ globalDelaySeconds={tableProps.timeThresholds().pbs}
+ metricDelaySeconds={tableProps.metricTimeThresholds().pbs ?? {}}
+ onMetricDelayChange={(metric, value) => state.updateMetricDelay('pbs', metric, value)}
+ factoryDefaults={tableProps.factoryPBSDefaults}
+ onResetDefaults={tableProps.resetPBSDefaults}
+ />
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx
new file mode 100644
index 0000000000..0cd859d8b8
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx
@@ -0,0 +1,106 @@
+import { Show } from 'solid-js';
+import Camera from 'lucide-solid/icons/camera';
+
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxSnapshotsSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('snapshots')}>
+ <CollapsibleSection
+ id="snapshots"
+ title={state.sectionTitles.snapshots}
+ collapsed={state.isCollapsed('snapshots')}
+ onToggle={() => state.toggleSection('snapshots')}
+ icon={<Camera class="w-5 h-5" />}
+ isGloballyDisabled={!tableProps.snapshotDefaults().enabled}
+ emptyMessage={state.SNAPSHOT_THRESHOLDS_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('snapshots')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ resources={[
+ {
+ id: 'snapshots-defaults',
+ name: 'Global Defaults',
+ thresholds: state.snapshotDefaultsRecord(),
+ defaults: state.snapshotDefaultsRecord(),
+ editable: true,
+ editScope: 'snapshot',
+ },
+ ]}
+ columns={['Warning Days', 'Critical Days']}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage=""
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ showOfflineAlertsColumn={true}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %', 'Temperature °C'])}
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={state.snapshotDefaultsRecord()}
+ setGlobalDefaults={(value) => {
+ state.updateSnapshotDefaults((prev) => {
+ const currentRecord = {
+ 'warning days': prev.warningDays ?? 0,
+ 'critical days': prev.criticalDays ?? 0,
+ 'warning size (gib)': prev.warningSizeGiB ?? 0,
+ 'critical size (gib)': prev.criticalSizeGiB ?? 0,
+ };
+ const nextRecord =
+ typeof value === 'function' ? value(currentRecord) : { ...currentRecord, ...value };
+ return {
+ ...prev,
+ warningDays:
+ typeof nextRecord['warning days'] === 'number'
+ ? nextRecord['warning days']
+ : prev.warningDays,
+ criticalDays:
+ typeof nextRecord['critical days'] === 'number'
+ ? nextRecord['critical days']
+ : prev.criticalDays,
+ warningSizeGiB:
+ typeof nextRecord['warning size (gib)'] === 'number'
+ ? nextRecord['warning size (gib)']
+ : prev.warningSizeGiB,
+ criticalSizeGiB:
+ typeof nextRecord['critical size (gib)'] === 'number'
+ ? nextRecord['critical size (gib)']
+ : prev.criticalSizeGiB,
+ };
+ });
+ }}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={() => !tableProps.snapshotDefaults().enabled}
+ onToggleGlobalDisable={() =>
+ state.updateSnapshotDefaults((prev) => ({
+ ...prev,
+ enabled: !prev.enabled,
+ }))
+ }
+ factoryDefaults={state.snapshotFactoryDefaultsRecord()}
+ onResetDefaults={() => {
+ if (tableProps.resetSnapshotDefaults) {
+ tableProps.resetSnapshotDefaults();
+ tableProps.setHasUnsavedChanges(true);
+ } else {
+ state.updateSnapshotDefaults(state.snapshotFactoryConfig());
+ }
+ }}
+ />
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx
new file mode 100644
index 0000000000..8660caf275
--- /dev/null
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx
@@ -0,0 +1,75 @@
+import { Show } from 'solid-js';
+import HardDrive from 'lucide-solid/icons/hard-drive';
+
+import { ResourceTable } from './ResourceTable';
+import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
+import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxStorageSection(props: ThresholdsTableSectionProps) {
+ const { state, tableProps } = props;
+
+ return (
+ <Show when={state.hasSection('storage')}>
+ <CollapsibleSection
+ id="storage"
+ title={state.sectionTitles.storage}
+ resourceCount={tableProps.storage.length}
+ collapsed={state.isCollapsed('storage')}
+ onToggle={() => state.toggleSection('storage')}
+ icon={<HardDrive class="w-5 h-5" />}
+ isGloballyDisabled={tableProps.disableAllStorage()}
+ emptyMessage={state.STORAGE_THRESHOLDS_EMPTY_STATE}
+ >
+ <div ref={state.registerSection('storage')} class="scroll-mt-24">
+ <ResourceTable
+ title=""
+ groupedResources={state.storageGroupedByNode()}
+ groupHeaderMeta={state.guestGroupHeaderMeta()}
+ columns={['Usage %']}
+ activeAlerts={tableProps.activeAlerts}
+ emptyMessage={state.STORAGE_THRESHOLDS_FILTER_EMPTY_STATE}
+ onEdit={state.startEditing}
+ onSaveEdit={state.saveEdit}
+ onCancelEdit={state.cancelEdit}
+ onRemoveOverride={state.removeOverride}
+ onToggleDisabled={state.toggleDisabled}
+ showOfflineAlertsColumn={false}
+ editingId={state.editingId}
+ editingThresholds={state.editingThresholds}
+ setEditingThresholds={state.setEditingThresholds}
+ editingNote={state.editingNote}
+ setEditingNote={state.setEditingNote}
+ onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %'])}
+ formatMetricValue={formatMetricValue}
+ hasActiveAlert={state.hasActiveAlert}
+ globalDefaults={{ usage: tableProps.storageDefault() }}
+ setGlobalDefaults={(value) => {
+ if (typeof value === 'function') {
+ const nextValue = value({ usage: tableProps.storageDefault() });
+ tableProps.setStorageDefault(nextValue.usage ?? 85);
+ } else {
+ tableProps.setStorageDefault(value.usage ?? 85);
+ }
+ }}
+ setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
+ globalDisableFlag={tableProps.disableAllStorage}
+ onToggleGlobalDisable={() =>
+ tableProps.setDisableAllStorage(!tableProps.disableAllStorage())
+ }
+ showDelayColumn={true}
+ globalDelaySeconds={tableProps.timeThresholds().storage}
+ metricDelaySeconds={tableProps.metricTimeThresholds().storage ?? {}}
+ onMetricDelayChange={(metric, value) => state.updateMetricDelay('storage', metric, value)}
+ factoryDefaults={
+ tableProps.factoryStorageDefault !== undefined
+ ? { usage: tableProps.factoryStorageDefault }
+ : undefined
+ }
+ onResetDefaults={tableProps.resetStorageDefault}
+ />
+ </div>
+ </CollapsibleSection>
+ </Show>
+ );
+}
diff --git a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx
index e3a47cc42e..9bdf92d609 100644
--- a/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx
+++ b/frontend-modern/src/components/Alerts/ThresholdsTableProxmoxTab.tsx
@@ -1,621 +1,22 @@
-import { Show } from 'solid-js';
-import Monitor from 'lucide-solid/icons/monitor';
-import HardDrive from 'lucide-solid/icons/hard-drive';
-import Database from 'lucide-solid/icons/database';
-import Archive from 'lucide-solid/icons/archive';
-import Camera from 'lucide-solid/icons/camera';
-import Server from 'lucide-solid/icons/server';
-
-import { Card } from '@/components/shared/Card';
-import Toggle from '@/components/shared/Toggle';
-import { TagInput } from '@/components/shared/TagInput';
-import { ResourceTable } from './ResourceTable';
-import { CollapsibleSection } from './Thresholds/sections/CollapsibleSection';
-import type { ThresholdsTableProps } from '@/features/alerts/thresholds/types';
-import type { ThresholdsTableState } from '@/features/alerts/thresholds/hooks/useThresholdsTableState';
-import {
- DEFAULT_BACKUP_FRESH_HOURS,
- DEFAULT_BACKUP_STALE_HOURS,
-} from '@/features/alerts/thresholds/constants';
-import { formatMetricValue } from '@/features/alerts/thresholds/helpers';
-
-interface ThresholdsTableTabProps {
- state: ThresholdsTableState;
- tableProps: ThresholdsTableProps;
-}
-
-export function ThresholdsTableProxmoxTab(props: ThresholdsTableTabProps) {
- const { state, tableProps } = props;
-
+import { ThresholdsTableProxmoxBackupsSection } from './ThresholdsTableProxmoxBackupsSection';
+import { ThresholdsTableProxmoxGuestFilteringSection } from './ThresholdsTableProxmoxGuestFilteringSection';
+import { ThresholdsTableProxmoxGuestsSection } from './ThresholdsTableProxmoxGuestsSection';
+import { ThresholdsTableProxmoxNodesSection } from './ThresholdsTableProxmoxNodesSection';
+import { ThresholdsTableProxmoxPBSSection } from './ThresholdsTableProxmoxPBSSection';
+import { ThresholdsTableProxmoxSnapshotsSection } from './ThresholdsTableProxmoxSnapshotsSection';
+import { ThresholdsTableProxmoxStorageSection } from './ThresholdsTableProxmoxStorageSection';
+import type { ThresholdsTableSectionProps } from '@/features/alerts/thresholds/thresholdsTableSectionProps';
+
+export function ThresholdsTableProxmoxTab(props: ThresholdsTableSectionProps) {
return (
<>
- <Show when={state.hasSection('nodes')}>
- <CollapsibleSection
- id="nodes"
- title={state.sectionTitles.nodes}
- resourceCount={state.nodesWithOverrides().length}
- collapsed={state.isCollapsed('nodes')}
- onToggle={() => state.toggleSection('nodes')}
- icon={<Server class="w-5 h-5" />}
- isGloballyDisabled={tableProps.disableAllNodes()}
- emptyMessage={state.NODE_THRESHOLDS_FILTER_EMPTY_STATE}
- >
- <div ref={state.registerSection('nodes')} class="scroll-mt-24">
- <ResourceTable
- title=""
- resources={state.nodesWithOverrides()}
- columns={['CPU %', 'Memory %', 'Disk %', 'Temp °C']}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage={state.NODE_THRESHOLDS_FILTER_EMPTY_STATE}
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- onToggleDisabled={state.toggleDisabled}
- onToggleNodeConnectivity={state.toggleNodeConnectivity}
- showOfflineAlertsColumn={true}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) =>
- state.handleBulkEdit(ids, ['CPU %', 'Memory %', 'Disk %', 'Temp °C'])
- }
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={tableProps.nodeDefaults}
- setGlobalDefaults={tableProps.setNodeDefaults}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={tableProps.disableAllNodes}
- onToggleGlobalDisable={() =>
- tableProps.setDisableAllNodes(!tableProps.disableAllNodes())
- }
- globalDisableOfflineFlag={tableProps.disableAllNodesOffline}
- onToggleGlobalDisableOffline={() =>
- tableProps.setDisableAllNodesOffline(!tableProps.disableAllNodesOffline())
- }
- showDelayColumn={true}
- globalDelaySeconds={tableProps.timeThresholds().node}
- metricDelaySeconds={tableProps.metricTimeThresholds().node ?? {}}
- onMetricDelayChange={(metric, value) => state.updateMetricDelay('node', metric, value)}
- factoryDefaults={tableProps.factoryNodeDefaults}
- onResetDefaults={tableProps.resetNodeDefaults}
- />
- </div>
- </CollapsibleSection>
- </Show>
-
- <Show when={state.hasSection('pbs')}>
- <CollapsibleSection
- id="pbs"
- title={state.sectionTitles.pbs}
- resourceCount={state.pbsServersWithOverrides().length}
- collapsed={state.isCollapsed('pbs')}
- onToggle={() => state.toggleSection('pbs')}
- icon={<Database class="w-5 h-5" />}
- isGloballyDisabled={tableProps.disableAllPBS()}
- emptyMessage={state.PBS_THRESHOLDS_EMPTY_STATE}
- >
- <div ref={state.registerSection('pbs')} class="scroll-mt-24">
- <ResourceTable
- title=""
- resources={state.pbsServersWithOverrides()}
- columns={['CPU %', 'Memory %']}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage={state.PBS_THRESHOLDS_FILTER_EMPTY_STATE}
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- onToggleDisabled={state.toggleDisabled}
- onToggleNodeConnectivity={state.toggleNodeConnectivity}
- showOfflineAlertsColumn={true}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) =>
- state.handleBulkEdit(ids, [
- 'CPU %',
- 'Memory %',
- 'Disk R MB/s',
- 'Disk W MB/s',
- 'Net In MB/s',
- 'Net Out MB/s',
- ])
- }
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={tableProps.pbsDefaults ?? { cpu: 80, memory: 85 }}
- setGlobalDefaults={tableProps.setPBSDefaults}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={tableProps.disableAllPBS}
- onToggleGlobalDisable={() => tableProps.setDisableAllPBS(!tableProps.disableAllPBS())}
- globalDisableOfflineFlag={tableProps.disableAllPBSOffline}
- onToggleGlobalDisableOffline={() =>
- tableProps.setDisableAllPBSOffline(!tableProps.disableAllPBSOffline())
- }
- showDelayColumn={true}
- globalDelaySeconds={tableProps.timeThresholds().pbs}
- metricDelaySeconds={tableProps.metricTimeThresholds().pbs ?? {}}
- onMetricDelayChange={(metric, value) => state.updateMetricDelay('pbs', metric, value)}
- factoryDefaults={tableProps.factoryPBSDefaults}
- onResetDefaults={tableProps.resetPBSDefaults}
- />
- </div>
- </CollapsibleSection>
- </Show>
-
- <Show when={state.hasSection('guests')}>
- <CollapsibleSection
- id="guests"
- title={state.sectionTitles.guests}
- resourceCount={tableProps.allGuests().length}
- collapsed={state.isCollapsed('guests')}
- onToggle={() => state.toggleSection('guests')}
- icon={<Monitor class="w-5 h-5" />}
- isGloballyDisabled={tableProps.disableAllGuests()}
- emptyMessage={state.GUEST_THRESHOLDS_EMPTY_STATE}
- >
- <div ref={state.registerSection('guests')} class="scroll-mt-24">
- <ResourceTable
- title=""
- groupedResources={state.guestsGroupedByNode()}
- groupHeaderMeta={state.guestGroupHeaderMeta()}
- columns={[
- 'CPU %',
- 'Memory %',
- 'Disk %',
- 'Backup',
- 'Snapshot',
- 'Disk R MB/s',
- 'Disk W MB/s',
- 'Net In MB/s',
- 'Net Out MB/s',
- ]}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage={state.GUEST_THRESHOLDS_FILTER_EMPTY_STATE}
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- onToggleDisabled={state.toggleDisabled}
- onToggleNodeConnectivity={state.toggleNodeConnectivity}
- onToggleBackup={state.toggleBackup}
- onToggleSnapshot={state.toggleSnapshot}
- showOfflineAlertsColumn={true}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) =>
- state.handleBulkEdit(ids, [
- 'CPU %',
- 'Memory %',
- 'Disk %',
- 'Disk R MB/s',
- 'Disk W MB/s',
- 'Net In MB/s',
- 'Net Out MB/s',
- ])
- }
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={tableProps.guestDefaults}
- setGlobalDefaults={tableProps.setGuestDefaults}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={tableProps.disableAllGuests}
- onToggleGlobalDisable={() =>
- tableProps.setDisableAllGuests(!tableProps.disableAllGuests())
- }
- globalDisableOfflineFlag={() => tableProps.guestDisableConnectivity()}
- onToggleGlobalDisableOffline={() =>
- tableProps.setGuestDisableConnectivity(!tableProps.guestDisableConnectivity())
- }
- globalOfflineSeverity={tableProps.guestPoweredOffSeverity()}
- onSetGlobalOfflineState={(nextState) => {
- if (nextState === 'off') {
- tableProps.setGuestDisableConnectivity(true);
- } else {
- tableProps.setGuestDisableConnectivity(false);
- tableProps.setGuestPoweredOffSeverity(
- nextState === 'critical' ? 'critical' : 'warning',
- );
- }
- tableProps.setHasUnsavedChanges(true);
- }}
- onSetOfflineState={state.setOfflineState}
- showDelayColumn={true}
- globalDelaySeconds={tableProps.timeThresholds().guest}
- metricDelaySeconds={tableProps.metricTimeThresholds().guest ?? {}}
- onMetricDelayChange={(metric, value) => state.updateMetricDelay('guest', metric, value)}
- factoryDefaults={tableProps.factoryGuestDefaults}
- onResetDefaults={tableProps.resetGuestDefaults}
- />
- </div>
- </CollapsibleSection>
- </Show>
-
- <CollapsibleSection
- id="guest-filtering"
- title={state.sectionTitles.guestFiltering}
- collapsed={state.isCollapsed('guest-filtering')}
- onToggle={() => state.toggleSection('guest-filtering')}
- icon={<Monitor class="w-5 h-5" />}
- emptyMessage={state.GUEST_FILTERING_EMPTY_STATE}
- >
- <div class="grid grid-cols-1 gap-6 p-4 xl:grid-cols-3">
- <Card padding="md" tone="card">
- <div class="mb-2">
- <h3 class="text-sm font-semibold text-base-content">
- {state.guestFilterPresentation.ignoredPrefixes.title}
- </h3>
- <p class="text-xs text-muted">
- {state.guestFilterPresentation.ignoredPrefixes.description}
- </p>
- </div>
- <TagInput
- tags={tableProps.ignoredGuestPrefixes()}
- onChange={(tags) => {
- tableProps.setIgnoredGuestPrefixes(tags);
- tableProps.setHasUnsavedChanges(true);
- }}
- placeholder={state.guestFilterPresentation.ignoredPrefixes.placeholder}
- />
- </Card>
-
- <Card padding="md" tone="card">
- <div class="mb-2">
- <h3 class="text-sm font-semibold text-base-content">
- {state.guestFilterPresentation.tagWhitelist.title}
- </h3>
- <p class="text-xs text-muted">
- {state.guestFilterPresentation.tagWhitelist.description}
- </p>
- </div>
- <TagInput
- tags={tableProps.guestTagWhitelist()}
- onChange={(tags) => {
- tableProps.setGuestTagWhitelist(tags);
- tableProps.setHasUnsavedChanges(true);
- }}
- placeholder={state.guestFilterPresentation.tagWhitelist.placeholder}
- />
- </Card>
-
- <Card padding="md" tone="card">
- <div class="mb-2">
- <h3 class="text-sm font-semibold text-base-content">
- {state.guestFilterPresentation.tagBlacklist.title}
- </h3>
- <p class="text-xs text-muted">
- {state.guestFilterPresentation.tagBlacklist.description}
- </p>
- </div>
- <TagInput
- tags={tableProps.guestTagBlacklist()}
- onChange={(tags) => {
- tableProps.setGuestTagBlacklist(tags);
- tableProps.setHasUnsavedChanges(true);
- }}
- placeholder={state.guestFilterPresentation.tagBlacklist.placeholder}
- />
- </Card>
- </div>
- </CollapsibleSection>
-
- <Show when={state.hasSection('backups')}>
- <CollapsibleSection
- id="backups"
- title={state.sectionTitles.backups}
- collapsed={state.isCollapsed('backups')}
- onToggle={() => state.toggleSection('backups')}
- icon={<Archive class="w-5 h-5" />}
- isGloballyDisabled={!tableProps.backupDefaults().enabled}
- emptyMessage={state.BACKUP_THRESHOLDS_EMPTY_STATE}
- >
- <div ref={state.registerSection('backups')} class="scroll-mt-24">
- <ResourceTable
- title=""
- resources={[
- {
- id: 'backups-defaults',
- name: 'Global Defaults',
- thresholds: state.backupDefaultsRecord(),
- defaults: state.backupDefaultsRecord(),
- editable: true,
- editScope: 'backup',
- },
- ]}
- columns={[
- 'Fresh Hours',
- 'Stale Hours',
- 'Warning Days',
- 'Critical Days',
- 'Warning Size (GiB)',
- 'Critical Size (GiB)',
- ]}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage=""
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- showOfflineAlertsColumn={true}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %'])}
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={state.backupDefaultsRecord()}
- setGlobalDefaults={(value) => {
- state.updateBackupDefaults((prev) => {
- const currentRecord = {
- 'fresh hours': prev.freshHours ?? DEFAULT_BACKUP_FRESH_HOURS,
- 'stale hours': prev.staleHours ?? DEFAULT_BACKUP_STALE_HOURS,
- 'warning days': prev.warningDays ?? 0,
- 'critical days': prev.criticalDays ?? 0,
- };
- const nextRecord =
- typeof value === 'function'
- ? value(currentRecord)
- : { ...currentRecord, ...value };
- return {
- ...prev,
- freshHours:
- typeof nextRecord['fresh hours'] === 'number'
- ? nextRecord['fresh hours']
- : prev.freshHours,
- staleHours:
- typeof nextRecord['stale hours'] === 'number'
- ? nextRecord['stale hours']
- : prev.staleHours,
- warningDays:
- typeof nextRecord['warning days'] === 'number'
- ? nextRecord['warning days']
- : prev.warningDays,
- criticalDays:
- typeof nextRecord['critical days'] === 'number'
- ? nextRecord['critical days']
- : prev.criticalDays,
- };
- });
- }}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={() => !tableProps.backupDefaults().enabled}
- onToggleGlobalDisable={() =>
- state.updateBackupDefaults((prev) => ({
- ...prev,
- enabled: !prev.enabled,
- }))
- }
- factoryDefaults={state.backupFactoryDefaultsRecord()}
- onResetDefaults={() => {
- if (tableProps.resetBackupDefaults) {
- tableProps.resetBackupDefaults();
- tableProps.setHasUnsavedChanges(true);
- } else {
- state.updateBackupDefaults(state.backupFactoryConfig());
- }
- }}
- />
-
- <Card padding="md" tone="card" class="mt-6">
- <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
- <div>
- <h3 class="text-sm font-semibold text-base-content">
- {state.backupOrphanedPresentation.title}
- </h3>
- <p class="mt-1 text-xs text-muted">
- {state.backupOrphanedPresentation.description}
- </p>
- </div>
- <Toggle
- checked={tableProps.backupDefaults().alertOrphaned ?? true}
- onToggle={() =>
- state.updateBackupDefaults((prev) => ({
- ...prev,
- alertOrphaned: !(prev.alertOrphaned ?? true),
- }))
- }
- label={
- <span class="text-sm font-medium text-base-content">
- {state.backupOrphanedPresentation.toggleLabel}
- </span>
- }
- description={
- <span class="text-xs text-muted">
- {state.backupOrphanedPresentation.toggleDescription}
- </span>
- }
- size="sm"
- />
- </div>
- <div class="mt-4">
- <label class="text-xs font-medium uppercase tracking-wide text-muted">
- {state.backupOrphanedPresentation.ignoreVmidsLabel}
- </label>
- <p class="mt-1 text-xs text-muted">
- {state.backupOrphanedPresentation.ignoreVmidsDescription}
- </p>
- <TagInput
- tags={tableProps.backupDefaults().ignoreVMIDs ?? []}
- onChange={(tags) => {
- state.updateBackupDefaults((prev) => ({ ...prev, ignoreVMIDs: tags }));
- tableProps.setHasUnsavedChanges(true);
- }}
- placeholder={state.backupOrphanedPresentation.ignoreVmidsPlaceholder}
- />
- </div>
- </Card>
- </div>
- </CollapsibleSection>
- </Show>
-
- <Show when={state.hasSection('snapshots')}>
- <CollapsibleSection
- id="snapshots"
- title={state.sectionTitles.snapshots}
- collapsed={state.isCollapsed('snapshots')}
- onToggle={() => state.toggleSection('snapshots')}
- icon={<Camera class="w-5 h-5" />}
- isGloballyDisabled={!tableProps.snapshotDefaults().enabled}
- emptyMessage={state.SNAPSHOT_THRESHOLDS_EMPTY_STATE}
- >
- <div ref={state.registerSection('snapshots')} class="scroll-mt-24">
- <ResourceTable
- title=""
- resources={[
- {
- id: 'snapshots-defaults',
- name: 'Global Defaults',
- thresholds: state.snapshotDefaultsRecord(),
- defaults: state.snapshotDefaultsRecord(),
- editable: true,
- editScope: 'snapshot',
- },
- ]}
- columns={['Warning Days', 'Critical Days']}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage=""
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- showOfflineAlertsColumn={true}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %', 'Temperature °C'])}
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={state.snapshotDefaultsRecord()}
- setGlobalDefaults={(value) => {
- state.updateSnapshotDefaults((prev) => {
- const currentRecord = {
- 'warning days': prev.warningDays ?? 0,
- 'critical days': prev.criticalDays ?? 0,
- 'warning size (gib)': prev.warningSizeGiB ?? 0,
- 'critical size (gib)': prev.criticalSizeGiB ?? 0,
- };
- const nextRecord =
- typeof value === 'function'
- ? value(currentRecord)
- : { ...currentRecord, ...value };
- return {
- ...prev,
- warningDays:
- typeof nextRecord['warning days'] === 'number'
- ? nextRecord['warning days']
- : prev.warningDays,
- criticalDays:
- typeof nextRecord['critical days'] === 'number'
- ? nextRecord['critical days']
- : prev.criticalDays,
- warningSizeGiB:
- typeof nextRecord['warning size (gib)'] === 'number'
- ? nextRecord['warning size (gib)']
- : prev.warningSizeGiB,
- criticalSizeGiB:
- typeof nextRecord['critical size (gib)'] === 'number'
- ? nextRecord['critical size (gib)']
- : prev.criticalSizeGiB,
- };
- });
- }}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={() => !tableProps.snapshotDefaults().enabled}
- onToggleGlobalDisable={() =>
- state.updateSnapshotDefaults((prev) => ({
- ...prev,
- enabled: !prev.enabled,
- }))
- }
- factoryDefaults={state.snapshotFactoryDefaultsRecord()}
- onResetDefaults={() => {
- if (tableProps.resetSnapshotDefaults) {
- tableProps.resetSnapshotDefaults();
- tableProps.setHasUnsavedChanges(true);
- } else {
- state.updateSnapshotDefaults(state.snapshotFactoryConfig());
- }
- }}
- />
- </div>
- </CollapsibleSection>
- </Show>
-
- <Show when={state.hasSection('storage')}>
- <CollapsibleSection
- id="storage"
- title={state.sectionTitles.storage}
- resourceCount={tableProps.storage.length}
- collapsed={state.isCollapsed('storage')}
- onToggle={() => state.toggleSection('storage')}
- icon={<HardDrive class="w-5 h-5" />}
- isGloballyDisabled={tableProps.disableAllStorage()}
- emptyMessage={state.STORAGE_THRESHOLDS_EMPTY_STATE}
- >
- <div ref={state.registerSection('storage')} class="scroll-mt-24">
- <ResourceTable
- title=""
- groupedResources={state.storageGroupedByNode()}
- groupHeaderMeta={state.guestGroupHeaderMeta()}
- columns={['Usage %']}
- activeAlerts={tableProps.activeAlerts}
- emptyMessage={state.STORAGE_THRESHOLDS_FILTER_EMPTY_STATE}
- onEdit={state.startEditing}
- onSaveEdit={state.saveEdit}
- onCancelEdit={state.cancelEdit}
- onRemoveOverride={state.removeOverride}
- onToggleDisabled={state.toggleDisabled}
- showOfflineAlertsColumn={false}
- editingId={state.editingId}
- editingThresholds={state.editingThresholds}
- setEditingThresholds={state.setEditingThresholds}
- editingNote={state.editingNote}
- setEditingNote={state.setEditingNote}
- onBulkEdit={(ids) => state.handleBulkEdit(ids, ['Usage %'])}
- formatMetricValue={formatMetricValue}
- hasActiveAlert={state.hasActiveAlert}
- globalDefaults={{ usage: tableProps.storageDefault() }}
- setGlobalDefaults={(value) => {
- if (typeof value === 'function') {
- const newValue = value({ usage: tableProps.storageDefault() });
- tableProps.setStorageDefault(newValue.usage ?? 85);
- } else {
- tableProps.setStorageDefault(value.usage ?? 85);
- }
- }}
- setHasUnsavedChanges={tableProps.setHasUnsavedChanges}
- globalDisableFlag={tableProps.disableAllStorage}
- onToggleGlobalDisable={() =>
- tableProps.setDisableAllStorage(!tableProps.disableAllStorage())
- }
- showDelayColumn={true}
- globalDelaySeconds={tableProps.timeThresholds().storage}
- metricDelaySeconds={tableProps.metricTimeThresholds().storage ?? {}}
- onMetricDelayChange={(metric, value) =>
- state.updateMetricDelay('storage', metric, value)
- }
- factoryDefaults={
- tableProps.factoryStorageDefault !== undefined
- ? { usage: tableProps.factoryStorageDefault }
- : undefined
- }
- onResetDefaults={tableProps.resetStorageDefault}
- />
- </div>
- </CollapsibleSection>
- </Show>
+ <ThresholdsTableProxmoxNodesSection {...props} />
+ <ThresholdsTableProxmoxPBSSection {...props} />
+ <ThresholdsTableProxmoxGuestsSection {...props} />
+ <ThresholdsTableProxmoxGuestFilteringSection {...props} />
+ <ThresholdsTableProxmoxBackupsSection {...props} />
+ <ThresholdsTableProxmoxSnapshotsSection {...props} />
+ <ThresholdsTableProxmoxStorageSection {...props} />
</>
);
}
diff --git a/frontend-modern/src/features/alerts/thresholds/thresholdsTableSectionProps.ts b/frontend-modern/src/features/alerts/thresholds/thresholdsTableSectionProps.ts
new file mode 100644
index 0000000000..c34075b3f9
--- /dev/null
+++ b/frontend-modern/src/features/alerts/thresholds/thresholdsTableSectionProps.ts
@@ -0,0 +1,7 @@
+import type { ThresholdsTableProps } from './types';
+import type { ThresholdsTableState } from './hooks/useThresholdsTableState';
+
+export interface ThresholdsTableSectionProps {
+ state: ThresholdsTableState;
+ tableProps: ThresholdsTableProps;
+}
diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
index bb574f39e4..12832a874e 100644
--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
@@ -31,6 +31,13 @@ import thresholdsTableSource from '@/components/Alerts/ThresholdsTable.tsx?raw';
import thresholdsTableAgentsTabSource from '@/components/Alerts/ThresholdsTableAgentsTab.tsx?raw';
import thresholdsTableDockerTabSource from '@/components/Alerts/ThresholdsTableDockerTab.tsx?raw';
import thresholdsTablePMGTabSource from '@/components/Alerts/ThresholdsTablePMGTab.tsx?raw';
+import thresholdsTableProxmoxBackupsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx?raw';
+import thresholdsTableProxmoxGuestFilteringSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx?raw';
+import thresholdsTableProxmoxGuestsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx?raw';
+import thresholdsTableProxmoxNodesSectionSource from '@/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx?raw';
+import thresholdsTableProxmoxPBSSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx?raw';
+import thresholdsTableProxmoxSnapshotsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx?raw';
+import thresholdsTableProxmoxStorageSectionSource from '@/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx?raw';
import thresholdsTableProxmoxTabSource from '@/components/Alerts/ThresholdsTableProxmoxTab.tsx?raw';
import thresholdsDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsData.ts?raw';
import thresholdsHostDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsHostData.ts?raw';
@@ -41,6 +48,7 @@ import thresholdsRecoveryDefaultsStateHookSource from '@/features/alerts/thresho
import thresholdsTableStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsTableState.ts?raw';
import thresholdsOverrideMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsOverrideMutations.ts?raw';
import thresholdsResourceModelSource from '@/features/alerts/thresholds/thresholdsResourceModel.ts?raw';
+import thresholdsTableSectionPropsSource from '@/features/alerts/thresholds/thresholdsTableSectionProps.ts?raw';
import {
ALERT_TAB_SEGMENTS,
@@ -396,8 +404,32 @@ describe('tab path helpers', () => {
expect(thresholdsTableSource).not.toContain("groupedResources={state.guestsGroupedByNode()}");
expect(thresholdsTableSource).not.toContain('dockerIgnoredPrefixesPresentation.title');
expect(thresholdsTableProxmoxTabSource).toContain('export function ThresholdsTableProxmoxTab');
- expect(thresholdsTableProxmoxTabSource).toContain('backupOrphanedPresentation');
- expect(thresholdsTableProxmoxTabSource).toContain("sectionTitles.guestFiltering");
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxNodesSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPBSSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestFilteringSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxBackupsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxSnapshotsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxStorageSection');
+ expect(thresholdsTableProxmoxTabSource).not.toContain('backupOrphanedPresentation');
+ expect(thresholdsTableProxmoxTabSource).not.toContain("sectionTitles.guestFiltering");
+ expect(thresholdsTableSectionPropsSource).toContain('export interface ThresholdsTableSectionProps');
+ expect(thresholdsTableProxmoxNodesSectionSource).toContain('export function ThresholdsTableProxmoxNodesSection');
+ expect(thresholdsTableProxmoxPBSSectionSource).toContain('export function ThresholdsTableProxmoxPBSSection');
+ expect(thresholdsTableProxmoxGuestsSectionSource).toContain('export function ThresholdsTableProxmoxGuestsSection');
+ expect(thresholdsTableProxmoxGuestFilteringSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxGuestFilteringSection',
+ );
+ expect(thresholdsTableProxmoxBackupsSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxBackupsSection',
+ );
+ expect(thresholdsTableProxmoxBackupsSectionSource).toContain('backupOrphanedPresentation');
+ expect(thresholdsTableProxmoxSnapshotsSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxSnapshotsSection',
+ );
+ expect(thresholdsTableProxmoxStorageSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxStorageSection',
+ );
expect(thresholdsTablePMGTabSource).toContain('export function ThresholdsTablePMGTab');
expect(thresholdsTablePMGTabSource).toContain('pmgGlobalDefaults()');
expect(thresholdsTableAgentsTabSource).toContain('export function ThresholdsTableAgentsTab');
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index f6edb41800..fd6c60cb33 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -353,6 +353,13 @@ import thresholdsTableSource from '@/components/Alerts/ThresholdsTable.tsx?raw';
import thresholdsTableAgentsTabSource from '@/components/Alerts/ThresholdsTableAgentsTab.tsx?raw';
import thresholdsTableDockerTabSource from '@/components/Alerts/ThresholdsTableDockerTab.tsx?raw';
import thresholdsTablePMGTabSource from '@/components/Alerts/ThresholdsTablePMGTab.tsx?raw';
+import thresholdsTableProxmoxBackupsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxBackupsSection.tsx?raw';
+import thresholdsTableProxmoxGuestFilteringSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestFilteringSection.tsx?raw';
+import thresholdsTableProxmoxGuestsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxGuestsSection.tsx?raw';
+import thresholdsTableProxmoxNodesSectionSource from '@/components/Alerts/ThresholdsTableProxmoxNodesSection.tsx?raw';
+import thresholdsTableProxmoxPBSSectionSource from '@/components/Alerts/ThresholdsTableProxmoxPBSSection.tsx?raw';
+import thresholdsTableProxmoxSnapshotsSectionSource from '@/components/Alerts/ThresholdsTableProxmoxSnapshotsSection.tsx?raw';
+import thresholdsTableProxmoxStorageSectionSource from '@/components/Alerts/ThresholdsTableProxmoxStorageSection.tsx?raw';
import thresholdsTableProxmoxTabSource from '@/components/Alerts/ThresholdsTableProxmoxTab.tsx?raw';
import thresholdsDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsData.ts?raw';
import thresholdsHostDataHookSource from '@/features/alerts/thresholds/hooks/useThresholdsHostData.ts?raw';
@@ -363,6 +370,7 @@ import thresholdsRecoveryDefaultsStateHookSource from '@/features/alerts/thresho
import thresholdsTableStateHookSource from '@/features/alerts/thresholds/hooks/useThresholdsTableState.ts?raw';
import thresholdsOverrideMutationsHookSource from '@/features/alerts/thresholds/hooks/useThresholdsOverrideMutations.ts?raw';
import thresholdsResourceModelSource from '@/features/alerts/thresholds/thresholdsResourceModel.ts?raw';
+import thresholdsTableSectionPropsSource from '@/features/alerts/thresholds/thresholdsTableSectionProps.ts?raw';
import alertIncidentPresentationSource from '@/utils/alertIncidentPresentation.ts?raw';
import alertHistoryPresentationSource from '@/utils/alertHistoryPresentation.ts?raw';
import bulkEditDialogSource from '@/components/Alerts/BulkEditDialog.tsx?raw';
@@ -2957,7 +2965,14 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsTableSource).not.toContain("groupedResources={state.guestsGroupedByNode()}");
expect(thresholdsTableSource).not.toContain('dockerIgnoredPrefixesPresentation.title');
expect(thresholdsTableProxmoxTabSource).toContain('export function ThresholdsTableProxmoxTab');
- expect(thresholdsTableProxmoxTabSource).toContain('backupOrphanedPresentation');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxNodesSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxPBSSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxGuestFilteringSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxBackupsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxSnapshotsSection');
+ expect(thresholdsTableProxmoxTabSource).toContain('ThresholdsTableProxmoxStorageSection');
+ expect(thresholdsTableProxmoxTabSource).not.toContain('backupOrphanedPresentation');
expect(thresholdsTablePMGTabSource).toContain('export function ThresholdsTablePMGTab');
expect(thresholdsTablePMGTabSource).toContain('pmgGlobalDefaults()');
expect(thresholdsTableAgentsTabSource).toContain('export function ThresholdsTableAgentsTab');
@@ -2965,6 +2980,29 @@ describe('frontend resource type boundaries', () => {
expect(thresholdsTableDockerTabSource).toContain('export function ThresholdsTableDockerTab');
expect(thresholdsTableDockerTabSource).toContain('dockerIgnoredPrefixesPresentation.title');
expect(thresholdsTableDockerTabSource).toContain('serviceGapValidationMessage()');
+ expect(thresholdsTableSectionPropsSource).toContain('export interface ThresholdsTableSectionProps');
+ expect(thresholdsTableProxmoxNodesSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxNodesSection',
+ );
+ expect(thresholdsTableProxmoxPBSSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxPBSSection',
+ );
+ expect(thresholdsTableProxmoxGuestsSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxGuestsSection',
+ );
+ expect(thresholdsTableProxmoxGuestFilteringSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxGuestFilteringSection',
+ );
+ expect(thresholdsTableProxmoxBackupsSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxBackupsSection',
+ );
+ expect(thresholdsTableProxmoxBackupsSectionSource).toContain('backupOrphanedPresentation');
+ expect(thresholdsTableProxmoxSnapshotsSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxSnapshotsSection',
+ );
+ expect(thresholdsTableProxmoxStorageSectionSource).toContain(
+ 'export function ThresholdsTableProxmoxStorageSection',
+ );
expect(thresholdsDataHookSource).toContain('export function useThresholdsData');
expect(thresholdsDataHookSource).toContain('useThresholdsHostData(inputs)');
expect(thresholdsDataHookSource).toContain('useThresholdsDockerData(inputs)');