File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
x-pack/plugins/ml/public/application/routing Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ describe('useResolver', () => {
7474 results : { } ,
7575 } ) ;
7676 expect ( addError ) . toHaveBeenCalledTimes ( 0 ) ;
77+ expect ( redirectToJobsManagementPage ) . toHaveBeenCalledTimes ( 0 ) ;
7778 } ) ;
7879
7980 it ( 'should add an error toast and redirect if indexPatternId is an empty string.' , async ( ) => {
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ import { useNotifications } from '../contexts/kibana';
2020import { useCreateAndNavigateToMlLink } from '../contexts/kibana/use_create_url' ;
2121import { ML_PAGES } from '../../../common/constants/ml_url_generator' ;
2222
23+ /**
24+ * Hook to resolve route specific requirements
25+ * @param indexPatternId optional Kibana index pattern id, used for wizards
26+ * @param savedSearchId optional Kibana saved search id, used for wizards
27+ * @param config Kibana UI Settings
28+ * @param resolvers an array of resolvers to be executed for the route
29+ * @return { context, results } returns the ML context and resolver results
30+ */
2331export const useResolver = (
2432 indexPatternId : string | undefined ,
2533 savedSearchId : string | undefined ,
You can’t perform that action at this time.
0 commit comments