diff --git a/x-pack/plugins/observability_solution/investigate_app/public/plugin.tsx b/x-pack/plugins/observability_solution/investigate_app/public/plugin.tsx index 53cae81320a7e5..0443da536e317a 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/plugin.tsx @@ -7,6 +7,7 @@ import { css } from '@emotion/css'; import { AppMountParameters, + AppStatus, APP_WRAPPER_CLASS, CoreSetup, CoreStart, @@ -41,10 +42,13 @@ export class InvestigateAppPlugin > { logger: Logger; + config: ConfigSchema; constructor(context: PluginInitializerContext) { this.logger = context.logger.get(); + this.config = context.config.get(); } + setup( coreSetup: CoreSetup, pluginsSetup: InvestigateAppSetupDependencies @@ -52,17 +56,18 @@ export class InvestigateAppPlugin coreSetup.application.register({ id: INVESTIGATE_APP_ID, title: i18n.translate('xpack.investigateApp.appTitle', { - defaultMessage: 'Observability AI Assistant', + defaultMessage: 'Observability Investigate', }), euiIconType: 'logoObservability', appRoute: '/app/investigate', category: DEFAULT_APP_CATEGORIES.observability, + status: this.config.enabled ? AppStatus.accessible : AppStatus.inaccessible, visibleIn: [], deepLinks: [ { id: 'investigate', - title: i18n.translate('xpack.investigateApp.investigateDeepLinkTitle', { - defaultMessage: 'Investigate', + title: i18n.translate('xpack.investigateApp.newInvestigateDeepLinkTitle', { + defaultMessage: 'New investigation', }), path: '/new', }, diff --git a/x-pack/plugins/observability_solution/investigate_app/public/types.ts b/x-pack/plugins/observability_solution/investigate_app/public/types.ts index af3657b712b597..660a9ca9c8d1da 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/types.ts +++ b/x-pack/plugins/observability_solution/investigate_app/public/types.ts @@ -30,7 +30,9 @@ import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/ /* eslint-disable @typescript-eslint/no-empty-interface*/ -export interface ConfigSchema {} +export interface ConfigSchema { + enabled: boolean; +} export interface InvestigateAppSetupDependencies { investigate: InvestigatePublicSetup; diff --git a/x-pack/plugins/observability_solution/investigate_app/server/config.ts b/x-pack/plugins/observability_solution/investigate_app/server/config.ts index e49356ade1c1a5..10f9804506015f 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/config.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/config.ts @@ -8,7 +8,7 @@ import { schema, type TypeOf } from '@kbn/config-schema'; export const config = schema.object({ - enabled: schema.boolean({ defaultValue: true }), + enabled: schema.boolean({ defaultValue: false }), }); export type InvestigateAppConfig = TypeOf; diff --git a/x-pack/plugins/observability_solution/investigate_app/server/index.ts b/x-pack/plugins/observability_solution/investigate_app/server/index.ts index 0ffe06b430cea9..bed166115a3889 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/index.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/index.ts @@ -4,9 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { PluginInitializer, PluginInitializerContext } from '@kbn/core/server'; -import { InvestigateAppConfig } from './config'; - +import type { + PluginConfigDescriptor, + PluginInitializer, + PluginInitializerContext, +} from '@kbn/core/server'; +import type { InvestigateAppConfig } from './config'; import { InvestigateAppPlugin } from './plugin'; import type { InvestigateAppServerSetup, @@ -14,11 +17,19 @@ import type { InvestigateAppSetupDependencies, InvestigateAppStartDependencies, } from './types'; +import { config as configSchema } from './config'; export type { InvestigateAppServerRouteRepository } from './routes/get_global_investigate_app_server_route_repository'; export type { InvestigateAppServerSetup, InvestigateAppServerStart }; +export const config: PluginConfigDescriptor = { + schema: configSchema, + exposeToBrowser: { + enabled: true, + }, +}; + export const plugin: PluginInitializer< InvestigateAppServerSetup, InvestigateAppServerStart,