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] Timeline uses existing filter manager #111732

Merged
merged 7 commits into from
Sep 13, 2021

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Sep 9, 2021

Summary

#106980

Steps to Reproduce

  1. Navigate to Timeline
  2. Create and save the timeline with query host.name: *
  3. In host.name click on "filter for value" or "filter out value"
  4. Observe that filters are working fine.
  5. Do a browser refresh.
  6. Observe that "filter for value" and "filter out value" should work (before this fix they were not working. It was a bit tricky to reproduce it successfully, but with a browser refresh landing on timeline's page usually has no problem reproducing the bug)

Checklist

Delete any items that are not applicable to this PR.

@@ -155,6 +155,7 @@ export const addTimelineToStore = ({
return {
...timelineById,
[id]: {
...(timelineById[id] ? timelineById[id] : {}),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

action ADD_TIMELINE wiped out the filterManager we set when initialising t-grid

@angorayc angorayc changed the title use existing filterManager [Security Solution] Timeline uses existing filter manager Sep 9, 2021
@angorayc angorayc added v7.15.0 v7.16.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. auto-backport Deprecated - use backport:version if exact versions are needed labels Sep 9, 2021
@@ -156,6 +156,7 @@ export const addTimelineToStore = ({
...timelineById,
[id]: {
...timeline,
filterManager: timelineById[id].filterManager,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

action ADD_TIMELINE wiped out the filterManager we set when initialising t-grid

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thank you!

@angorayc angorayc marked this pull request as ready for review September 10, 2021 10:43
@angorayc angorayc requested a review from a team as a code owner September 10, 2021 10:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

[timelineId, activeFilterMananager, filterManagerBackup]
() =>
timelineId === TimelineId.active
? activeFilterManager ?? new FilterManager(uiSettings)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

activeFilterManager could be undefined sometimes

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Tested locally and the issue no longer occurs in the timelines created from the alerts, timelines, rule details, or host pages.

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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 6.5MB 6.5MB +564.0B

History

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

@angorayc angorayc merged commit b7b593a into elastic:master Sep 13, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 13, 2021
…1732)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 13, 2021
…1732)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.15
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 13, 2021
…111968)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Angela Chuang <[email protected]>
kibanamachine added a commit that referenced this pull request Sep 13, 2021
…111969)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Angela Chuang <[email protected]>
angorayc added a commit to angorayc/kibana that referenced this pull request Sep 14, 2021
…1732)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx
angorayc added a commit that referenced this pull request Sep 14, 2021
…1732) (#112148)

* [Security Solution] Timeline uses existing filter manager (#111732)

* use existing filterManager

* remove unused default value

* unit test

* fix type

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx

* lint error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.14.2 v7.15.0 v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants