diff --git a/.betterer.results b/.betterer.results index 42911e6ae35..676282c0bb3 100644 --- a/.betterer.results +++ b/.betterer.results @@ -2519,10 +2519,6 @@ exports[`better eslint`] = { "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/dashboard/components/ShareModal/index.ts:5381": [ - [0, 0, 0, "Do not re-export imported variable (\`./ShareModal\`)", "0"], - [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"] - ], "public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -3772,10 +3768,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], - "public/app/features/search/service/index.ts:5381": [ - [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], - [0, 0, 0, "Do not re-export imported variable (\`./searcher\`)", "1"] - ], "public/app/features/search/service/sql.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], diff --git a/public/app/core/components/AppChrome/AppChrome.test.tsx b/public/app/core/components/AppChrome/AppChrome.test.tsx index bb21306e316..b8ffc09c5fd 100644 --- a/public/app/core/components/AppChrome/AppChrome.test.tsx +++ b/public/app/core/components/AppChrome/AppChrome.test.tsx @@ -8,7 +8,8 @@ import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock'; import { DataFrame, DataFrameView, FieldType } from '@grafana/data'; import { config } from '@grafana/runtime'; import { HOME_NAV_ID } from 'app/core/reducers/navModel'; -import { DashboardQueryResult, getGrafanaSearcher, QueryResponse } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { DashboardQueryResult, QueryResponse } from 'app/features/search/service/types'; import { Page } from '../Page/Page'; diff --git a/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx b/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx index 2d131f619ab..9e345b32712 100644 --- a/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx +++ b/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx @@ -10,7 +10,8 @@ import { Alert, Icon, Input, LoadingBar, useStyles2 } from '@grafana/ui'; import { t } from 'app/core/internationalization'; import { skipToken, useGetFolderQuery } from 'app/features/browse-dashboards/api/browseDashboardsAPI'; import { DashboardViewItemWithUIItems, DashboardsTreeItem } from 'app/features/browse-dashboards/types'; -import { QueryResponse, getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { QueryResponse } from 'app/features/search/service/types'; import { queryResultToViewItem } from 'app/features/search/service/utils'; import { DashboardViewItem } from 'app/features/search/types'; import { PermissionLevelString } from 'app/types'; diff --git a/public/app/core/components/Select/SortPicker.tsx b/public/app/core/components/Select/SortPicker.tsx index b07215156ce..28fe35a5e50 100644 --- a/public/app/core/components/Select/SortPicker.tsx +++ b/public/app/core/components/Select/SortPicker.tsx @@ -3,7 +3,7 @@ import { useAsync } from 'react-use'; import { SelectableValue } from '@grafana/data'; import { Icon, Select } from '@grafana/ui'; import { DEFAULT_SORT } from 'app/features/search/constants'; -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; export interface Props { onChange: (sortValue: SelectableValue) => void; diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 789515e47cd..bca18c2be23 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -3,7 +3,7 @@ import { LocationService } from '@grafana/runtime'; import appEvents from 'app/core/app_events'; import { getExploreUrl } from 'app/core/utils/explore'; import { SaveDashboardDrawer } from 'app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer'; -import { ShareModal } from 'app/features/dashboard/components/ShareModal'; +import { ShareModal } from 'app/features/dashboard/components/ShareModal/ShareModal'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; import { getTimeSrv } from '../../features/dashboard/services/TimeSrv'; diff --git a/public/app/features/browse-dashboards/RecentlyDeletedPage.tsx b/public/app/features/browse-dashboards/RecentlyDeletedPage.tsx index 7c11c697b68..3e1e067d5de 100644 --- a/public/app/features/browse-dashboards/RecentlyDeletedPage.tsx +++ b/public/app/features/browse-dashboards/RecentlyDeletedPage.tsx @@ -7,7 +7,7 @@ import { FilterInput, useStyles2 } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; import { t } from 'app/core/internationalization'; import { ActionRow } from 'app/features/search/page/components/ActionRow'; -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; import { useDispatch } from '../../types'; diff --git a/public/app/features/browse-dashboards/api/services.test.ts b/public/app/features/browse-dashboards/api/services.test.ts index 39675f0f582..e0a3ea9fd85 100644 --- a/public/app/features/browse-dashboards/api/services.test.ts +++ b/public/app/features/browse-dashboards/api/services.test.ts @@ -1,5 +1,6 @@ import { DataFrame, DataFrameView, FieldType } from '@grafana/data'; -import { DashboardQueryResult, getGrafanaSearcher, QueryResponse } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { DashboardQueryResult, QueryResponse } from 'app/features/search/service/types'; import { listDashboards } from './services'; diff --git a/public/app/features/browse-dashboards/api/services.ts b/public/app/features/browse-dashboards/api/services.ts index 867e33a1129..8028b1dd5fe 100644 --- a/public/app/features/browse-dashboards/api/services.ts +++ b/public/app/features/browse-dashboards/api/services.ts @@ -1,6 +1,7 @@ import { config, getBackendSrv } from '@grafana/runtime'; import { GENERAL_FOLDER_UID } from 'app/features/search/constants'; -import { getGrafanaSearcher, NestedFolderDTO } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { NestedFolderDTO } from 'app/features/search/service/types'; import { queryResultToViewItem } from 'app/features/search/service/utils'; import { DashboardViewItem } from 'app/features/search/types'; diff --git a/public/app/features/browse-dashboards/components/BrowseFilters.tsx b/public/app/features/browse-dashboards/components/BrowseFilters.tsx index a34c47806df..e7075748f15 100644 --- a/public/app/features/browse-dashboards/components/BrowseFilters.tsx +++ b/public/app/features/browse-dashboards/components/BrowseFilters.tsx @@ -1,5 +1,5 @@ import { ActionRow } from 'app/features/search/page/components/ActionRow'; -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; import { useSearchStateManager } from 'app/features/search/state/SearchStateManager'; export function BrowseFilters() { diff --git a/public/app/features/commandPalette/actions/dashboardActions.test.ts b/public/app/features/commandPalette/actions/dashboardActions.test.ts index efea227dc10..5e6e390e32f 100644 --- a/public/app/features/commandPalette/actions/dashboardActions.test.ts +++ b/public/app/features/commandPalette/actions/dashboardActions.test.ts @@ -2,7 +2,8 @@ import { DataFrame, DataFrameView, FieldType } from '@grafana/data'; import { config } from '@grafana/runtime'; import { ContextSrv, contextSrv } from 'app/core/services/context_srv'; import impressionSrv from 'app/core/services/impression_srv'; -import { DashboardQueryResult, getGrafanaSearcher, QueryResponse } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { DashboardQueryResult, QueryResponse } from 'app/features/search/service/types'; import { getRecentDashboardActions, getSearchResultActions } from './dashboardActions'; diff --git a/public/app/features/commandPalette/actions/dashboardActions.ts b/public/app/features/commandPalette/actions/dashboardActions.ts index 342d78e9730..5b9f01c6e71 100644 --- a/public/app/features/commandPalette/actions/dashboardActions.ts +++ b/public/app/features/commandPalette/actions/dashboardActions.ts @@ -5,7 +5,7 @@ import { config } from '@grafana/runtime'; import { t } from 'app/core/internationalization'; import { contextSrv } from 'app/core/services/context_srv'; import impressionSrv from 'app/core/services/impression_srv'; -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; import { CommandPaletteAction } from '../types'; import { RECENT_DASHBOARDS_PRIORITY, SEARCH_RESULTS_PRIORITY } from '../values'; diff --git a/public/app/features/dashboard/components/ShareModal/index.ts b/public/app/features/dashboard/components/ShareModal/index.ts deleted file mode 100644 index 2cccea87893..00000000000 --- a/public/app/features/dashboard/components/ShareModal/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { ShareModal, addDashboardShareTab, addPanelShareTab } from './ShareModal'; -export * from './types'; diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 03f32764a77..2f825a3ffad 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -32,7 +32,7 @@ import { DashboardPrompt } from '../components/DashboardPrompt/DashboardPrompt'; import { DashboardSettings } from '../components/DashboardSettings'; import { PanelInspector } from '../components/Inspector/PanelInspector'; import { PanelEditor } from '../components/PanelEditor/PanelEditor'; -import { ShareModal } from '../components/ShareModal'; +import { ShareModal } from '../components/ShareModal/ShareModal'; import { SubMenu } from '../components/SubMenu/SubMenu'; import { DashboardGrid } from '../dashgrid/DashboardGrid'; import { liveTimer } from '../dashgrid/liveTimer'; diff --git a/public/app/features/dashboard/utils/panel.ts b/public/app/features/dashboard/utils/panel.ts index 688451bc730..b2bfb63d404 100644 --- a/public/app/features/dashboard/utils/panel.ts +++ b/public/app/features/dashboard/utils/panel.ts @@ -6,7 +6,7 @@ import appEvents from 'app/core/app_events'; import config from 'app/core/config'; import { LS_PANEL_COPY_KEY, PANEL_BORDER } from 'app/core/constants'; import store from 'app/core/store'; -import { ShareModal } from 'app/features/dashboard/components/ShareModal'; +import { ShareModal } from 'app/features/dashboard/components/ShareModal/ShareModal'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { UnlinkModal } from 'app/features/dashboard-scene/scene/UnlinkModal'; diff --git a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx index a4723b01937..06d90268267 100644 --- a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx +++ b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'; import { PanelPluginMeta, PluginMetaInfo, PluginType } from '@grafana/data'; import { config } from '@grafana/runtime'; import { Panel } from '@grafana/schema'; -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; import { backendSrv } from '../../../../core/services/backend_srv'; import * as panelUtils from '../../../panel/state/util'; diff --git a/public/app/features/manage-dashboards/services/ValidationSrv.ts b/public/app/features/manage-dashboards/services/ValidationSrv.ts index e6846fae9be..24d41c1c048 100644 --- a/public/app/features/manage-dashboards/services/ValidationSrv.ts +++ b/public/app/features/manage-dashboards/services/ValidationSrv.ts @@ -1,4 +1,4 @@ -import { getGrafanaSearcher } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; class ValidationError extends Error { type: string; diff --git a/public/app/features/playlist/PlaylistForm.tsx b/public/app/features/playlist/PlaylistForm.tsx index 441a6b37500..711b2a5576f 100644 --- a/public/app/features/playlist/PlaylistForm.tsx +++ b/public/app/features/playlist/PlaylistForm.tsx @@ -8,7 +8,7 @@ import { DashboardPicker } from 'app/core/components/Select/DashboardPicker'; import { TagFilter } from 'app/core/components/TagFilter/TagFilter'; import { Trans, t } from 'app/core/internationalization'; -import { getGrafanaSearcher } from '../search/service'; +import { getGrafanaSearcher } from '../search/service/searcher'; import { PlaylistTable } from './PlaylistTable'; import { Playlist } from './types'; diff --git a/public/app/features/playlist/PlaylistSrv.test.ts b/public/app/features/playlist/PlaylistSrv.test.ts index 68d279d9d17..687b5e39156 100644 --- a/public/app/features/playlist/PlaylistSrv.test.ts +++ b/public/app/features/playlist/PlaylistSrv.test.ts @@ -5,7 +5,7 @@ import configureMockStore from 'redux-mock-store'; import { locationService } from '@grafana/runtime'; import { setStore } from 'app/store/store'; -import { DashboardQueryResult } from '../search/service'; +import { DashboardQueryResult } from '../search/service/types'; import { PlaylistSrv } from './PlaylistSrv'; import { Playlist, PlaylistItem } from './types'; diff --git a/public/app/features/playlist/api.ts b/public/app/features/playlist/api.ts index dd778f8903d..e00ba763dbc 100644 --- a/public/app/features/playlist/api.ts +++ b/public/app/features/playlist/api.ts @@ -10,7 +10,8 @@ import { dispatch } from 'app/store/store'; import { ScopedResourceClient } from '../apiserver/client'; import { Resource, ResourceForCreate, ResourceClient } from '../apiserver/types'; -import { DashboardQueryResult, getGrafanaSearcher, SearchQuery } from '../search/service'; +import { getGrafanaSearcher } from '../search/service/searcher'; +import { DashboardQueryResult, SearchQuery } from '../search/service/types'; import { Playlist, PlaylistItem, PlaylistAPI } from './types'; diff --git a/public/app/features/playlist/types.ts b/public/app/features/playlist/types.ts index 61263cc0492..e8400cb6fbb 100644 --- a/public/app/features/playlist/types.ts +++ b/public/app/features/playlist/types.ts @@ -1,4 +1,4 @@ -import { DashboardQueryResult } from '../search/service'; +import { DashboardQueryResult } from '../search/service/types'; export type PlaylistMode = boolean | 'tv'; diff --git a/public/app/features/plugins/admin/components/PluginUsage.tsx b/public/app/features/plugins/admin/components/PluginUsage.tsx index 162986160fe..559a9a18ea7 100644 --- a/public/app/features/plugins/admin/components/PluginUsage.tsx +++ b/public/app/features/plugins/admin/components/PluginUsage.tsx @@ -9,7 +9,8 @@ import { config } from '@grafana/runtime'; import { Alert, Spinner, useStyles2 } from '@grafana/ui'; import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; import { SearchResultsTable } from 'app/features/search/page/components/SearchResultsTable'; -import { getGrafanaSearcher, SearchQuery } from 'app/features/search/service'; +import { getGrafanaSearcher } from 'app/features/search/service/searcher'; +import { SearchQuery } from 'app/features/search/service/types'; type Props = { plugin: PluginMeta; diff --git a/public/app/features/search/hooks/useSearchKeyboardSelection.ts b/public/app/features/search/hooks/useSearchKeyboardSelection.ts index 12c0478eddf..87c1d0cc18c 100644 --- a/public/app/features/search/hooks/useSearchKeyboardSelection.ts +++ b/public/app/features/search/hooks/useSearchKeyboardSelection.ts @@ -4,7 +4,7 @@ import { Observable, Subject } from 'rxjs'; import { Field, locationUtil } from '@grafana/data'; import { locationService } from '@grafana/runtime'; -import { QueryResponse } from '../service'; +import { QueryResponse } from '../service/types'; export function useKeyNavigationListener() { const eventsRef = useRef(new Subject()); diff --git a/public/app/features/search/page/components/SearchResultsTable.test.tsx b/public/app/features/search/page/components/SearchResultsTable.test.tsx index 3229803696e..dc4045b5bcf 100644 --- a/public/app/features/search/page/components/SearchResultsTable.test.tsx +++ b/public/app/features/search/page/components/SearchResultsTable.test.tsx @@ -3,7 +3,8 @@ import { Subject } from 'rxjs'; import { applyFieldOverrides, createTheme, DataFrame, DataFrameView, FieldType, toDataFrame } from '@grafana/data'; -import { DashboardQueryResult, getGrafanaSearcher, QueryResponse } from '../../service'; +import { getGrafanaSearcher } from '../../service/searcher'; +import { DashboardQueryResult, QueryResponse } from '../../service/types'; import { DashboardSearchItemType } from '../../types'; import { SearchResultsTable } from './SearchResultsTable'; diff --git a/public/app/features/search/page/components/SearchResultsTable.tsx b/public/app/features/search/page/components/SearchResultsTable.tsx index 21f81d648b6..7af88363425 100644 --- a/public/app/features/search/page/components/SearchResultsTable.tsx +++ b/public/app/features/search/page/components/SearchResultsTable.tsx @@ -14,7 +14,7 @@ import { useTableStyles } from '@grafana/ui/src/components/Table/styles'; import { useCustomFlexLayout } from 'app/features/browse-dashboards/components/customFlexTableLayout'; import { useSearchKeyboardNavigation } from '../../hooks/useSearchKeyboardSelection'; -import { QueryResponse } from '../../service'; +import { QueryResponse } from '../../service/types'; import { SelectionChecker, SelectionToggle } from '../selection'; import { generateColumns } from './columns'; diff --git a/public/app/features/search/page/components/columns.tsx b/public/app/features/search/page/components/columns.tsx index bf5d8d92177..05c4b2e6792 100644 --- a/public/app/features/search/page/components/columns.tsx +++ b/public/app/features/search/page/components/columns.tsx @@ -18,7 +18,7 @@ import { formatDate, formatDuration } from 'app/core/internationalization/dates' import { PluginIconName } from 'app/features/plugins/admin/types'; import { ShowModalReactEvent } from 'app/types/events'; -import { QueryResponse, SearchResultMeta } from '../../service'; +import { QueryResponse, SearchResultMeta } from '../../service/types'; import { getIconForKind } from '../../service/utils'; import { SelectionChecker, SelectionToggle } from '../selection'; diff --git a/public/app/features/search/service/bluge.ts b/public/app/features/search/service/bluge.ts index 547a430b47d..756658c9a69 100644 --- a/public/app/features/search/service/bluge.ts +++ b/public/app/features/search/service/bluge.ts @@ -9,10 +9,9 @@ import { import { config, getBackendSrv } from '@grafana/runtime'; import { TermCount } from 'app/core/components/TagFilter/TagFilter'; +import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery, SearchResultMeta } from './types'; import { replaceCurrentFolderQuery } from './utils'; -import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery, SearchResultMeta } from '.'; - // The backend returns an empty frame with a special name to indicate that the indexing engine is being rebuilt, // and that it can not serve any search requests. We are temporarily using the old SQL Search API as a fallback when that happens. const loadingFrameName = 'Loading'; diff --git a/public/app/features/search/service/dummy.ts b/public/app/features/search/service/dummy.ts index 02888067544..d014fd22c6a 100644 --- a/public/app/features/search/service/dummy.ts +++ b/public/app/features/search/service/dummy.ts @@ -1,7 +1,7 @@ import { SelectableValue, DataFrame, DataFrameView } from '@grafana/data'; import { TermCount } from 'app/core/components/TagFilter/TagFilter'; -import { GrafanaSearcher, QueryResponse, SearchQuery } from '.'; +import { GrafanaSearcher, QueryResponse, SearchQuery } from './types'; // This is a dummy search useful for tests export class DummySearcher implements GrafanaSearcher { diff --git a/public/app/features/search/service/frontend.ts b/public/app/features/search/service/frontend.ts index 4a78f750f5c..11634988f7a 100644 --- a/public/app/features/search/service/frontend.ts +++ b/public/app/features/search/service/frontend.ts @@ -3,7 +3,7 @@ import uFuzzy from '@leeoniya/ufuzzy'; import { DataFrameView, SelectableValue } from '@grafana/data'; import { TermCount } from 'app/core/components/TagFilter/TagFilter'; -import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery } from '.'; +import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery } from './types'; export class FrontendSearcher implements GrafanaSearcher { readonly cache = new Map>(); diff --git a/public/app/features/search/service/index.ts b/public/app/features/search/service/index.ts deleted file mode 100644 index d09c91dec00..00000000000 --- a/public/app/features/search/service/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './types'; -export { getGrafanaSearcher } from './searcher'; diff --git a/public/app/features/search/service/sql.ts b/public/app/features/search/service/sql.ts index 3a25678746e..798f152fd9f 100644 --- a/public/app/features/search/service/sql.ts +++ b/public/app/features/search/service/sql.ts @@ -7,11 +7,9 @@ import { PermissionLevelString } from 'app/types'; import { DEFAULT_MAX_VALUES, GENERAL_FOLDER_UID, TYPE_KIND_MAP } from '../constants'; import { DashboardSearchHit, DashboardSearchItemType } from '../types'; -import { LocationInfo } from './types'; +import { DashboardQueryResult, GrafanaSearcher, LocationInfo, QueryResponse, SearchQuery } from './types'; import { replaceCurrentFolderQuery } from './utils'; -import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery } from '.'; - interface APIQuery { query?: string; tag?: string[]; diff --git a/public/app/features/search/service/unified.ts b/public/app/features/search/service/unified.ts index 1c4992a193e..5d33aea3ff8 100644 --- a/public/app/features/search/service/unified.ts +++ b/public/app/features/search/service/unified.ts @@ -9,10 +9,9 @@ import { import { config, getBackendSrv } from '@grafana/runtime'; import { TermCount } from 'app/core/components/TagFilter/TagFilter'; +import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery, SearchResultMeta } from './types'; import { replaceCurrentFolderQuery } from './utils'; -import { DashboardQueryResult, GrafanaSearcher, QueryResponse, SearchQuery, SearchResultMeta } from '.'; - // The backend returns an empty frame with a special name to indicate that the indexing engine is being rebuilt, // and that it can not serve any search requests. We are temporarily using the old SQL Search API as a fallback when that happens. const loadingFrameName = 'Loading'; diff --git a/public/app/features/search/state/SearchStateManager.test.ts b/public/app/features/search/state/SearchStateManager.test.ts index 547ceaf9f42..893f33063a0 100644 --- a/public/app/features/search/state/SearchStateManager.test.ts +++ b/public/app/features/search/state/SearchStateManager.test.ts @@ -1,7 +1,8 @@ import { DataFrameView } from '@grafana/data'; import { locationService } from '@grafana/runtime'; -import { DashboardQueryResult, getGrafanaSearcher } from '../service'; +import { getGrafanaSearcher } from '../service/searcher'; +import { DashboardQueryResult } from '../service/types'; import { SearchLayout } from '../types'; import * as utils from '../utils'; diff --git a/public/app/features/search/state/SearchStateManager.ts b/public/app/features/search/state/SearchStateManager.ts index 8ee43e438ea..67dd5c93e5f 100644 --- a/public/app/features/search/state/SearchStateManager.ts +++ b/public/app/features/search/state/SearchStateManager.ts @@ -13,7 +13,8 @@ import { reportSearchQueryInteraction, reportSearchResultInteraction, } from '../page/reporting'; -import { getGrafanaSearcher, SearchQuery } from '../service'; +import { getGrafanaSearcher } from '../service/searcher'; +import { SearchQuery } from '../service/types'; import { SearchLayout, SearchQueryParams, SearchState } from '../types'; import { parseRouteParams } from '../utils'; diff --git a/public/app/features/search/types.ts b/public/app/features/search/types.ts index 975e6135f12..33151cc7e95 100644 --- a/public/app/features/search/types.ts +++ b/public/app/features/search/types.ts @@ -2,7 +2,7 @@ import { Action } from 'redux'; import { WithAccessControlMetadata } from '@grafana/data'; -import { QueryResponse } from './service'; +import { QueryResponse } from './service/types'; export enum DashboardSearchItemType { DashDB = 'dash-db', diff --git a/public/app/plugins/datasource/grafana/components/QueryEditor.tsx b/public/app/plugins/datasource/grafana/components/QueryEditor.tsx index 5b8a5cb734c..865691dec3f 100644 --- a/public/app/plugins/datasource/grafana/components/QueryEditor.tsx +++ b/public/app/plugins/datasource/grafana/components/QueryEditor.tsx @@ -34,7 +34,7 @@ import { import { hasAlphaPanels } from 'app/core/config'; import * as DFImport from 'app/features/dataframe-import'; import { getManagedChannelInfo } from 'app/features/live/info'; -import { SearchQuery } from 'app/features/search/service'; +import { SearchQuery } from 'app/features/search/service/types'; import { GrafanaDatasource } from '../datasource'; import { defaultQuery, GrafanaQuery, GrafanaQueryType } from '../types'; diff --git a/public/app/plugins/datasource/grafana/components/SearchEditor.tsx b/public/app/plugins/datasource/grafana/components/SearchEditor.tsx index e5d102c8be4..872c73a2132 100644 --- a/public/app/plugins/datasource/grafana/components/SearchEditor.tsx +++ b/public/app/plugins/datasource/grafana/components/SearchEditor.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import * as React from 'react'; import { InlineField, Input, InlineFieldRow, CodeEditor } from '@grafana/ui'; -import { SearchQuery } from 'app/features/search/service'; +import { SearchQuery } from 'app/features/search/service/types'; interface Props { value: SearchQuery; diff --git a/public/app/plugins/datasource/grafana/types.ts b/public/app/plugins/datasource/grafana/types.ts index cb00f090443..52202904c00 100644 --- a/public/app/plugins/datasource/grafana/types.ts +++ b/public/app/plugins/datasource/grafana/types.ts @@ -2,7 +2,7 @@ import { DataFrameJSON } from '@grafana/data'; import { LiveDataFilter } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; import { TimeRegionConfig } from 'app/core/utils/timeRegions'; -import { SearchQuery } from 'app/features/search/service'; +import { SearchQuery } from 'app/features/search/service/types'; //---------------------------------------------- // Query