Chore: Remove search_srv (#62964)

* Chore: Remove Search Service

* use getSortOptions from grafana searcher

* wip

* fix library panels search tests
This commit is contained in:
Josh Hunt
2023-02-07 15:28:07 -05:00
committed by GitHub
parent f80bf11782
commit 09637caade
6 changed files with 22 additions and 506 deletions
@@ -19,6 +19,7 @@ type Props = Pick<SearchResultsProps, 'selection' | 'selectionToggle' | 'onTagSe
tags?: string[];
hidePseudoFolders?: boolean;
};
export const FolderView = ({
selection,
selectionToggle,
@@ -31,6 +32,7 @@ export const FolderView = ({
const results = useAsync(async () => {
const folders: DashboardSection[] = [];
if (!hidePseudoFolders) {
if (contextSrv.isSignedIn) {
const stars = await getBackendSrv().get('api/user/stars');
@@ -44,6 +46,7 @@ export const FolderView = ({
folders.push({ title: 'Recent', icon: 'clock-nine', kind: 'query-recent', uid: '__recent', itemsUIDs });
}
}
folders.push({ title: 'General', url: '/dashboards', kind: 'folder', uid: GENERAL_FOLDER_UID });
const searcher = getGrafanaSearcher();