File tree Expand file tree Collapse file tree
x-pack/plugins/global_search_providers/server/providers/saved_objects Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,12 +10,6 @@ import { SavedObjectsFindOptionsReference, ISavedObjectTypeRegistry } from 'src/
1010import { GlobalSearchResultProvider } from '../../../../global_search/server' ;
1111import { mapToResults } from './map_object_to_result' ;
1212
13- const getSearchableTypes = ( typeRegistry : ISavedObjectTypeRegistry , types ?: string [ ] ) =>
14- typeRegistry
15- . getVisibleTypes ( )
16- . filter ( types ? ( type ) => includeIgnoreCase ( types , type . name ) : ( ) => true )
17- . filter ( ( type ) => type . management ?. defaultSearchField && type . management ?. getInAppUrl ) ;
18-
1913export const createSavedObjectsResultProvider = ( ) : GlobalSearchResultProvider => {
2014 return {
2115 id : 'savedObjects' ,
@@ -63,6 +57,12 @@ export const createSavedObjectsResultProvider = (): GlobalSearchResultProvider =
6357 } ;
6458} ;
6559
60+ const getSearchableTypes = ( typeRegistry : ISavedObjectTypeRegistry , types ?: string [ ] ) =>
61+ typeRegistry
62+ . getVisibleTypes ( )
63+ . filter ( types ? ( type ) => includeIgnoreCase ( types , type . name ) : ( ) => true )
64+ . filter ( ( type ) => type . management ?. defaultSearchField && type . management ?. getInAppUrl ) ;
65+
6666const uniq = < T > ( values : T [ ] ) : T [ ] => [ ...new Set ( values ) ] ;
6767
6868const includeIgnoreCase = ( list : string [ ] , item : string ) =>
You can’t perform that action at this time.
0 commit comments