-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ILM] Rollover field redesign (#85579)
* implement form-level support for using default rollover action * slight update to copy * added use default rollover switch and tooltips for detailed copy * fix legacy integration tests and do not unmount rollover field!! * remove unused import * fix client integration tests * updated form to use new isUsingRollover check * fix serialization of rollover * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Adam Locke <adam.locke@elastic.co>
- Loading branch information
1 parent
1f21fe7
commit 286f464
Showing
19 changed files
with
300 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
*/ | ||
|
||
export * from './data_tiers'; | ||
|
||
export * from './rollover'; |
18 changes: 18 additions & 0 deletions
18
x-pack/plugins/index_lifecycle_management/public/application/lib/rollover.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { SerializedPolicy } from '../../../common/types'; | ||
import { defaultRolloverAction } from '../constants'; | ||
|
||
export const isUsingDefaultRollover = (policy: SerializedPolicy): boolean => { | ||
const rollover = policy?.phases?.hot?.actions?.rollover; | ||
return Boolean( | ||
rollover && | ||
rollover.max_age === defaultRolloverAction.max_age && | ||
rollover.max_docs === defaultRolloverAction.max_docs && | ||
rollover.max_size === defaultRolloverAction.max_size | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.