Skip to content

Commit

Permalink
xpack_main legacy plugin pre-removal cleanup (#76257)
Browse files Browse the repository at this point in the history
* cleanup xpack_main legacy plugin, remove capabilities mixin

* fix test env

* delete injectXpackSignature and related tests
  • Loading branch information
pgayvallet authored Sep 1, 2020
1 parent e7966e9 commit d802bf0
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 828 deletions.
65 changes: 0 additions & 65 deletions src/legacy/server/capabilities/capabilities_mixin.test.ts

This file was deleted.

42 changes: 0 additions & 42 deletions src/legacy/server/capabilities/capabilities_mixin.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/legacy/server/capabilities/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/legacy/server/kbn_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import configCompleteMixin from './config/complete';
import { optimizeMixin } from '../../optimize';
import * as Plugins from './plugins';
import { savedObjectsMixin } from './saved_objects/saved_objects_mixin';
import { capabilitiesMixin } from './capabilities';
import { serverExtensionsMixin } from './server_extensions';
import { uiMixin } from '../ui';
import { i18nMixin } from './i18n';
Expand Down Expand Up @@ -115,9 +114,6 @@ export default class KbnServer {
// setup saved object routes
savedObjectsMixin,

// setup capabilities routes
capabilitiesMixin,

// setup routes that serve the @kbn/optimizer output
optimizeMixin,

Expand Down
28 changes: 0 additions & 28 deletions x-pack/legacy/plugins/xpack_main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@

import { resolve } from 'path';
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
import { replaceInjectedVars } from './server/lib/replace_injected_vars';
import { setupXPackMain } from './server/lib/setup_xpack_main';
import { xpackInfoRoute, settingsRoute } from './server/routes/api/v1';

export { callClusterFactory } from './server/lib/call_cluster_factory';

export const xpackMain = (kibana) => {
return new kibana.Plugin({
id: 'xpack_main',
Expand All @@ -25,32 +22,7 @@ export const xpackMain = (kibana) => {
}).default();
},

uiCapabilities(server) {
const featuresPlugin = server.newPlatform.setup.plugins.features;
if (!featuresPlugin) {
throw new Error('New Platform XPack Features plugin is not available.');
}
return featuresPlugin.getFeaturesUICapabilities();
},

uiExports: {
replaceInjectedVars,
injectDefaultVars(server) {
const config = server.config();

return {
activeSpace: null,
spacesEnabled: config.get('xpack.spaces.enabled'),
};
},
},

init(server) {
const featuresPlugin = server.newPlatform.setup.plugins.features;
if (!featuresPlugin) {
throw new Error('New Platform XPack Features plugin is not available.');
}

mirrorPluginStatus(server.plugins.elasticsearch, this, 'yellow', 'red');

setupXPackMain(server);
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit d802bf0

Please sign in to comment.