-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SecuritySolution] Add "exist filter" when value count is filtered in Lens cell action #181151
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.
@angorayc thanks for fixing this and adding all the unit tests!
I was more expecting the hover actions to just not be displayed at all. Approving because this approach works as well!
@PhilippeOberti You are right, I checked the existing behaviour when filter on a Screen.Recording.2024-04-22.at.10.11.40.mov |
When I was checking what's the correct behaviour, I found two different behaviours in Lens while filtering on a Screen.Recording.2024-04-22.at.10.54.41.movScreen.Recording.2024-04-22.at.10.55.44.movAfter checking with the Kibana-visualization team, they confirmed that it's a bug. The count value should still have cell actions, so I think we are fine to add the However, it does not show cell actions when Security Solution still have cell actions available when Screen.Recording.2024-04-23.at.10.37.53.movLens table does not have cell actions available when |
x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts
Outdated
Show resolved
Hide resolved
import { isEmptyFilterValue } from './create_filter'; | ||
import { addFilter } from './add_filter'; |
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.
NIT: It probably makes more sense now to move the isEmptyFilterValue
function to the new add_filter.ts module as well. So actions will only have to import from add_filter module, and the create_filter module will become an internal module to help create the filters of add_filter module.
x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts
Outdated
Show resolved
Hide resolved
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.
Tested locally, everything is working as expected. Thanks @angorayc
LGTM!
…eate_action.ts Co-authored-by: Sergi Massaneda <[email protected]>
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
To update your PR or re-run it, just comment with: cc @angorayc |
… Lens cell action (elastic#181151) ## Summary Original issue and steps to reproduce: elastic#181120 Before: https://github.com/elastic/kibana/assets/6295984/10c7a2ce-d814-4750-8481-8f05b55384f8 After: https://github.com/elastic/kibana/assets/6295984/00dfbcb6-244b-4f2b-8dd4-a1f7435385cf ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Sergi Massaneda <[email protected]> (cherry picked from commit 42e6f0c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…nt is filtered in Lens cell action (#181151) (#181534) # Backport This will backport the following commits from `main` to `8.14`: - [[SecuritySolution] Add "exist filter" when value count is filtered in Lens cell action (#181151)](#181151) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Angela Chuang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-04-24T09:41:21Z","message":"[SecuritySolution] Add \"exist filter\" when value count is filtered in Lens cell action (#181151)\n\n## Summary\r\n\r\nOriginal issue and steps to reproduce:\r\nhttps://github.com//issues/181120\r\n\r\n\r\nBefore:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/10c7a2ce-d814-4750-8481-8f05b55384f8\r\n\r\n\r\n\r\n\r\nAfter:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/00dfbcb6-244b-4f2b-8dd4-a1f7435385cf\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Sergi Massaneda <[email protected]>","sha":"42e6f0cd73f9d80944136925f844757a0d775dc2","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v8.14.0","v8.15.0"],"title":"[SecuritySolution] Add \"exist filter\" when value count is filtered in Lens cell action","number":181151,"url":"https://github.com/elastic/kibana/pull/181151","mergeCommit":{"message":"[SecuritySolution] Add \"exist filter\" when value count is filtered in Lens cell action (#181151)\n\n## Summary\r\n\r\nOriginal issue and steps to reproduce:\r\nhttps://github.com//issues/181120\r\n\r\n\r\nBefore:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/10c7a2ce-d814-4750-8481-8f05b55384f8\r\n\r\n\r\n\r\n\r\nAfter:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/00dfbcb6-244b-4f2b-8dd4-a1f7435385cf\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Sergi Massaneda <[email protected]>","sha":"42e6f0cd73f9d80944136925f844757a0d775dc2"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181151","number":181151,"mergeCommit":{"message":"[SecuritySolution] Add \"exist filter\" when value count is filtered in Lens cell action (#181151)\n\n## Summary\r\n\r\nOriginal issue and steps to reproduce:\r\nhttps://github.com//issues/181120\r\n\r\n\r\nBefore:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/10c7a2ce-d814-4750-8481-8f05b55384f8\r\n\r\n\r\n\r\n\r\nAfter:\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/6295984/00dfbcb6-244b-4f2b-8dd4-a1f7435385cf\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Sergi Massaneda <[email protected]>","sha":"42e6f0cd73f9d80944136925f844757a0d775dc2"}}]}] BACKPORT--> Co-authored-by: Angela Chuang <[email protected]>
Summary
Original issue and steps to reproduce: #181120
Before:
Screen.Recording.2024-04-17.at.2.13.45.PM.mov
After:
Screen.Recording.2024-04-18.at.14.15.34.mov
Checklist
Delete any items that are not applicable to this PR.