Skip to content
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] Fix TopN filters in timeline #183501

Merged
merged 3 commits into from
May 16, 2024

Conversation

semd
Copy link
Contributor

@semd semd commented May 15, 2024

Summary

Fixes: #183497

Sets the applyGlobalQueriesAndFilters prop correctly to VisualizationEmbeddable. This property was ignored when used from the TopN component, causing it to always apply the global filters and query.

Extra: I cleaned all props that are not used in those component

Screenshots

Pre-condition: Setting user.name:"0q3c5et718" query to the global query in the background.

Before:

before

After:

after

@semd semd added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore v8.14.0 v8.15.0 labels May 15, 2024
@semd semd self-assigned this May 15, 2024
@semd semd requested a review from a team as a code owner May 15, 2024 11:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore)

@semd
Copy link
Contributor Author

semd commented May 16, 2024

@elasticmachine merge upstream

Copy link
Contributor

@kapral18 kapral18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #17 / Saved Objects Management saved objects management with hidden types Delete modal should not delete the hidden objects when performing the operation

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 15.1MB 15.1MB -99.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd

@semd semd merged commit 5acea44 into elastic:main May 16, 2024
36 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 16, 2024
## Summary

Fixes: elastic#183497

Sets the `applyGlobalQueriesAndFilters` prop correctly to
_VisualizationEmbeddable_. This property was ignored when used from the
_TopN_ component, causing it to always apply the global filters and
query.

Extra: I cleaned all props that are not used in those component

### Screenshots

Pre-condition: Setting `user.name:"0q3c5et718"` query to the global
query in the background.

Before:

![before](https://github.com/elastic/kibana/assets/17747913/0b9ee913-44dc-48a7-a170-1c537ae494cf)

After:

![after](https://github.com/elastic/kibana/assets/17747913/89b6f752-d640-4e99-a826-0ff78d84992b)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 5acea44)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 16, 2024
…83601)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Security Solution] Fix TopN filters in timeline
(#183501)](#183501)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2024-05-16T08:45:31Z","message":"[Security
Solution] Fix TopN filters in timeline (#183501)\n\n##
Summary\r\n\r\nFixes:
#183497 the
`applyGlobalQueriesAndFilters` prop correctly
to\r\n_VisualizationEmbeddable_. This property was ignored when used
from the\r\n_TopN_ component, causing it to always apply the global
filters and\r\nquery.\r\n\r\nExtra: I cleaned all props that are not
used in those component\r\n\r\n### Screenshots\r\n\r\nPre-condition:
Setting `user.name:\"0q3c5et718\"` query to the global\r\nquery in the
background.\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/0b9ee913-44dc-48a7-a170-1c537ae494cf)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/89b6f752-d640-4e99-a826-0ff78d84992b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5acea44cc9b9694e52534e584ee68187ef8760c1","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat
Hunting","Team:Threat
Hunting:Explore","v8.14.0","v8.15.0"],"title":"[Security Solution] Fix
TopN filters in
timeline","number":183501,"url":"#183501
Solution] Fix TopN filters in timeline (#183501)\n\n##
Summary\r\n\r\nFixes:
#183497 the
`applyGlobalQueriesAndFilters` prop correctly
to\r\n_VisualizationEmbeddable_. This property was ignored when used
from the\r\n_TopN_ component, causing it to always apply the global
filters and\r\nquery.\r\n\r\nExtra: I cleaned all props that are not
used in those component\r\n\r\n### Screenshots\r\n\r\nPre-condition:
Setting `user.name:\"0q3c5et718\"` query to the global\r\nquery in the
background.\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/0b9ee913-44dc-48a7-a170-1c537ae494cf)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/89b6f752-d640-4e99-a826-0ff78d84992b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5acea44cc9b9694e52534e584ee68187ef8760c1"}},"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":"#183501
Solution] Fix TopN filters in timeline (#183501)\n\n##
Summary\r\n\r\nFixes:
#183497 the
`applyGlobalQueriesAndFilters` prop correctly
to\r\n_VisualizationEmbeddable_. This property was ignored when used
from the\r\n_TopN_ component, causing it to always apply the global
filters and\r\nquery.\r\n\r\nExtra: I cleaned all props that are not
used in those component\r\n\r\n### Screenshots\r\n\r\nPre-condition:
Setting `user.name:\"0q3c5et718\"` query to the global\r\nquery in the
background.\r\n\r\nBefore:\r\n\r\n\r\n![before](https://github.com/elastic/kibana/assets/17747913/0b9ee913-44dc-48a7-a170-1c537ae494cf)\r\n\r\nAfter:\r\n\r\n\r\n![after](https://github.com/elastic/kibana/assets/17747913/89b6f752-d640-4e99-a826-0ff78d84992b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"5acea44cc9b9694e52534e584ee68187ef8760c1"}}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] Fix TopN filters in timeline
5 participants