import { i18n } from '@kbn/i18n' ; import React , { FunctionComponent } from 'react' ; import { EuiCallOut } from '@elastic/eui' ; import { PhaseWithAllocation } from '../../../../../../../../../common/types' ; const i18nTexts = { warm : { title : i18n . translate ( 'xpack.indexLifecycleMgmt.warmPhase.dataTier.noTiersAvailableTitle' , { defaultMessage : 'No nodes assigned to the warm tier' , } ) , body : i18n . translate ( 'xpack.indexLifecycleMgmt.warmPhase.dataTier.noTiersAvailableBody' , { defaultMessage : 'To use role-based allocation, assign one or more nodes to the warm or hot tiers. Allocation will fail if there are no available nodes.' , } ) , } , cold : { title : i18n . translate ( 'xpack.indexLifecycleMgmt.coldPhase.dataTier.noTiersAvailableTitle' , { defaultMessage : 'No nodes assigned to the cold tier' , } ) , body : i18n . translate ( 'xpack.indexLifecycleMgmt.coldPhase.dataTier.noTiersAvailableBody' , { defaultMessage : 'To use role-based allocation, assign one or more nodes to the cold, warm, or hot tiers. Allocation will fail if there are no available nodes.' , } ) , } , } ; interface Props { phase : PhaseWithAllocation ; } export const NoTiersAvailableNotice = ( { phase } ) => { return ( < EuiCallOut data - test - subj = "noTiersAvailableNotice" title = { i18nTexts [ phase ] . title } color = "warning" > { i18nTexts [ phase ] . body } < /EuiCallOut>); } ;