Skip to content

Commit

Permalink
[SecuritySolution] override timerange for prebuilt templates (#82468) (
Browse files Browse the repository at this point in the history
…#83453)

* override timerange for prebuilt templates

* add unit test

* add unit tests

* make sure it is template

* check timelineType

* overwrite prebuilt template's timerange

* update mock path

* override with relative timerange

* Update x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts

Co-authored-by: Patryk Kopyciński <[email protected]>

* review

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2020
1 parent 358de9e commit 2e9fa46
Show file tree
Hide file tree
Showing 9 changed files with 1,299 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ 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.
const DEFAULT_FROM_MOMENT = moment().subtract(24, 'hours');
const DEFAULT_TO_MOMENT = moment();
export const DEFAULT_FROM_MOMENT = moment().subtract(24, 'hours');
export const DEFAULT_TO_MOMENT = moment();

/**
* Retrieves timeRange settings to populate filters
Expand Down
Loading

0 comments on commit 2e9fa46

Please sign in to comment.