Issue 5429: Added a shortcut to ML jobs (#39147)

* Added a shortcut to ML jobs

* Changed the link to monitoring ML jobs

* Removed whitespace
This commit is contained in:
igoristic 2019-06-25 19:40:31 -04:00 committed by GitHub
parent 9ac21391f3
commit 90a3ba41cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,15 +153,22 @@ export function ElasticsearchPanel(props) {
const showMlJobs = () => {
// if license doesn't support ML, then `ml === null`
if (props.ml) {
return [
<EuiDescriptionListTitle key="mlJobsListTitle">
<FormattedMessage
id="xpack.monitoring.cluster.overview.esPanel.jobsLabel"
defaultMessage="Jobs"
/>
</EuiDescriptionListTitle>,
<EuiDescriptionListDescription key="mlJobsCount" data-test-subj="esMlJobs">{ props.ml.jobs }</EuiDescriptionListDescription>
];
const gotoURL = '#/elasticsearch/ml_jobs';
return (
<>
<EuiDescriptionListTitle>
<EuiLink href={gotoURL}>
<FormattedMessage
id="xpack.monitoring.cluster.overview.esPanel.jobsLabel"
defaultMessage="Jobs"
/>
</EuiLink>
</EuiDescriptionListTitle>
<EuiDescriptionListDescription data-test-subj="esMlJobs">
<EuiLink href={gotoURL}>{props.ml.jobs}</EuiLink>
</EuiDescriptionListDescription>
</>
);
}
return null;
};