Skip to content

Commit

Permalink
Removes the kibana_legacy plugin (elastic#118672)
Browse files Browse the repository at this point in the history
* Removes kibana_legacy plugin

* Update translations

* Move functions to canvas and monitpring plugins

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and TinLe committed Dec 22, 2021
1 parent 8c3288e commit 5a59e73
Show file tree
Hide file tree
Showing 41 changed files with 305 additions and 278 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/x-pack/plugins/lens/ @elastic/kibana-vis-editors
/src/plugins/advanced_settings/ @elastic/kibana-vis-editors
/src/plugins/charts/ @elastic/kibana-vis-editors
/src/plugins/kibana_legacy/ @elastic/kibana-vis-editors
/src/plugins/management/ @elastic/kibana-vis-editors
/src/plugins/vis_default_editor/ @elastic/kibana-vis-editors
/src/plugins/vis_types/metric/ @elastic/kibana-vis-editors
/src/plugins/vis_types/table/ @elastic/kibana-vis-editors
Expand Down
1 change: 0 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"indexPatternManagement": "src/plugins/data_view_management",
"interactiveSetup": "src/plugins/interactive_setup",
"advancedSettings": "src/plugins/advanced_settings",
"kibana_legacy": "src/plugins/kibana_legacy",
"kibanaOverview": "src/plugins/kibana_overview",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
Expand Down
4 changes: 0 additions & 4 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|The plugin provides UI and APIs for the interactive setup mode.
|{kib-repo}blob/{branch}/src/plugins/kibana_legacy/README.md[kibanaLegacy]
|This plugin contains several helpers and services to integrate pieces of the legacy Kibana app with the new Kibana platform.
|{kib-repo}blob/{branch}/src/plugins/kibana_overview/README.md[kibanaOverview]
|An overview page highlighting Kibana apps
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pageLoadAssetSize:
ingestPipelines: 58003
inputControlVis: 172675
inspector: 148711
kibanaLegacy: 107711
kibanaOverview: 56279
lens: 96624
licenseManagement: 41817
Expand Down
7 changes: 0 additions & 7 deletions src/plugins/kibana_legacy/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions src/plugins/kibana_legacy/jest.config.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/plugins/kibana_legacy/kibana.json

This file was deleted.

17 changes: 0 additions & 17 deletions src/plugins/kibana_legacy/public/index.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/plugins/kibana_legacy/public/mocks.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/plugins/kibana_legacy/public/notify/index.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/plugins/kibana_legacy/public/notify/lib/format_es_msg.test.js

This file was deleted.

26 changes: 0 additions & 26 deletions src/plugins/kibana_legacy/public/notify/lib/format_es_msg.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/plugins/kibana_legacy/public/notify/lib/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/plugins/kibana_legacy/public/plugin.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/plugins/kibana_legacy/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/telemetry_management_section/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{ "path": "../kibana_utils/tsconfig.json" },
{ "path": "../usage_collection/tsconfig.json" },
{ "path": "../telemetry/tsconfig.json" },
{ "path": "../kibana_legacy/tsconfig.json"},
{ "path": "../ui_actions/tsconfig.json" },
{ "path": "../expressions/tsconfig.json" },
{ "path": "../home/tsconfig.json" },
Expand Down
1 change: 0 additions & 1 deletion src/plugins/url_forwarding/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
"include": ["public/**/*"],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../kibana_legacy/tsconfig.json" }
]
}
1 change: 0 additions & 1 deletion x-pack/plugins/canvas/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"requiredBundles": [
"discover",
"home",
"kibanaLegacy",
"kibanaReact",
"kibanaUtils",
"lens",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { formatMsg } from './format_msg';
import expect from '@kbn/expect';
import { formatMsg, formatESMsg } from './format_msg';

describe('formatMsg', () => {
test('should prepend the second argument to result', () => {
Expand Down Expand Up @@ -65,4 +64,59 @@ describe('formatMsg', () => {

expect(actual).to.equal('I am the detailed message');
});

describe('formatESMsg', () => {
test('should return undefined if passed a basic error', () => {
const err = new Error('This is a normal error');

const actual = formatESMsg(err);

expect(actual).to.be(undefined);
});

test('should return undefined if passed a string', () => {
const err = 'This is a error string';

const actual = formatESMsg(err);

expect(actual).to.be(undefined);
});

test('should return the root_cause if passed an extended elasticsearch', () => {
const err: Record<string, any> = new Error('This is an elasticsearch error');
err.resp = {
error: {
root_cause: [
{
reason: 'I am the detailed message',
},
],
},
};

const actual = formatESMsg(err);

expect(actual).to.equal('I am the detailed message');
});

test('should combine the reason messages if more than one is returned.', () => {
const err: Record<string, any> = new Error('This is an elasticsearch error');
err.resp = {
error: {
root_cause: [
{
reason: 'I am the detailed message 1',
},
{
reason: 'I am the detailed message 2',
},
],
},
};

const actual = formatESMsg(err);

expect(actual).to.equal('I am the detailed message 1\nI am the detailed message 2');
});
});
});
Loading

0 comments on commit 5a59e73

Please sign in to comment.