Skip to content
43 changes: 43 additions & 0 deletions src/PlanViewer.App/Controls/QueryStoreGridControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@
<ComboBoxItem Content="Executions" Tag="executions"/>
</ComboBox>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="Group by" Foreground="{DynamicResource ForegroundBrush}" FontSize="11"/>
<ComboBox x:Name="GroupByBox" Width="130" Height="36" FontSize="13"
SelectedIndex="0" SelectionChanged="GroupBy_SelectionChanged">
<ComboBoxItem Content="None" Tag="none"/>
<ComboBoxItem Content="Query Hash" Tag="query-hash"/>
<ComboBoxItem Content="Module" Tag="module"/>
</ComboBox>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="Search by" Foreground="{DynamicResource ForegroundBrush}" FontSize="11"/>
<ComboBox x:Name="SearchTypeBox" Width="120" Height="36" FontSize="13"
Expand Down Expand Up @@ -141,6 +150,30 @@
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="220" IsVisible="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="local:QueryStoreRow">
<StackPanel Orientation="Horizontal" Margin="{Binding IndentMargin}"
VerticalAlignment="Stretch">
<Button Content="{Binding ExpandChevron}"
IsVisible="{Binding HasChildren}"
MinWidth="20" Padding="2,0"
FontSize="18" FontWeight="Bold"
Background="Transparent" BorderThickness="0"
Foreground="{DynamicResource ForegroundBrush}"
VerticalAlignment="Stretch"
VerticalContentAlignment="Center"
Click="ExpandRow_Click"/>
<TextBlock Text="{Binding GroupDisplayText}"
VerticalAlignment="Center"
Margin="4,0,0,0"
FontWeight="{Binding GroupFontWeight}"
Foreground="{DynamicResource ForegroundBrush}"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="" Width="40">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="local:QueryStoreRow">
Expand Down Expand Up @@ -330,6 +363,16 @@
Foreground="{DynamicResource ForegroundBrush}"/>
</StackPanel>
</Border>
<!-- Empty-state overlay (Module groupby with no module data) -->
<Border x:Name="GridEmptyMessage" IsVisible="False"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False">
<TextBlock x:Name="GridEmptyMessageText"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="20" FontWeight="SemiBold"
Foreground="{DynamicResource ForegroundMutedBrush}"
TextAlignment="Center"/>
</Border>
</Grid>
</Grid>
</UserControl>
Loading
Loading