Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Aug 15, 2024

Description

Fixes #2595

This PR adds:

  • Relationship annotation and WithRelationship extension method to app model
  • WithRelationship calls are in various methods that add or reference resources.
  • Relationship field to resource service proto contract
  • Relationship field to ResourceViewModel.
  • UI to resource details to display References and Back references
  • Color to resource name on resources page and resource names in detail's references UI

image

image

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?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-dashboard label Aug 15, 2024
@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from dff7497 to 8248dae Compare August 19, 2024 01:47
@JamesNK JamesNK marked this pull request as ready for review August 19, 2024 02:19
@mitchdenny
Copy link
Member

From an app model perspective I am happy with where this is at except for the XML doc comments ;)

@JamesNK JamesNK marked this pull request as draft September 27, 2024 14:12
@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from 8248dae to 82aa476 Compare October 9, 2024 08:18
@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch 2 times, most recently from 2a63a77 to 0c6bdbc Compare October 30, 2024 01:47
@JamesNK JamesNK marked this pull request as ready for review October 30, 2024 01:47
@JamesNK JamesNK requested a review from radical as a code owner October 30, 2024 01:47
@JamesNK JamesNK requested review from adamint and drewnoakes October 30, 2024 01:47
@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from d209098 to d62dfa5 Compare November 12, 2024 06:04
@JamesNK
Copy link
Member Author

JamesNK commented Nov 12, 2024

I think this is ready for folks to review.

@leslierichardson95 @davidfowl UI feedback is welcome on adding colors to resources page. This is the same thing the dashboard does in telemetry pages, i.e. frontend could be assigned a blue color that shows up in various UI including the span waterfall on trace detail.

IMO the colors back it easier to quickly identify resources, but I'm curious whether folks think it makes the resources page too busy.

var resource = source.Resource;
connectionName ??= resource.Name;

builder.WithRelationship(resource, "ConnectionString");
Copy link
Member

Choose a reason for hiding this comment

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

WellKnownRelationshipTypes constants class?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@mitchdenny
Copy link
Member

I think this is looking good. Just a few minor things and a bit of a UX nit:

image

Why not just hyperlink the resource name?

@JamesNK
Copy link
Member Author

JamesNK commented Nov 14, 2024

Yeah, it doesn't look that great. However, it's the UI we're using everywell else. Buttons looking a bit ugly is why I've been switching to the action column with ... button.

I'll play around with options later. I don't want to hold this PR up on a new UI design for row links.

@davidfowl
Copy link
Member

I am not a fan on the colors, I think it is too noisy indeed.

@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from 8b78d15 to f1c1533 Compare November 14, 2024 23:47
@JamesNK
Copy link
Member Author

JamesNK commented Nov 14, 2024

All feedback applied.

@leslierichardson95
Copy link

I think this is ready for folks to review.

@leslierichardson95 @davidfowl UI feedback is welcome on adding colors to resources page. This is the same thing the dashboard does in telemetry pages, i.e. frontend could be assigned a blue color that shows up in various UI including the span waterfall on trace detail.

IMO the colors back it easier to quickly identify resources, but I'm curious whether folks think it makes the resources page too busy.

Personally, I'm a fan of having the colors because as you said, it helps people recognize resources quicker and it aligns with what already exists in other pages like Traces.

Copy link

@leslierichardson95 leslierichardson95 left a comment

Choose a reason for hiding this comment

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

Looks good to me (including the color tags)!

@JamesNK
Copy link
Member Author

JamesNK commented Nov 21, 2024

I've already removed the colors. To avoid colors and UI discussion being a blocker, this PR can be merged without them, and then we can discuss later whether they're wanted or not.

Adding (or removing) them isn't difficult.

Copy link
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

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

Few small things but this looks good. Either do those minor tweaks now or as a follow-up.

@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from f1c1533 to de4c3d5 Compare November 21, 2024 07:31
@JamesNK JamesNK force-pushed the jamesnk/resource-relationship branch from 717b833 to 73e9c3a Compare November 22, 2024 02:37
@JamesNK JamesNK merged commit b45b046 into main Nov 25, 2024
9 checks passed
@JamesNK JamesNK deleted the jamesnk/resource-relationship branch November 25, 2024 07:25
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2024
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.

Graph view of resource relationships

6 participants