Skip to content

Commit

Permalink
move to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Dec 9, 2020
1 parent 59cf6a1 commit 3963a35
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import { SavedObjectsFindOptionsReference, ISavedObjectTypeRegistry } from 'src/
import { GlobalSearchResultProvider } from '../../../../global_search/server';
import { mapToResults } from './map_object_to_result';

const getSearchableTypes = (typeRegistry: ISavedObjectTypeRegistry, types?: string[]) =>
typeRegistry
.getVisibleTypes()
.filter(types ? (type) => includeIgnoreCase(types, type.name) : () => true)
.filter((type) => type.management?.defaultSearchField && type.management?.getInAppUrl);

export const createSavedObjectsResultProvider = (): GlobalSearchResultProvider => {
return {
id: 'savedObjects',
Expand Down Expand Up @@ -63,6 +57,12 @@ export const createSavedObjectsResultProvider = (): GlobalSearchResultProvider =
};
};

const getSearchableTypes = (typeRegistry: ISavedObjectTypeRegistry, types?: string[]) =>
typeRegistry
.getVisibleTypes()
.filter(types ? (type) => includeIgnoreCase(types, type.name) : () => true)
.filter((type) => type.management?.defaultSearchField && type.management?.getInAppUrl);

const uniq = <T>(values: T[]): T[] => [...new Set(values)];

const includeIgnoreCase = (list: string[], item: string) =>
Expand Down

0 comments on commit 3963a35

Please sign in to comment.