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

[Upgrade Assistant] Move out of legacy folder #58034

Merged
merged 22 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b631a40
Create x-pack/plugins skeleton for upgrade assistant
jloleysens Feb 18, 2020
c1fe10a
Move public folder contents
jloleysens Feb 18, 2020
0272a14
Include stylesheets in public
jloleysens Feb 18, 2020
e93348e
Move server side out of legacy
jloleysens Feb 19, 2020
c7691a9
Updated the routes with new dependencies and removed server shim
jloleysens Feb 19, 2020
5938e91
Fix router unit tests
jloleysens Feb 19, 2020
64ec947
Fix server lib tests
jloleysens Feb 19, 2020
e91d248
Clean up types issues
jloleysens Feb 19, 2020
3362e94
Fix setting credentials on request header
jloleysens Feb 19, 2020
1f646ec
Removed the security plugin from Upgrade Assistant
jloleysens Feb 19, 2020
b540a6e
Migrate to config to new platform config
jloleysens Feb 19, 2020
ee141c0
Remove unused types
jloleysens Feb 19, 2020
a0e1bd2
Fix import issue
jloleysens Feb 20, 2020
db64a18
Move upgrade assistant back to Elasticsearch management section
jloleysens Feb 21, 2020
9684204
Update dotfiles
jloleysens Feb 21, 2020
8d944ba
Merge branch 'master' of github.com:elastic/kibana into ua/chore/move…
jloleysens Feb 21, 2020
73c6267
Merge branch 'master' of github.com:elastic/kibana into ua/chore/move…
jloleysens Feb 24, 2020
c8b2da1
Merge branch 'master' into ua/chore/move-out-of-legacy
elasticmachine Feb 24, 2020
b7d17db
Merge branch 'master' into ua/chore/move-out-of-legacy
elasticmachine Feb 24, 2020
1d793d7
Alphabetical ordering in xpack/i18nrc.json
jloleysens Feb 25, 2020
e4dba40
Implemented PR feedback
jloleysens Feb 25, 2020
5c32021
Revert to longer import path
jloleysens Feb 25, 2020
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: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/plugins/searchprofiler/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui

# Endpoint
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"],
"xpack.taskManager": "legacy/plugins/task_manager",
"xpack.transform": "legacy/plugins/transform",
"xpack.upgradeAssistant": "plugins/upgrade_assistant",
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to keep the alphabetical order here.

"xpack.triggersActionsUI": "plugins/triggers_actions_ui",
"xpack.upgradeAssistant": "legacy/plugins/upgrade_assistant",
"xpack.uptime": "legacy/plugins/uptime",
"xpack.watcher": "plugins/watcher"
},
Expand Down
44 changes: 1 addition & 43 deletions x-pack/legacy/plugins/upgrade_assistant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import _ from 'lodash';
import Joi from 'joi';
import { Legacy } from 'kibana';
import { resolve } from 'path';
import mappings from './mappings.json';
import { plugin } from './server/np_ready';
import { CloudSetup } from '../../../plugins/cloud/server';

export function upgradeAssistant(kibana: any) {
const publicSrc = resolve(__dirname, 'public');
const npSrc = resolve(publicSrc, 'np_ready');

const config: Legacy.PluginSpecOptions = {
id: 'upgrade_assistant',
configPrefix: 'xpack.upgrade_assistant',
require: ['elasticsearch'],
uiExports: {
// @ts-ignore
managementSections: ['plugins/upgrade_assistant'],
savedObjectSchemas: {
'upgrade-assistant-reindex-operation': {
isNamespaceAgnostic: true,
Expand All @@ -30,41 +19,10 @@ export function upgradeAssistant(kibana: any) {
isNamespaceAgnostic: true,
},
},
styleSheetPaths: resolve(npSrc, 'application/index.scss'),
mappings,
},
publicDir: publicSrc,

config() {
return Joi.object({
enabled: Joi.boolean().default(true),
}).default();
},

init(server: Legacy.Server) {
// Add server routes and initialize the plugin here
const instance = plugin({} as any);

const { usageCollection, cloud } = server.newPlatform.setup.plugins;
instance.setup(server.newPlatform.setup.core, {
usageCollection,
cloud: cloud as CloudSetup,
__LEGACY: {
// Legacy objects
events: server.events,
savedObjects: server.savedObjects,

// Legacy functions
log: server.log.bind(server),

// Legacy plugins
plugins: {
elasticsearch: server.plugins.elasticsearch,
xpack_main: server.plugins.xpack_main,
},
},
});
},
init() {},
};
return new kibana.Plugin(config);
}
7 changes: 0 additions & 7 deletions x-pack/legacy/plugins/upgrade_assistant/public/index.ts

This file was deleted.

106 changes: 0 additions & 106 deletions x-pack/legacy/plugins/upgrade_assistant/public/legacy.ts

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions x-pack/legacy/plugins/upgrade_assistant/public/np_ready/plugin.ts

This file was deleted.

7 changes: 0 additions & 7 deletions x-pack/legacy/plugins/upgrade_assistant/server/index.ts

This file was deleted.

This file was deleted.

Loading