File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ import React from 'react';
88import { shallow } from 'enzyme' ;
99
1010import { MlJobSelect } from './index' ;
11- import { useInstalledSecurityJobs } from '../../../../common/components/ml /hooks/use_installed_security_jobs ' ;
11+ import { useSecurityJobs } from '../../../../common/components/ml_popover /hooks/use_security_jobs ' ;
1212import { useFormFieldMock } from '../../../../common/mock' ;
13- jest . mock ( '../../../../common/components/ml /hooks/use_installed_security_jobs ' ) ;
13+ jest . mock ( '../../../../common/components/ml_popover /hooks/use_security_jobs ' ) ;
1414jest . mock ( '../../../../common/lib/kibana' ) ;
1515
1616describe ( 'MlJobSelect' , ( ) => {
1717 beforeAll ( ( ) => {
18- ( useInstalledSecurityJobs as jest . Mock ) . mockReturnValue ( { loading : false , jobs : [ ] } ) ;
18+ ( useSecurityJobs as jest . Mock ) . mockReturnValue ( { loading : false , jobs : [ ] } ) ;
1919 } ) ;
2020
2121 it ( 'renders correctly' , ( ) => {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
1919import styled from 'styled-components' ;
2020import { isJobStarted } from '../../../../../common/machine_learning/helpers' ;
2121import { FieldHook , getFieldValidityAndErrorMessage } from '../../../../shared_imports' ;
22- import { useInstalledSecurityJobs } from '../../../../common/components/ml /hooks/use_installed_security_jobs ' ;
22+ import { useSecurityJobs } from '../../../../common/components/ml_popover /hooks/use_security_jobs ' ;
2323import { useKibana } from '../../../../common/lib/kibana' ;
2424import {
2525 ML_JOB_SELECT_PLACEHOLDER_TEXT ,
@@ -81,7 +81,7 @@ interface MlJobSelectProps {
8181export const MlJobSelect : React . FC < MlJobSelectProps > = ( { describedByIds = [ ] , field } ) => {
8282 const jobId = field . value as string ;
8383 const { isInvalid, errorMessage } = getFieldValidityAndErrorMessage ( field ) ;
84- const { loading, jobs } = useInstalledSecurityJobs ( ) ;
84+ const { loading, jobs } = useSecurityJobs ( false ) ;
8585 const mlUrl = useKibana ( ) . services . application . getUrlForApp ( 'ml' ) ;
8686 const handleJobChange = useCallback (
8787 ( machineLearningJobId : string ) => {
You can’t perform that action at this time.
0 commit comments