Skip to content

Commit

Permalink
remove legacy ES plug
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Sep 17, 2020
1 parent dd8db10 commit 7699afa
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 878 deletions.
10 changes: 0 additions & 10 deletions kibana.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export { Public, Server };
/**
* All exports from TS ambient definitions (where types are added for JS source in a .d.ts file).
*/
import * as LegacyElasticsearch from './src/legacy/core_plugins/elasticsearch';
import * as LegacyKibanaPluginSpec from './src/legacy/plugin_discovery/plugin_spec/plugin_spec_options';
import * as LegacyKibanaServer from './src/legacy/server/kbn_server';

Expand All @@ -44,13 +43,4 @@ export namespace Legacy {
export type InitPluginFunction = LegacyKibanaPluginSpec.InitPluginFunction;
export type UiExports = LegacyKibanaPluginSpec.UiExports;
export type PluginSpecOptions = LegacyKibanaPluginSpec.PluginSpecOptions;

export namespace Plugins {
export namespace elasticsearch {
export type Plugin = LegacyElasticsearch.ElasticsearchPlugin;
export type Cluster = LegacyElasticsearch.Cluster;
export type ClusterConfig = LegacyElasticsearch.ClusterConfig;
export type CallClusterOptions = LegacyElasticsearch.CallClusterOptions;
}
}
}
526 changes: 0 additions & 526 deletions src/legacy/core_plugins/elasticsearch/index.d.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/legacy/core_plugins/elasticsearch/index.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/legacy/core_plugins/elasticsearch/package.json

This file was deleted.

This file was deleted.

This file was deleted.

51 changes: 0 additions & 51 deletions src/legacy/core_plugins/elasticsearch/server/lib/cluster.ts

This file was deleted.

79 changes: 0 additions & 79 deletions src/legacy/core_plugins/elasticsearch/server/lib/create_proxy.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/legacy/server/kbn_server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,14 @@ import {
import { LegacyConfig, ILegacyInternals } from '../../core/server/legacy';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { UiPlugins } from '../../core/server/plugins';
import { ElasticsearchPlugin } from '../core_plugins/elasticsearch';

// lot of legacy code was assuming this type only had these two methods
export type KibanaConfig = Pick<LegacyConfig, 'get' | 'has'>;

// Extend the defaults with the plugins and server methods we need.
declare module 'hapi' {
interface PluginProperties {
elasticsearch: ElasticsearchPlugin;
kibana: any;
spaces: any;
// add new plugin types here
}

interface Server {
Expand Down
40 changes: 0 additions & 40 deletions test/api_integration/apis/elasticsearch/index.js

This file was deleted.

1 change: 0 additions & 1 deletion test/api_integration/apis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
export default function ({ loadTestFile }) {
describe('apis', () => {
loadTestFile(require.resolve('./core'));
loadTestFile(require.resolve('./elasticsearch'));
loadTestFile(require.resolve('./general'));
loadTestFile(require.resolve('./home'));
loadTestFile(require.resolve('./index_patterns'));
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/security/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const security = (kibana: Record<string, any>) =>
new kibana.Plugin({
id: 'security',
publicDir: resolve(__dirname, 'public'),
require: ['elasticsearch'],
require: [],
configPrefix: 'xpack.security',
config: (Joi: Root) =>
Joi.object({ enabled: Joi.boolean().default(true) })
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/spaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const spaces = (kibana: Record<string, any>) =>
id: 'spaces',
configPrefix: 'xpack.spaces',
publicDir: resolve(__dirname, 'public'),
require: ['elasticsearch', 'xpack_main'],
require: ['xpack_main'],
config(Joi: any) {
return Joi.object({
enabled: Joi.boolean().default(true),
Expand Down
Loading

0 comments on commit 7699afa

Please sign in to comment.