Skip to content

Commit 59ecc7f

Browse files
Merge pull request #218 from rferraton/feature/QueryStore-GroupBy-Changer
Feature/query store group by changer
2 parents 3ca9398 + 44a5ed8 commit 59ecc7f

File tree

4 files changed

+1411
-47
lines changed

4 files changed

+1411
-47
lines changed

src/PlanViewer.App/Controls/QueryStoreGridControl.axaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@
6767
<ComboBoxItem Content="Executions" Tag="executions"/>
6868
</ComboBox>
6969
</StackPanel>
70+
<StackPanel Spacing="4">
71+
<TextBlock Text="Group by" Foreground="{DynamicResource ForegroundBrush}" FontSize="11"/>
72+
<ComboBox x:Name="GroupByBox" Width="130" Height="36" FontSize="13"
73+
SelectedIndex="0" SelectionChanged="GroupBy_SelectionChanged">
74+
<ComboBoxItem Content="None" Tag="none"/>
75+
<ComboBoxItem Content="Query Hash" Tag="query-hash"/>
76+
<ComboBoxItem Content="Module" Tag="module"/>
77+
</ComboBox>
78+
</StackPanel>
7079
<StackPanel Spacing="4">
7180
<TextBlock Text="Search by" Foreground="{DynamicResource ForegroundBrush}" FontSize="11"/>
7281
<ComboBox x:Name="SearchTypeBox" Width="120" Height="36" FontSize="13"
@@ -141,6 +150,30 @@
141150
</ContextMenu>
142151
</DataGrid.ContextMenu>
143152
<DataGrid.Columns>
153+
<DataGridTemplateColumn Header="" Width="220" IsVisible="False">
154+
<DataGridTemplateColumn.CellTemplate>
155+
<DataTemplate x:DataType="local:QueryStoreRow">
156+
<StackPanel Orientation="Horizontal" Margin="{Binding IndentMargin}"
157+
VerticalAlignment="Stretch">
158+
<Button Content="{Binding ExpandChevron}"
159+
IsVisible="{Binding HasChildren}"
160+
MinWidth="20" Padding="2,0"
161+
FontSize="18" FontWeight="Bold"
162+
Background="Transparent" BorderThickness="0"
163+
Foreground="{DynamicResource ForegroundBrush}"
164+
VerticalAlignment="Stretch"
165+
VerticalContentAlignment="Center"
166+
Click="ExpandRow_Click"/>
167+
<TextBlock Text="{Binding GroupDisplayText}"
168+
VerticalAlignment="Center"
169+
Margin="4,0,0,0"
170+
FontWeight="{Binding GroupFontWeight}"
171+
Foreground="{DynamicResource ForegroundBrush}"
172+
TextTrimming="CharacterEllipsis"/>
173+
</StackPanel>
174+
</DataTemplate>
175+
</DataGridTemplateColumn.CellTemplate>
176+
</DataGridTemplateColumn>
144177
<DataGridTemplateColumn Header="" Width="40">
145178
<DataGridTemplateColumn.CellTemplate>
146179
<DataTemplate x:DataType="local:QueryStoreRow">
@@ -330,6 +363,16 @@
330363
Foreground="{DynamicResource ForegroundBrush}"/>
331364
</StackPanel>
332365
</Border>
366+
<!-- Empty-state overlay (Module groupby with no module data) -->
367+
<Border x:Name="GridEmptyMessage" IsVisible="False"
368+
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
369+
IsHitTestVisible="False">
370+
<TextBlock x:Name="GridEmptyMessageText"
371+
HorizontalAlignment="Center" VerticalAlignment="Center"
372+
FontSize="20" FontWeight="SemiBold"
373+
Foreground="{DynamicResource ForegroundMutedBrush}"
374+
TextAlignment="Center"/>
375+
</Border>
333376
</Grid>
334377
</Grid>
335378
</UserControl>

0 commit comments

Comments
 (0)