-
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
[Security Solution] [Bug] Multiple filtering actions in Lens visualizations #171167
Comments
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
The bug is caused by this PR. Only the showTopN popover visualization was taken into consideration. The rest of the Lens visualizations in Security do not pass the We could add this prop to the Alerts page and other visualizations we render directly. BUT, the Dashboards inside Security also render Lens visualizations, and we do not have control over how those visualizations are rendered, this new I am implementing a PoC that do not require any new property, we can use the actions cc @drewdaemon |
…lter actions in visualizations (elastic#171284) ## Summary Bug: elastic#171167 The [previous implementation](elastic#170127) solved a different bug using a new `shouldShowLegendAction` property. This approach had a limitation on the Security Dashboards page since the Security app has no control over the properties passed to the visualization components when they are rendered through portable Dashboards. This PR fixes the problem by checking if any of the registered actions is a "filter" action `type` in the visualizations. If customized filter actions are found, the default filter actions hardcoded in the visualizations code are not added, preventing duplication of filter actions. The specific action `type` used for the check is the `FILTER_CELL_ACTION_TYPE = 'cellAction-filter'` constant exported by the `@kbn/cell-actions` package. This new approach uses a property stored in the registered actions themselves, so we don't need to pass any extra property to the visualization components, it works transparently. So the `shouldShowLegendAction` property has also been cleaned. ## Demos Timeline using `showTopN` visualization: https://github.com/elastic/kibana/assets/17747913/491c08e8-0740-4c9e-9cb7-81267b9ba040 Alerts page using `Counts` table visualization and `showTopN` visualization https://github.com/elastic/kibana/assets/17747913/683eec6c-382e-4ae9-9400-c1022922e488 Portable Dashboard visualizations: https://github.com/elastic/kibana/assets/17747913/50f09a65-488d-41f2-a5b8-3882d9c80678 Security actions are "compatible" only inside the Security app, in the Lens app the default filter actions are displayed: <img width="1682" alt="lens-actions-screenshot" src="https://github.com/elastic/kibana/assets/17747913/1e7ce929-129d-45a9-ba71-8d28e3726454"> --------- Co-authored-by: kibanamachine <[email protected]>
Summary
Lens visualizations in Security are showing multiple
Filter for
&Filter out
actions.The issue does not happen outside Security, when editing visualizations in the Lens app it works as expected.
fwiw, not all filter actions work, only the first two and the last two.
It can be reproduced on the Security Alerts page in the
Counts
table:Also in the Lens visualizations added in dashboards inside Security:
The text was updated successfully, but these errors were encountered: