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

[SIEM] [Detection Engine] Adds Rules Table #50839

Merged
merged 25 commits into from
Nov 21, 2019
Merged

Conversation

spong
Copy link
Member

@spong spong commented Nov 16, 2019

Summary

Detection Engine Meta Issue: #50405
Resolves #50412

This PR wires up the Detection Engine Rules Table and provides the following features:

  • Lists all rules for a given user/space
  • Search/Filtering via Rule Name
  • Sorting via Activate
  • Pagination
  • Enable/Disable Action
  • Rule Selection / Batch Actions
  • Rule Import w/ validation via io-ts
  • Batch Actions
    • Activate selected
    • Deactivate selected
    • Export selected (as .ndjson)
    • Edit selected index patterns... (Waiting on supported feature)
    • Delete selected
  • Individual Overflow Actions
    • Edit rule settings (Waiting on supported feature)
    • Run rule manually... (Waiting on supported feature)
    • Duplicate rule...
    • Export rule
    • Delete rule...
Searching / Sorting

sort_and_filter

Importing / Exporting

import_and_export

Import Fails validation

import_failed_validation

Batch Activate / Deactivate

batch_activate_deactivate

Batch Delete

batch_delete

Delete / Duplicate

dupe_and_delete

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

LGTM

tags: rule.tags ?? [],
activate: rule.enabled,
sourceRule: rule,
isLoading: selectedIds?.includes(rule.id) ?? false,
Copy link
Contributor

Choose a reason for hiding this comment

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

🤜 ?? 🤛

The power of TypeScript is now here. Thanks for letting me see all the new syntax and adding it. Very cool stuff.

@elasticmachine

This comment has been minimized.

<EuiButtonEmpty onClick={closeModal}>{i18n.CANCEL_BUTTON}</EuiButtonEmpty>
<EuiButton
onClick={importRules}
disabled={selectedFiles == null || isImporting}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Don't you want your fancy smancy ?? like so: selectedFiles == null ?? isImporting ;-)

@spong
Copy link
Member Author

spong commented Nov 21, 2019

@elasticmachine merge upstream

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@spong spong merged commit bda4ea0 into elastic:master Nov 21, 2019
@spong spong deleted the de-all-rules-table branch November 21, 2019 21:25
Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

LGTM!

spong added a commit to spong/kibana that referenced this pull request Nov 21, 2019
This PR wires up the Detection Engine Rules Table and provides the following features:
 * [x] Lists all rules for a given user/space
 * [x] Search/Filtering via `Rule Name`
 * [x] Sorting via `Activate`
 * [x] Pagination
 * [x] Enable/Disable Action
 * [x] Rule Selection / Batch Actions
 * [x] Rule Import w/ validation via `io-ts`
 * [x] Batch Actions
   * [x] Activate selected
   * [x] Deactivate selected
   * [x] Export selected (as `.ndjson`)
   * [ ] ~Edit selected index patterns...~ (Waiting on supported feature)
   * [x] Delete selected
 * [x] Individual Overflow Actions
   * [ ] ~Edit rule settings~ (Waiting on supported feature)
   * [ ] ~Run rule manually...~ (Waiting on supported feature)
   * [x] Duplicate rule...
   * [X] Export rule
   * [x] Delete rule...

![sort_and_filter](https://user-images.githubusercontent.com/2946766/69286404-641d1a80-0bb0-11ea-9930-8eada88b36f6.gif)

![import_and_export](https://user-images.githubusercontent.com/2946766/69286806-79df0f80-0bb1-11ea-99c5-92df0a706f0e.gif)

![import_failed_validation](https://user-images.githubusercontent.com/2946766/69286797-72b80180-0bb1-11ea-9397-71fa0ff0b203.gif)

![batch_activate_deactivate](https://user-images.githubusercontent.com/2946766/69287019-0093ec80-0bb2-11ea-8320-57cc7fec27a8.gif)

![batch_delete](https://user-images.githubusercontent.com/2946766/69287139-6e401880-0bb2-11ea-948c-c5b92ba90e6f.gif)

![dupe_and_delete](https://user-images.githubusercontent.com/2946766/69287143-74ce9000-0bb2-11ea-88b3-db75f66ba666.gif)

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

- [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ --
  * Will work with @benskelker on overall Detection Engine documentation
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
  * Includes basic tests -- will expand coverage as features solidify
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
- [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
spong added a commit that referenced this pull request Nov 22, 2019
This PR wires up the Detection Engine Rules Table and provides the following features:
 * [x] Lists all rules for a given user/space
 * [x] Search/Filtering via `Rule Name`
 * [x] Sorting via `Activate`
 * [x] Pagination
 * [x] Enable/Disable Action
 * [x] Rule Selection / Batch Actions
 * [x] Rule Import w/ validation via `io-ts`
 * [x] Batch Actions
   * [x] Activate selected
   * [x] Deactivate selected
   * [x] Export selected (as `.ndjson`)
   * [ ] ~Edit selected index patterns...~ (Waiting on supported feature)
   * [x] Delete selected
 * [x] Individual Overflow Actions
   * [ ] ~Edit rule settings~ (Waiting on supported feature)
   * [ ] ~Run rule manually...~ (Waiting on supported feature)
   * [x] Duplicate rule...
   * [X] Export rule
   * [x] Delete rule...

![sort_and_filter](https://user-images.githubusercontent.com/2946766/69286404-641d1a80-0bb0-11ea-9930-8eada88b36f6.gif)

![import_and_export](https://user-images.githubusercontent.com/2946766/69286806-79df0f80-0bb1-11ea-99c5-92df0a706f0e.gif)

![import_failed_validation](https://user-images.githubusercontent.com/2946766/69286797-72b80180-0bb1-11ea-9397-71fa0ff0b203.gif)

![batch_activate_deactivate](https://user-images.githubusercontent.com/2946766/69287019-0093ec80-0bb2-11ea-8320-57cc7fec27a8.gif)

![batch_delete](https://user-images.githubusercontent.com/2946766/69287139-6e401880-0bb2-11ea-948c-c5b92ba90e6f.gif)

![dupe_and_delete](https://user-images.githubusercontent.com/2946766/69287143-74ce9000-0bb2-11ea-88b3-db75f66ba666.gif)

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

- [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ --
  * Will work with @benskelker on overall Detection Engine documentation
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
  * Includes basic tests -- will expand coverage as features solidify
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
- [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
@elasticmachine
Copy link
Contributor

💔 Build Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SIEM] [Detection Engine] Create All Rules Table
5 participants