Skip to content

Commit 44a5ed8

Browse files
committed
1. FetchPlansForRangeAsync — Adds GridEmptyMessage.IsVisible = false alongside GridLoadingOverlay.IsVisible = true at the start of every fetch, so any lingering empty message is dismissed before the next request.
2. FetchGroupedPlansAsync — When IntermediateRows.Count == 0 and the mode is Module: sets the message text to "No module found in the selected period", shows the overlay, and returns — without writing to StatusText. For QueryHash mode (or any other non-Module grouped mode) that still hits the empty case, the original status bar message is preserved.
1 parent be88ec8 commit 44a5ed8

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/PlanViewer.App/Controls/QueryStoreGridControl.axaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,16 @@
363363
Foreground="{DynamicResource ForegroundBrush}"/>
364364
</StackPanel>
365365
</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>
366376
</Grid>
367377
</Grid>
368378
</UserControl>

src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ private async System.Threading.Tasks.Task FetchPlansForRangeAsync()
187187
StatusText.Text = "Fetching plans...";
188188
GridLoadingOverlay.IsVisible = true;
189189
GridLoadingText.Text = "Fetching plans...";
190+
GridEmptyMessage.IsVisible = false;
190191
_rows.Clear();
191192
_filteredRows.Clear();
192193
_groupedRootRows.Clear();
@@ -266,10 +267,19 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync(
266267
}
267268

268269
GridLoadingOverlay.IsVisible = false;
270+
GridEmptyMessage.IsVisible = false;
269271

270272
if (grouped.IntermediateRows.Count == 0)
271273
{
272-
StatusText.Text = "No Query Store data found for the selected range.";
274+
if (_groupByMode == QueryStoreGroupBy.Module)
275+
{
276+
GridEmptyMessageText.Text = "No module found in the selected period";
277+
GridEmptyMessage.IsVisible = true;
278+
}
279+
else
280+
{
281+
StatusText.Text = "No Query Store data found for the selected range.";
282+
}
273283
return;
274284
}
275285

0 commit comments

Comments
 (0)