-
Notifications
You must be signed in to change notification settings - Fork 526
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 filtering by resource state and health status, and update the filters based on visible grid items #6925
base: main
Are you sure you want to change the base?
Conversation
…der options by name
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor.cs
Outdated
Show resolved
Hide resolved
What happens if there are a lot of states, resources types and health states? The popup should probably have a maximum height and a scoll bar to handle that situation nicely. |
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor
Outdated
Show resolved
Hide resolved
Reverted the change. |
…lthstatus # Conflicts: # src/Aspire.Dashboard/wwwroot/css/app.css
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor
Outdated
Show resolved
Hide resolved
I think you should add some component tests to test these changes. We don't tests for resources page yet so you'll need to add some setup code for registering required services and JS calls, but there a lot of other pages already setup that you can follow. |
This submission has been automatically marked as stale because it has been marked as requiring author action but has not had any activity for 14 days. |
…lthstatus # Conflicts: # src/Aspire.Dashboard/Components/Pages/Resources.razor.cs # src/Aspire.Dashboard/wwwroot/css/app.css
Do you intend to write component tests for this? |
Description
Currently, you can filter resources by type, but it would also be useful to filter by health status or by resource state. I extracted the resource filter UI into its own component
ResourceFilters
and convertedSelectResourceTypes
into a component that was more generic and so could be reused for state and health status (SelectResourceOptions
). This also meant other refactoring was necessary, such as creating reusable methodsGet/SetFieldVisibility
from the getter and setter logic previously inAreAllTypesVisible
.Fixes #1190
In a follow-up, we could persist these values in the URL (#3647)
(note that, for example, finished and no state have disappeared from available options because no resource with those values is in the grid anymore)
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow