Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-60568
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 23, 2020
2 parents 777dccb + 204ef66 commit a0841da
Show file tree
Hide file tree
Showing 110 changed files with 2,281 additions and 1,068 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/legacy/core_plugins/data/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/core_plugins/expressions/**/*.{js,ts,tsx}'],
rules: {
Expand Down
5 changes: 1 addition & 4 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"console": "src/plugins/console",
"core": "src/core",
"dashboard": "src/plugins/dashboard",
"data": [
"src/legacy/core_plugins/data",
"src/plugins/data"
],
"data": "src/plugins/data",
"embeddableApi": "src/plugins/embeddable",
"embeddableExamples": "examples/embeddable_examples",
"share": "src/plugins/share",
Expand Down
41 changes: 0 additions & 41 deletions src/legacy/core_plugins/data/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/legacy/core_plugins/data/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions src/legacy/core_plugins/data/public/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/legacy/core_plugins/data/public/legacy.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/legacy/core_plugins/data/public/plugin.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/legacy/core_plugins/data/public/setup.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/legacy/core_plugins/input_control_vis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LegacyPluginApi, LegacyPluginInitializer } from '../../../../src/legacy
const inputControlVisPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
id: 'input_control_vis',
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter', 'data'],
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter'],
publicDir: resolve(__dirname, 'public'),
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/kibana/public/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ function buildRestrictedPaths(shimmedPlugins) {
'ui/**/*',
'src/legacy/ui/**/*',
'src/legacy/core_plugins/kibana/public/**/*',
'src/legacy/core_plugins/data/public/**/*',
'!src/legacy/core_plugins/data/public/index.ts',
`!src/legacy/core_plugins/kibana/public/${shimmedPlugin}/**/*`,
],
allowSameFolder: false,
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/timelion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const experimentalLabel = i18n.translate('timelion.uiSettings.experimentalLabel'

const timelionPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
require: ['kibana', 'elasticsearch', 'data'],
require: ['kibana', 'elasticsearch'],
config(Joi: any) {
return Joi.object({
enabled: Joi.boolean().default(true),
Expand Down
1 change: 0 additions & 1 deletion src/legacy/core_plugins/timelion/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import 'ui/directives/input_focus';
import './directives/saved_object_finder';
import 'ui/directives/listen';
import './directives/saved_object_save_as_checkbox';
import '../../data/public/legacy';
import './services/saved_sheet_register';

import rootTemplate from 'plugins/timelion/index.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ import React from 'react';
import { render, mount } from 'enzyme';
import { MarkdownVisWrapper } from './markdown_vis_controller';

// We need Markdown to do these tests, so mock data plugin
jest.mock('../../data/public/legacy', () => {
return {};
});

describe('markdown vis controller', () => {
it('should set html from markdown params', () => {
const vis = {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_timelion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LegacyPluginApi, LegacyPluginInitializer } from '../../../../src/legacy
const timelionVisPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
id: 'timelion_vis',
require: ['kibana', 'elasticsearch', 'visualizations', 'data'],
require: ['kibana', 'elasticsearch', 'visualizations'],
publicDir: resolve(__dirname, 'public'),
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';

jest.mock('plugins/data', () => {
return {
QueryStringInput: () => <div className="queryStringInput" />,
};
});

jest.mock('../lib/get_default_query_language', () => ({
getDefaultQueryLanguage: () => 'kuery',
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ import React from 'react';
import { GaugeSeries } from './series';
import { mountWithIntl } from 'test_utils/enzyme_helpers';

jest.mock('plugins/data', () => {
return {
QueryStringInput: () => <div className="queryStringInput" />,
};
});

const defaultProps = {
disableAdd: true,
disableDelete: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ import React from 'react';
import { MetricSeries } from './series';
import { mountWithIntl } from 'test_utils/enzyme_helpers';

jest.mock('plugins/data', () => {
return {
QueryStringInput: () => <div className="queryStringInput" />,
};
});

const defaultProps = {
disableAdd: false,
disableDelete: true,
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_vislib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { LegacyPluginApi, LegacyPluginInitializer } from '../../types';
const visTypeVislibPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
id: 'vis_type_vislib',
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter', 'data'],
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter'],
publicDir: resolve(__dirname, 'public'),
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
uiExports: {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/vis_type_xy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface ConfigSchema {
const visTypeXyPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
id: 'visTypeXy',
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter', 'data'],
require: ['kibana', 'elasticsearch', 'visualizations', 'interpreter'],
publicDir: resolve(__dirname, 'public'),
uiExports: {
hacks: [resolve(__dirname, 'public/legacy')],
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/data/public/field_formats/utils/deserialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export const deserializeFieldFormat: FormatFactory = function(
const { id } = mapping;
if (id === 'range') {
const RangeFormat = FieldFormat.from((range: any) => {
const format = getFieldFormat(this, id, mapping.params);
const nestedFormatter = mapping.params as SerializedFieldFormat;
const format = getFieldFormat(this, nestedFormatter.id, nestedFormatter.params);
const gte = '\u2265';
const lt = '\u003c';
return i18n.translate('data.aggTypes.buckets.ranges.rangesFormatMessage', {
Expand Down
12 changes: 6 additions & 6 deletions test/functional/apps/visualize/_data_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ export default function({ getService, getPageObjects }) {
async function expectValidTableData() {
const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'≥ 0B and < 1,000B',
'1,351 64.7%',
'≥ 1000 and < 2000',
'≥ 1,000B and < 1.953KB',
'737 35.3%',
]);
}
Expand Down Expand Up @@ -144,9 +144,9 @@ export default function({ getService, getPageObjects }) {

const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'≥ 0B and < 1,000B',
'344.094B',
'≥ 1000 and < 2000',
'≥ 1,000B and < 1.953KB',
'1.697KB',
]);
});
Expand Down Expand Up @@ -248,9 +248,9 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visEditor.clickGo();
const data = await PageObjects.visChart.getTableVisData();
expect(data.trim().split('\n')).to.be.eql([
'≥ 0 and < 1000',
'≥ 0B and < 1,000B',
'1,351',
'≥ 1000 and < 2000',
'≥ 1,000B and < 1.953KB',
'737',
]);
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/lens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const lens: LegacyPluginInitializer = kibana => {
id: PLUGIN_ID,
configPrefix: `xpack.${PLUGIN_ID}`,
// task_manager could be required, but is only used for telemetry
require: ['kibana', 'elasticsearch', 'xpack_main', 'interpreter', 'data'],
require: ['kibana', 'elasticsearch', 'xpack_main', 'interpreter'],
publicDir: resolve(__dirname, 'public'),

uiExports: {
Expand Down
Loading

0 comments on commit a0841da

Please sign in to comment.