import { DataGridItem } from '../../../../../components/data_grid' ; import { DataFrameAnalyticsConfig } from '../../../../common' ; import { FEATURE_INFLUENCE , OUTLIER_SCORE } from '../../../../common/constants' ; export const getOutlierScoreFieldName = ( jobConfig ) => `${ jobConfig . dest . results_field }.${ OUTLIER_SCORE }` ; export const getFeatureCount = ( resultsField , tableItems = [ ] ) => { if ( tableItems . length === 0 ) { return 0 ; } const fullItem = tableItems [ 0 ] ; if ( Array . isArray ( fullItem [ `${ resultsField }.${ FEATURE_INFLUENCE }` ] ) ) { return fullItem [ `${ resultsField }.${ FEATURE_INFLUENCE }` ] . length ; } return 0 ; } ;