From 97dbd6edbbc4c9ddcb19b2c5046f2a98d399e1c8 Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Thu, 5 Mar 2026 09:11:43 +0000 Subject: [PATCH 01/17] Allow horizontal scroll fixes #14 --- src/PlanViewer.App/Controls/QueryStoreGridControl.axaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index 74e346d..a9cded8 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -78,7 +78,8 @@ HeadersVisibility="Column" FontSize="11" Background="{DynamicResource BackgroundDarkBrush}" - BorderThickness="0"> + BorderThickness="0" + ScrollViewer.HorizontalScrollBarVisibility="Auto"> @@ -108,7 +109,7 @@ - + Date: Thu, 5 Mar 2026 10:00:09 +0000 Subject: [PATCH 02/17] Fixes #15 --- .../Controls/QueryStoreGridControl.axaml | 26 +++++++++---------- .../Controls/QueryStoreGridControl.axaml.cs | 16 ++++++++++++ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index a9cded8..566edf9 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -96,19 +96,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs index b7d7817..2412ead 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs @@ -134,6 +134,22 @@ public bool IsSelected public string AvgPhysReadsDisplay => Plan.AvgPhysicalIoReads.ToString("N0"); public string TotalMemDisplay => (Plan.TotalMemoryGrantPages * 8.0 / 1024.0).ToString("N1"); public string AvgMemDisplay => (Plan.AvgMemoryGrantPages * 8.0 / 1024.0).ToString("N1"); + + // Numeric sort properties (DataGrid SortMemberPath targets) + public long ExecsSort => Plan.CountExecutions; + public long TotalCpuSort => Plan.TotalCpuTimeUs; + public double AvgCpuSort => Plan.AvgCpuTimeUs; + public long TotalDurSort => Plan.TotalDurationUs; + public double AvgDurSort => Plan.AvgDurationUs; + public long TotalReadsSort => Plan.TotalLogicalIoReads; + public double AvgReadsSort => Plan.AvgLogicalIoReads; + public long TotalWritesSort => Plan.TotalLogicalIoWrites; + public double AvgWritesSort => Plan.AvgLogicalIoWrites; + public long TotalPhysReadsSort => Plan.TotalPhysicalIoReads; + public double AvgPhysReadsSort => Plan.AvgPhysicalIoReads; + public long TotalMemSort => Plan.TotalMemoryGrantPages; + public double AvgMemSort => Plan.AvgMemoryGrantPages; + public string LastExecutedLocal => Plan.LastExecutedUtc.ToLocalTime().ToString("yyyy-MM-dd HH:mm"); public string QueryPreview => Plan.QueryText.Length > 80 ? Plan.QueryText[..80].Replace("\n", " ").Replace("\r", "") + "..." From ac924956e025ae1137ea46eddf61676bee3c5f6a Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Thu, 5 Mar 2026 10:05:23 +0000 Subject: [PATCH 03/17] implements #16 --- src/PlanViewer.App/Controls/QueryStoreGridControl.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index 566edf9..f2f2eb2 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -70,7 +70,7 @@ Date: Thu, 5 Mar 2026 12:01:37 +0000 Subject: [PATCH 04/17] Implements #17 --- .../Controls/ColumnFilterPopup.axaml | 32 +++ .../Controls/ColumnFilterPopup.axaml.cs | 113 +++++++++ .../Controls/ColumnFilterState.cs | 75 ++++++ .../Controls/QueryStoreGridControl.axaml.cs | 235 +++++++++++++++++- 4 files changed, 451 insertions(+), 4 deletions(-) create mode 100644 src/PlanViewer.App/Controls/ColumnFilterPopup.axaml create mode 100644 src/PlanViewer.App/Controls/ColumnFilterPopup.axaml.cs create mode 100644 src/PlanViewer.App/Controls/ColumnFilterState.cs diff --git a/src/PlanViewer.App/Controls/ColumnFilterPopup.axaml b/src/PlanViewer.App/Controls/ColumnFilterPopup.axaml new file mode 100644 index 0000000..5a54155 --- /dev/null +++ b/src/PlanViewer.App/Controls/ColumnFilterPopup.axaml @@ -0,0 +1,32 @@ + + + + + + + + + +