diff --git a/src/plugins/data/public/ui/search_bar/search_bar.tsx b/src/plugins/data/public/ui/search_bar/search_bar.tsx index bc91368f7d26..c13a18346eb2 100644 --- a/src/plugins/data/public/ui/search_bar/search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/search_bar.tsx @@ -95,6 +95,7 @@ export interface SearchBarOwnProps { onRefresh?: (payload: { dateRange: TimeRange }) => void; indicateNoData?: boolean; queryResult?: SearchData; + data$?: BehaviorSubject; } export type SearchBarProps = SearchBarOwnProps & SearchBarInjectedDeps; diff --git a/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx b/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx index 50694c875e25..b4ff1f5c57b0 100644 --- a/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx +++ b/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx @@ -124,8 +124,6 @@ export const TopNav = ({ opts, showSaveQuery, isEnhancementsEnabled }: TopNavPro const displayToNavLinkInPortal = isEnhancementsEnabled && !!opts?.optionalRef?.topLinkRef?.current && !showActionsInGroup; - console.log('in discover top nav', data$); - return ( <> {displayToNavLinkInPortal && diff --git a/src/plugins/discover/public/application/view_components/utils/use_search.ts b/src/plugins/discover/public/application/view_components/utils/use_search.ts index 80452ebcecdb..c5ac428c4fb3 100644 --- a/src/plugins/discover/public/application/view_components/utils/use_search.ts +++ b/src/plugins/discover/public/application/view_components/utils/use_search.ts @@ -225,8 +225,11 @@ export const useSearch = (services: DiscoverViewServices) => { data$.next({ status: ResultStatus.ERROR, - rows: [], errorMsg: error.body || error, + title: + indexPattern?.title !== searchSource.getDataFrame()?.name + ? searchSource.getDataFrame()?.name + : indexPattern?.title, }); console.log('error', error.body); diff --git a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx index f327eb6d7c76..9c4a9d33c44a 100644 --- a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx +++ b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx @@ -156,7 +156,6 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null { // Validate presence of all required fields if (!showSearchBar || !props.data) return null; const { SearchBar } = props.data.ui; - console.log('in top nav menu', props.data$); return (