diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx index f4adfe0f2a18c..d682403251a7b 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx @@ -8,6 +8,7 @@ import React, { FC, Fragment } from 'react'; import { EuiCard, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useMlKibana, useMlUrlGenerator } from '../../../../../contexts/kibana'; +import { ML_TABS } from '../../../../../../url_generator'; export const BackToListPanel: FC = () => { const urlGenerator = useMlUrlGenerator(); @@ -18,7 +19,7 @@ export const BackToListPanel: FC = () => { } = useMlKibana(); const redirectToAnalyticsManagementPage = async () => { - const url = await urlGenerator.createUrl({ page: 'data_frame_analytics' }); + const url = await urlGenerator.createUrl({ page: ML_TABS.DATA_FRAME_ANALYTICS }); await navigateToUrl(url); }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx index e1b1f80122da3..49bd4937b5e10 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import { useMlUrlGenerator } from '../../../../../contexts/kibana'; import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; import { useNavigateToPath } from '../../../../../contexts/kibana'; +import { ML_TABS } from '../../../../../../url_generator'; interface Props { jobId: string; @@ -20,9 +21,9 @@ export const ViewResultsPanel: FC = ({ jobId, analysisType }) => { const urlGenerator = useMlUrlGenerator(); const navigateToPath = useNavigateToPath(); - const redirectToAnalyticsManagementPage = async () => { + const redirectToAnalyticsJobPage = async () => { const path = await urlGenerator.createUrl({ - page: 'data_frame_analytics/exploration', + page: ML_TABS.DATA_FRAME_ANALYTICS_EXPLORATION, jobId, analysisType, }); @@ -43,7 +44,7 @@ export const ViewResultsPanel: FC = ({ jobId, analysisType }) => { defaultMessage: 'View results for the analytics job.', } )} - onClick={redirectToAnalyticsManagementPage} + onClick={redirectToAnalyticsJobPage} data-test-subj="analyticsWizardViewResultsCard" />