Skip to content

Commit

Permalink
[ML] Transforms: Migrate server plugin to NP. (#58714) (#59115)
Browse files Browse the repository at this point in the history
Migrate transform legacy server to NP.
- Create server plugin/index for transform in x-pack/plugins.
- Move all legacy/server files to plugins/transform
  • Loading branch information
walterra authored Mar 3, 2020
1 parent 621eeae commit c251f2f
Show file tree
Hide file tree
Showing 21 changed files with 824 additions and 541 deletions.
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"xpack.snapshotRestore": "legacy/plugins/snapshot_restore",
"xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"],
"xpack.taskManager": "legacy/plugins/task_manager",
"xpack.transform": "legacy/plugins/transform",
"xpack.transform": ["legacy/plugins/transform", "plugins/transform"],
"xpack.triggersActionsUI": "plugins/triggers_actions_ui",
"xpack.upgradeAssistant": "plugins/upgrade_assistant",
"xpack.uptime": "legacy/plugins/uptime",
Expand Down
19 changes: 1 addition & 18 deletions x-pack/legacy/plugins/transform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { Legacy } from 'kibana';
import { resolve } from 'path';

import { PLUGIN } from './common/constants';
import { Plugin as TransformPlugin } from './server/plugin';
import { createServerShim } from './server/shim';

export function transform(kibana: any) {
return new kibana.Plugin({
Expand All @@ -20,20 +18,5 @@ export function transform(kibana: any) {
styleSheetPaths: resolve(__dirname, 'public/app/index.scss'),
managementSections: ['plugins/transform'],
},
init(server: Legacy.Server) {
const { core, plugins } = createServerShim(server, PLUGIN.ID);
const transformPlugin = new TransformPlugin();

// Start plugin
transformPlugin.start(core, plugins);

// Register license checker
plugins.license.registerLicenseChecker(
server,
PLUGIN.ID,
PLUGIN.getI18nName(),
PLUGIN.MINIMUM_LICENSE_REQUIRED
);
},
});
}
17 changes: 0 additions & 17 deletions x-pack/legacy/plugins/transform/server/plugin.ts

This file was deleted.

99 changes: 0 additions & 99 deletions x-pack/legacy/plugins/transform/server/routes/api/app.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit c251f2f

Please sign in to comment.