From 2030add171097eb632f68f055617bed3de922684 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Tue, 5 Apr 2022 11:42:00 -0500 Subject: [PATCH] iindex_pattern => data view --- .../query/filter_manager/lib/get_display_value.ts | 9 +++++---- .../lib/get_index_pattern_from_filter.ts | 7 ++++--- .../apply_filters/apply_filter_popover_content.tsx | 5 +++-- .../public/apply_filters/apply_filters_popover.tsx | 5 +++-- .../unified_search/public/filter_bar/filter_bar.tsx | 5 +++-- .../public/filter_bar/filter_editor/index.tsx | 10 +++++----- .../filter_editor/lib/filter_editor_utils.ts | 9 +++++---- .../filter_bar/filter_editor/phrase_suggestor.tsx | 5 +++-- .../unified_search/public/filter_bar/filter_item.tsx | 4 ++-- .../public/query_string_input/fetch_index_patterns.ts | 4 ++-- .../public/query_string_input/query_bar_top_row.tsx | 4 ++-- .../public/query_string_input/query_string_input.tsx | 10 +++++----- .../unified_search/public/search_bar/search_bar.tsx | 5 +++-- .../applications/fleet/components/search_bar.tsx | 5 +++-- .../components/agent_logs/query_bar.tsx | 5 +++-- .../infra/public/pages/logs/stream/page_toolbar.tsx | 3 ++- .../pages/alerts/components/alerts_search_bar.tsx | 3 ++- .../public/common/components/query_bar/index.tsx | 3 ++- .../public/common/components/search_bar/index.tsx | 3 ++- .../components/rules/description_step/helpers.tsx | 1 + .../endpoint_hosts/view/components/search_bar.tsx | 3 ++- .../es_query/expression/read_only_filter_items.tsx | 5 +++-- 22 files changed, 65 insertions(+), 48 deletions(-) diff --git a/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts b/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts index 1ccfaacb24e4b..d38c1d6375d8c 100644 --- a/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts +++ b/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts @@ -7,15 +7,16 @@ */ import { i18n } from '@kbn/i18n'; -import { Filter, IIndexPattern } from '../../../../common'; +import { Filter } from '../../../../common'; +import { DataView, DataViewField } from '../../../../../data_views/public'; import { getIndexPatternFromFilter } from './get_index_pattern_from_filter'; -function getValueFormatter(indexPattern?: IIndexPattern, key?: string) { +function getValueFormatter(indexPattern?: DataView, key?: string) { // checking getFormatterForField exists because there is at least once case where an index pattern // is an object rather than an IndexPattern class if (!indexPattern || !indexPattern.getFormatterForField || !key) return; - const field = indexPattern.fields.find((f) => f.name === key); + const field = indexPattern.fields.find((f: DataViewField) => f.name === key); if (!field) { throw new Error( i18n.translate('data.filter.filterBar.fieldNotFound', { @@ -27,7 +28,7 @@ function getValueFormatter(indexPattern?: IIndexPattern, key?: string) { return indexPattern.getFormatterForField(field); } -export function getDisplayValueFromFilter(filter: Filter, indexPatterns: IIndexPattern[]): string { +export function getDisplayValueFromFilter(filter: Filter, indexPatterns: DataView[]): string { const { key, value } = filter.meta; if (typeof value === 'function') { const indexPattern = getIndexPatternFromFilter(filter, indexPatterns); diff --git a/src/plugins/data/public/query/filter_manager/lib/get_index_pattern_from_filter.ts b/src/plugins/data/public/query/filter_manager/lib/get_index_pattern_from_filter.ts index 7a2ce29102e51..d4951ebc6efc2 100644 --- a/src/plugins/data/public/query/filter_manager/lib/get_index_pattern_from_filter.ts +++ b/src/plugins/data/public/query/filter_manager/lib/get_index_pattern_from_filter.ts @@ -6,11 +6,12 @@ * Side Public License, v 1. */ -import { Filter, IIndexPattern } from '../../../../common'; +import { Filter } from '../../../../common'; +import { DataView } from '../../../../../data_views/public'; export function getIndexPatternFromFilter( filter: Filter, - indexPatterns: IIndexPattern[] -): IIndexPattern | undefined { + indexPatterns: DataView[] +): DataView | undefined { return indexPatterns.find((indexPattern) => indexPattern.id === filter.meta.index); } diff --git a/src/plugins/unified_search/public/apply_filters/apply_filter_popover_content.tsx b/src/plugins/unified_search/public/apply_filters/apply_filter_popover_content.tsx index 03e377036b3d4..1daf3a719284f 100644 --- a/src/plugins/unified_search/public/apply_filters/apply_filter_popover_content.tsx +++ b/src/plugins/unified_search/public/apply_filters/apply_filter_popover_content.tsx @@ -21,11 +21,12 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { Component } from 'react'; import { getDisplayValueFromFilter, mapAndFlattenFilters } from '../../../data/public'; import { FilterLabel } from '../filter_bar'; -import { Filter, IIndexPattern } from '../../../data/common'; +import { Filter } from '../../../data/common'; +import { DataView } from '../../../data_views/public'; interface Props { filters: Filter[]; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; onCancel: () => void; onSubmit: (filters: Filter[]) => void; } diff --git a/src/plugins/unified_search/public/apply_filters/apply_filters_popover.tsx b/src/plugins/unified_search/public/apply_filters/apply_filters_popover.tsx index 4d6e045cdb707..45567f4c93d31 100644 --- a/src/plugins/unified_search/public/apply_filters/apply_filters_popover.tsx +++ b/src/plugins/unified_search/public/apply_filters/apply_filters_popover.tsx @@ -7,7 +7,8 @@ */ import React from 'react'; -import { IIndexPattern, Filter } from '../../../data/common'; +import { Filter } from '../../../data/common'; +import { DataView } from '../../../data_views/common'; type CancelFnType = () => void; type SubmitFnType = (filters: Filter[]) => void; @@ -18,7 +19,7 @@ const LazyApplyFiltersPopoverContent = React.lazy(() => import('./apply_filter_p export const applyFiltersPopover = ( filters: Filter[], - indexPatterns: IIndexPattern[], + indexPatterns: DataView[], onCancel: CancelFnType, onSubmit: SubmitFnType ) => { diff --git a/src/plugins/unified_search/public/filter_bar/filter_bar.tsx b/src/plugins/unified_search/public/filter_bar/filter_bar.tsx index 405580dc0534d..136d83525a9f6 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_bar.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_bar.tsx @@ -26,14 +26,15 @@ import { FilterEditor } from './filter_editor'; import { FILTER_EDITOR_WIDTH, FilterItem } from './filter_item'; import { FilterOptions } from './filter_options'; import { useKibana } from '../../../kibana_react/public'; -import { IIndexPattern, UI_SETTINGS } from '../../../data/common'; +import { UI_SETTINGS } from '../../../data/common'; import { IDataPluginServices } from '../../../data/public'; +import { DataView } from '../../../data_views/public'; export interface Props { filters: Filter[]; onFiltersUpdated?: (filters: Filter[]) => void; className: string; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; intl: InjectedIntl; appName: string; timeRangeForSuggestionsOverride?: boolean; diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/index.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/index.tsx index 7eb2cde56b806..7596b5ba557a1 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/index.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/index.tsx @@ -44,13 +44,13 @@ import { Operator } from './lib/filter_operators'; import { PhraseValueInput } from './phrase_value_input'; import { PhrasesValuesInput } from './phrases_values_input'; import { RangeValueInput } from './range_value_input'; -import { IIndexPattern, IFieldType } from '../../../../data/common'; +import { DataView, IFieldType } from '../../../../data_views/common'; import { getIndexPatternFromFilter } from '../../../../data/public'; import { CodeEditor } from '../../../../kibana_react/public'; export interface Props { filter: Filter; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; onSubmit: (filter: Filter) => void; onCancel: () => void; intl: InjectedIntl; @@ -58,7 +58,7 @@ export interface Props { } interface State { - selectedIndexPattern?: IIndexPattern; + selectedIndexPattern?: DataView; selectedField?: IFieldType; selectedOperator?: Operator; params: any; @@ -432,7 +432,7 @@ class FilterEditorUI extends Component { return isFilterValid(indexPattern, field, operator, params); } - private onIndexPatternChange = ([selectedIndexPattern]: IIndexPattern[]) => { + private onIndexPatternChange = ([selectedIndexPattern]: DataView[]) => { const selectedField = undefined; const selectedOperator = undefined; const params = undefined; @@ -513,7 +513,7 @@ class FilterEditorUI extends Component { }; } -function IndexPatternComboBox(props: GenericComboBoxProps) { +function IndexPatternComboBox(props: GenericComboBoxProps) { return GenericComboBox(props); } diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_editor_utils.ts b/src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_editor_utils.ts index 3b8fb867c361b..f9b6ed77d0e50 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_editor_utils.ts +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_editor_utils.ts @@ -11,9 +11,10 @@ import { Filter, FieldFilter } from '@kbn/es-query'; import { ES_FIELD_TYPES } from '@kbn/field-types'; import isSemverValid from 'semver/functions/valid'; import { FILTER_OPERATORS, Operator } from './filter_operators'; -import { isFilterable, IIndexPattern, IFieldType, IpAddress } from '../../../../../data/common'; +import { isFilterable, IFieldType, IpAddress } from '../../../../../data/common'; +import { DataView } from '../../../../../data_views/common'; -export function getFieldFromFilter(filter: FieldFilter, indexPattern: IIndexPattern) { +export function getFieldFromFilter(filter: FieldFilter, indexPattern: DataView) { return indexPattern.fields.find((field) => field.name === filter.meta.key); } @@ -23,7 +24,7 @@ export function getOperatorFromFilter(filter: Filter) { }); } -export function getFilterableFields(indexPattern: IIndexPattern) { +export function getFilterableFields(indexPattern: DataView) { return indexPattern.fields.filter(isFilterable); } @@ -57,7 +58,7 @@ export function validateParams(params: any, field: IFieldType) { } export function isFilterValid( - indexPattern?: IIndexPattern, + indexPattern?: DataView, field?: IFieldType, operator?: Operator, params?: any diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx index 18464f04de0be..68ed20e8c34dd 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx @@ -10,12 +10,13 @@ import React from 'react'; import { debounce } from 'lodash'; import { withKibana, KibanaReactContextValue } from '../../../../kibana_react/public'; -import { IIndexPattern, IFieldType, UI_SETTINGS } from '../../../../data/common'; +import { IFieldType, UI_SETTINGS } from '../../../../data/common'; +import { DataView } from '../../../../data_views/common'; import { IDataPluginServices } from '../../../../data/public'; export interface PhraseSuggestorProps { kibana: KibanaReactContextValue; - indexPattern: IIndexPattern; + indexPattern: DataView; field: IFieldType; timeRangeForSuggestionsOverride?: boolean; } diff --git a/src/plugins/unified_search/public/filter_bar/filter_item.tsx b/src/plugins/unified_search/public/filter_bar/filter_item.tsx index 4f71718d13d04..571278fcf05d1 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_item.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_item.tsx @@ -20,7 +20,7 @@ import React, { MouseEvent, useState, useEffect, HTMLAttributes } from 'react'; import { IUiSettingsClient } from 'src/core/public'; import { FilterEditor } from './filter_editor'; import { FilterView } from './filter_view'; -import { IIndexPattern } from '../../../data/common'; +import { DataView } from '../../../data_views/public'; import { getIndexPatternFromFilter, getDisplayValueFromFilter } from '../../../data/public'; import { getIndexPatterns } from '../services'; @@ -29,7 +29,7 @@ type PanelOptions = 'pinFilter' | 'editFilter' | 'negateFilter' | 'disableFilter export interface FilterItemProps { id: string; filter: Filter; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; className?: string; onUpdate: (filter: Filter) => void; onRemove: () => void; diff --git a/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts b/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts index 4d37e53753374..ed2d57afe348c 100644 --- a/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts +++ b/src/plugins/unified_search/public/query_string_input/fetch_index_patterns.ts @@ -7,10 +7,10 @@ */ import { isEmpty } from 'lodash'; -import { IndexPatternsContract } from '../../../data/public'; +import { DataViewsContract } from '../../../data_views/public'; export async function fetchIndexPatterns( - indexPatternsService: IndexPatternsContract, + indexPatternsService: DataViewsContract, indexPatternStrings: string[] ) { if (!indexPatternStrings || isEmpty(indexPatternStrings)) { diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx index ddba035b91fdd..d2b4a2d70bfee 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx @@ -25,12 +25,12 @@ import { } from '@elastic/eui'; import { IDataPluginServices, - IIndexPattern, TimeRange, TimeHistoryContract, Query, getQueryLog, } from '../../../data/public'; +import { DataView } from '../../../data_views/public'; import type { PersistedLog } from '../../../data/public'; import { useKibana, withKibana } from '../../../kibana_react/public'; import QueryStringInputUI from './query_string_input'; @@ -56,7 +56,7 @@ export interface QueryBarTopRowProps { disableAutoFocus?: boolean; fillSubmitButton: boolean; iconType?: EuiIconProps['type']; - indexPatterns?: Array; + indexPatterns?: Array; indicateNoData?: boolean; isClearable?: boolean; isDirty: boolean; diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx index 1a075812ac207..a9b093eb3c8bb 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx @@ -30,12 +30,12 @@ import { compact, debounce, isEqual, isFunction } from 'lodash'; import { Toast } from '../../../../core/public'; import { IDataPluginServices, - IIndexPattern, Query, QuerySuggestion, QuerySuggestionTypes, getQueryLog, } from '../../../data/public'; +import { DataView } from '../../../data_views/public'; import { matchPairs } from './match_pairs'; import { toUser } from './to_user'; import { fromUser } from './from_user'; @@ -50,7 +50,7 @@ import { onRaf } from '../utils'; import { getTheme } from '../services'; export interface QueryStringInputProps { - indexPatterns: Array; + indexPatterns: Array; query: Query; disableAutoFocus?: boolean; screenTitle?: string; @@ -104,7 +104,7 @@ interface State { suggestionLimit: number; selectionStart: number | null; selectionEnd: number | null; - indexPatterns: IIndexPattern[]; + indexPatterns: DataView[]; /** * Part of state because passed down to child components @@ -170,7 +170,7 @@ export default class QueryStringInputUI extends PureComponent { ) as string[]; const objectPatterns = this.props.indexPatterns.filter( (indexPattern) => typeof indexPattern !== 'string' - ) as IIndexPattern[]; + ) as DataView[]; // abort the previous fetch to avoid overriding with outdated data // issue https://github.com/elastic/kibana/issues/80831 @@ -181,7 +181,7 @@ export default class QueryStringInputUI extends PureComponent { const objectPatternsFromStrings = (await fetchIndexPatterns( this.services.data.indexPatterns, stringPatterns - )) as IIndexPattern[]; + )) as DataView[]; if (!currentAbortController.signal.aborted) { this.setState({ diff --git a/src/plugins/unified_search/public/search_bar/search_bar.tsx b/src/plugins/unified_search/public/search_bar/search_bar.tsx index f6dddef2909e4..4a212db08998e 100644 --- a/src/plugins/unified_search/public/search_bar/search_bar.tsx +++ b/src/plugins/unified_search/public/search_bar/search_bar.tsx @@ -23,7 +23,8 @@ import type { TimeHistoryContract, SavedQuery } from '../../../data/public'; import type { SavedQueryAttributes } from '../../../data/common'; import { IDataPluginServices } from '../../../data/public'; import { FilterBar } from '../filter_bar'; -import { TimeRange, IIndexPattern } from '../../../data/common'; +import { TimeRange } from '../../../data/common'; +import { DataView } from '../../../data_views/public'; import { SavedQueryMeta, SaveQueryForm } from '../saved_query_form'; import { SavedQueryManagementComponent } from '../saved_query_management'; @@ -38,7 +39,7 @@ export interface SearchBarInjectedDeps { } export interface SearchBarOwnProps { - indexPatterns?: IIndexPattern[]; + indexPatterns?: DataView[]; isLoading?: boolean; customSubmitButton?: React.ReactNode; screenTitle?: string; diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx index 6537bbea98c92..7d823a5f94700 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx @@ -11,6 +11,7 @@ import { fromKueryExpression } from '@kbn/es-query'; import type { FieldSpec } from '../../../../../../../src/plugins/data/common'; import { QueryStringInput } from '../../../../../../../src/plugins/unified_search/public'; +import type { DataView } from '../../../../../../../src/plugins/data_views/public'; import { useStartServices } from '../hooks'; import { INDEX_NAME, AGENTS_PREFIX } from '../constants'; @@ -79,12 +80,12 @@ export const SearchBar: React.FunctionComponent = ({ disableLanguageSwitcher={true} indexPatterns={ indexPatternFields - ? [ + ? ([ { title: indexPattern, fields: indexPatternFields, }, - ] + ] as unknown as DataView[]) : [] } query={{ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx index 8a0d8fec58f11..d231cd77fcf57 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n'; import type { FieldSpec } from '../../../../../../../../../../../src/plugins/data/common'; import { QueryStringInput } from '../../../../../../../../../../../src/plugins/unified_search/public'; +import type { DataView } from '../../../../../../../../../../../src/plugins/data_views/public'; import { useStartServices } from '../../../../../hooks'; import { @@ -53,12 +54,12 @@ export const LogQueryBar: React.FunctionComponent<{ disableLanguageSwitcher={true} indexPatterns={ indexPatternFields - ? [ + ? ([ { title: AGENT_LOG_INDEX_PATTERN, fields: indexPatternFields, }, - ] + ] as unknown as DataView[]) : [] } query={{ diff --git a/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx b/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx index f9f352c235693..b699a585ab4c7 100644 --- a/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx +++ b/x-pack/plugins/infra/public/pages/logs/stream/page_toolbar.tsx @@ -10,6 +10,7 @@ import { Query } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import React, { useContext } from 'react'; import { QueryStringInput } from '../../../../../../../src/plugins/unified_search/public'; +import { DataView } from '../../../../../../../src/plugins/data_views/public'; import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common'; import { LogCustomizationMenu } from '../../../components/logging/log_customization_menu'; import { LogDatepicker } from '../../../components/logging/log_datepicker'; @@ -57,7 +58,7 @@ export const LogsToolbar = () => { { setSurroundingLogsId(null); diff --git a/x-pack/plugins/observability/public/pages/alerts/components/alerts_search_bar.tsx b/x-pack/plugins/observability/public/pages/alerts/components/alerts_search_bar.tsx index 87c422a45de04..28b9b3c0758e8 100644 --- a/x-pack/plugins/observability/public/pages/alerts/components/alerts_search_bar.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/components/alerts_search_bar.tsx @@ -8,6 +8,7 @@ import { DataViewBase } from '@kbn/es-query'; import React, { useMemo, useState } from 'react'; import { TimeHistory } from '../../../../../../../src/plugins/data/public'; +import { DataView } from '../../../../../../../src/plugins/data_views/public'; import { SearchBar } from '../../../../../../../src/plugins/unified_search/public'; import { Storage } from '../../../../../../../src/plugins/kibana_utils/public'; import { translations } from '../../../config'; @@ -47,7 +48,7 @@ export function AlertsSearchBar({ return ( ( dateRangeFrom={dateRangeFrom} dateRangeTo={dateRangeTo} filters={filters} - indexPatterns={indexPatterns} + indexPatterns={indexPatterns as DataView[]} isLoading={isLoading} isRefreshPaused={isRefreshPaused} query={filterQuery} diff --git a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx index aeef2dbfb40d4..d5624421c0006 100644 --- a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx @@ -16,6 +16,7 @@ import deepEqual from 'fast-deep-equal'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; import type { FilterManager, TimeRange, SavedQuery } from 'src/plugins/data/public'; +import type { DataView } from 'src/plugins/data_views/public'; import { OnTimeChangeProps } from '@elastic/eui'; @@ -298,7 +299,7 @@ export const SearchBarComponent = memo( ) : ( diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx index acb86cb403204..0d76cdb64641c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx @@ -11,6 +11,7 @@ import { encode, RisonValue } from 'rison-node'; import styled from 'styled-components'; import type { Query } from '@kbn/es-query'; import { TimeHistory } from '../../../../../../../../../src/plugins/data/public'; +import { DataView } from '../../../../../../../../../src/plugins/data_views/public'; import { SearchBar } from '../../../../../../../../../src/plugins/unified_search/public'; import { Storage } from '../../../../../../../../../src/plugins/kibana_utils/public'; import { urlFromQueryParams } from '../url_from_query_params'; @@ -59,7 +60,7 @@ export const AdminSearchBar = memo(() => { {};