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
Add status filter for KubeCRDs #1769
base: main
Are you sure you want to change the base?
Add status filter for KubeCRDs #1769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this.
I left a few notes about the html tags, and in a few spots where the translation might need attending (the old code didn't have a namespace... maybe it was buggy?).
Would you mind rebasing so there are no merge commits?
We do atomic commits with one commit containing a self contained thing. For the git comments, we follow the linux kernel style format. First subject line in imperative mood at 50 chars max starting with the context. Then more description if it's needed in the body 72 chars after a blank line.
eg.
frontend: StatusFilter: Add component to filter by pod statuses
Body goes here with extra if you need it in 72 chars per line... It facilitates
resource filtering based on statuses with an autocomplete input field.
Works seamlessly with existing filters.
I haven't got around to testing it yet... but I will do that next.
c663af3
to
e66bdcd
Compare
)} | ||
renderTags={(tags: string[]) => { | ||
if (tags.length === 0) { | ||
return <Typography variant="body2">{t('translation|All statuses')}</Typography>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to the translation files. If you run the tests locally, I think it changes the files for you.
I'm trying it out, and when I open the filters I get this message repeated over and over in the console. Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
at StatusesAutocomplete (http://localhost:3000/static/js/bundle.js:27277:80)
...
at SectionHeader (http://localhost:3000/static/js/bundle.js:26169:5)
at SectionFilterHeader (http://localhost:3000/static/js/bundle.js:25843:5) When I click on the input field this error happens, and it crashes...
|
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Since now we are using sx everywhere. Signed-off-by: René Dudfield <[email protected]> Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
This reverts commit 63415cc. Signed-off-by: Lisa Alexander <[email protected]>
…comment Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
This change allows the ResourceList component to filter various resources depending on whether status field exists. Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
This reverts commit 0dfa4d5. Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
Signed-off-by: Lisa Alexander <[email protected]>
6b9c349
to
232bd49
Compare
Signed-off-by: Lisa Alexander <[email protected]>
Hi @lalexander07 . Thanks for the PR. Due to the space around the filter UI being limited, and given that other partners have asked for different columns to be filtered, I have been pushing back on adding more fields to the SectionFilterHeader. Till we replace the table component, maybe we could have an alternative approach here: instead of having a dedicated entry for the status search, how about we use a search prefix? e.g. What do you think? |
Hrmm. The problem with the status:running approach is that it's not easily discoverable. |
Correct, but if we add that dropdown filter in the input, then it should fix that issue. |
One thing I noticed while testing this PR is that unlike namespace filter the queryParam status is not persisted on view change but the state still shows the updated values |
Also the tile of this PR is a bit confusing to me, are we adding this to the CRDs, how??? Maybe changing it to something like adding status filter to views where we have the status column would make more sense |
This pr is to be able to filter by statuses (partner ask was specifically pod statuses) on WebXT Falcon's clusterfleet explorer headlamp plugin
How to test
Go to Pods, click on the filter, enter some status in the "Statuses" filter.