Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/PlanViewer.App/Controls/QueryStoreGridControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<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">
SelectedIndex="1" SelectionChanged="GroupBy_SelectionChanged">
<ComboBoxItem Content="None" Tag="none"/>
<ComboBoxItem Content="Query Hash" Tag="query-hash"/>
<ComboBoxItem Content="Module" Tag="module"/>
Expand Down Expand Up @@ -150,7 +150,7 @@
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="" Width="220" IsVisible="False">
<DataGridTemplateColumn Header="" Width="220" IsVisible="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="local:QueryStoreRow">
<StackPanel Orientation="Horizontal" Margin="{Binding IndentMargin}"
Expand Down
10 changes: 3 additions & 7 deletions src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public partial class QueryStoreGridControl : UserControl
private bool _waitStatsSupported; // false until version + capture mode confirmed
private bool _waitStatsEnabled = true;
private bool _waitPercentMode;
private QueryStoreGroupBy _groupByMode = QueryStoreGroupBy.None;
private QueryStoreGroupBy _groupByMode = QueryStoreGroupBy.QueryHash;
private List<QueryStoreRow> _groupedRootRows = new(); // top-level rows for grouped mode

public event EventHandler<List<QueryStorePlan>>? PlansSelected;
Expand Down Expand Up @@ -89,6 +89,7 @@ public QueryStoreGridControl(ServerConnection serverConnection, ICredentialServi
// Auto-fetch with default settings on connect
Avalonia.Threading.Dispatcher.UIThread.Post(() =>
{
ReorderColumnsForGroupBy();
Fetch_Click(null, new RoutedEventArgs());
_initialOrderByLoaded = true;
}, Avalonia.Threading.DispatcherPriority.Loaded);
Expand Down Expand Up @@ -311,12 +312,7 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync(
LoadButton.IsEnabled = true;
SelectToggleButton.Content = "Select All";

// Auto-expand the first root row to the deepest level
if (rootRows.Count > 0)
{
var first = rootRows[0];
ExpandRowRecursive(first);
}


UpdateStatusText();
UpdateBarRatios();
Expand Down
Loading