import React , { FunctionComponent } from 'react' ; import { i18n } from '@kbn/i18n' ; import { useConfiguration } from '../../../form' ; import { DataTierAllocationField , SearchableSnapshotField , IndexPriorityField , ReplicasField , ReadonlyField , } from '../shared_fields' ; import { Phase } from '../phase' ; const i18nTexts = { dataTierAllocation : { description : i18n . translate ( 'xpack.indexLifecycleMgmt.coldPhase.dataTier.description' , { defaultMessage : 'Move data to nodes optimized for less frequent, read-only access. Store data in the cold phase on less-expensive hardware.' , } ) , } , } ; export const ColdPhase = ( ) => { const { isUsingSearchableSnapshotInHotPhase } = useConfiguration ( ) ; return ( < Phase phase = "cold" topLevelSettings = { < SearchableSnapshotField phase = "cold" / > } > < ReplicasField phase = "cold" / > { } { ! isUsingSearchableSnapshotInHotPhase && < ReadonlyField phase = "cold" / > } { } < DataTierAllocationField description = { i18nTexts . dataTierAllocation . description } phase = "cold" / > < IndexPriorityField phase = "cold" / > < /Phase>); } ;