import { FailedTransactionsCorrelation , FailedTransactionsCorrelationsImpactThreshold , } from '../../../../../common/correlations/failed_transactions_correlations/types' ; import { FAILED_TRANSACTIONS_IMPACT_THRESHOLD } from '../../../../../common/correlations/failed_transactions_correlations/constants' ; export function getFailedTransactionsCorrelationImpactLabel ( pValue ) { if ( pValue === null ) { return null ; } if ( pValue >= 0 && pValue < 1e-6 ) return { impact : FAILED_TRANSACTIONS_IMPACT_THRESHOLD . HIGH , color : 'danger' , } ; if ( pValue >= 1e-6 && pValue < 0.001 ) return { impact : FAILED_TRANSACTIONS_IMPACT_THRESHOLD . MEDIUM , color : 'warning' , } ; if ( pValue >= 0.001 && pValue < 0.02 ) return { impact : FAILED_TRANSACTIONS_IMPACT_THRESHOLD . LOW , color : 'default' , } ; return null ; }