-
Notifications
You must be signed in to change notification settings - Fork 667
Add support for custom table filters #1735
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 support for custom table filters #1735
Conversation
|
@vojtechszocs: GitHub didn't allow me to request PR reviews from the following users: mareklibra. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
FYI @jelkosz |
|
@spadgett @alecmerdler Can you please share your knowledge on For example, in const filters = [{
type: 'pod-status',
selected: [ 'Running', 'Pending', 'Terminating', 'CrashLoopBackOff' ],
reducer: podPhaseFilterReducer,
items: [
{ id: 'Running', title: 'Running' },
{ id: 'Pending', title: 'Pending' },
{ id: 'Terminating', title: 'Terminating' },
{ id: 'CrashLoopBackOff', title: 'CrashLoopBackOff' },
// Use title "Completed" to match what appears in the status column for the pod.
// The pod phase is "Succeeded," but the container state is "Completed."
{ id: 'Succeeded', title: 'Completed' },
{ id: 'Failed', title: 'Failed' },
{ id: 'Unknown', title: 'Unknown '},
],
}];The |
|
As discussed, I do not understand why |
I agree, that's a cleaner approach. I don't know the history of the current implementation. @alecmerdler might. We should consider the same thing for |
|
PR updated, added KubeVirt example code in PR description. |
96aaafe to
5c63fb4
Compare
|
/lgtm |
|
@spadgett , @christianvogt , @vojtechszocs , is there a way how to pass additional objects to row filters? As an example, to determine status of a virtual machine, additional objects (like pods or custom resource objects) need to be inspected. |
|
/approve |
spadgett
left a comment
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.
/lgtm
@mareklibra This can be done as a follow-up. It seems that the VM table needs more data beyond the usual list of VM objects, so one way to solve that is to make the VM table work with composite (synthetic) objects that combine VM data and any other k8s resource data that is necessary. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, spadgett, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
TableandListcomponents now support custom filter functions via existingListPage.rowFiltersprop pass-through.For example:
Additionally,
Tablevs.Listfilter map inconsistency was removed by using the sametableFiltersimplementation./cc @spadgett @christianvogt @mareklibra @jtomasek