forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Adding cloud specific ML node warning (elastic#50139)
* [ML] Adding cloud specific ML node warning * fixing include * adding callout and cloud checks * fixing translations * removing positive look behind in regex
- Loading branch information
1 parent
bdfe2df
commit 659ae71
Showing
8 changed files
with
114 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
...gins/ml/public/jobs/jobs_list/components/node_available_warning/node_available_warning.js
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
...ins/ml/public/jobs/jobs_list/components/node_available_warning/node_available_warning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { Fragment, FC } from 'react'; | ||
|
||
import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { mlNodesAvailable, permissionToViewMlNodeCount } from '../../../../ml_nodes_check'; | ||
import { cloudDeploymentId, isCloud } from '../../../../jobs/new_job_new/utils/new_job_defaults'; | ||
|
||
export const NodeAvailableWarning: FC = () => { | ||
if (mlNodesAvailable() === true || permissionToViewMlNodeCount() === false) { | ||
return null; | ||
} else { | ||
const id = cloudDeploymentId(); | ||
return ( | ||
<Fragment> | ||
<EuiCallOut | ||
title={ | ||
<FormattedMessage | ||
id="xpack.ml.jobsList.nodeAvailableWarning.noMLNodesAvailableTitle" | ||
defaultMessage="No ML nodes available" | ||
/> | ||
} | ||
color="warning" | ||
iconType="alert" | ||
> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.ml.jobsList.nodeAvailableWarning.noMLNodesAvailableDescription" | ||
defaultMessage="There are no ML nodes available." | ||
/> | ||
<br /> | ||
<FormattedMessage | ||
id="xpack.ml.jobsList.nodeAvailableWarning.unavailableCreateOrRunJobsDescription" | ||
defaultMessage="You will not be able to create or run jobs." | ||
/> | ||
{isCloud && id !== null && ( | ||
<Fragment> | ||
<br /> | ||
<FormattedMessage | ||
id="xpack.ml.jobsList.nodeAvailableWarning.linkToCloudDescription" | ||
defaultMessage="Please edit your {link}. You may enable a free 1GB machine learning node or expand your existing ML configuration." | ||
values={{ | ||
link: ( | ||
<EuiLink href={`https://cloud.elastic.co/deployments?q=${id}`}> | ||
<FormattedMessage | ||
id="xpack.ml.jobsList.nodeAvailableWarning.linkToCloud.hereLinkText" | ||
defaultMessage="Elastic Cloud deployment" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</Fragment> | ||
)} | ||
</p> | ||
</EuiCallOut> | ||
<EuiSpacer size="m" /> | ||
</Fragment> | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters