[SIEM][Exceptions] - ExceptionsViewer cleanup#68739
Merged
yctercero merged 39 commits intoelastic:masterfrom Jun 10, 2020
Merged
[SIEM][Exceptions] - ExceptionsViewer cleanup#68739yctercero merged 39 commits intoelastic:masterfrom
yctercero merged 39 commits intoelastic:masterfrom
Conversation
…to exceptions-viewer-2
… due to be refactored but dont want to make this PR bigger
Contributor
|
Pinging @elastic/siem (Team:SIEM) |
14 tasks
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
| expect(wrapper.find('[data-test-subj="exceptionsEndpointMessage"]').exists()).toBeTruthy(); | ||
| expect(wrapper.find('[data-test-subj="exceptionsDetectionsMessage"]').exists()).toBeFalsy(); | ||
| }); | ||
| }); |
Contributor
There was a problem hiding this comment.
Lots of nice tests 👍
|
|
||
| if (action.filterOptions.showEndpointList) { | ||
| const exceptions = state.allExceptions.filter((t) => t._tags.includes('endpoint')); | ||
| const list = action.allLists.filter((t) => t.type === 'endpoint'); |
Contributor
There was a problem hiding this comment.
tip: People usually use destructoring when they don't care about a variable name like so:
.filter(({ type }) => type === 'endpoint');No changes needed, just a tip.
Contributor
Author
There was a problem hiding this comment.
Ah, nice. I have an upcoming PR, will link to it with changes for this. Thanks!
FrankHassanabad
approved these changes
Jun 10, 2020
Contributor
FrankHassanabad
left a comment
There was a problem hiding this comment.
Looked it over, looks really clean easy to read. So LGTM for ya!
yctercero
added a commit
to yctercero/kibana
that referenced
this pull request
Jun 10, 2020
### Summary - Adds missing unit tests for relevant files missing them - Changes filter search to fire request on 'Enter' - Breaks out the main ExceptionViewer component into smaller components to make more readable and better tested - Updates utility bar to have the specific list description text next to it as proposed by @spong in elastic#68294 (comment) - Adds loading state any time async request occurs - Now fetches list on list type toggle (if user selects to view either only detections or endpoint items), before was simply filtering already fetched items
madirey
approved these changes
Jun 10, 2020
yctercero
added a commit
that referenced
this pull request
Jun 10, 2020
### Summary - Adds missing unit tests for relevant files missing them - Changes filter search to fire request on 'Enter' - Breaks out the main ExceptionViewer component into smaller components to make more readable and better tested - Updates utility bar to have the specific list description text next to it as proposed by @spong in #68294 (comment) - Adds loading state any time async request occurs - Now fetches list on list type toggle (if user selects to view either only detections or endpoint items), before was simply filtering already fetched items
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jun 11, 2020
* master: (38 commits) Support migrating from reserved feature privileges (elastic#68504) add `preference` field to SavedObjectsFindOptions (elastic#68620) [ILM] Add "wait for snapshot" policy field to Delete phase (elastic#68505) Cleanup old license overwrites (elastic#68744) Bump TypeScript to v3.9 (elastic#67666) [APM] Service maps - adds new storybook stories to test out various data sets (elastic#68727) Fix vega specification parsing (elastic#67963) docs: add more api information (elastic#68717) [APM] Don't show annotations on charts with no data (elastic#68829) [Metrics UI] Fix Inventory View sorting by handling null values (elastic#67889) skip flaky suite (elastic#68836) [SIEM][Detections Engine] - Fix reference rule url overflow (elastic#68640) Index pattern public api => common (elastic#68289) [APM] Lazy-load alert triggers (elastic#68806) [DOCS] Fix table formatting in ingest manager settings (elastic#68824) [Endpoint] Functional Tests cleanup (elastic#68756) revert previous commit which was unintentional Use Github token instead for project assignments [SIEM][Exceptions] - ExceptionsViewer cleanup (elastic#68739) move @kbn/storybook to devDeps (elastic#68791) ...
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExceptionViewercomponent into smaller components to make more readable and better testedTo do
momentto use theFormattedDateinsteadScreenshots & Gifs
Empty state
Only one type of list allowed
List toggles hidden, no popover for add exception.

Exceptions search
Exceptions list toggle
Delete exception
Testing
To turn on lists plugin - in kibana.dev.yml
Use the scripts in
x-pack/plugins/lists/server/scriptsto create some sample exception lists and items. You can use the following:./post_exception_list.sh ./exception_lists/new/exception_list_detection.json./post_exception_list_item.sh ./exception_lists/new/exception_list_item_detection_auto_id.json- this script auto generates the item_id so you can run it as many times as you like to create multiple items associated with the list generated in step 1./post_exception_list.sh./post_exception_list_item.sh ./exception_lists/new/exception_list_item_auto_id.json- this script auto generates the item_id so you can run it as many times as you like to create multiple items associated with the list generated in step 3./find_exception_lists.shto get the id of the two lists you createdExceptionsViewercomponent inx-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/details/index.tsxto something like the following:Navigate to the rules details page and click on the 'Exceptions' tab. Voila!
To check storybook elements, run
yarn storybook security_solutionfrom./kibana/.Checklist
Delete any items that are not applicable to this PR.