mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
trigger creation from overview page (#97531)
This commit is contained in:
parent
59482009f6
commit
366691a9c8
1 changed files with 6 additions and 1 deletions
|
@ -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<Props> = ({ jobCreationDisabled, setLazyJobCount
|
|||
);
|
||||
const [errorMessage, setErrorMessage] = useState<any>(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<Props> = ({ jobCreationDisabled, setLazyJobCount
|
|||
}
|
||||
actions={
|
||||
<EuiButton
|
||||
onClick={redirectToDataFrameAnalyticsManagementPage}
|
||||
onClick={() => setIsSourceIndexModalVisible(true)}
|
||||
color="primary"
|
||||
fill
|
||||
iconType="plusInCircle"
|
||||
|
@ -160,6 +162,9 @@ export const AnalyticsPanel: FC<Props> = ({ jobCreationDisabled, setLazyJobCount
|
|||
</div>
|
||||
</>
|
||||
)}
|
||||
{isSourceIndexModalVisible === true && (
|
||||
<SourceSelection onClose={() => setIsSourceIndexModalVisible(false)} />
|
||||
)}
|
||||
</EuiPanel>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue