diff --git a/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx b/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx index 630e8c16629cb..3a67b413dbdf6 100644 --- a/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx +++ b/x-pack/plugins/ml/public/application/overview/components/analytics_panel/analytics_panel.tsx @@ -26,6 +26,7 @@ import { DataFrameAnalyticsListRow } from '../../../data_frame_analytics/pages/a import { AnalyticStatsBarStats, StatsBar } from '../../../components/stats_bar'; import { useMlUrlGenerator, useNavigateToPath } from '../../../contexts/kibana'; import { ML_PAGES } from '../../../../../common/constants/ml_url_generator'; +import { SourceSelection } from '../../../data_frame_analytics/pages/analytics_management/components/source_selection'; interface Props { jobCreationDisabled: boolean; @@ -38,6 +39,7 @@ export const AnalyticsPanel: FC = ({ jobCreationDisabled, setLazyJobCount ); const [errorMessage, setErrorMessage] = useState(undefined); const [isInitialized, setIsInitialized] = useState(false); + const [isSourceIndexModalVisible, setIsSourceIndexModalVisible] = useState(false); const mlUrlGenerator = useMlUrlGenerator(); const navigateToPath = useNavigateToPath(); @@ -110,7 +112,7 @@ export const AnalyticsPanel: FC = ({ jobCreationDisabled, setLazyJobCount } actions={ setIsSourceIndexModalVisible(true)} color="primary" fill iconType="plusInCircle" @@ -160,6 +162,9 @@ export const AnalyticsPanel: FC = ({ jobCreationDisabled, setLazyJobCount )} + {isSourceIndexModalVisible === true && ( + setIsSourceIndexModalVisible(false)} /> + )} ); };