Skip to content

Commit

Permalink
[7.10] [SecuritySolution] override timerange for prebuilt templates (e…
Browse files Browse the repository at this point in the history
…lastic#82468) (elastic#83454)

* [SecuritySolution] override timerange for prebuilt templates (elastic#82468)

* 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]>

* add limits

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>
  • Loading branch information
3 people authored Nov 17, 2020
1 parent 522254e commit 8e6d31f
Show file tree
Hide file tree
Showing 10 changed files with 1,300 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pageLoadAssetSize:
searchprofiler: 67224
security: 189428
securityOss: 30806
securitySolution: 622587
securitySolution: 638231
share: 99205
snapshotRestore: 79176
spaces: 389643
Expand Down
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 8e6d31f

Please sign in to comment.