-
Notifications
You must be signed in to change notification settings - Fork 418
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
Split dashboard resource snapshots from view models #1415
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The UI will have a single object type for all resources, treating the uniformly. That object has both a fixed set of fields, and now its own extensible metadata. In the protocol between ResourceService and Dashboard, we'll need an extensible way to model these resource data. This allows the UI to work with resource types it hasn't seen before.
We are moving towards removing `Aspire.Hosting`'s reference to `Aspire.Dashboard`. In this new model we will have different types on the back end and front end. - DCP has its own types (e.g. `CustomResource`), which remain untouched, and exist only on the back end. - `ResourceSnapshot` is a new abstract base class for `ContainerSnapshot`, `ExecutableSnapshot` and `ProjectSnapshot`. These are immutable, have no view-specific data, and will only be used on the back end. In the near future, these objects will be used to populate gRPC messages. - `ResourceViewModel` remains, though only on the front end. It no longer has subclasses. We are designing the dashboard to support arbitrary resource types. In the near future, these objects will be constructed and updated in response to gRPC messages. As the front end no longer has subclasses of `ResourceViewModel`, some of the hard-coded resource-specific logic has been changed to work on the additional data within a resource. We also introduce a `KnownResourceTypes` static class with consts for known resource type names (e.g. "Container").
drewnoakes
commented
Dec 15, 2023
drewnoakes
commented
Dec 15, 2023
drewnoakes
commented
Dec 15, 2023
drewnoakes
requested review from
adamint,
tlmii,
JamesNK,
smitpatel and
kvenkatrajan
December 15, 2023 14:27
davidfowl
reviewed
Dec 16, 2023
adamint
approved these changes
Dec 18, 2023
JamesNK
reviewed
Dec 18, 2023
Thanks for the reviews here. I'm closing this in favour of #1476 which also adds gRPC between app host and dashboard. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are moving towards removing
Aspire.Hosting
's reference toAspire.Dashboard
. In this new model we will have different types on the back end and front end.CustomResource
), which remain untouched, and exist only on the back end.ResourceSnapshot
is a new abstract base class forContainerSnapshot
,ExecutableSnapshot
andProjectSnapshot
. These are immutable, have no view-specific data, and will only be used on the back end. In the near future, these objects will be used to populate gRPC messages.ResourceViewModel
remains, though only on the front end. It no longer has subclasses. We are designing the dashboard to support arbitrary resource types. In the near future, these objects will be constructed and updated in response to gRPC messages.As the front end no longer has subclasses of
ResourceViewModel
, some of the hard-coded resource-specific logic has been changed to work on the additional data within a resource.We also introduce a
KnownResourceTypes
static class with consts for known resource type names (e.g. "Container").Microsoft Reviewers: Open in CodeFlow