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