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] Adds a configuraton option for the default SIEM date time range #44540

Merged

Conversation

FrankHassanabad
Copy link
Contributor

@FrankHassanabad FrankHassanabad commented Aug 30, 2019

Summary

Adds a configuration for the SIEM date time picker and interval within advanced settings:

${root}/app/kibana#/management/kibana/settings

Screen Shot 2019-08-30 at 1 24 29 PM

Checklist

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

For maintainers

@FrankHassanabad FrankHassanabad self-assigned this Aug 30, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -53,7 +53,7 @@ const MyEuiSuperDatePicker: React.SFC<MyEuiSuperDatePickerProps> = EuiSuperDateP

interface SuperDatePickerStateRedux {
duration: number;
policy: string;
policy: Policy['kind'];
Copy link
Member

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.
Copy link
Member

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 = (
Copy link
Member

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().

@elasticmachine

This comment has been minimized.

* with the object being malformed.
* @param timeRange Malformed object
*/
const isMalformedTimeRange = (timeRange: unknown): timeRange is DefaultTimeRangeSetting =>
Copy link
Member

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!

Copy link
Member

@spong spong left a 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...

      ___       ___           ___           ___     
     /\__\     /\  \         /\  \         /\__\    
    /:/  /    /::\  \        \:\  \       /::|  |   
   /:/  /    /:/\:\  \        \:\  \     /:|:|  |   
  /:/  /    /:/  \:\  \       /::\  \   /:/|:|__|__ 
 /:/__/    /:/__/_\:\__\     /:/\:\__\ /:/ |::::\__\
 \:\  \    \:\  /\ \/__/    /:/  \/__/ \/__/~~/:/  /
  \:\  \    \:\ \:\__\     /:/  /            /:/  / 
   \:\  \    \:\/:/  /     \/__/            /:/  /  
    \:\__\    \::/  /                      /:/  /   
     \/__/     \/__/                       \/__/    

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@FrankHassanabad FrankHassanabad merged commit 13d43fe into elastic:master Aug 31, 2019
@FrankHassanabad FrankHassanabad deleted the configurable-default-time-2 branch August 31, 2019 00:32
FrankHassanabad added a commit to FrankHassanabad/kibana that referenced this pull request Aug 31, 2019
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)
FrankHassanabad added a commit to FrankHassanabad/kibana that referenced this pull request Aug 31, 2019
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)
FrankHassanabad added a commit that referenced this pull request Aug 31, 2019
#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)
FrankHassanabad added a commit that referenced this pull request Aug 31, 2019
#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)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 2, 2019
…-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
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.

3 participants