Skip to content

Commit

Permalink
Clarify no documents error message when filtering by is_training (ela…
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Aug 18, 2020
1 parent 2d958e5 commit 928ae53
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,16 @@ export const EvaluatePanel: FC<Props> = ({ jobConfig, jobStatus, searchQuery })
{generalizationEval.error !== null && (
<EuiFlexItem grow={false}>
<EuiText size="xs" color="danger">
{generalizationEval.error}
{isTrainingFilter === true &&
generalizationDocsCount === 0 &&
generalizationEval.error.includes('No documents found')
? i18n.translate(
'xpack.ml.dataframe.analytics.regressionExploration.evaluateNoTestingDocsError',
{
defaultMessage: 'No testing documents found',
}
)
: generalizationEval.error}
</EuiText>
</EuiFlexItem>
)}
Expand Down Expand Up @@ -421,7 +430,16 @@ export const EvaluatePanel: FC<Props> = ({ jobConfig, jobStatus, searchQuery })
{trainingEval.error !== null && (
<EuiFlexItem grow={false}>
<EuiText size="xs" color="danger">
{trainingEval.error}
{isTrainingFilter === false &&
trainingDocsCount === 0 &&
trainingEval.error.includes('No documents found')
? i18n.translate(
'xpack.ml.dataframe.analytics.regressionExploration.evaluateNoTrainingDocsError',
{
defaultMessage: 'No training documents found',
}
)
: trainingEval.error}
</EuiText>
</EuiFlexItem>
)}
Expand Down

0 comments on commit 928ae53

Please sign in to comment.