From 177f57dd0623ac2b3b80496be40f30606537638c Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Mon, 16 Feb 2026 08:41:05 -0500 Subject: [PATCH 1/3] Add alert types, alerts history view, column filtering, and dismiss/hide (#52, #56-59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New alert types for both Dashboard and Lite: Long-Running Queries, Poison Waits, TempDB Space, Long-Running Jobs — each with configurable thresholds in Settings, email notifications, tray toasts, and auto-clear when conditions resolve. Alerts History view aggregates all alerts across servers in a timeline with severity-colored rows, time range and server filters, column-level filtering, copy/export context menu, and dismiss/hide functionality. Dashboard persists alert history to JSON on exit and reloads on startup. Alerts are hidden (not deleted) when dismissed, surviving across sessions. Lite stores alerts in DuckDB with a dismissed column (schema v9 migration). Both apps auto-refresh the alerts view when visible and support multi-select dismiss and bulk dismiss-all with confirmation. Co-Authored-By: Claude Opus 4.6 --- Dashboard/Controls/AlertsHistoryContent.xaml | 157 ++++++ .../Controls/AlertsHistoryContent.xaml.cs | 446 ++++++++++++++++++ Dashboard/MainWindow.xaml | 6 + Dashboard/MainWindow.xaml.cs | 372 ++++++++++++++- Dashboard/Models/AlertHealthResult.cs | 8 +- Dashboard/Models/AnomalousJobInfo.cs | 21 + Dashboard/Models/LongRunningQueryInfo.cs | 22 + Dashboard/Models/PoisonWaitDelta.cs | 16 + Dashboard/Models/TempDbSpaceInfo.cs | 23 + Dashboard/Models/UserPreferences.cs | 8 + .../Services/DatabaseService.NocHealth.cs | 219 ++++++++- Dashboard/Services/EmailAlertService.cs | 112 ++++- Dashboard/Services/EmailTemplateBuilder.cs | 4 + Dashboard/Services/NotificationService.cs | 45 ++ Dashboard/SettingsWindow.xaml | 52 ++ Dashboard/SettingsWindow.xaml.cs | 60 +++ Lite/App.xaml.cs | 16 + Lite/Controls/AlertsHistoryTab.xaml | 156 ++++++ Lite/Controls/AlertsHistoryTab.xaml.cs | 399 ++++++++++++++++ Lite/Database/DuckDbInitializer.cs | 17 +- Lite/Database/Schema.cs | 3 +- Lite/MainWindow.xaml | 4 + Lite/MainWindow.xaml.cs | 318 ++++++++++++- Lite/Services/EmailAlertService.cs | 98 ++-- Lite/Services/EmailTemplateBuilder.cs | 4 + .../Services/LocalDataService.AlertHistory.cs | 191 ++++++++ Lite/Services/LocalDataService.RunningJobs.cs | 61 +++ Lite/Services/LocalDataService.TempDb.cs | 57 +++ Lite/Services/LocalDataService.WaitStats.cs | 118 +++++ Lite/Windows/SettingsWindow.xaml | 28 ++ Lite/Windows/SettingsWindow.xaml.cs | 36 ++ 31 files changed, 3015 insertions(+), 62 deletions(-) create mode 100644 Dashboard/Controls/AlertsHistoryContent.xaml create mode 100644 Dashboard/Controls/AlertsHistoryContent.xaml.cs create mode 100644 Dashboard/Models/AnomalousJobInfo.cs create mode 100644 Dashboard/Models/LongRunningQueryInfo.cs create mode 100644 Dashboard/Models/PoisonWaitDelta.cs create mode 100644 Dashboard/Models/TempDbSpaceInfo.cs create mode 100644 Lite/Controls/AlertsHistoryTab.xaml create mode 100644 Lite/Controls/AlertsHistoryTab.xaml.cs create mode 100644 Lite/Services/LocalDataService.AlertHistory.cs diff --git a/Dashboard/Controls/AlertsHistoryContent.xaml b/Dashboard/Controls/AlertsHistoryContent.xaml new file mode 100644 index 00000000..41793f4c --- /dev/null +++ b/Dashboard/Controls/AlertsHistoryContent.xaml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +