Skip to content

Commit 4202ad7

Browse files
Merge pull request #352 from erikdarlingdata/dev
Merge dev to main
2 parents 7c9d981 + d101b1b commit 4202ad7

33 files changed

Lines changed: 1827 additions & 257 deletions

Dashboard/Controls/MemoryContent.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ public MemoryContent()
8282
SetupChartContextMenus();
8383
Loaded += OnLoaded;
8484

85+
// Apply dark theme immediately so charts don't flash white before data loads
86+
TabHelpers.ApplyDarkModeToChart(MemoryStatsOverviewChart);
87+
TabHelpers.ApplyDarkModeToChart(MemoryGrantSizingChart);
88+
TabHelpers.ApplyDarkModeToChart(MemoryGrantActivityChart);
89+
TabHelpers.ApplyDarkModeToChart(MemoryClerksChart);
90+
TabHelpers.ApplyDarkModeToChart(PlanCacheChart);
91+
TabHelpers.ApplyDarkModeToChart(MemoryPressureEventsChart);
92+
8593
_memoryStatsOverviewHover = new Helpers.ChartHoverHelper(MemoryStatsOverviewChart, "MB");
8694
_memoryGrantSizingHover = new Helpers.ChartHoverHelper(MemoryGrantSizingChart, "MB");
8795
_memoryGrantActivityHover = new Helpers.ChartHoverHelper(MemoryGrantActivityChart, "count");

Dashboard/Controls/PlanViewerControl.xaml

Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@
2727
<Separator Margin="12,4"/>
2828
<Button Content="Save .sqlplan" Click="SavePlan_Click" Height="28" Padding="8,0"
2929
ToolTip="Save plan as .sqlplan file"/>
30-
<Separator Margin="12,4"/>
31-
<TextBlock x:Name="StatementLabel" Text="Statement:" VerticalAlignment="Center"
32-
Foreground="{DynamicResource ForegroundMutedBrush}" Margin="0,0,6,0"
33-
Visibility="Collapsed"/>
34-
<ComboBox x:Name="StatementSelector" MinWidth="200" Height="28"
35-
SelectionChanged="StatementSelector_Changed"
36-
Visibility="Collapsed"/>
30+
<Separator x:Name="StatementsButtonSeparator" Margin="12,4" Visibility="Collapsed"/>
31+
<Button x:Name="StatementsButton" Content="Statements" Click="ToggleStatements_Click"
32+
Height="28" Padding="8,0" Visibility="Collapsed"
33+
ToolTip="Show/hide statement list"/>
3734
</StackPanel>
3835
<TextBlock x:Name="CostText" DockPanel.Dock="Right" VerticalAlignment="Center"
3936
HorizontalAlignment="Right"
@@ -92,20 +89,76 @@
9289
Padding="8,4"/>
9390
</Expander>
9491

95-
<!-- Plan Canvas + Properties Panel -->
92+
<!-- Statements Panel + Plan Canvas + Properties Panel -->
9693
<Grid Grid.Row="4">
9794
<Grid.ColumnDefinitions>
95+
<!-- Col 0: Statements Panel (hidden by default) -->
96+
<ColumnDefinition x:Name="StatementsColumn" Width="0"/>
97+
<!-- Col 1: Statements Splitter (hidden by default) -->
98+
<ColumnDefinition x:Name="StatementsSplitterColumn" Width="0"/>
99+
<!-- Col 2: Plan Canvas -->
98100
<ColumnDefinition Width="*"/>
101+
<!-- Col 3: Properties Splitter (hidden by default) -->
99102
<ColumnDefinition Width="Auto"/>
103+
<!-- Col 4: Properties Panel (hidden by default) -->
100104
<ColumnDefinition x:Name="PropertiesColumn" Width="0"/>
101105
</Grid.ColumnDefinitions>
102106

107+
<!-- Statements Panel -->
108+
<Border x:Name="StatementsPanel" Grid.Column="0"
109+
Background="{DynamicResource BackgroundDarkBrush}"
110+
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,1,0"
111+
Visibility="Collapsed">
112+
<DockPanel>
113+
<!-- Header -->
114+
<Border DockPanel.Dock="Top" Padding="10,8"
115+
Background="{DynamicResource BackgroundBrush}"
116+
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
117+
<DockPanel>
118+
<Button DockPanel.Dock="Right" Content="&#x2715;" Click="CloseStatements_Click"
119+
Width="24" Height="24" Padding="0" FontSize="12"
120+
VerticalAlignment="Center" ToolTip="Close Statements"
121+
Background="Transparent" BorderThickness="0"
122+
Foreground="{DynamicResource ForegroundMutedBrush}"/>
123+
<TextBlock x:Name="StatementsHeader" Text="Statements"
124+
FontWeight="SemiBold" FontSize="13"
125+
Foreground="{DynamicResource ForegroundBrush}"
126+
VerticalAlignment="Center"/>
127+
</DockPanel>
128+
</Border>
129+
130+
<!-- Statement Grid -->
131+
<DataGrid x:Name="StatementsGrid"
132+
AutoGenerateColumns="False"
133+
CanUserSortColumns="True"
134+
CanUserReorderColumns="False"
135+
CanUserResizeColumns="True"
136+
IsReadOnly="True"
137+
SelectionMode="Single"
138+
GridLinesVisibility="Horizontal"
139+
HeadersVisibility="Column"
140+
SelectionChanged="StatementsGrid_SelectionChanged"
141+
FontSize="11"
142+
Background="{DynamicResource BackgroundDarkBrush}"
143+
BorderThickness="0"/>
144+
</DockPanel>
145+
</Border>
146+
147+
<!-- Statements Splitter -->
148+
<GridSplitter x:Name="StatementsSplitter" Grid.Column="1" Width="5"
149+
HorizontalAlignment="Center" VerticalAlignment="Stretch"
150+
Background="{DynamicResource BorderBrush}"
151+
Visibility="Collapsed"/>
152+
103153
<!-- Plan Canvas -->
104-
<ScrollViewer Grid.Column="0" x:Name="PlanScrollViewer"
154+
<ScrollViewer Grid.Column="2" x:Name="PlanScrollViewer"
105155
HorizontalScrollBarVisibility="Auto"
106156
VerticalScrollBarVisibility="Auto"
107157
Background="{DynamicResource BackgroundBrush}"
108-
PreviewMouseWheel="PlanScrollViewer_PreviewMouseWheel">
158+
PreviewMouseWheel="PlanScrollViewer_PreviewMouseWheel"
159+
PreviewMouseLeftButtonDown="PlanScrollViewer_PreviewMouseLeftButtonDown"
160+
PreviewMouseMove="PlanScrollViewer_PreviewMouseMove"
161+
PreviewMouseLeftButtonUp="PlanScrollViewer_PreviewMouseLeftButtonUp">
109162
<Canvas x:Name="PlanCanvas" ClipToBounds="False">
110163
<Canvas.LayoutTransform>
111164
<ScaleTransform x:Name="ZoomTransform" ScaleX="1" ScaleY="1"/>
@@ -114,22 +167,22 @@
114167
</ScrollViewer>
115168

116169
<!-- Empty State -->
117-
<StackPanel x:Name="EmptyState" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
170+
<StackPanel x:Name="EmptyState" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
118171
<TextBlock Text="No Plan Loaded" FontSize="20" FontWeight="Light"
119172
Foreground="{DynamicResource ForegroundMutedBrush}" HorizontalAlignment="Center"/>
120173
<TextBlock Text="Right-click a query row and choose 'View Plan' to display an execution plan here"
121174
FontSize="13" Foreground="{DynamicResource ForegroundMutedBrush}"
122175
HorizontalAlignment="Center" Margin="0,8,0,0"/>
123176
</StackPanel>
124177

125-
<!-- GridSplitter -->
126-
<GridSplitter x:Name="PropertiesSplitter" Grid.Column="1" Width="5"
178+
<!-- Properties Splitter -->
179+
<GridSplitter x:Name="PropertiesSplitter" Grid.Column="3" Width="5"
127180
HorizontalAlignment="Center" VerticalAlignment="Stretch"
128181
Background="{DynamicResource BorderBrush}"
129182
Visibility="Collapsed"/>
130183

131184
<!-- Properties Panel -->
132-
<Border x:Name="PropertiesPanel" Grid.Column="2"
185+
<Border x:Name="PropertiesPanel" Grid.Column="4"
133186
Background="{DynamicResource BackgroundDarkBrush}"
134187
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,0,0"
135188
Visibility="Collapsed">

0 commit comments

Comments
 (0)