-
Notifications
You must be signed in to change notification settings - Fork 464
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
Allow resource properties to be marked as secret #5380
Allow resource properties to be marked as secret #5380
Conversation
src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@drewnoakes This is close to being done right? |
It's close, but blocked on the (minor) bug mentioned above. The cause seems to be a UI update loop that prevents the popup from opening. I haven't made time to investigate yet, given other priorities, but will come back to it soon. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
a506f6a
to
e8a5be9
Compare
@JamesNK please re-review and both @davidfowl and I are waiting to build on this for other work (e.g. #4974). |
Fixes #5065
Fixes #5377
This change allows selected resource properties in the details view to support masking, and show as masked by default. This behaviour exists today for all environment variables, and has so-far not been available for resource properties.
The resource service specifies which properties may be "sensitive", and the UI shows them masked.
Currently, the app host hides container/executable command line arguments, but it can be amended to include other properties too. Other resource services (like ACA's) can customise this logic to their needs as well.
As part of this change, we create interface
IPropertyGridItem
that view models must implement to be bound to thePropertyGrid
component. This allows the component to work directly with the items, rather than calling back to the component's user via parameters for callback logic that largely do the same thing.We also avoid having the
ResourceDetails
code create copies ofResourcePropertyViewModel
objects for binding the UI. This copying won't work with the newIPropertyGridItem
as thePropertyGrid
requires these to be the same mutable object over time. Removing this fixed the inability to unmask resource property values.Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow