Skip to content

Commit 28f46ce

Browse files
Merge branch 'master' into task/ingest-68914-datasource-api-hooks
2 parents 1758eb8 + 572d006 commit 28f46ce

File tree

21 files changed

+418
-363
lines changed

21 files changed

+418
-363
lines changed

x-pack/.i18nrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"xpack.dashboard": "plugins/dashboard_enhanced",
1212
"xpack.discover": "plugins/discover_enhanced",
1313
"xpack.crossClusterReplication": "plugins/cross_cluster_replication",
14-
"xpack.dashboardMode": "legacy/plugins/dashboard_mode",
14+
"xpack.dashboardMode": "plugins/dashboard_mode",
1515
"xpack.data": "plugins/data_enhanced",
1616
"xpack.embeddableEnhanced": "plugins/embeddable_enhanced",
1717
"xpack.endpoint": "plugins/endpoint",

x-pack/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import { xpackMain } from './legacy/plugins/xpack_main';
88
import { monitoring } from './legacy/plugins/monitoring';
99
import { security } from './legacy/plugins/security';
10-
import { dashboardMode } from './legacy/plugins/dashboard_mode';
1110
import { beats } from './legacy/plugins/beats_management';
1211
import { spaces } from './legacy/plugins/spaces';
1312
import { ingestManager } from './legacy/plugins/ingest_manager';
@@ -18,8 +17,7 @@ module.exports = function (kibana) {
1817
monitoring(kibana),
1918
spaces(kibana),
2019
security(kibana),
21-
dashboardMode(kibana),
22-
beats(kibana),
2320
ingestManager(kibana),
21+
beats(kibana),
2422
];
2523
};

x-pack/legacy/plugins/dashboard_mode/index.js

Lines changed: 0 additions & 64 deletions
This file was deleted.

x-pack/legacy/plugins/dashboard_mode/server/__tests__/dashboard_mode_request_interceptor.js

Lines changed: 0 additions & 163 deletions
This file was deleted.

x-pack/legacy/plugins/dashboard_mode/server/dashboard_mode_request_interceptor.js

Lines changed: 0 additions & 73 deletions
This file was deleted.

x-pack/legacy/plugins/ingest_manager/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { resolve } from 'path';
88
export function ingestManager(kibana: any) {
99
return new kibana.Plugin({
1010
id: 'ingestManager',
11+
require: ['kibana', 'elasticsearch', 'xpack_main'],
1112
publicDir: resolve(__dirname, '../../../plugins/ingest_manager/public'),
1213
});
1314
}

x-pack/legacy/plugins/dashboard_mode/server/index.js renamed to x-pack/plugins/dashboard_mode/common/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export { createDashboardModeRequestInterceptor } from './dashboard_mode_request_interceptor';
7+
export const UI_SETTINGS = {
8+
CONFIG_DASHBOARD_ONLY_MODE_ROLES: 'xpackDashboardMode:roles',
9+
};

x-pack/legacy/plugins/dashboard_mode/common/index.js renamed to x-pack/plugins/dashboard_mode/common/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export * from './constants';
7+
export { UI_SETTINGS } from './constants';

x-pack/plugins/dashboard_mode/kibana.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
"version": "8.0.0",
44
"kibanaVersion": "kibana",
55
"configPath": [
6-
"xpack", "dashboard_mode"
6+
"xpack",
7+
"dashboard_mode"
78
],
9+
"optionalPlugins": ["security"],
810
"requiredPlugins": [
9-
"kibanaLegacy", "dashboard"
11+
"kibanaLegacy",
12+
"dashboard"
1013
],
1114
"server": true,
1215
"ui": true

x-pack/plugins/dashboard_mode/server/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { PluginConfigDescriptor } from 'kibana/server';
8-
7+
import { PluginConfigDescriptor, PluginInitializerContext } from 'kibana/server';
98
import { schema } from '@kbn/config-schema';
109

10+
import { DashboardModeServerPlugin } from './plugin';
11+
1112
export const config: PluginConfigDescriptor = {
1213
schema: schema.object({
1314
enabled: schema.boolean({ defaultValue: true }),
1415
}),
1516
};
1617

17-
export const plugin = () => ({
18-
setup() {},
19-
start() {},
20-
});
18+
export function plugin(initializerContext: PluginInitializerContext) {
19+
return new DashboardModeServerPlugin(initializerContext);
20+
}
21+
22+
export { DashboardModeServerPlugin as Plugin };

0 commit comments

Comments
 (0)