diff --git a/frontend-modern/src/components/Alerts/ResourceTable.tsx b/frontend-modern/src/components/Alerts/ResourceTable.tsx index 42ab2667c..2b96419f0 100644 --- a/frontend-modern/src/components/Alerts/ResourceTable.tsx +++ b/frontend-modern/src/components/Alerts/ResourceTable.tsx @@ -117,6 +117,7 @@ export function ResourceTable(props: ResourceTableProps) { const hasRows = () => flattenResources().length > 0; const [activeMetricInput, setActiveMetricInput] = createSignal<{ resourceId: string; metric: string } | null>(null); + const [showDelayRow, setShowDelayRow] = createSignal(false); const normalizeMetricKey = (column: string): string => { const key = column.trim().toLowerCase(); @@ -536,11 +537,35 @@ export function ResourceTable(props: ResourceTableProps) { - - + + + + + - + - + - @@ -558,15 +583,15 @@ export function ResourceTable(props: ResourceTableProps) { return ( -
+
{ return overrideDelay !== undefined ? overrideDelay : ''; })()} - placeholder={formatDelayLabel(typeDefaultDelay)} - class="w-20 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-700 dark:text-gray-100 focus:border-blue-500 focus:ring-1 focus:ring-blue-500" + placeholder={String(typeDefaultDelay)} + class="w-16 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-2 py-0.5 text-sm text-center text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-1 focus:ring-blue-500" onInput={(e) => { const raw = e.currentTarget.value; if (raw === '') { @@ -577,36 +602,17 @@ export function ResourceTable(props: ResourceTableProps) { if (Number.isNaN(parsed)) { return; } - props.onMetricDelayChange?.(metric, Math.max(0, parsed)); + const sanitized = Math.max(0, parsed); + // If the value matches the default, clear the override + if (sanitized === typeDefaultDelay) { + props.onMetricDelayChange?.(metric, null); + } else { + props.onMetricDelayChange?.(metric, sanitized); + } props.setHasUnsavedChanges?.(true); } }} /> - - -
);