diff --git a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts index 0b856b639a5617..9d14c3f1f73172 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts @@ -152,7 +152,6 @@ export const applicationUsageSchema = { fleet: commonSchema, integrations: commonSchema, ingestManager: commonSchema, - investigate: commonSchema, lens: commonSchema, maps: commonSchema, ml: commonSchema, diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index ee72c6e949968b..ebd98b2190c124 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -4325,137 +4325,6 @@ } } }, - "investigate": { - "properties": { - "appId": { - "type": "keyword", - "_meta": { - "description": "The application being tracked" - } - }, - "viewId": { - "type": "keyword", - "_meta": { - "description": "Always `main`" - } - }, - "clicks_total": { - "type": "long", - "_meta": { - "description": "General number of clicks in the application since we started counting them" - } - }, - "clicks_7_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the application over the last 7 days" - } - }, - "clicks_30_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the application over the last 30 days" - } - }, - "clicks_90_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the application over the last 90 days" - } - }, - "minutes_on_screen_total": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen since we started counting them." - } - }, - "minutes_on_screen_7_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen over the last 7 days" - } - }, - "minutes_on_screen_30_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen over the last 30 days" - } - }, - "minutes_on_screen_90_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen over the last 90 days" - } - }, - "views": { - "type": "array", - "items": { - "properties": { - "appId": { - "type": "keyword", - "_meta": { - "description": "The application being tracked" - } - }, - "viewId": { - "type": "keyword", - "_meta": { - "description": "The application view being tracked" - } - }, - "clicks_total": { - "type": "long", - "_meta": { - "description": "General number of clicks in the application sub view since we started counting them" - } - }, - "clicks_7_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the active application sub view over the last 7 days" - } - }, - "clicks_30_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the active application sub view over the last 30 days" - } - }, - "clicks_90_days": { - "type": "long", - "_meta": { - "description": "General number of clicks in the active application sub view over the last 90 days" - } - }, - "minutes_on_screen_total": { - "type": "float", - "_meta": { - "description": "Minutes the application sub view is active and on-screen since we started counting them." - } - }, - "minutes_on_screen_7_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen active application sub view over the last 7 days" - } - }, - "minutes_on_screen_30_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen active application sub view over the last 30 days" - } - }, - "minutes_on_screen_90_days": { - "type": "float", - "_meta": { - "description": "Minutes the application is active and on-screen active application sub view over the last 90 days" - } - } - } - } - } - } - }, "lens": { "properties": { "appId": { 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,