Skip to content

Commit c6952ab

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 52841
# Conflicts: # src/legacy/ui/public/vis/editors/config/editor_config_providers.ts
2 parents cf73a86 + 6942d0b commit c6952ab

File tree

159 files changed

+312
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+312
-454
lines changed

src/legacy/core_plugins/data/public/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export function plugin() {
2828

2929
/** @public types */
3030
export { DataStart };
31-
32-
export { Field, FieldType, IFieldList, IndexPattern } from './index_patterns';
3331
export { EsQuerySortValue, FetchOptions, ISearchSource, SortDirection } from './search/types';
3432
export { SearchSourceFields } from './search/types';
3533
export {
@@ -41,5 +39,4 @@ export {
4139
/** @public static code */
4240
export * from '../common';
4341
export { FilterStateManager } from './filter/filter_manager';
44-
export { getFromSavedObject, getRoutes, flattenHitWrapper } from './index_patterns';
4542
export { getRequestInspectorStats, getResponseInspectorStats } from './search';

src/legacy/core_plugins/data/public/index_patterns/index.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/legacy/core_plugins/kbn_doc_views/public/views/json_code_block.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import React from 'react';
2020
import { shallow } from 'enzyme';
2121
import { JsonCodeBlock } from './json_code_block';
22-
import { IndexPattern } from 'ui/index_patterns';
22+
import { IndexPattern } from '../../../../../plugins/data/public';
2323

2424
it('returns the `JsonCodeEditor` component', () => {
2525
const props = {

src/legacy/core_plugins/kbn_doc_views/public/views/table/table.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
*/
1919
import React from 'react';
2020
import { mount } from 'enzyme';
21-
import { IndexPattern } from 'ui/index_patterns';
2221
// @ts-ignore
2322
import { findTestSubject } from '@elastic/eui/lib/test';
24-
import { flattenHitWrapper } from '../../../../data/public/';
2523
import { DocViewTable } from './table';
2624

25+
import { IndexPattern, indexPatterns } from '../../../../../../plugins/data/public';
26+
2727
jest.mock('ui/new_platform');
2828

2929
// @ts-ignore
@@ -70,7 +70,7 @@ const indexPattern = {
7070
formatHit: jest.fn(hit => hit._source),
7171
} as IndexPattern;
7272

73-
indexPattern.flattenHit = flattenHitWrapper(indexPattern, indexPattern.metaFields);
73+
indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields);
7474

7575
describe('DocViewTable at Discover', () => {
7676
// At Discover's main view, all buttons are rendered

src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_app_controller.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ import {
3939
unhashUrl,
4040
VISUALIZE_EMBEDDABLE_TYPE,
4141
} from '../legacy_imports';
42-
import { FilterStateManager, IndexPattern } from '../../../../data/public';
43-
import { Query, SavedQuery, IndexPatternsContract } from '../../../../../../plugins/data/public';
42+
import { FilterStateManager } from '../../../../data/public';
43+
import {
44+
IndexPattern,
45+
Query,
46+
SavedQuery,
47+
IndexPatternsContract,
48+
} from '../../../../../../plugins/data/public';
4449

4550
import {
4651
DashboardContainer,

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__jest__/render.test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ const unmountComponentAtNode = jest.fn();
2222

2323
jest.doMock('react-dom', () => ({ render, unmountComponentAtNode }));
2424

25-
// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
26-
// at Function.defineProperties`.
27-
jest.mock('ui/index_patterns', () => ({
28-
INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
29-
}));
30-
3125
jest.mock('ui/chrome', () => ({
3226
getUiSettingsClient: () => ({
3327
get: () => '',

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__jest__/step_index_pattern.test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ const mockIndexPatternCreationType = {
3232
checkIndicesForErrors: () => false,
3333
getShowSystemIndices: () => false,
3434
};
35-
// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
36-
// at Function.defineProperties`.
37-
jest.mock('ui/index_patterns', () => ({
38-
INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
39-
}));
4035

4136
jest.mock('ui/chrome', () => ({
4237
getUiSettingsClient: () => ({

src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import React, { Component } from 'react';
2121
import PropTypes from 'prop-types';
22-
import { INDEX_PATTERN_ILLEGAL_CHARACTERS as ILLEGAL_CHARACTERS } from 'ui/index_patterns';
22+
import { indexPatterns } from '../../../../../../../../../../plugins/data/public';
2323
import { MAX_SEARCH_SIZE } from '../../constants';
2424
import {
2525
getIndices,
@@ -71,7 +71,7 @@ export class StepIndexPattern extends Component {
7171
indexPatternName: indexPatternCreationType.getIndexPatternName(),
7272
};
7373

74-
this.ILLEGAL_CHARACTERS = [...ILLEGAL_CHARACTERS];
74+
this.ILLEGAL_CHARACTERS = [...indexPatterns.ILLEGAL_CHARACTERS];
7575
this.lastQuery = null;
7676
}
7777

@@ -243,7 +243,7 @@ export class StepIndexPattern extends Component {
243243
if (!query || !query.length || query === '.' || query === '..') {
244244
// This is an error scenario but do not report an error
245245
containsErrors = true;
246-
} else if (containsIllegalCharacters(query, ILLEGAL_CHARACTERS)) {
246+
} else if (containsIllegalCharacters(query, indexPatterns.ILLEGAL_CHARACTERS)) {
247247
const errorMessage = i18n.translate(
248248
'kbn.management.createIndexPattern.step.invalidCharactersErrorMessage',
249249
{

src/legacy/ui/public/agg_types/agg_configs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { TimeRange } from 'src/plugins/data/public';
3131
import { Schema } from '../vis/editors/default/schemas';
3232
import { AggConfig, AggConfigOptions } from './agg_config';
3333
import { AggGroupNames } from '../vis/editors/default/agg_groups';
34-
import { IndexPattern } from '../../../core_plugins/data/public';
34+
import { IndexPattern } from '../../../../plugins/data/public';
3535
import { ISearchSource, FetchOptions } from '../courier/types';
3636

3737
type Schemas = Record<string, any>;

src/legacy/ui/public/agg_types/filter/agg_type_filters.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { IndexPattern } from 'ui/index_patterns';
20+
import { IndexPattern } from '../../../../../plugins/data/public';
2121
import { AggTypeFilters } from './agg_type_filters';
2222
import { AggType } from '..';
2323
import { AggConfig } from '../../vis';

0 commit comments

Comments
 (0)