Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Remote clusters] Migrate server code out of legacy #56781

Merged
merged 13 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"xpack.maps": "legacy/plugins/maps",
"xpack.ml": "legacy/plugins/ml",
"xpack.monitoring": "legacy/plugins/monitoring",
"xpack.remoteClusters": "legacy/plugins/remote_clusters",
"xpack.remoteClusters": ["plugins/remote_clusters", "legacy/plugins/remote_clusters"],
"xpack.reporting": ["plugins/reporting", "legacy/plugins/reporting"],
"xpack.rollupJobs": "legacy/plugins/rollup",
"xpack.searchProfiler": "plugins/searchprofiler",
Expand Down
23 changes: 1 addition & 22 deletions x-pack/legacy/plugins/remote_clusters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import { Legacy } from 'kibana';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if the goal of this contribution is to complete the NP migration we should strip this file down to the bare minimum required to keep functional parity with legacy. For instance:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I was planning on addressing these items in a separate PR as part of the public migration.

Also, isEnabled is being used by CCR so I think this needs to stay as is for now.

import { resolve } from 'path';
import { PLUGIN } from './common';
import { Plugin as RemoteClustersPlugin } from './plugin';
import { createShim } from './shim';

export function remoteClusters(kibana: any) {
return new kibana.Plugin({
Expand Down Expand Up @@ -43,25 +41,6 @@ export function remoteClusters(kibana: any) {
config.get('xpack.remote_clusters.enabled') && config.get('xpack.index_management.enabled')
);
},
init(server: Legacy.Server) {
const {
coreSetup,
pluginsSetup: {
license: { registerLicenseChecker },
},
} = createShim(server, PLUGIN.ID);

const remoteClustersPlugin = new RemoteClustersPlugin();

// Set up plugin.
remoteClustersPlugin.setup(coreSetup);

registerLicenseChecker(
server,
PLUGIN.ID,
PLUGIN.getI18nName(),
PLUGIN.MINIMUM_LICENSE_REQUIRED
);
},
init(server: any) {},
});
}
30 changes: 0 additions & 30 deletions x-pack/legacy/plugins/remote_clusters/plugin.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class RemoteClusterEdit extends Component {
stopEditingCluster: PropTypes.func,
editCluster: PropTypes.func,
isEditingCluster: PropTypes.bool,
getEditClusterError: PropTypes.string,
getEditClusterError: PropTypes.object,
clearEditClusterErrors: PropTypes.func,
openDetailPanel: PropTypes.func,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export const removeClusters = names => async (dispatch, getState) => {
const {
name,
error: {
output: {
payload: { message },
},
payload: { message },
},
} = errors[0];

Expand Down

This file was deleted.

This file was deleted.

Loading