Skip to content

Commit

Permalink
[ML] Add machine learning documentation links (#85089)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Dec 15, 2020
1 parent 69000ff commit a9a06ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ export const JobsListPage: FC<{
return null;
}

const docLinks = getDocLinks();
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = docLinks;
const anomalyDetectionJobsUrl = `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-jobs.html`;
const anomalyJobsUrl = `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics.html`;
const anomalyDetectionJobsUrl = getDocLinks().links.ml.anomalyDetectionJobs;
const dataFrameAnalyticsUrl = getDocLinks().links.ml.dataFrameAnalytics;

const anomalyDetectionDocsLabel = i18n.translate(
'xpack.ml.management.jobsList.anomalyDetectionDocsLabel',
Expand Down Expand Up @@ -222,7 +220,7 @@ export const JobsListPage: FC<{
href={
currentTabId === 'anomaly_detection_jobs'
? anomalyDetectionJobsUrl
: anomalyJobsUrl
: dataFrameAnalyticsUrl
}
>
{currentTabId === 'anomaly_detection_jobs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import React, { FC } from 'react';
import { EuiFlexItem, EuiLink, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { useMlKibana } from '../../contexts/kibana';

const feedbackLink = 'https://www.elastic.co/community/';

interface Props {
Expand All @@ -23,8 +22,7 @@ export const OverviewSideBar: FC<Props> = ({ createAnomalyDetectionJobDisabled }
},
} = useMlKibana();

const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = docLinks;
const docsLink = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/xpack-ml.html`;
const docsLink = docLinks.links.ml.guide;
const transformsLink = `${basePath.get()}/app/management/data/transform`;

return (
Expand Down

0 comments on commit a9a06ff

Please sign in to comment.