Skip to content

Commit

Permalink
prevent update if mml is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Jul 6, 2020
1 parent 81a73e6 commit 4783bab
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const EditAnalyticsFlyout: FC<EditAnalyticsJobFlyoutProps> = ({ closeFlyo
} = useMlKibana();
const { refresh } = useRefreshAnalyticsList();

// Disable if all fields are empty or mml is not valid
// Disable if mml is not valid
const updateButtonDisabled = mmlValidationError !== undefined;

useEffect(() => {
Expand All @@ -82,7 +82,11 @@ export const EditAnalyticsFlyout: FC<EditAnalyticsJobFlyoutProps> = ({ closeFlyo
setMmlValidationError(undefined);
}
} else {
setMmlValidationError(undefined);
setMmlValidationError(
i18n.translate('xpack.ml.dataframe.analytics.create.modelMemoryEmptyError', {
defaultMessage: 'Model memory limit must not be empty',
})
);
}
}, [modelMemoryLimit]);

Expand Down

0 comments on commit 4783bab

Please sign in to comment.