import { i18n } from '@kbn/i18n' ; import React , { FunctionComponent } from 'react' ; import { EuiCallOut } from '@elastic/eui' ; import { PhaseWithAllocation , DataTierRole } from '../../../../../../../../../common/types' ; import { noCustomAttributesTitle , nodeAllocationMigrationGuidance , } from './no_custom_attributes_messages' ; import { nodeRoleToFallbackTierMap } from './node_role_to_fallback_tier_map' ; interface Props { phase : PhaseWithAllocation ; targetNodeRole : DataTierRole ; } export const WillUseFallbackTierUsingNodeAttributesNotice = ( { phase , targetNodeRole , } ) => { return ( < EuiCallOut data - test - subj = "willUseFallbackTierUsingNodeAttributesNotice" title = { noCustomAttributesTitle } > < p > { i18n . translate ( 'xpack.indexLifecycleMgmt.dataTier.willUseFallbackTierUsingNodeAttributesDescription' , { defaultMessage : 'No {phase} nodes available. Data will be allocated to the {fallbackTier} tier.' , values : { phase , fallbackTier : nodeRoleToFallbackTierMap [ targetNodeRole ] } , } ) } < /p> < p > { nodeAllocationMigrationGuidance } < /p> < /EuiCallOut>); } ;