[Serverless] Disable ux plugin (#170637)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Shahzad 2023-11-06 17:30:22 +01:00 committed by GitHub
parent d398606134
commit 2a01db9d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 60 additions and 2 deletions

View file

@ -147,4 +147,8 @@ xpack.task_manager.requeue_invalid_tasks.enabled: true
# Reporting feature
xpack.screenshotting.enabled: false
xpack.reporting.roles.enabled: false
xpack.reporting.statefulSettings.enabled: false
xpack.reporting.statefulSettings.enabled: false
# Disabled Observability plugins
xpack.ux.enabled: false

View file

@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { PluginConfigDescriptor } from '@kbn/core/server';
import { schema, TypeOf } from '@kbn/config-schema';
const uxConfig = schema.object({
enabled: schema.boolean({ defaultValue: true }),
});
export const config: PluginConfigDescriptor = {
schema: uxConfig,
};
export type UXConfig = TypeOf<typeof uxConfig>;

View file

@ -4,7 +4,7 @@
"owner": "@elastic/uptime",
"plugin": {
"id": "ux",
"server": false,
"server": true,
"browser": true,
"configPath": ["xpack", "ux"],
"requiredPlugins": [

View file

@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { PluginInitializerContext } from '@kbn/core/server';
import { Plugin } from './plugin';
export const plugin = (initializerContext: PluginInitializerContext) =>
new Plugin();
export { config } from '../common/config';

View file

@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { CoreStart, CoreSetup, Plugin as PluginType } from '@kbn/core/server';
export class Plugin implements PluginType {
constructor() {}
public setup(core: CoreSetup, plugins: {}) {
return {};
}
public start(coreStart: CoreStart, pluginsStart: {}) {}
public stop() {}
}

View file

@ -7,6 +7,7 @@
"../../../typings/**/*",
"common/**/*",
"public/**/*",
"server/**/*",
"typings/**/*",
"public/**/*.json",
],
@ -40,6 +41,7 @@
"@kbn/observability-shared-plugin",
"@kbn/shared-ux-router",
"@kbn/observability-ai-assistant-plugin",
"@kbn/config-schema",
],
"exclude": [
"target/**/*",