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][Exceptions] - Moves ExceptionItem component to lists plugin #95246

Merged
merged 12 commits into from
Mar 27, 2021

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Mar 23, 2021

Summary

Moves part of the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I am moving single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the BuilderExceptionItem which deals with rendering the individual exception items.

Quick Summary:

  • x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.tsx x-pack/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx
    • Corresponding unit test file moved as well
    • Updated security solution exception builder to pull BuilderExceptionItem from lists plugin
  • Copied x-pack/plugins/security_solution/public/common/components/and_or_badge/ to x-pack/plugins/lists/public/exceptions/components/and_or_badge/
    • As these components are also used in non exceptions flows in security solution, did not remove there
    • Working on creating an issue to see if these components can be taken up by EUI (reached out to the team and they suggested this as a first step) [EUI][Data] - Add index field selectors to EUI or Data #94875
Entry Item (PR)

Screen Shot 2021-03-14 at 11 31 04 PM

Exception Item (THIS PR DEALS WITH 👇🏽)

Screen Shot 2021-03-14 at 11 32 15 PM

Builder Buttons

Screen Shot 2021-03-14 at 11 32 39 PM

Exception Item Comments

Screen Shot 2021-03-14 at 11 33 11 PM

Builder Modal

Screen Shot 2021-03-14 at 11 33 30 PM

Notes

  • There may still be work to do to get the component working for all use cases, however, for the moment being, concentrating on moving existing functionality over

Testing

Prior to making these changes, added a number of tests to ensure coverage of existing functionality. For manual testing, please checkout PR and play around with the following:

  • Add/edit an exception item
    • if an existing item, make sure that it populates as expected in the modal
  • Add/edit different entry types like match, match_any, nested etc.
  • Play around with the component in storybook

Checklist

@yctercero yctercero self-assigned this Mar 23, 2021
@yctercero yctercero added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detections and Resp Security Detection Response Team v7.13.0 v8.0.0 labels Mar 23, 2021
@yctercero yctercero marked this pull request as ready for review March 24, 2021 01:44
@yctercero yctercero requested review from a team as code owners March 24, 2021 01:44
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

Already left a review on the builder pr but this also looks good on all the manual testing i did with it 👍

@yctercero
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
lists 149 156 +7
securitySolution 2209 2206 -3
total +4

Async chunks

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

id before after diff
securitySolution 7.2MB 7.2MB -9.8KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
lists 176.6KB 190.2KB +13.6KB

History

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

cc @yctercero

@yctercero yctercero merged commit 17d3907 into elastic:master Mar 27, 2021
yctercero added a commit to yctercero/kibana that referenced this pull request Mar 27, 2021
…sts plugin (elastic#95246)

## Summary

Moves part of the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I am moving single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `BuilderExceptionItem` which deals with rendering the individual exception items.
yctercero added a commit that referenced this pull request Mar 30, 2021
… to lists plugin (#95246) (#95608)

* [Security Solution][Exceptions] - Moves ExceptionItem component to lists plugin (#95246)

## Summary

Moves part of the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I am moving single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `BuilderExceptionItem` which deals with rendering the individual exception items.

* updating snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@yctercero yctercero deleted the rac_exception_item branch October 13, 2021 06:27
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:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants