-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Adds a configuraton option for the default SIEM date time range #44540
[SIEM] Adds a configuraton option for the default SIEM date time range #44540
Conversation
Pinging @elastic/siem |
💚 Build Succeeded |
@@ -53,7 +53,7 @@ const MyEuiSuperDatePicker: React.SFC<MyEuiSuperDatePickerProps> = EuiSuperDateP | |||
|
|||
interface SuperDatePickerStateRedux { | |||
duration: number; | |||
policy: string; | |||
policy: Policy['kind']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ on fixing the typing -- thanks! 🙂
export type DefaultIntervalSetting = DefaultInterval | null | undefined; | ||
|
||
// Defaults for if everything fails including dateMath.parse(DEFAULT_FROM) or dateMath.parse(DEFAULT_TO) | ||
// These should not really be hit unless we are in an extreme buggy state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explicitly detailing this 👍
* scenarios here or the absence of a time range setting. | ||
* @param timeRange timeRange to use as a mock, including malformed data | ||
*/ | ||
const mockTimeRange = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! And nice usage with the clear in the beforeEach()
.
This comment has been minimized.
This comment has been minimized.
* with the object being malformed. | ||
* @param timeRange Malformed object | ||
*/ | ||
const isMalformedTimeRange = (timeRange: unknown): timeRange is DefaultTimeRangeSetting => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really love this technique -- thanks again for sharing it on the Maps PR! ++ type narrowing!
x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out, tested locally and performed code review.
Very clean implementation! Thanks for cleaning up some of the types, and for the thorough test coverage on this -- crazy! :D Added a few nits, but other than that...
___ ___ ___ ___
/\__\ /\ \ /\ \ /\__\
/:/ / /::\ \ \:\ \ /::| |
/:/ / /:/\:\ \ \:\ \ /:|:| |
/:/ / /:/ \:\ \ /::\ \ /:/|:|__|__
/:/__/ /:/__/_\:\__\ /:/\:\__\ /:/ |::::\__\
\:\ \ \:\ /\ \/__/ /:/ \/__/ \/__/~~/:/ /
\:\ \ \:\ \:\__\ /:/ / /:/ /
\:\ \ \:\/:/ / \/__/ /:/ /
\:\__\ \::/ / /:/ /
\/__/ \/__/ \/__/
💚 Build Succeeded |
elastic#44540) ## Summary Adds a configuration for the SIEM date time picker and interval within advanced settings: ``` ${root}/app/kibana#/management/kibana/settings ``` <img width="696" alt="Screen Shot 2019-08-30 at 1 24 29 PM" src="https://user-images.githubusercontent.com/1151048/64046623-95de9200-cb29-11e9-9f5a-dc396494210c.png"> ### Checklist 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) - [x] [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 - [x] 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)
elastic#44540) ## Summary Adds a configuration for the SIEM date time picker and interval within advanced settings: ``` ${root}/app/kibana#/management/kibana/settings ``` <img width="696" alt="Screen Shot 2019-08-30 at 1 24 29 PM" src="https://user-images.githubusercontent.com/1151048/64046623-95de9200-cb29-11e9-9f5a-dc396494210c.png"> ### Checklist 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) - [x] [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 - [x] 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)
#44540) (#44559) ## Summary Adds a configuration for the SIEM date time picker and interval within advanced settings: ``` ${root}/app/kibana#/management/kibana/settings ``` <img width="696" alt="Screen Shot 2019-08-30 at 1 24 29 PM" src="https://user-images.githubusercontent.com/1151048/64046623-95de9200-cb29-11e9-9f5a-dc396494210c.png"> ### Checklist 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) - [x] [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 - [x] 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)
#44540) (#44558) ## Summary Adds a configuration for the SIEM date time picker and interval within advanced settings: ``` ${root}/app/kibana#/management/kibana/settings ``` <img width="696" alt="Screen Shot 2019-08-30 at 1 24 29 PM" src="https://user-images.githubusercontent.com/1151048/64046623-95de9200-cb29-11e9-9f5a-dc396494210c.png"> ### Checklist 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) - [x] [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 - [x] 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)
…-to-np-ready * 'master' of github.com:elastic/kibana: (409 commits) [ML] Data frame analytics: Fix source index checks. (elastic#44479) [Code] try fix this test (elastic#43692) skip flaky suite (elastic#44572) (elastic#42111) (elastic#44286) (elastic#43557) (elastic#42567) skip flaky suite (elastic#44560) skip flaky suite (elastic#44250) disable flaky suite (elastic#41336) [code] Update download URLs for go lsp. (elastic#44581) disable flaky suite (elastic#44575) disable flaky suite (elastic#44576) [Code] add functional test to verify lang server full api symbol/reference counts (elastic#44051) Improve Storybook scripts and load time (elastic#44511) Update Dependencies (elastic#44519) Remove use of injecti18n in Embeddables plugin (elastic#44043) [SIEM] Adds a configuraton option for the default SIEM date time range (elastic#44540) [Uptime]Fix/issue 40584 section headline should be inside panel (elastic#43468) disable flaky suite (elastic#22322) Changes network to use ECS fields (elastic#44392) Fix 'workpad flash' when loading new workpad (elastic#44387) [renovate] bump new PR version labels Update dependency cmd-shim to ^2.1.0 (elastic#44034) ... # Conflicts: # src/legacy/core_plugins/console/public/index.html
Summary
Adds a configuration for the SIEM date time picker and interval within advanced settings:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers