Skip to content

Clear button on ConsoleLogs page#7419

Merged
davidfowl merged 5 commits intomicrosoft:mainfrom
Daluur:main
Feb 8, 2025
Merged

Clear button on ConsoleLogs page#7419
davidfowl merged 5 commits intomicrosoft:mainfrom
Daluur:main

Conversation

@Daluur
Copy link
Copy Markdown
Contributor

@Daluur Daluur commented Feb 5, 2025

Description

Adds a button to the console logs pages to clear logs, similar to what has been done in: #6898. I followed the idea of simply filtering logs based on when the remove button was pressed.

Clear-consolelogs (1)

Fixes #5458

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Feb 5, 2025
@adamint
Copy link
Copy Markdown
Member

adamint commented Feb 6, 2025

@Daluur can you add a component bUnit test for this case?

{
newConsoleLogsSubscription = new ConsoleLogsSubscription { Name = selectedResourceName };
Logger.LogDebug("Creating new subscription {SubscriptionId}.", newConsoleLogsSubscription.SubscriptionId);
if (selectedResourceName is not null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: formatting has changed - please change it back

Comment thread src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs
@danmoseley danmoseley requested a review from Copilot February 7, 2025 02:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs:553

  • [nitpick] The parameter name 'key' is ambiguous. It should be renamed to 'applicationKey' to improve clarity.
private async Task ClearConsoleLogs(ApplicationKey? key)

@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Feb 7, 2025

I'd like to get this in for 9.1, and we have limited time. @Daluur I'll help make changes on your branch to this PR.

@davidfowl
Copy link
Copy Markdown
Contributor

Yes please

@Daluur
Copy link
Copy Markdown
Contributor Author

Daluur commented Feb 7, 2025

Unfortunately I don't have any time to look into the required changes until middle of next week. I'll do it then, if @JamesNK have not already done it 😊

@adamint
Copy link
Copy Markdown
Member

adamint commented Feb 7, 2025

@Daluur we will do this before Wednesday

@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Feb 8, 2025

Made some changes. The most notable is to persist filter dates so they're remembered when navigating to and from the console logs page.

TODO: Test

@davidfowl davidfowl merged commit b9fe532 into microsoft:main Feb 8, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-dashboard community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add clear button to dashboard console logs page

5 participants