From d9e2c9ea322695b37543ff8fc0bb905cefb05470 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Thu, 19 Mar 2026 20:24:35 -0400 Subject: [PATCH] Add time display picker to Dashboard and Lite toolbars Both apps now have a "Times: [Server Time | Local Time | UTC]" ComboBox on the global toolbar. Changing the mode: - Updates ServerTimeHelper.CurrentDisplayMode - Refreshes all DataGrid timestamp columns via Items.Refresh() - Dashboard persists the preference via UserPreferencesService The existing ServerTimeConverter already reads CurrentDisplayMode, so all timestamp columns update instantly without re-querying. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Controls/QueryPerformanceContent.xaml.cs | 11 +++++ Dashboard/ServerTab.xaml | 7 ++++ Dashboard/ServerTab.xaml.cs | 40 +++++++++++++++++++ Lite/Controls/ServerTab.xaml | 8 ++++ Lite/Controls/ServerTab.xaml.cs | 39 ++++++++++++++++++ 5 files changed, 105 insertions(+) diff --git a/Dashboard/Controls/QueryPerformanceContent.xaml.cs b/Dashboard/Controls/QueryPerformanceContent.xaml.cs index 48fe2a57..fb9a5e82 100644 --- a/Dashboard/Controls/QueryPerformanceContent.xaml.cs +++ b/Dashboard/Controls/QueryPerformanceContent.xaml.cs @@ -227,6 +227,17 @@ public void Initialize(DatabaseService databaseService, Action? statusCa _statusCallback = statusCallback; } + public void RefreshGridBindings() + { + QueryStatsDataGrid.Items.Refresh(); + ProcStatsDataGrid.Items.Refresh(); + QueryStoreDataGrid.Items.Refresh(); + QueryStoreRegressionsDataGrid.Items.Refresh(); + ActiveQueriesDataGrid.Items.Refresh(); + CurrentActiveQueriesDataGrid.Items.Refresh(); + LongRunningQueryPatternsDataGrid.Items.Refresh(); + } + /// /// Sets the time range for all sub-tabs. /// diff --git a/Dashboard/ServerTab.xaml b/Dashboard/ServerTab.xaml index 0c630634..625277b4 100644 --- a/Dashboard/ServerTab.xaml +++ b/Dashboard/ServerTab.xaml @@ -104,6 +104,13 @@