-
Notifications
You must be signed in to change notification settings - Fork 775
Add a pause button to console logs, structured logs, traces, and metrics pages #8184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JamesNK
merged 37 commits into
dotnet:main
from
adamint:dev/adamint/pause-resume-buttons
Mar 29, 2025
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
13fc5e7
Add pause/resume button
adamint 78b42e8
Allow pause/resume inside console logs
adamint d1bb548
Add pause/resume button to structured logs
adamint 290d129
Add pause/resume button to traces, allow applying timestamp filter to…
adamint 813d211
Add pause/resume to metrics
adamint 876be03
don't resume when switching console log apps
adamint d1530b1
Add unit test for console log pause/resume
adamint a2ab30a
Fix added test
adamint 54b64d8
slightly improve test
adamint 85051b5
Use singleton
adamint 356b96b
update dashboard tests
adamint ccb568b
Add title to clear signals button
adamint 4f5fa2c
Remove unused parameter
adamint 378266b
Rename button to PauseIncomingDataSwitch, remove disable parameter
adamint e49ca8c
add telemetry repository test, make console log pause range private
adamint 97a34fc
Change button appearance, show pauses in the log viewer
adamint e000223
clean up pause display
adamint efc0a2c
Move 2 strings to consolelogs.resx, add a few tests
adamint 0795490
Fix line number problem, add additional tests for pause manager, upda…
adamint cc75a50
Persist metric pause time so that start time is identical when naviga…
adamint 8c1f019
clean up
adamint dbb98d5
Merge branch 'main' into dev/adamint/pause-resume-buttons
adamint 51de86c
run custom tool after merge
adamint 247868c
use LogEntry instead of Timestamp as the entry in PauseManager becaus…
adamint da5693c
Filter out pauses when downloading logs
adamint c89e5fe
remove debug assrt
adamint 4757bf0
Update pause strings
adamint 28ef562
Avoid pluralizing in TotalItemsFooterText
adamint 9fb557a
include pause info in trace/structured log footers
adamint f75c553
fix test
adamint 2ab4c29
Text and style changes
JamesNK 7651112
Merge branch 'main' into dev/adamint/pause-resume-buttons
adamint 8706873
Switch to vm in LogEntry
adamint 709089a
Fix skipping line numbers
adamint e53dc6d
Clean up, fix removing console logs while paused
JamesNK d0f8ef5
Clean up
JamesNK 98bf5a1
Add lock to console logs page
JamesNK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/Aspire.Dashboard/Components/Controls/ClearSignalsButton.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| @namespace Aspire.Dashboard.Components.Controls | ||
| @using Aspire.Dashboard.Resources | ||
| @using Aspire.Dashboard.Resources | ||
| @namespace Aspire.Dashboard.Components.Controls | ||
|
|
||
| @inject IStringLocalizer<ControlsStrings> Loc | ||
|
|
||
| <AspireMenuButton IconStart="@(new Icons.Regular.Size16.Delete())" | ||
| Icon="@(new Icons.Regular.Size12.ChevronDown())" | ||
| IconColor="Color.FillInverse" | ||
| Items="@_clearMenuItems" | ||
| ButtonAppearance="Appearance.Neutral" | ||
| ButtonClass="clear-button" /> | ||
| ButtonClass="clear-button" | ||
| Title="@Loc[nameof(ControlsStrings.ClearSignalsButtonTitle)]" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Aspire.Dashboard/Components/Controls/PauseIncomingDataSwitch.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| @using Aspire.Dashboard.Resources | ||
| @inject IStringLocalizer<ControlsStrings> Loc | ||
|
|
||
| <FluentButton Appearance="Appearance.Neutral" | ||
| Title="@(IsPaused ? Loc[nameof(ControlsStrings.ResumeButtonTitle)] : Loc[nameof(ControlsStrings.PauseButtonTitle)])" | ||
| OnClick="@OnTogglePauseCoreAsync"> | ||
| @if (IsPaused) | ||
| { | ||
| <FluentIcon Value="@(new Icons.Regular.Size16.PauseOff())" /> | ||
| } | ||
| else | ||
| { | ||
| <FluentIcon Value="@(new Icons.Regular.Size16.Pause())" /> | ||
| } | ||
| </FluentButton> |
21 changes: 21 additions & 0 deletions
21
src/Aspire.Dashboard/Components/Controls/PauseIncomingDataSwitch.razor.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| using Microsoft.AspNetCore.Components; | ||
|
|
||
| namespace Aspire.Dashboard.Components.Controls; | ||
|
|
||
| public partial class PauseIncomingDataSwitch : ComponentBase | ||
| { | ||
| [Parameter] | ||
| public bool IsPaused { get; set; } | ||
|
|
||
| [Parameter] | ||
| public EventCallback<bool> IsPausedChanged { get; set; } | ||
|
|
||
| private async Task OnTogglePauseCoreAsync() | ||
| { | ||
| IsPaused = !IsPaused; | ||
| await IsPausedChanged.InvokeAsync(IsPaused); | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.