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] Move Endpoint details flyout and related middleware to their own functions #108330

Conversation

academo
Copy link
Contributor

@academo academo commented Aug 12, 2021

Summary

This PR is a continuation to #107632

Even though there seem to be many changes, this PR doesn't change any business logic. It moves things from a file to other and adds a new redux action to later be used.

Tests will be added for this new component after is moved to common components in the following refactor PR.

What in the past was a component like this:

<Flyout>
  <Header>
  <Content>
  <Foorter>
  <Tabs>
</Flyout>

turns to be:

<Flyout>
	<DetailsContent>
</Flyout>

and the DetailsContent would be:

<Header>
<Content>
<Foorter>
<Tabs>

What had been done:

  • The endpoint hosts middleware had been further refactor to split the section that loads an endpoint details and the ingest policies
  • The Endpoint details flyout component doesn't have visual components anymore. Now it only reads the endpoint id from the url and dispatch an action to load the endpoint details data.
  • The Endpoint details component had been detached from URL query parameters. It still displays data based on the redux store.

TODO in upcoming PRs:

  • Detach the internal policy flyout content from queryParameters (make them optional)
  • Move the endpoint details component (non-flyout) to common components
  • Invoke the endpoint details component from the timeline view.

Checklist

Delete any items that are not applicable to this PR.

@academo academo requested a review from ashokaditya August 12, 2021 08:06
@academo academo added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.15.0 v7.16.0 v8.0.0 labels Aug 12, 2021
@academo academo marked this pull request as ready for review August 12, 2021 08:17
@academo academo requested a review from a team as a code owner August 12, 2021 08:17
@academo academo requested a review from joeypoon August 12, 2021 08:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@academo academo requested review from dasansol92 and removed request for joeypoon August 12, 2021 08:18
@@ -4,122 +4,23 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all the code that you see had been removed here (A)

@@ -0,0 +1,210 @@
/*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was moved into this file (A)

Copy link
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. 🚀 Nice to have large files refactored. 👏

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2360 2361 +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 6.5MB 6.5MB +520.0B

History

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

@academo academo merged commit 8cc5f49 into elastic:master Aug 13, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 13, 2021
…re to their own functions (elastic#108330)

* Split function to load endpoint details using parameters

* Add action to load endpoint details

* Moving all the endpoint details content to a separate component

* Rename endpoint details to endpoint details content

* Rename temporal file into EndpointDetails

* Remove unused dispatch

* Refactor ingestPolicies dispatching in the middleware
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x
7.16 The branch "7.16" is invalid or doesn't exist

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 108330

@academo academo removed the v7.16.0 label Aug 13, 2021
kibanamachine added a commit that referenced this pull request Aug 13, 2021
…re to their own functions (#108330) (#108491)

* Split function to load endpoint details using parameters

* Add action to load endpoint details

* Moving all the endpoint details content to a separate component

* Rename endpoint details to endpoint details content

* Rename temporal file into EndpointDetails

* Remove unused dispatch

* Refactor ingestPolicies dispatching in the middleware

Co-authored-by: Esteban Beltran <[email protected]>
ashokaditya added a commit that referenced this pull request Aug 16, 2021
… correctly (#108551)

* update endpoint middleware to load data correctly

fixes kibana/issues/108497
modifies changes done in /pull/107632
and /pull/108330

* await results

fixes /issues/108497

* review comments

* Add a test to cover this case

fixes /issues/108497

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 16, 2021
… correctly (elastic#108551)

* update endpoint middleware to load data correctly

fixes kibana/issues/108497
modifies changes done in elastic/pull/107632
and elastic/pull/108330

* await results

fixes elastic/issues/108497

* review comments

* Add a test to cover this case

fixes elastic/issues/108497

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit that referenced this pull request Aug 16, 2021
… correctly (#108551) (#108678)

* update endpoint middleware to load data correctly

fixes kibana/issues/108497
modifies changes done in /pull/107632
and /pull/108330

* await results

fixes /issues/108497

* review comments

* Add a test to cover this case

fixes /issues/108497

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

Co-authored-by: Ashokaditya <[email protected]>
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 release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants