import React , { FunctionComponent } from 'react' ; import { i18n } from '@kbn/i18n' ; import { useConfiguration } from '../../../form' ; import { ForcemergeField , IndexPriorityField , DataTierAllocationField , ShrinkField , ReadonlyField , ReplicasField , } from '../shared_fields' ; import { Phase } from '../phase' ; const i18nTexts = { dataTierAllocation : { description : i18n . translate ( 'xpack.indexLifecycleMgmt.warmPhase.dataTier.description' , { defaultMessage : 'Move data to nodes optimized for less-frequent, read-only access.' , } ) , } , } ; export const WarmPhase = ( ) => { const { isUsingSearchableSnapshotInHotPhase } = useConfiguration ( ) ; return ( < Phase phase = "warm" > < ReplicasField phase = "warm" / > { ! isUsingSearchableSnapshotInHotPhase && < ShrinkField phase = "warm" / > } { ! isUsingSearchableSnapshotInHotPhase && < ForcemergeField phase = "warm" / > } { ! isUsingSearchableSnapshotInHotPhase && < ReadonlyField phase = "warm" / > } { } < DataTierAllocationField description = { i18nTexts . dataTierAllocation . description } phase = "warm" / > < IndexPriorityField phase = "warm" / > < /Phase>); } ;