Skip to content

Commit

Permalink
[SIEM][Detection Engine] Critical blocker, fixes schema accepting val…
Browse files Browse the repository at this point in the history
…ues it should not (#55488)

## Summary

* This fixes the schema accepting values the UI cannot handle at this point with severity. It's best to just set it to a small fixed enumeration of values.
* From feedback from people the values should have more defaults and be more consistent in the schema so gave defaults for `from`, `to`, and `interval`.
* Removed dead query examples that cannot happen because immutable cannot be set by end users anymore
* Changes the version and other sections to be integer only and not allow floats
* Added unit tests

### Checklist

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

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] 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~~

- [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

~~- [ ] 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)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] 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)
  • Loading branch information
FrankHassanabad committed Jan 22, 2020
1 parent b4f15c6 commit a3385e0
Show file tree
Hide file tree
Showing 29 changed files with 480 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jest.mock('../../rules/get_prepackaged_rules', () => {
to: 'now',
index: ['index-1'],
name: 'some-name',
severity: 'severity',
severity: 'low',
interval: '5m',
type: 'query',
version: 2, // set one higher than the mocks which is set to 1 to trigger updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jest.mock('../../rules/get_prepackaged_rules', () => {
to: 'now',
index: ['index-1'],
name: 'some-name',
severity: 'severity',
severity: 'low',
interval: '5m',
type: 'query',
version: 2, // set one higher than the mocks which is set to 1 to trigger updates
Expand Down
Loading

0 comments on commit a3385e0

Please sign in to comment.