Updates error message when creating ML job (#28085) (#28480)

* Updates error message when creating ML job

* Updated error message based on feedback
This commit is contained in:
Jason Rhodes 2019-01-10 10:04:31 -05:00 committed by GitHub
parent cdbefd368d
commit c5240c5666
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,26 +90,19 @@ export class MachineLearningFlyout extends Component<FlyoutProps, FlyoutState> {
};
public addErrorToast = () => {
const { location, urlParams } = this.props;
const { serviceName = 'unknown', transactionType } = urlParams;
const { urlParams } = this.props;
const { serviceName = 'unknown' } = urlParams;
if (!serviceName) {
return;
}
toastNotifications.addWarning({
title: 'Job already exists',
title: 'Job creation failed',
text: (
<p>
There&apos;s already a job running for anomaly detection on{' '}
{serviceName} ({transactionType}).{' '}
<ViewMLJob
serviceName={serviceName}
transactionType={transactionType}
location={location}
>
View existing job
</ViewMLJob>
Your current license may not allow for creating machine learning jobs,
or this job may already exist.
</p>
)
});