Skip to content
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

Clear button on ConsoleLogs page #7419

Merged
merged 5 commits into from
Feb 8, 2025
Merged

Clear button on ConsoleLogs page #7419

merged 5 commits into from
Feb 8, 2025

Conversation

Daluur
Copy link
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
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
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

src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Outdated Show resolved Hide resolved
@danmoseley danmoseley requested a review from Copilot February 7, 2025 02:10

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
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
Member

Yes please

@Daluur
Copy link
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
Member

adamint commented Feb 7, 2025

@Daluur we will do this before Wednesday

@JamesNK
Copy link
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 dotnet:main Feb 8, 2025
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
4 participants