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

Migrate dashboard mode #69305

Merged
merged 7 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -11,7 +11,7 @@
"xpack.dashboard": "plugins/dashboard_enhanced",
"xpack.discover": "plugins/discover_enhanced",
"xpack.crossClusterReplication": "plugins/cross_cluster_replication",
"xpack.dashboardMode": "legacy/plugins/dashboard_mode",
"xpack.dashboardMode": "plugins/dashboard_mode",
"xpack.data": "plugins/data_enhanced",
"xpack.embeddableEnhanced": "plugins/embeddable_enhanced",
"xpack.endpoint": "plugins/endpoint",
Expand Down
4 changes: 1 addition & 3 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { xpackMain } from './legacy/plugins/xpack_main';
import { monitoring } from './legacy/plugins/monitoring';
import { security } from './legacy/plugins/security';
import { dashboardMode } from './legacy/plugins/dashboard_mode';
import { beats } from './legacy/plugins/beats_management';
import { spaces } from './legacy/plugins/spaces';
import { ingestManager } from './legacy/plugins/ingest_manager';
Expand All @@ -18,8 +17,7 @@ module.exports = function (kibana) {
monitoring(kibana),
spaces(kibana),
security(kibana),
dashboardMode(kibana),
beats(kibana),
ingestManager(kibana),
beats(kibana),
];
};
64 changes: 0 additions & 64 deletions x-pack/legacy/plugins/dashboard_mode/index.js

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions x-pack/legacy/plugins/ingest_manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { resolve } from 'path';
export function ingestManager(kibana: any) {
return new kibana.Plugin({
id: 'ingestManager',
require: ['kibana', 'elasticsearch', 'xpack_main'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elastic/ingest-management
Could you please help me to deal with that broken CI test apis Fleet Endpoints fleet_setup should create a fleet_enroll user and role ?

Not sure that it's somehow related to my changes but looks like my PR forced that problem #68568

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on my local it works fine.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

@elastic/ingest-management Could someone help out here, please?

Copy link
Member

Choose a reason for hiding this comment

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

For this error, we currently have an external dependency in our tests (to the package registry), we are working to have it running locally, and avoid these one time errors.

Copy link
Contributor Author

@alexwizp alexwizp Jun 18, 2020

Choose a reason for hiding this comment

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

@nchaulet I changed the order of the tests a bit. Now everything passes. Could you take a look at this PR?

I was able to reproduce this problem locally, and it seems now everything is working correctly

publicDir: resolve(__dirname, '../../../plugins/ingest_manager/public'),
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/

export { createDashboardModeRequestInterceptor } from './dashboard_mode_request_interceptor';
export const UI_SETTINGS = {
CONFIG_DASHBOARD_ONLY_MODE_ROLES: 'xpackDashboardMode:roles',
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/

export * from './constants';
export { UI_SETTINGS } from './constants';
7 changes: 5 additions & 2 deletions x-pack/plugins/dashboard_mode/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
"version": "8.0.0",
"kibanaVersion": "kibana",
"configPath": [
"xpack", "dashboard_mode"
"xpack",
"dashboard_mode"
],
"optionalPlugins": ["security"],
"requiredPlugins": [
"kibanaLegacy", "dashboard"
"kibanaLegacy",
"dashboard"
],
"server": true,
"ui": true
Expand Down
14 changes: 8 additions & 6 deletions x-pack/plugins/dashboard_mode/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { PluginConfigDescriptor } from 'kibana/server';

import { PluginConfigDescriptor, PluginInitializerContext } from 'kibana/server';
import { schema } from '@kbn/config-schema';

import { DashboardModeServerPlugin } from './plugin';

export const config: PluginConfigDescriptor = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
};

export const plugin = () => ({
setup() {},
start() {},
});
export function plugin(initializerContext: PluginInitializerContext) {
return new DashboardModeServerPlugin(initializerContext);
}

export { DashboardModeServerPlugin as Plugin };
Loading