8000 Add context menu to resource graph, improve console logs actions by JamesNK · Pull Request #8691 · dotnet/aspire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add context menu to resource graph, improve console logs actions #8691

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
merged 7 commits into from
Apr 10, 2025

Conversation

JamesNK
Copy link
Member
@JamesNK JamesNK commented Apr 10, 2025

Description

  • Adds right click context menu to resource graph
  • Splits AspireMenu out of AspireMenuButton
  • Updates console logs to display all actions for a resource. Changed text from "Resource commands" to "Resource actions"
  • Updates resources context menu to also show highlighted commands

context-menu

image

Fixes #8634 #8145

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?

Copy link
Contributor
@Copilot 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 16 out of 26 changed files in this pull request and generated no comments.

Files not reviewed (10)
  • src/Aspire.Dashboard/Resources/ConsoleLogs.Designer.cs: Language not supported
  • src/Aspire.Dashboard/Resources/ConsoleLogs.resx: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.cs.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.de.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.es.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.fr.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.it.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.ja.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.ko.xlf: Language not supported
  • src/Aspire.Dashboard/Resources/xlf/ConsoleLogs.pl.xlf: Language not supported
Comments suppressed due to low confidence (2)

src/Aspire.Dashboard/Components/Pages/Resources.razor.cs:358

  • It appears 'resources' may be incorrectly referenced. If the intention is to reference the current component instance, consider replacing 'resources' with 'this' to avoid potential runtime errors.
if (resources._resourceByName.TryGetValue(id, out var resource))

src/Aspire.Dashboard/Components/Controls/ResourceActions.razor.cs:161

  • Consider filtering out highlighted commands from menuCommands to avoid duplicate display in desktop view, as these commands are already shown separately as highlighted actions.
var menuCommands = resource.Commands.Where(c => c.State != CommandViewModelState.Hidden).OrderBy(c => !c.IsHighlighted).ToList();

Icon = s_consoleLogsIcon,
=>
{
navigationManager.NavigateTo(DashboardUrls.ConsoleLogsUrl(resource: resource.Name));
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Update after #8470 is merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or #8470 will need to react to this PR 😄

@JamesNK JamesNK enabled auto-merge (squash) April 10, 2025 22:32
@Jame
8000
sNK JamesNK merged commit 9f00227 into main Apr 10, 2025
174 checks passed
@JamesNK JamesNK deleted the jamesnk/improve-menus branch April 10, 2025 23:22
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add actions drop down to resources in graph view
2 participants
0