From 52edbd4e78b17afeca67850fa42345efd54de0d5 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 7 Oct 2025 20:31:00 +0000 Subject: [PATCH] Fix Docker alert cleanup and email provider UI - Add HandleDockerHostRemoved to properly clean up all alerts and tracking when Docker hosts are removed from config - Implement pruneStaleDockerAlerts to automatically clear orphaned Docker alerts during sync cycles - Clean up restart tracking and exit code maps in addition to state confirmations - Add comprehensive test coverage for Docker host removal cleanup - Improve email provider select layout with consistent styling and instruction boxes - Fix RemoveDockerHost to handle missing hosts gracefully and still clear alerts --- .../components/Alerts/EmailProviderSelect.tsx | 15 +-- internal/alerts/alerts.go | 94 ++++++++++++------- internal/alerts/alerts_test.go | 47 +++++++++- internal/monitoring/monitor.go | 89 +++++++++++++++++- 4 files changed, 199 insertions(+), 46 deletions(-) diff --git a/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx b/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx index 86ef48d3d..7e4c004b6 100644 --- a/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx +++ b/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx @@ -86,16 +86,17 @@ export function EmailProviderSelect(props: EmailProviderSelectProps) { }; const currentProvider = () => providers().find((p) => p.name === props.config.provider); + const instructionBoxClass = "mt-2 rounded border border-blue-200 bg-blue-50 px-3 py-2 text-xs leading-relaxed text-blue-900 dark:border-blue-700 dark:bg-blue-900/20 dark:text-blue-200"; return (
-
- +
+