-
Notifications
You must be signed in to change notification settings - Fork 467
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
Display nested resources in the dashboard #6589
Conversation
I wonder if we could do it with the relationship annotation. Special case "Parent" relationship and use it to drive nesting in UI. I agree 100% it would be useful to nest more resources. I don't think we need to solve this problem in this PR. The focus here can be to get the basic UI right, and then we can iterate. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Real test failures |
Yep, and doing it for replicas would be great too. Not sure whether it's better for the dashboard to synthesize a parent in that case, or whether it should be modelled somehow. |
But that would not work if you have multiple postgres servers. Wouldn't they all use the same pgadmin instance? It wouldn't make sense then to nest it under only one of them. Or would it be listed mutiple times (under each of them)? Would that be confusing? I think for those management UIs that can be used with multiple instances it would make sense to be able to manually define groups where the user can add all postgres instances and management UI (like pgadmin) inside. #6139 |
If a child resource has a different status then healthy (but the parent is healthy), would that be noticeable if it is collapsed? |
@Mrxx99 brings up a good point. We really need Postgres to be easily accessible. One option might be taking the first step towards expanding the This would be useful in a bunch of other scenarios as well. I don't think it needs to be in this PR now. Lets get this initial change in first and then we can look at the execute result protocol expansion (and then hide PGAdmin). |
... if we took this approach we could completely hide the PGAdmin resource. |
I am not sure this would be great, as you won't see it's status or could easily see it's logs. Developers would wonder where it is, as it would not directly be visible. Why not just keep it a separate resource in the dashboard as it is currently, but adding commands to the postgres resource instances to open in pgamdin and/or pgweb (whichever resource is added)? |
We don't need to rathole on pgadmin here, @Mrxx99 is right and it shouldnt be a child because of how it works. |
ba865f7
to
8ea6afc
Compare
Done. Review please 🙏 |
c7a265b
to
c2000e4
Compare
Also should there be a toggle to flatten the table again? |
Collapse all / Expand all, would be great. |
It's visible if you click show all. When relationships are added it will be visible there as well. I think what there is today is fine. |
Do you have example of a website that has UI that you'd like? I've been looking through websites like AzDo and GitHub and I can't find any examples of pages that have collapse/expand all. |
Should child resources be expanded or collapsed by default? |
None specific in mind, I actually had more traditional tree views in mind like the VS Solution Explorer. Definitely more a nice to have than required but I'll keep an eye out.
Collapsed. |
I want to leave expand/collapse all to another PR. You try nesting out without it and decide whether it is important and how you'd like it to be displayed. |
Did you test this with azure resources? Storage for e.g.? |
Does it work when you're not running a container but instead use an azure resource? I see you handle custom resources but where does that happen outside of the app executor? |
I think this really only works when the parent resource is a container. I added logic to set the parent property to existing logic in app executor for parent/children. That seems to only be implemented for containers. |
We should fix this. |
I don't think this needs to be improved in this PR. New issue: #6615 |
This new issue only targets projects and executables but AzureStorageResource (-> AzureProvisioningResource -> AzureBicepResource -> Resource) is neither. |
This already works when the parent resource is a container. However I see that @davidfowl What are your thoughts here? Should publishing a resource automatically set its parent ID property in |
This is a special case, the AzureWebPubSubHubResource doesn't get added to the model AFAIK I am more concerned about things like azure storage. |
Can you give me an example of an app host which you're worried about not working? |
Take this sample https://github.com/dotnet/aspire/blob/main/playground/AzureStorageEndToEnd/AzureStorageEndToEnd.AppHost/Program.cs and uncomment RunAsEmulator |
868759f
to
08fdb73
Compare
I tested and storage resources aren't nested. The question is where should parent informaiton be set?
|
I would add it to the |
Description
Automatically nested and collapse child resources that implement
IResourceWithParent
. By default, nested resources are collapsed. Parent information is sent in a resource property calledresource.parentName
. That means no proto changes required.In test shop playground,
catelogdb
database resource is a child ofpostgres
container resource:Not 100% done yet, need to move some code to better places, add tests, tweak margins and paddings. But good enough to try out.
Edit: Updated screenshots
Resources page. Name column title and content is now aligned. I've consistently indented all content on the right by 8px across screens.
Trace detail page. Updated it to use button instead of +/- text. Consistent with resources page.
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow