[data views] rename files from index patterns to data view (#112047)
* rename directories Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0353d5eedc
commit
3c0e5e5876
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DataView } from './index_pattern';
|
import { DataView } from './data_view';
|
||||||
|
|
||||||
export interface DataViewCache {
|
export interface DataViewCache {
|
||||||
get: (id: string) => Promise<DataView> | undefined;
|
get: (id: string) => Promise<DataView> | undefined;
|
|
@ -15,8 +15,8 @@ import { DATA_VIEW_SAVED_OBJECT_TYPE, SavedObjectsClientCommon } from '../..';
|
||||||
|
|
||||||
import { createDataViewCache } from '.';
|
import { createDataViewCache } from '.';
|
||||||
import type { RuntimeField } from '../types';
|
import type { RuntimeField } from '../types';
|
||||||
import { DataView } from './index_pattern';
|
import { DataView } from './data_view';
|
||||||
import { createEnsureDefaultDataView, EnsureDefaultDataView } from './ensure_default_index_pattern';
|
import { createEnsureDefaultDataView, EnsureDefaultDataView } from './ensure_default_data_view';
|
||||||
import {
|
import {
|
||||||
OnNotification,
|
OnNotification,
|
||||||
OnError,
|
OnError,
|
||||||
|
@ -237,7 +237,7 @@ export class DataViewsService {
|
||||||
/**
|
/**
|
||||||
* Checks if current user has a user created index pattern ignoring fleet's server default index patterns
|
* Checks if current user has a user created index pattern ignoring fleet's server default index patterns
|
||||||
*/
|
*/
|
||||||
async hasUserIndexPattern(): Promise<boolean> {
|
async hasUserDataView(): Promise<boolean> {
|
||||||
return this.apiClient.hasUserIndexPattern();
|
return this.apiClient.hasUserIndexPattern();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { includes } from 'lodash';
|
import { includes } from 'lodash';
|
||||||
import { DataViewsContract } from './index_patterns';
|
import { DataViewsContract } from './data_views';
|
||||||
import { UiSettingsCommon } from '../types';
|
import { UiSettingsCommon } from '../types';
|
||||||
|
|
||||||
export type EnsureDefaultDataView = () => Promise<unknown> | undefined;
|
export type EnsureDefaultDataView = () => Promise<unknown> | undefined;
|
||||||
|
|
||||||
export const createEnsureDefaultDataView = (
|
export const createEnsureDefaultDataView = (
|
||||||
uiSettings: UiSettingsCommon,
|
uiSettings: UiSettingsCommon,
|
||||||
onRedirectNoIndexPattern: () => Promise<unknown> | void
|
onRedirectNoDefaultView: () => Promise<unknown> | void
|
||||||
) => {
|
) => {
|
||||||
/**
|
/**
|
||||||
* Checks whether a default index pattern is set and exists and defines
|
* Checks whether a default data view is set and exists and defines
|
||||||
* one otherwise.
|
* one otherwise.
|
||||||
*/
|
*/
|
||||||
return async function ensureDefaultDataView(this: DataViewsContract) {
|
return async function ensureDefaultDataView(this: DataViewsContract) {
|
||||||
|
@ -36,12 +36,12 @@ export const createEnsureDefaultDataView = (
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is any user index pattern created, set the first as default
|
// If there is any user index pattern created, set the first as default
|
||||||
// if there is 0 patterns, then don't even call `hasUserIndexPattern()`
|
// if there is 0 patterns, then don't even call `hasUserDataView()`
|
||||||
if (patterns.length >= 1 && (await this.hasUserIndexPattern().catch(() => true))) {
|
if (patterns.length >= 1 && (await this.hasUserDataView().catch(() => true))) {
|
||||||
defaultId = patterns[0];
|
defaultId = patterns[0];
|
||||||
await uiSettings.set('defaultIndex', defaultId);
|
await uiSettings.set('defaultIndex', defaultId);
|
||||||
} else {
|
} else {
|
||||||
return onRedirectNoIndexPattern();
|
return onRedirectNoDefaultView();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IndexPattern } from './index_pattern';
|
import { IndexPattern } from './data_view';
|
||||||
|
|
||||||
import { fieldFormatsMock } from '../../../../field_formats/common/mocks';
|
import { fieldFormatsMock } from '../../../../field_formats/common/mocks';
|
||||||
import { flattenHitWrapper } from './flatten_hit';
|
import { flattenHitWrapper } from './flatten_hit';
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { DataView } from './index_pattern';
|
import { DataView } from './data_view';
|
||||||
|
|
||||||
// Takes a hit, merges it with any stored/scripted fields, and with the metaFields
|
// Takes a hit, merges it with any stored/scripted fields, and with the metaFields
|
||||||
// returns a flattened version
|
// returns a flattened version
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { DataView } from './index_pattern';
|
import { DataView } from './data_view';
|
||||||
import { FieldFormatsContentType } from '../../../../field_formats/common';
|
import { FieldFormatsContentType } from '../../../../field_formats/common';
|
||||||
|
|
||||||
const formattedCache = new WeakMap();
|
const formattedCache = new WeakMap();
|
|
@ -9,5 +9,5 @@
|
||||||
export * from './_pattern_cache';
|
export * from './_pattern_cache';
|
||||||
export * from './flatten_hit';
|
export * from './flatten_hit';
|
||||||
export * from './format_hit';
|
export * from './format_hit';
|
||||||
export * from './index_pattern';
|
export * from './data_view';
|
||||||
export * from './index_patterns';
|
export * from './data_views';
|
|
@ -6,8 +6,8 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IndexPattern } from './index_pattern';
|
import { IndexPattern } from './data_view';
|
||||||
import { IndexPatternSpec } from '../types';
|
import { DataViewSpec } from '../types';
|
||||||
import { FieldFormatsStartCommon } from '../../../../field_formats/common';
|
import { FieldFormatsStartCommon } from '../../../../field_formats/common';
|
||||||
import { fieldFormatsMock } from '../../../../field_formats/common/mocks';
|
import { fieldFormatsMock } from '../../../../field_formats/common/mocks';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ export const createStubIndexPattern = ({
|
||||||
opts,
|
opts,
|
||||||
deps,
|
deps,
|
||||||
}: {
|
}: {
|
||||||
spec: IndexPatternSpec;
|
spec: DataViewSpec;
|
||||||
opts?: {
|
opts?: {
|
||||||
shortDotsEnable?: boolean;
|
shortDotsEnable?: boolean;
|
||||||
metaFields?: string[];
|
metaFields?: string[];
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { map, last } from 'lodash';
|
import { map, last } from 'lodash';
|
||||||
|
|
||||||
import { IndexPattern } from './index_pattern';
|
import { IndexPattern } from './data_view';
|
||||||
|
|
||||||
import { DuplicateField } from '../../../../kibana_utils/common';
|
import { DuplicateField } from '../../../../kibana_utils/common';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
||||||
import { DataViewsContract } from '../index_patterns';
|
import { DataViewsContract } from '../data_views';
|
||||||
import { DataViewSpec } from '..';
|
import { DataViewSpec } from '..';
|
||||||
import { SavedObjectReference } from '../../../../../core/types';
|
import { SavedObjectReference } from '../../../../../core/types';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { findIndex } from 'lodash';
|
||||||
import { IFieldType } from './types';
|
import { IFieldType } from './types';
|
||||||
import { DataViewField } from './index_pattern_field';
|
import { DataViewField } from './index_pattern_field';
|
||||||
import { FieldSpec, DataViewFieldMap } from '../types';
|
import { FieldSpec, DataViewFieldMap } from '../types';
|
||||||
import { DataView } from '../index_patterns';
|
import { DataView } from '../data_views';
|
||||||
|
|
||||||
type FieldMap = Map<DataViewField['name'], DataViewField>;
|
type FieldMap = Map<DataViewField['name'], DataViewField>;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IndexPatternField } from './index_pattern_field';
|
import { IndexPatternField } from './index_pattern_field';
|
||||||
import { IndexPattern } from '../index_patterns';
|
import { IndexPattern } from '..';
|
||||||
import { KBN_FIELD_TYPES } from '../../../common';
|
import { KBN_FIELD_TYPES } from '../../../common';
|
||||||
import { FieldSpec, RuntimeField } from '../types';
|
import { FieldSpec, RuntimeField } from '../types';
|
||||||
import { FieldFormat } from '../../../../field_formats/common';
|
import { FieldFormat } from '../../../../field_formats/common';
|
|
@ -14,12 +14,8 @@ export {
|
||||||
IndexPatternsContract,
|
IndexPatternsContract,
|
||||||
DataViewsService,
|
DataViewsService,
|
||||||
DataViewsContract,
|
DataViewsContract,
|
||||||
} from './index_patterns';
|
} from './data_views';
|
||||||
export type {
|
// todo was trying to export this as type but wasn't working
|
||||||
IndexPattern,
|
export { IndexPattern, IndexPatternListItem, DataView, DataViewListItem } from './data_views';
|
||||||
IndexPatternListItem,
|
|
||||||
DataView,
|
|
||||||
DataViewListItem,
|
|
||||||
} from './index_patterns';
|
|
||||||
export * from './errors';
|
export * from './errors';
|
||||||
export * from './expressions';
|
export * from './expressions';
|
|
@ -7,8 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { stubFieldSpecMap, stubLogstashFieldSpecMap } from './field.stub';
|
import { stubFieldSpecMap, stubLogstashFieldSpecMap } from './field.stub';
|
||||||
import { createStubIndexPattern } from './index_patterns/index_pattern.stub';
|
import { createStubIndexPattern } from './data_views/index_pattern.stub';
|
||||||
export { createStubIndexPattern } from './index_patterns/index_pattern.stub';
|
export { createStubIndexPattern } from './data_views/index_pattern.stub';
|
||||||
import { SavedObject } from '../../../../core/types';
|
import { SavedObject } from '../../../../core/types';
|
||||||
import { IndexPatternAttributes } from '../types';
|
import { IndexPatternAttributes } from '../types';
|
||||||
|
|
|
@ -22,3 +22,9 @@ export class DataViewMissingIndices extends KbnError {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use DataViewMissingIndices. All index pattern interfaces were renamed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class IndexPatternMissingIndices extends DataViewMissingIndices {}
|
|
@ -7,4 +7,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './fields/fields.mocks';
|
export * from './fields/fields.mocks';
|
||||||
export * from './index_patterns/index_pattern.stub';
|
export * from './data_views/index_pattern.stub';
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { IndexPatternSavedObjectAttrs } from './index_patterns';
|
import type { IndexPatternSavedObjectAttrs } from './data_views';
|
||||||
import type { SavedObjectsClientCommon } from '../types';
|
import type { SavedObjectsClientCommon } from '../types';
|
||||||
|
|
||||||
import { DATA_VIEW_SAVED_OBJECT_TYPE } from '../constants';
|
import { DATA_VIEW_SAVED_OBJECT_TYPE } from '../constants';
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
export * from './constants';
|
export * from './constants';
|
||||||
export * from './es_query';
|
export * from './es_query';
|
||||||
export * from './index_patterns';
|
export * from './data_views';
|
||||||
export * from './kbn_field_types';
|
export * from './kbn_field_types';
|
||||||
export * from './query';
|
export * from './query';
|
||||||
export * from './search';
|
export * from './search';
|
||||||
|
@ -25,4 +25,4 @@ export * from './exports';
|
||||||
* @removeBy 8.1
|
* @removeBy 8.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { IndexPatternAttributes, DataViewAttributes } from './types';
|
export { IndexPatternAttributes } from './types';
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './index_patterns/fields/fields.mocks';
|
export * from './data_views/fields/fields.mocks';
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { AggType } from './agg_type';
|
||||||
import { AggTypesRegistryStart } from './agg_types_registry';
|
import { AggTypesRegistryStart } from './agg_types_registry';
|
||||||
import { mockAggTypesRegistry } from './test_helpers';
|
import { mockAggTypesRegistry } from './test_helpers';
|
||||||
import { MetricAggType } from './metrics/metric_agg_type';
|
import { MetricAggType } from './metrics/metric_agg_type';
|
||||||
import { IndexPattern, IndexPatternField, IIndexPatternFieldList } from '../../index_patterns';
|
import { IndexPattern, IndexPatternField, IIndexPatternFieldList } from '../..';
|
||||||
|
|
||||||
describe('AggConfig', () => {
|
describe('AggConfig', () => {
|
||||||
let indexPattern: IndexPattern;
|
let indexPattern: IndexPattern;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { AggConfig } from './agg_config';
|
||||||
import { AggConfigs } from './agg_configs';
|
import { AggConfigs } from './agg_configs';
|
||||||
import { AggTypesRegistryStart } from './agg_types_registry';
|
import { AggTypesRegistryStart } from './agg_types_registry';
|
||||||
import { mockAggTypesRegistry } from './test_helpers';
|
import { mockAggTypesRegistry } from './test_helpers';
|
||||||
import { IndexPattern } from '../../index_patterns/';
|
import { IndexPattern } from '../..';
|
||||||
import { stubIndexPattern } from '../../stubs';
|
import { stubIndexPattern } from '../../stubs';
|
||||||
import { IEsSearchResponse } from '..';
|
import { IEsSearchResponse } from '..';
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { AggConfig, AggConfigSerialized, IAggConfig } from './agg_config';
|
||||||
import { IAggType } from './agg_type';
|
import { IAggType } from './agg_type';
|
||||||
import { AggTypesRegistryStart } from './agg_types_registry';
|
import { AggTypesRegistryStart } from './agg_types_registry';
|
||||||
import { AggGroupNames } from './agg_groups';
|
import { AggGroupNames } from './agg_groups';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns/index_pattern';
|
import { IndexPattern } from '../..';
|
||||||
import { TimeRange, getTime, calculateBounds } from '../../../common';
|
import { TimeRange, getTime, calculateBounds } from '../../../common';
|
||||||
import { IBucketAggConfig } from './buckets';
|
import { IBucketAggConfig } from './buckets';
|
||||||
import { insertTimeShiftSplit, mergeTimeShifts } from './utils/time_splits';
|
import { insertTimeShiftSplit, mergeTimeShifts } from './utils/time_splits';
|
||||||
|
|
|
@ -16,8 +16,8 @@ import { AggConfigs, CreateAggConfigParams } from '../agg_configs';
|
||||||
import { BUCKET_TYPES } from './bucket_agg_types';
|
import { BUCKET_TYPES } from './bucket_agg_types';
|
||||||
import { IBucketAggConfig } from './bucket_agg_type';
|
import { IBucketAggConfig } from './bucket_agg_type';
|
||||||
import { mockAggTypesRegistry } from '../test_helpers';
|
import { mockAggTypesRegistry } from '../test_helpers';
|
||||||
import type { IndexPatternField } from '../../../index_patterns';
|
import type { IndexPatternField } from '../../..';
|
||||||
import { IndexPattern } from '../../../index_patterns/index_patterns/index_pattern';
|
import { IndexPattern } from '../../..';
|
||||||
|
|
||||||
const indexPattern = {
|
const indexPattern = {
|
||||||
id: '1234',
|
id: '1234',
|
||||||
|
|
|
@ -11,7 +11,7 @@ import moment from 'moment-timezone';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
|
||||||
import { KBN_FIELD_TYPES, TimeRange, TimeRangeBounds, UI_SETTINGS } from '../../../../common';
|
import { KBN_FIELD_TYPES, TimeRange, TimeRangeBounds, UI_SETTINGS } from '../../../../common';
|
||||||
import { IFieldType } from '../../../index_patterns';
|
import { IFieldType } from '../../..';
|
||||||
|
|
||||||
import { ExtendedBounds, extendedBoundsToAst, timerangeToAst } from '../../expressions';
|
import { ExtendedBounds, extendedBoundsToAst, timerangeToAst } from '../../expressions';
|
||||||
import { intervalOptions, autoInterval, isAutoInterval } from './_interval_options';
|
import { intervalOptions, autoInterval, isAutoInterval } from './_interval_options';
|
||||||
|
|
|
@ -10,8 +10,8 @@ import { AggConfigs } from '../agg_configs';
|
||||||
import { METRIC_TYPES } from '../metrics';
|
import { METRIC_TYPES } from '../metrics';
|
||||||
import { mockAggTypesRegistry } from '../test_helpers';
|
import { mockAggTypesRegistry } from '../test_helpers';
|
||||||
import { BUCKET_TYPES } from './bucket_agg_types';
|
import { BUCKET_TYPES } from './bucket_agg_types';
|
||||||
import type { IndexPatternField } from '../../../index_patterns';
|
import type { IndexPatternField } from '../../..';
|
||||||
import { IndexPattern } from '../../../index_patterns/index_patterns/index_pattern';
|
import { IndexPattern } from '../../..';
|
||||||
|
|
||||||
describe('Terms Agg', () => {
|
describe('Terms Agg', () => {
|
||||||
describe('order agg editor UI', () => {
|
describe('order agg editor UI', () => {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
import { BaseParamType } from './base';
|
import { BaseParamType } from './base';
|
||||||
import { propFilter } from '../utils';
|
import { propFilter } from '../utils';
|
||||||
import { KBN_FIELD_TYPES } from '../../../kbn_field_types/types';
|
import { KBN_FIELD_TYPES } from '../../../kbn_field_types/types';
|
||||||
import { isNestedField, IndexPatternField } from '../../../index_patterns/fields';
|
import { isNestedField, IndexPatternField } from '../../../data_views/fields';
|
||||||
|
|
||||||
const filterByType = propFilter('type');
|
const filterByType = propFilter('type');
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { Assign } from '@kbn/utility-types';
|
import { Assign } from '@kbn/utility-types';
|
||||||
import { DatatableColumn } from 'src/plugins/expressions';
|
import { DatatableColumn } from 'src/plugins/expressions';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns/index_pattern';
|
import { IndexPattern } from '../..';
|
||||||
import {
|
import {
|
||||||
aggAvg,
|
aggAvg,
|
||||||
aggBucketAvg,
|
aggBucketAvg,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DatatableColumn } from 'src/plugins/expressions/common';
|
import { DatatableColumn } from 'src/plugins/expressions/common';
|
||||||
import { IndexPattern } from '../../../index_patterns';
|
import { IndexPattern } from '../../..';
|
||||||
import { AggConfigs, CreateAggConfigParams } from '../agg_configs';
|
import { AggConfigs, CreateAggConfigParams } from '../agg_configs';
|
||||||
import { AggTypesRegistryStart } from '../agg_types_registry';
|
import { AggTypesRegistryStart } from '../agg_types_registry';
|
||||||
import { IAggType } from '../agg_type';
|
import { IAggType } from '../agg_type';
|
||||||
|
|
|
@ -18,7 +18,7 @@ jest.mock('moment', () => {
|
||||||
return moment;
|
return moment;
|
||||||
});
|
});
|
||||||
|
|
||||||
import { IndexPattern, IndexPatternField } from '../../../index_patterns';
|
import { IndexPattern, IndexPatternField } from '../../..';
|
||||||
import { AggParamsDateHistogram } from '../buckets';
|
import { AggParamsDateHistogram } from '../buckets';
|
||||||
import { inferTimeZone } from './infer_time_zone';
|
import { inferTimeZone } from './infer_time_zone';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { IndexPattern } from '../../../index_patterns';
|
import { IndexPattern } from '../../..';
|
||||||
import { AggParamsDateHistogram } from '../buckets';
|
import { AggParamsDateHistogram } from '../buckets';
|
||||||
|
|
||||||
export function inferTimeZone(
|
export function inferTimeZone(
|
||||||
|
|
|
@ -12,8 +12,8 @@ import { Observable } from 'rxjs';
|
||||||
import type { Datatable, ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
import type { Datatable, ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
||||||
import { buildExpressionFunction } from '../../../../../../plugins/expressions/common';
|
import { buildExpressionFunction } from '../../../../../../plugins/expressions/common';
|
||||||
|
|
||||||
import { IndexPatternExpressionType } from '../../../index_patterns/expressions';
|
import { IndexPatternExpressionType } from '../../../data_views/expressions';
|
||||||
import { IndexPatternsContract } from '../../../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../../..';
|
||||||
|
|
||||||
import { AggsStart, AggExpressionType, aggCountFnName } from '../../aggs';
|
import { AggsStart, AggExpressionType, aggCountFnName } from '../../aggs';
|
||||||
import { ISearchStartSearchSource } from '../../search_source';
|
import { ISearchStartSearchSource } from '../../search_source';
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import { from } from 'rxjs';
|
import { from } from 'rxjs';
|
||||||
import type { MockedKeys } from '@kbn/utility-types/jest';
|
import type { MockedKeys } from '@kbn/utility-types/jest';
|
||||||
import type { Filter } from '../../../es_query';
|
import type { Filter } from '../../../es_query';
|
||||||
import type { IndexPattern } from '../../../index_patterns';
|
import type { IndexPattern } from '../../..';
|
||||||
import type { IAggConfigs } from '../../aggs';
|
import type { IAggConfigs } from '../../aggs';
|
||||||
import type { ISearchSource } from '../../search_source';
|
import type { ISearchSource } from '../../search_source';
|
||||||
import { searchSourceCommonMock, searchSourceInstanceMock } from '../../search_source/mocks';
|
import { searchSourceCommonMock, searchSourceInstanceMock } from '../../search_source/mocks';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { EsRawResponse } from './es_raw_response';
|
||||||
import { RequestStatistics, RequestAdapter } from '../../../../inspector/common';
|
import { RequestStatistics, RequestAdapter } from '../../../../inspector/common';
|
||||||
import { ISearchGeneric, KibanaContext } from '..';
|
import { ISearchGeneric, KibanaContext } from '..';
|
||||||
import { getEsQueryConfig } from '../../es_query';
|
import { getEsQueryConfig } from '../../es_query';
|
||||||
import { UiSettingsCommon } from '../../index_patterns';
|
import { UiSettingsCommon } from '../..';
|
||||||
|
|
||||||
const name = 'esdsl';
|
const name = 'esdsl';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
|
||||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
||||||
import { buildFilter, FILTERS } from '@kbn/es-query';
|
import { buildFilter, FILTERS } from '@kbn/es-query';
|
||||||
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
|
|
||||||
interface Arguments {
|
interface Arguments {
|
||||||
field: KibanaField;
|
field: KibanaField;
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { ExecutionContextSearch, KibanaContext, KibanaFilter } from './kibana_co
|
||||||
import { KibanaQueryOutput } from './kibana_context_type';
|
import { KibanaQueryOutput } from './kibana_context_type';
|
||||||
import { KibanaTimerangeOutput } from './timerange';
|
import { KibanaTimerangeOutput } from './timerange';
|
||||||
import { SavedObjectReference } from '../../../../../core/types';
|
import { SavedObjectReference } from '../../../../../core/types';
|
||||||
import { SavedObjectsClientCommon } from '../../index_patterns';
|
import { SavedObjectsClientCommon } from '../..';
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export interface KibanaContextStartDependencies {
|
export interface KibanaContextStartDependencies {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import { ExpressionValueBoxed } from 'src/plugins/expressions/common';
|
import { ExpressionValueBoxed } from 'src/plugins/expressions/common';
|
||||||
import { Filter } from '../../es_query';
|
import { Filter } from '../../es_query';
|
||||||
import { Query, TimeRange } from '../../query';
|
import { Query, TimeRange } from '../../query';
|
||||||
import { IndexPatternField } from '../../index_patterns/fields';
|
import { IndexPatternField } from '../..';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||||
export type ExecutionContextSearch = {
|
export type ExecutionContextSearch = {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
|
||||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
||||||
import { buildFilter, FILTERS } from '@kbn/es-query';
|
import { buildFilter, FILTERS } from '@kbn/es-query';
|
||||||
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
|
|
||||||
interface Arguments {
|
interface Arguments {
|
||||||
field: KibanaField;
|
field: KibanaField;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
|
||||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
|
||||||
import { buildFilter, FILTERS } from '@kbn/es-query';
|
import { buildFilter, FILTERS } from '@kbn/es-query';
|
||||||
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
import { KibanaField, KibanaFilter } from './kibana_context_type';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
import { KibanaRange } from './range';
|
import { KibanaRange } from './range';
|
||||||
|
|
||||||
interface Arguments {
|
interface Arguments {
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
import { createSearchSource as createSearchSourceFactory } from './create_search_source';
|
import { createSearchSource as createSearchSourceFactory } from './create_search_source';
|
||||||
import { SearchSourceDependencies } from './search_source';
|
import { SearchSourceDependencies } from './search_source';
|
||||||
import { IIndexPattern } from '../../index_patterns';
|
import { IIndexPattern } from '../..';
|
||||||
import { IndexPatternsContract } from '../../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../..';
|
||||||
import { Filter } from '../../es_query';
|
import { Filter } from '../../es_query';
|
||||||
|
|
||||||
describe('createSearchSource', () => {
|
describe('createSearchSource', () => {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { migrateLegacyQuery } from './migrate_legacy_query';
|
import { migrateLegacyQuery } from './migrate_legacy_query';
|
||||||
import { SearchSource, SearchSourceDependencies } from './search_source';
|
import { SearchSource, SearchSourceDependencies } from './search_source';
|
||||||
import { IndexPatternsContract } from '../../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../..';
|
||||||
import { SearchSourceFields } from './types';
|
import { SearchSourceFields } from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { normalizeSortRequest } from './normalize_sort_request';
|
import { normalizeSortRequest } from './normalize_sort_request';
|
||||||
import { SortDirection } from './types';
|
import { SortDirection } from './types';
|
||||||
import { IIndexPattern } from '../../index_patterns';
|
import { IIndexPattern } from '../..';
|
||||||
|
|
||||||
describe('SearchSource#normalizeSortRequest', function () {
|
describe('SearchSource#normalizeSortRequest', function () {
|
||||||
const scriptedField = {
|
const scriptedField = {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IIndexPattern } from '../../index_patterns';
|
import { IIndexPattern } from '../..';
|
||||||
import { EsQuerySortValue, SortOptions } from './types';
|
import { EsQuerySortValue, SortOptions } from './types';
|
||||||
|
|
||||||
export function normalizeSortRequest(
|
export function normalizeSortRequest(
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { IndexPattern } from '../../index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
import { SearchSource, SearchSourceDependencies, SortDirection } from './';
|
import { SearchSource, SearchSourceDependencies, SortDirection } from './';
|
||||||
import { AggConfigs, AggTypesRegistryStart } from '../../';
|
import { AggConfigs, AggTypesRegistryStart } from '../../';
|
||||||
import { mockAggTypesRegistry } from '../aggs/test_helpers';
|
import { mockAggTypesRegistry } from '../aggs/test_helpers';
|
||||||
|
|
|
@ -75,7 +75,7 @@ import { estypes } from '@elastic/elasticsearch';
|
||||||
import { buildEsQuery, Filter } from '@kbn/es-query';
|
import { buildEsQuery, Filter } from '@kbn/es-query';
|
||||||
import { normalizeSortRequest } from './normalize_sort_request';
|
import { normalizeSortRequest } from './normalize_sort_request';
|
||||||
import { fieldWildcardFilter } from '../../../../kibana_utils/common';
|
import { fieldWildcardFilter } from '../../../../kibana_utils/common';
|
||||||
import { IIndexPattern, IndexPattern, IndexPatternField } from '../../index_patterns';
|
import { IIndexPattern, IndexPattern, IndexPatternField } from '../..';
|
||||||
import {
|
import {
|
||||||
AggConfigs,
|
AggConfigs,
|
||||||
EsQuerySortValue,
|
EsQuerySortValue,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IndexPatternsContract } from '../../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../..';
|
||||||
import { SearchSourceService, SearchSourceDependencies } from './';
|
import { SearchSourceService, SearchSourceDependencies } from './';
|
||||||
|
|
||||||
describe('SearchSource service', () => {
|
describe('SearchSource service', () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createSearchSource, SearchSource, SearchSourceDependencies } from './';
|
import { createSearchSource, SearchSource, SearchSourceDependencies } from './';
|
||||||
import { IndexPatternsContract } from '../../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../..';
|
||||||
|
|
||||||
export class SearchSourceService {
|
export class SearchSourceService {
|
||||||
public setup() {}
|
public setup() {}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import type { estypes } from '@elastic/elasticsearch';
|
||||||
import { IAggConfigs } from 'src/plugins/data/public';
|
import { IAggConfigs } from 'src/plugins/data/public';
|
||||||
import { Query } from '../..';
|
import { Query } from '../..';
|
||||||
import { Filter } from '../../es_query';
|
import { Filter } from '../../es_query';
|
||||||
import { IndexPattern } from '../../index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
import { SearchSource } from './search_source';
|
import { SearchSource } from './search_source';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tabifyAggResponse } from './tabify';
|
import { tabifyAggResponse } from './tabify';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns/index_pattern';
|
import { IndexPattern } from '../..';
|
||||||
import { AggConfigs, IAggConfig, IAggConfigs } from '../aggs';
|
import { AggConfigs, IAggConfig, IAggConfigs } from '../aggs';
|
||||||
import { mockAggTypesRegistry } from '../aggs/test_helpers';
|
import { mockAggTypesRegistry } from '../aggs/test_helpers';
|
||||||
import { metricOnly, threeTermBuckets } from './fixtures/fake_hierarchical_data';
|
import { metricOnly, threeTermBuckets } from './fixtures/fake_hierarchical_data';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tabifyDocs } from './tabify_docs';
|
import { tabifyDocs } from './tabify_docs';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
|
|
||||||
describe('tabifyDocs', () => {
|
describe('tabifyDocs', () => {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import type { estypes } from '@elastic/elasticsearch';
|
import type { estypes } from '@elastic/elasticsearch';
|
||||||
import { isPlainObject } from 'lodash';
|
import { isPlainObject } from 'lodash';
|
||||||
import { IndexPattern } from '../../index_patterns/index_patterns';
|
import { IndexPattern } from '../..';
|
||||||
import { Datatable, DatatableColumn, DatatableColumnType } from '../../../../expressions/common';
|
import { Datatable, DatatableColumn, DatatableColumnType } from '../../../../expressions/common';
|
||||||
|
|
||||||
export interface TabifyDocsOptions {
|
export interface TabifyDocsOptions {
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './index_patterns/field.stub';
|
export * from './data_views/field.stub';
|
||||||
export * from './index_patterns/index_pattern.stub';
|
export * from './data_views/index_pattern.stub';
|
||||||
export * from './es_query/stubs';
|
export * from './es_query/stubs';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
export * from './query/types';
|
export * from './query/types';
|
||||||
export * from './kbn_field_types/types';
|
export * from './kbn_field_types/types';
|
||||||
export * from './index_patterns/types';
|
export * from './data_views/types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If a service is being shared on both the client and the server, and
|
* If a service is being shared on both the client and the server, and
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ValueSuggestionsMethod } from '../../../common';
|
import { ValueSuggestionsMethod } from '../../../common';
|
||||||
import { IFieldType, IIndexPattern } from '../../../common/index_patterns';
|
import { IFieldType, IIndexPattern } from '../../../common';
|
||||||
|
|
||||||
export enum QuerySuggestionTypes {
|
export enum QuerySuggestionTypes {
|
||||||
Field = 'field',
|
Field = 'field',
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from '../../../common/index_patterns/index_patterns';
|
export * from '../../../common/data_views/data_views';
|
||||||
export * from './redirect_no_index_pattern';
|
export * from './redirect_no_index_pattern';
|
||||||
export * from './index_patterns_api_client';
|
export * from './index_patterns_api_client';
|
|
@ -7,12 +7,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { HttpSetup } from 'src/core/public';
|
import { HttpSetup } from 'src/core/public';
|
||||||
import { DataViewMissingIndices } from '../../../common/index_patterns/lib';
|
import { DataViewMissingIndices } from '../../../common/data_views/lib';
|
||||||
import {
|
import {
|
||||||
GetFieldsOptions,
|
GetFieldsOptions,
|
||||||
IIndexPatternsApiClient,
|
IIndexPatternsApiClient,
|
||||||
GetFieldsOptionsTimePattern,
|
GetFieldsOptionsTimePattern,
|
||||||
} from '../../../common/index_patterns/types';
|
} from '../../../common/data_views/types';
|
||||||
|
|
||||||
const API_BASE_URL: string = `/api/index_patterns/`;
|
const API_BASE_URL: string = `/api/index_patterns/`;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IndexPatternLoadStartDependencies } from '../../../common/index_patterns/expressions';
|
import { IndexPatternLoadStartDependencies } from '../../../common/data_views/expressions';
|
||||||
import { getFunctionDefinition } from './load_index_pattern';
|
import { getFunctionDefinition } from './load_index_pattern';
|
||||||
|
|
||||||
describe('indexPattern expression function', () => {
|
describe('indexPattern expression function', () => {
|
|
@ -11,7 +11,7 @@ import {
|
||||||
getIndexPatternLoadMeta,
|
getIndexPatternLoadMeta,
|
||||||
IndexPatternLoadExpressionFunctionDefinition,
|
IndexPatternLoadExpressionFunctionDefinition,
|
||||||
IndexPatternLoadStartDependencies,
|
IndexPatternLoadStartDependencies,
|
||||||
} from '../../../common/index_patterns/expressions';
|
} from '../../../common/data_views/expressions';
|
||||||
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -13,10 +13,10 @@ export {
|
||||||
ILLEGAL_CHARACTERS,
|
ILLEGAL_CHARACTERS,
|
||||||
validateDataView,
|
validateDataView,
|
||||||
isDefault,
|
isDefault,
|
||||||
} from '../../common/index_patterns/lib';
|
} from '../../common/data_views/lib';
|
||||||
export { flattenHitWrapper, formatHitProvider, onRedirectNoIndexPattern } from './index_patterns';
|
export { flattenHitWrapper, formatHitProvider, onRedirectNoIndexPattern } from './data_views';
|
||||||
|
|
||||||
export { IndexPatternField, IIndexPatternFieldList, TypeMeta } from '../../common/index_patterns';
|
export { IndexPatternField, IIndexPatternFieldList, TypeMeta } from '../../common/data_views';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
IndexPatternsService,
|
IndexPatternsService,
|
||||||
|
@ -26,6 +26,6 @@ export {
|
||||||
DataViewsService,
|
DataViewsService,
|
||||||
DataViewsContract,
|
DataViewsContract,
|
||||||
DataView,
|
DataView,
|
||||||
} from './index_patterns';
|
} from './data_views';
|
||||||
export { UiSettingsPublicToCommon } from './ui_settings_wrapper';
|
export { UiSettingsPublicToCommon } from './ui_settings_wrapper';
|
||||||
export { SavedObjectsClientPublicToCommon } from './saved_objects_client_wrapper';
|
export { SavedObjectsClientPublicToCommon } from './saved_objects_client_wrapper';
|
|
@ -12,7 +12,7 @@ import {
|
||||||
SavedObjectsClientCommon,
|
SavedObjectsClientCommon,
|
||||||
SavedObjectsClientCommonFindArgs,
|
SavedObjectsClientCommonFindArgs,
|
||||||
SavedObject,
|
SavedObject,
|
||||||
} from '../../common/index_patterns';
|
} from '../../common/data_views';
|
||||||
|
|
||||||
type SOClient = Pick<SavedObjectsClient, 'find' | 'get' | 'update' | 'create' | 'delete'>;
|
type SOClient = Pick<SavedObjectsClient, 'find' | 'get' | 'update' | 'create' | 'delete'>;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IUiSettingsClient } from 'src/core/public';
|
import { IUiSettingsClient } from 'src/core/public';
|
||||||
import { UiSettingsCommon } from '../../common/index_patterns';
|
import { UiSettingsCommon } from '../../common';
|
||||||
|
|
||||||
export class UiSettingsPublicToCommon implements UiSettingsCommon {
|
export class UiSettingsPublicToCommon implements UiSettingsCommon {
|
||||||
private uiSettings: IUiSettingsClient;
|
private uiSettings: IUiSettingsClient;
|
|
@ -48,9 +48,9 @@ import {
|
||||||
isDefault,
|
isDefault,
|
||||||
validateDataView,
|
validateDataView,
|
||||||
flattenHitWrapper,
|
flattenHitWrapper,
|
||||||
} from './index_patterns';
|
} from './data_views';
|
||||||
|
|
||||||
export type { IndexPatternsService } from './index_patterns';
|
export type { IndexPatternsService } from './data_views';
|
||||||
|
|
||||||
// Index patterns namespace:
|
// Index patterns namespace:
|
||||||
export const indexPatterns = {
|
export const indexPatterns = {
|
||||||
|
@ -71,7 +71,7 @@ export {
|
||||||
IndexPattern,
|
IndexPattern,
|
||||||
IndexPatternField,
|
IndexPatternField,
|
||||||
TypeMeta,
|
TypeMeta,
|
||||||
} from './index_patterns';
|
} from './data_views';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
IIndexPattern,
|
IIndexPattern,
|
||||||
|
@ -91,7 +91,7 @@ export {
|
||||||
IndexPatternListItem,
|
IndexPatternListItem,
|
||||||
} from '../common';
|
} from '../common';
|
||||||
|
|
||||||
export { DuplicateDataViewError } from '../common/index_patterns/errors';
|
export { DuplicateDataViewError } from '../common/data_views/errors';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Autocomplete query suggestions:
|
* Autocomplete query suggestions:
|
||||||
|
|
|
@ -26,7 +26,7 @@ import {
|
||||||
onRedirectNoIndexPattern,
|
onRedirectNoIndexPattern,
|
||||||
IndexPatternsApiClient,
|
IndexPatternsApiClient,
|
||||||
UiSettingsPublicToCommon,
|
UiSettingsPublicToCommon,
|
||||||
} from './index_patterns';
|
} from './data_views';
|
||||||
import {
|
import {
|
||||||
setIndexPatterns,
|
setIndexPatterns,
|
||||||
setNotifications,
|
setNotifications,
|
||||||
|
@ -44,8 +44,8 @@ import {
|
||||||
createSelectRangeAction,
|
createSelectRangeAction,
|
||||||
} from './actions';
|
} from './actions';
|
||||||
import { APPLY_FILTER_TRIGGER, applyFilterTrigger } from './triggers';
|
import { APPLY_FILTER_TRIGGER, applyFilterTrigger } from './triggers';
|
||||||
import { SavedObjectsClientPublicToCommon } from './index_patterns';
|
import { SavedObjectsClientPublicToCommon } from './data_views';
|
||||||
import { getIndexPatternLoad } from './index_patterns/expressions';
|
import { getIndexPatternLoad } from './data_views/expressions';
|
||||||
import { UsageCollectionSetup } from '../../usage_collection/public';
|
import { UsageCollectionSetup } from '../../usage_collection/public';
|
||||||
import { getTableViewDescription } from './utils/table_inspector_view';
|
import { getTableViewDescription } from './utils/table_inspector_view';
|
||||||
import { NowProvider, NowProviderInternalContract } from './now_provider';
|
import { NowProvider, NowProviderInternalContract } from './now_provider';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
AggTypesDependencies,
|
AggTypesDependencies,
|
||||||
} from '../../../common/search/aggs';
|
} from '../../../common/search/aggs';
|
||||||
import { AggsSetup, AggsStart } from './types';
|
import { AggsSetup, AggsStart } from './types';
|
||||||
import { IndexPatternsContract } from '../../index_patterns';
|
import { IndexPatternsContract } from '../..';
|
||||||
import { NowProviderInternalContract } from '../../now_provider';
|
import { NowProviderInternalContract } from '../../now_provider';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { omit } from 'lodash';
|
||||||
import { of as mockOf } from 'rxjs';
|
import { of as mockOf } from 'rxjs';
|
||||||
import type { MockedKeys } from '@kbn/utility-types/jest';
|
import type { MockedKeys } from '@kbn/utility-types/jest';
|
||||||
import type { ExecutionContext } from 'src/plugins/expressions/public';
|
import type { ExecutionContext } from 'src/plugins/expressions/public';
|
||||||
import type { IndexPatternsContract } from '../../../common/index_patterns/index_patterns';
|
import type { IndexPatternsContract } from '../../../common';
|
||||||
import type {
|
import type {
|
||||||
ISearchStartSearchSource,
|
ISearchStartSearchSource,
|
||||||
KibanaContext,
|
KibanaContext,
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import { StartServicesAccessor } from 'src/core/public';
|
import { StartServicesAccessor } from 'src/core/public';
|
||||||
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
||||||
import { getEsdslFn } from '../../../common/search/expressions/esdsl';
|
import { getEsdslFn } from '../../../common/search/expressions/esdsl';
|
||||||
import { UiSettingsCommon } from '../../../common/index_patterns';
|
import { UiSettingsCommon } from '../../../common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is some glue code that takes in `core.getStartServices`, extracts the dependencies
|
* This is some glue code that takes in `core.getStartServices`, extracts the dependencies
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import { StartServicesAccessor } from 'src/core/public';
|
import { StartServicesAccessor } from 'src/core/public';
|
||||||
import { getKibanaContextFn } from '../../../common/search/expressions';
|
import { getKibanaContextFn } from '../../../common/search/expressions';
|
||||||
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
import { DataPublicPluginStart, DataStartDependencies } from '../../types';
|
||||||
import { SavedObjectsClientCommon } from '../../../common/index_patterns';
|
import { SavedObjectsClientCommon } from '../../../common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is some glue code that takes in `core.getStartServices`, extracts the dependencies
|
* This is some glue code that takes in `core.getStartServices`, extracts the dependencies
|
||||||
|
|
|
@ -44,7 +44,7 @@ import {
|
||||||
esRawResponse,
|
esRawResponse,
|
||||||
} from '../../common/search';
|
} from '../../common/search';
|
||||||
import { AggsService, AggsStartDependencies } from './aggs';
|
import { AggsService, AggsStartDependencies } from './aggs';
|
||||||
import { IndexPatternsContract } from '../index_patterns/index_patterns';
|
import { IndexPatternsContract } from '..';
|
||||||
import { ISearchInterceptor, SearchInterceptor } from './search_interceptor';
|
import { ISearchInterceptor, SearchInterceptor } from './search_interceptor';
|
||||||
import { SearchUsageCollector, createUsageCollector } from './collectors';
|
import { SearchUsageCollector, createUsageCollector } from './collectors';
|
||||||
import { UsageCollectionSetup } from '../../../usage_collection/public';
|
import { UsageCollectionSetup } from '../../../usage_collection/public';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { PackageInfo } from 'kibana/server';
|
||||||
import { SearchUsageCollector } from './collectors';
|
import { SearchUsageCollector } from './collectors';
|
||||||
import { AggsSetup, AggsSetupDependencies, AggsStartDependencies, AggsStart } from './aggs';
|
import { AggsSetup, AggsSetupDependencies, AggsStartDependencies, AggsStart } from './aggs';
|
||||||
import { ISearchGeneric, ISearchStartSearchSource } from '../../common/search';
|
import { ISearchGeneric, ISearchStartSearchSource } from '../../common/search';
|
||||||
import { IndexPatternsContract } from '../../common/index_patterns/index_patterns';
|
import { IndexPatternsContract } from '../../common';
|
||||||
import { UsageCollectionSetup } from '../../../usage_collection/public';
|
import { UsageCollectionSetup } from '../../../usage_collection/public';
|
||||||
import { ISessionsClient, ISessionService } from './session';
|
import { ISessionsClient, ISessionService } from './session';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { NotificationsStart, CoreStart } from 'src/core/public';
|
import { NotificationsStart, CoreStart } from 'src/core/public';
|
||||||
import { createGetterSetter } from '../../kibana_utils/public';
|
import { createGetterSetter } from '../../kibana_utils/public';
|
||||||
import { IndexPatternsContract } from './index_patterns';
|
import { IndexPatternsContract } from './data_views';
|
||||||
import { DataPublicPluginStart } from './types';
|
import { DataPublicPluginStart } from './types';
|
||||||
|
|
||||||
export const [getNotifications, setNotifications] = createGetterSetter<NotificationsStart>(
|
export const [getNotifications, setNotifications] = createGetterSetter<NotificationsStart>(
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from '../common/stubs';
|
export * from '../common/stubs';
|
||||||
export { createStubIndexPattern } from './index_patterns/index_patterns/index_pattern.stub';
|
export { createStubIndexPattern } from './data_views/data_views/index_pattern.stub';
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { AutocompleteSetup, AutocompleteStart } from './autocomplete';
|
||||||
import { createFiltersFromRangeSelectAction, createFiltersFromValueClickAction } from './actions';
|
import { createFiltersFromRangeSelectAction, createFiltersFromValueClickAction } from './actions';
|
||||||
import { ISearchSetup, ISearchStart } from './search';
|
import { ISearchSetup, ISearchStart } from './search';
|
||||||
import { QuerySetup, QueryStart } from './query';
|
import { QuerySetup, QueryStart } from './query';
|
||||||
import { DataViewsContract } from './index_patterns';
|
import { DataViewsContract } from './data_views';
|
||||||
import { IndexPatternSelectProps, StatefulSearchBarProps } from './ui';
|
import { IndexPatternSelectProps, StatefulSearchBarProps } from './ui';
|
||||||
import { UsageCollectionSetup, UsageCollectionStart } from '../../usage_collection/public';
|
import { UsageCollectionSetup, UsageCollectionStart } from '../../usage_collection/public';
|
||||||
import { Setup as InspectorSetup } from '../../inspector/public';
|
import { Setup as InspectorSetup } from '../../inspector/public';
|
||||||
|
|
|
@ -34,7 +34,7 @@ const mockResponse = {
|
||||||
},
|
},
|
||||||
} as ApiResponse<estypes.SearchResponse<any>>;
|
} as ApiResponse<estypes.SearchResponse<any>>;
|
||||||
|
|
||||||
jest.mock('../index_patterns');
|
jest.mock('../data_views');
|
||||||
|
|
||||||
describe('terms agg suggestions', () => {
|
describe('terms agg suggestions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue