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][Resolver] - Maintain active node #86682

Merged
merged 11 commits into from
Jan 5, 2021

Conversation

michaelolo24
Copy link
Contributor

@michaelolo24 michaelolo24 commented Dec 21, 2020

Summary

This PR removes the deprecated userBroughtNodeIntoView, and adds a useSyncSelectedNode to sync the active node to any url changes that take place via interaction with the graph as well as via the browser back and forward buttons. This also resolves #81189

GIF of the forward and back actions below

syncSelected.gif.zip

Checklist

Delete any items that are not applicable to this PR.

@michaelolo24 michaelolo24 added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.12.0 Team:Threat Hunting Security Solution Threat Hunting Team labels Dec 21, 2020
@michaelolo24
Copy link
Contributor Author

@elasticmachine merge upstream

1 similar comment
@michaelolo24
Copy link
Contributor Author

@elasticmachine merge upstream

@michaelolo24 michaelolo24 marked this pull request as ready for review December 22, 2020 21:15
@michaelolo24 michaelolo24 requested review from a team as code owners December 22, 2020 21:15
@michaelolo24 michaelolo24 added release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 22, 2020
@michaelolo24
Copy link
Contributor Author

@elasticmachine merge upstream

payload: nodeID,
payload: {
nodeID,
time: timestamp(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the time field? I probably missed something but doesn't look like we use it in the reducer right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, this line specifically:

camera: animatePanning(nextState.camera, action.payload.time, position, animationDuration),

import { urlSearch } from '../test_utilities/url_search';

const resolverComponentInstanceID = 'useSyncSelectedNodeTestInstanceId';
const animationDuration = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't remember if it's possible but should we import the duration amount from the resolver code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We never made this a constant anywhere, but just did so and updated it in any relevant tests

Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

Looks good, just wasn't sure if the cypress changes should be removed.

@michaelolo24
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2160 2161 +1

Async chunks

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

id before after diff
securitySolution 8.5MB 8.5MB +897.0B

Distributable file count

id before after diff
default 47252 48012 +760

History

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

@michaelolo24
Copy link
Contributor Author

Looks good, just wasn't sure if the cypress changes should be removed.

Spoke with @patrykkopycinski and it should remain in there. Reverted my changes to the cypress.json file. Thanks

@michaelolo24 michaelolo24 merged commit bb3659c into elastic:master Jan 5, 2021
@michaelolo24 michaelolo24 deleted the maintain-active-node branch January 5, 2021 18:27
michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Jan 5, 2021
michaelolo24 added a commit that referenced this pull request Jan 6, 2021
@oatkiller oatkiller added the Feature:Resolver Security Solution Resolver feature label Jan 11, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-app-team (Feature:Resolver)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Resolver Security Solution Resolver feature release_note:enhancement Team:Threat Hunting Security Solution Threat Hunting Team v7.12.0 v8.0.0
Projects
None yet
6 participants