From 53ba3367202191619fc02584e25fad65b6a9c9c8 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Thu, 27 Nov 2025 18:28:33 -0500 Subject: [PATCH 01/16] feat: Added UI for AI v2 with a blank page --- .../shared/automatic_import_v2/kibana.jsonc | 3 +- .../create_integration/create_integration.tsx | 38 ++++++++++++++++ .../components/create_integration/index.tsx | 26 +++++++++++ .../components/create_integration/types.ts | 8 ++++ .../automatic_import_v2/public/index.ts | 14 ++++++ .../automatic_import_v2/public/plugin.ts | 43 +++++++++++++++++++ .../public/services/types.ts | 10 +++++ .../automatic_import_v2/public/types.ts | 36 ++++++++++++++++ .../plugins/shared/fleet/kibana.jsonc | 1 + .../integrations/hooks/use_breadcrumbs.tsx | 8 ++++ .../integrations/sections/epm/index.tsx | 9 +++- .../sections/epm/screens/create/index.tsx | 9 ++++ .../fleet/public/constants/page_paths.ts | 3 ++ .../plugins/shared/fleet/public/plugin.ts | 3 ++ 14 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/index.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/kibana.jsonc b/x-pack/platform/plugins/shared/automatic_import_v2/kibana.jsonc index 2f33f5a12e6f3..3f99f670f9818 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/kibana.jsonc +++ b/x-pack/platform/plugins/shared/automatic_import_v2/kibana.jsonc @@ -8,7 +8,7 @@ "plugin": { "id": "automaticImportVTwo", "server": true, - "browser": false, + "browser": true, "configPath": [ "xpack", "automatic_import_v2" @@ -23,5 +23,6 @@ "security", "taskManager" ], + "requiredBundles": [] } } diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx new file mode 100644 index 0000000000000..7f4cf1fc7757b --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx @@ -0,0 +1,38 @@ +/* + * 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 React from 'react'; +import { EuiText } from '@elastic/eui'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import type { Services } from '../../services/types'; + +interface CreateIntegrationProps { + services: Services; +} + +// TODO: Add TelemetryContextProvider +export const CreateIntegration = React.memo(({ services }) => ( + + + +)); +CreateIntegration.displayName = 'CreateIntegration'; + +// TODO: change to Router and navigation in a later task +const CreateIntegrationContent = React.memo(() => { + return ( + + + + +

Welcome to Automatic Import V2.

+
+
+
+ ); +}); +CreateIntegrationContent.displayName = 'CreateIntegrationContent'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx new file mode 100644 index 0000000000000..4d379e4809bfc --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx @@ -0,0 +1,26 @@ +/* + * 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 { EuiLoadingSpinner } from '@elastic/eui'; +import React, { Suspense } from 'react'; +import type { Services } from '../../services/types'; +import type { CreateIntegrationComponent } from './types'; + +const CreateIntegration = React.lazy(() => + import('./create_integration').then((module) => ({ + default: module.CreateIntegration, + })) +); + +export const getCreateIntegrationLazy = (services: Services): CreateIntegrationComponent => + React.memo(function CreateIntegrationLazy() { + return ( + }> + + + ); + }); diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts new file mode 100644 index 0000000000000..9fa3554d95040 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export type CreateIntegrationComponent = React.ComponentType; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/index.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/index.ts new file mode 100644 index 0000000000000..45f87184dff41 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/index.ts @@ -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 type { PluginInitializerContext } from '@kbn/core/public'; +import { AutomaticImportPlugin } from './plugin'; +export type { AutomaticImportPluginSetup, AutomaticImportPluginStart } from './types'; + +export function plugin(initializerContext: PluginInitializerContext) { + return new AutomaticImportPlugin(initializerContext); +} diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts new file mode 100644 index 0000000000000..137d4200bd6cc --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts @@ -0,0 +1,43 @@ +/* + * 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 { CoreStart, Plugin, CoreSetup, PluginInitializerContext } from '@kbn/core/public'; + +import { getCreateIntegrationLazy } from './components/create_integration'; +import type { + AutomaticImportPluginSetup, + AutomaticImportPluginStart, + AutomaticImportPluginStartDependencies, +} from './types'; + +export class AutomaticImportPlugin + implements Plugin +{ + constructor(private readonly initializerContext: PluginInitializerContext) {} + + public setup(core: CoreSetup): AutomaticImportPluginSetup { + return {}; + } + + public start( + core: CoreStart, + dependencies: AutomaticImportPluginStartDependencies + ): AutomaticImportPluginStart { + const services = { + ...core, + ...dependencies, + }; + + return { + components: { + CreateIntegration: getCreateIntegrationLazy(services), + }, + }; + } + + public stop() {} +} diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts new file mode 100644 index 0000000000000..c8dafeb04b12e --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts @@ -0,0 +1,10 @@ +/* + * 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 { CoreStart } from '@kbn/core/public'; +import type { AutomaticImportPluginStartDependencies } from '../types'; + +export type Services = CoreStart & AutomaticImportPluginStartDependencies; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts new file mode 100644 index 0000000000000..b46bd362f4ea8 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts @@ -0,0 +1,36 @@ +/* + * 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 { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/public'; +import type { + TriggersAndActionsUIPublicPluginSetup, + TriggersAndActionsUIPublicPluginStart, +} from '@kbn/triggers-actions-ui-plugin/public'; +import type { CreateIntegrationComponent } from './components/create_integration/types'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AutomaticImportPluginSetup {} + +export interface AutomaticImportPluginStart { + components: { + /** + * Component that allows the user to create an integration. + */ + CreateIntegration: CreateIntegrationComponent; + }; + + // TODO: Include renderUpselling function in the future +} + +export interface AutomaticImportPluginSetupDependencies { + triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; + licensing: LicensingPluginSetup; +} + +export interface AutomaticImportPluginStartDependencies { + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + licensing: LicensingPluginStart; +} diff --git a/x-pack/platform/plugins/shared/fleet/kibana.jsonc b/x-pack/platform/plugins/shared/fleet/kibana.jsonc index 9da130586c023..0e46d29599772 100644 --- a/x-pack/platform/plugins/shared/fleet/kibana.jsonc +++ b/x-pack/platform/plugins/shared/fleet/kibana.jsonc @@ -44,6 +44,7 @@ "discover", "ingestPipelines", "automaticImport", + "automaticImportVTwo", "alerting" ], "requiredBundles": [ diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx index 70fa3fed682f7..30d4e94bb8591 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx @@ -50,6 +50,14 @@ const breadcrumbGetters: { }), }, ], + integration_create_v2: () => [ + BASE_BREADCRUMB, + { + text: i18n.translate('xpack.fleet.breadcrumbs.createIntegrationV2PageTitle', { + defaultMessage: 'Create integration V2', + }), + }, + ], integration_details_overview: ({ pkgTitle }) => [BASE_BREADCRUMB, { text: pkgTitle }], integration_policy_edit: ({ pkgTitle, pkgkey, policyName }) => [ BASE_BREADCRUMB, diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx index 303951eaf9461..ea02f3fa56b2f 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx @@ -16,11 +16,11 @@ import { IntegrationsStateContextProvider, useBreadcrumbs, useStartServices } fr import { EPMHomePage } from './screens/home'; import { Detail } from './screens/detail'; import { Policy } from './screens/policy'; -import { CreateIntegration } from './screens/create'; +import { CreateIntegration, CreateIntegrationV2 } from './screens/create'; import { CustomLanguagesOverview } from './screens/detail/custom_languages_overview'; export const EPMApp: React.FunctionComponent = () => { - const { automaticImport } = useStartServices(); + const { automaticImport, automaticImportVTwo } = useStartServices(); useBreadcrumbs('integrations'); return ( @@ -45,6 +45,11 @@ export const EPMApp: React.FunctionComponent = () => { )} + {automaticImportVTwo && ( + + + + )} diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx index 7486870d16e54..cb84e76047de8 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx @@ -17,3 +17,12 @@ export const CreateIntegration = React.memo(() => { return CreateAutomaticImport ? : null; }); + +export const CreateIntegrationV2 = React.memo(() => { + const { automaticImportVTwo } = useStartServices(); + useBreadcrumbs('integration_create_v2'); + + const CreateAutomaticImportV2 = automaticImportVTwo?.components.CreateIntegration; + + return CreateAutomaticImportV2 ? : null; +}); diff --git a/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts b/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts index 5c712649b4582..5e1eac1ae7c36 100644 --- a/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts +++ b/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts @@ -12,6 +12,7 @@ export type StaticPage = | 'overview' | 'integrations' | 'integration_create' + | 'integration_create_v2' | 'policies' | 'policies_list' | 'enrollment_tokens' @@ -102,6 +103,7 @@ export const INTEGRATIONS_ROUTING_PATHS = { integrations_installed: '/installed/:category?', integrations_installed_updates_available: '/installed/updates_available/:category?', integrations_create: '/create', + integrations_create_v2: '/create_v2', integration_details: '/detail/:pkgkey/:panel?', integration_details_overview: '/detail/:pkgkey/overview', integration_details_policies: '/detail/:pkgkey/policies', @@ -170,6 +172,7 @@ export const pagePathGetters: { return [INTEGRATIONS_BASE_PATH, `/installed/updates_available${categoryPath}${queryParams}`]; }, integration_create: () => [INTEGRATIONS_BASE_PATH, `/create`], + integration_create_v2: () => [INTEGRATIONS_BASE_PATH, `/create_v2`], integration_details_overview: ({ pkgkey, integration, returnAppId, returnPath }) => { const qs = stringify({ integration, returnAppId, returnPath }); return [INTEGRATIONS_BASE_PATH, `/detail/${pkgkey}/overview${qs ? `?${qs}` : ''}`]; diff --git a/x-pack/platform/plugins/shared/fleet/public/plugin.ts b/x-pack/platform/plugins/shared/fleet/public/plugin.ts index 9370e67436776..366d7e5bdd6a8 100644 --- a/x-pack/platform/plugins/shared/fleet/public/plugin.ts +++ b/x-pack/platform/plugins/shared/fleet/public/plugin.ts @@ -53,6 +53,7 @@ import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import { Subject } from 'rxjs'; import type { AutomaticImportPluginStart } from '@kbn/automatic-import-plugin/public'; +import type { AutomaticImportPluginStart as AutomaticImportV2PluginStart } from '@kbn/automatic-import-v2-plugin/public'; import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; @@ -138,6 +139,7 @@ export interface FleetStartDeps { customIntegrations: CustomIntegrationsStart; share: SharePluginStart; automaticImport?: AutomaticImportPluginStart; + automaticImportVTwo?: AutomaticImportV2PluginStart; cloud?: CloudStart; usageCollection?: UsageCollectionStart; embeddable: EmbeddableStart; @@ -149,6 +151,7 @@ export interface FleetStartServices extends CoreStart, Exclude Date: Thu, 27 Nov 2025 23:44:36 +0000 Subject: [PATCH 02/16] Changes from node scripts/lint_packages --fix --- x-pack/platform/plugins/shared/fleet/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/fleet/tsconfig.json b/x-pack/platform/plugins/shared/fleet/tsconfig.json index 85e1c278f2c9e..6d0cad5781c96 100644 --- a/x-pack/platform/plugins/shared/fleet/tsconfig.json +++ b/x-pack/platform/plugins/shared/fleet/tsconfig.json @@ -125,6 +125,7 @@ "@kbn/spaces-utils", "@kbn/setup-node-env", "@kbn/react-query", - "@kbn/fs" + "@kbn/fs", + "@kbn/automatic-import-v2-plugin" ] } From a9aeb3707a000d3c69749d0264572dca7cbf5210 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:03:46 +0000 Subject: [PATCH 03/16] Changes from node scripts/regenerate_moon_projects.js --update --- x-pack/platform/plugins/shared/fleet/moon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/platform/plugins/shared/fleet/moon.yml b/x-pack/platform/plugins/shared/fleet/moon.yml index 49d31d63418e7..6366471f5ec5d 100644 --- a/x-pack/platform/plugins/shared/fleet/moon.yml +++ b/x-pack/platform/plugins/shared/fleet/moon.yml @@ -118,6 +118,7 @@ dependsOn: - '@kbn/setup-node-env' - '@kbn/react-query' - '@kbn/fs' + - '@kbn/automatic-import-v2-plugin' tags: - plugin - prod From 6d5256b73e8dbbdca8cf7c5fd70df28c27853089 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Thu, 27 Nov 2025 21:47:23 -0500 Subject: [PATCH 04/16] fix: ts errors --- .../plugins/shared/automatic_import_v2/public/plugin.ts | 2 +- .../platform/plugins/shared/automatic_import_v2/tsconfig.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts index 137d4200bd6cc..e74e46a4c6cc3 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts @@ -17,7 +17,7 @@ import type { export class AutomaticImportPlugin implements Plugin { - constructor(private readonly initializerContext: PluginInitializerContext) {} + constructor(_: PluginInitializerContext) {} public setup(core: CoreSetup): AutomaticImportPluginSetup { return {}; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json b/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json index 41780c043ce7f..338cc54f95429 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json +++ b/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json @@ -5,6 +5,7 @@ }, "include": [ "index.ts", + "public/**/*", "server/**/*.ts", "common/**/*.ts", "../../../../typings/**/*" @@ -31,5 +32,8 @@ "@kbn/core-saved-objects-server-mocks", "@kbn/task-manager-plugin", "@kbn/inference-langchain", + "@kbn/kibana-react-plugin", + "@kbn/triggers-actions-ui-plugin", + "@kbn/shared-ux-page-kibana-template" ] } From e0c1e8901c8d7ab005de2b60ac2f4d319691dd9a Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 28 Nov 2025 03:46:36 +0000 Subject: [PATCH 05/16] Changes from node scripts/regenerate_moon_projects.js --update --- x-pack/platform/plugins/shared/automatic_import_v2/moon.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml b/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml index 84ccaf3b61dd6..baf968627aaf5 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml +++ b/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml @@ -35,6 +35,9 @@ dependsOn: - '@kbn/storage-adapter' - '@kbn/core-saved-objects-server-mocks' - '@kbn/inference-langchain' + - '@kbn/kibana-react-plugin' + - '@kbn/triggers-actions-ui-plugin' + - '@kbn/shared-ux-page-kibana-template' - '@kbn/core-application-common' - '@kbn/i18n' - '@kbn/features-plugin' @@ -48,6 +51,7 @@ tags: fileGroups: src: - index.ts + - public/**/* - server/**/*.ts - common/**/*.ts - '!target/**/*' From 77fc2f7d51f1b963c9f72ade1f10b459f9c9e45b Mon Sep 17 00:00:00 2001 From: robester0403 Date: Fri, 28 Nov 2025 10:03:14 -0500 Subject: [PATCH 06/16] chore: update bundle limits due to adding new plugin --- packages/kbn-optimizer/limits.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 391443430f6c4..b05ed76ae28f0 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -3,17 +3,18 @@ pageLoadAssetSize: advancedSettings: 6196 aiAssistantManagementSelection: 10000 aiops: 15359 - alerting: 28395 + alerting: 144525 apm: 38573 apmSourcesAccess: 2278 automaticImport: 12162 + automaticImportVTwo: 4694 banners: 4087 canvas: 15142 cases: 153204 charts: 40269 cloud: 10648 cloudDataMigration: 5687 - cloudDefend: 7718 + cloudDefend: 62958 cloudExperiments: 103984 cloudFullStory: 4752 cloudLinks: 36333 @@ -22,7 +23,7 @@ pageLoadAssetSize: contentConnectors: 33014 contentManagement: 8350 controls: 12234 - core: 569774 + core: 565220 cps: 5918 crossClusterReplication: 12662 customIntegrations: 11715 @@ -94,7 +95,6 @@ pageLoadAssetSize: kibanaReact: 22503 kibanaUsageCollection: 1736 kibanaUtils: 54848 - kubernetesSecurity: 77234 lens: 71718 licenseManagement: 8265 licensing: 10073 @@ -103,7 +103,6 @@ pageLoadAssetSize: logsDataAccess: 7900 logsShared: 101273 logstash: 15882 - maintenanceWindows: 3883 management: 12951 maps: 45917 mapsEms: 6734 @@ -112,10 +111,10 @@ pageLoadAssetSize: ml: 89000 mockIdpPlugin: 7544 monitoring: 28983 - navigation: 14705 + navigation: 14703 newsfeed: 12371 noDataPage: 1749 - observability: 107955 + observability: 107797 observabilityAIAssistant: 52556 observabilityAIAssistantApp: 16012 observabilityAiAssistantManagement: 6438 @@ -157,12 +156,12 @@ pageLoadAssetSize: searchSynonyms: 6371 security: 79627 securitySolution: 119378 - securitySolutionEss: 43319 - securitySolutionServerless: 62689 - serverless: 7852 - serverlessObservability: 23774 - serverlessSearch: 31189 - serverlessWorkplaceAI: 7279 + securitySolutionEss: 38689 + securitySolutionServerless: 52082 + serverless: 7451 + serverlessObservability: 19472 + serverlessSearch: 26393 + serverlessWorkplaceAI: 6736 sessionView: 47912 share: 58677 slo: 36645 From da7741403c2a8fe6412a97083df55adaa3e4abd3 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Fri, 28 Nov 2025 11:05:25 -0500 Subject: [PATCH 07/16] Chore: update limits --- packages/kbn-optimizer/limits.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index b05ed76ae28f0..8051ab87031b5 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -3,7 +3,7 @@ pageLoadAssetSize: advancedSettings: 6196 aiAssistantManagementSelection: 10000 aiops: 15359 - alerting: 144525 + alerting: 26932 apm: 38573 apmSourcesAccess: 2278 automaticImport: 12162 @@ -14,7 +14,7 @@ pageLoadAssetSize: charts: 40269 cloud: 10648 cloudDataMigration: 5687 - cloudDefend: 62958 + cloudDefend: 8146 cloudExperiments: 103984 cloudFullStory: 4752 cloudLinks: 36333 @@ -95,6 +95,7 @@ pageLoadAssetSize: kibanaReact: 22503 kibanaUsageCollection: 1736 kibanaUtils: 54848 + kubernetesSecurity: 6807 lens: 71718 licenseManagement: 8265 licensing: 10073 @@ -103,6 +104,7 @@ pageLoadAssetSize: logsDataAccess: 7900 logsShared: 101273 logstash: 15882 + maintenanceWindows: 3905 management: 12951 maps: 45917 mapsEms: 6734 From a580dc29877f93040bfb447ffafb7215ff24b9f4 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Mon, 1 Dec 2025 12:15:14 -0500 Subject: [PATCH 08/16] Chore: Removed changes to fleet folder, renamed create integration to Integration Management, refactored code --- .../automatic_import_v2/common/constants.ts | 8 ++++ .../automatic_import_v2/common/index.ts | 1 - .../public/application.tsx | 43 +++++++++++++++++++ .../create_integration/create_integration.tsx | 38 ---------------- .../components/create_integration/index.tsx | 26 ----------- .../integration_management/index.tsx | 29 +++++++++++++ .../integration_management.tsx | 23 ++++++++++ .../types.ts | 2 +- .../automatic_import_v2/public/plugin.ts | 28 ++++++++++-- .../automatic_import_v2/public/types.ts | 8 ++-- .../plugins/shared/fleet/kibana.jsonc | 1 - .../integrations/hooks/use_breadcrumbs.tsx | 8 ---- .../integrations/sections/epm/index.tsx | 9 +--- .../sections/epm/screens/create/index.tsx | 9 ---- .../fleet/public/constants/page_paths.ts | 3 -- .../plugins/shared/fleet/public/plugin.ts | 3 -- .../plugins/shared/fleet/tsconfig.json | 11 ++--- 17 files changed, 137 insertions(+), 113 deletions(-) create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/common/constants.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx delete mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx delete mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/integration_management.tsx rename x-pack/platform/plugins/shared/automatic_import_v2/public/components/{create_integration => integration_management}/types.ts (79%) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/common/constants.ts b/x-pack/platform/plugins/shared/automatic_import_v2/common/constants.ts new file mode 100644 index 0000000000000..f22bc6e166f03 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/common/constants.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ +export const PLUGIN_ID = 'automaticImportV2'; +export const PLUGIN_NAME = 'Automatic Import V2'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/common/index.ts b/x-pack/platform/plugins/shared/automatic_import_v2/common/index.ts index 73bce9317db68..3da90fe909a56 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/common/index.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/common/index.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - export type { CreateAutoImportIntegrationRequestBody, CreateAutoImportIntegrationResponse, diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx new file mode 100644 index 0000000000000..cf58209a74c18 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx @@ -0,0 +1,43 @@ +/* + * 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 React from 'react'; +import ReactDOM from 'react-dom'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { IntegrationManagement } from './components/integration_management/integration_management'; +import type { Services } from './services/types'; +import type { AutomaticImportPluginStartDependencies } from './types'; + +export const renderApp = ({ + coreStart, + plugins, + params, +}: { + coreStart: CoreStart; + plugins: AutomaticImportPluginStartDependencies; + params: AppMountParameters; +}) => { + const { element } = params; + const services: Services = { + ...coreStart, + ...plugins, + }; + + ReactDOM.render( + coreStart.rendering.addContext( + + + + ), + element + ); + + return () => { + ReactDOM.unmountComponentAtNode(element); + }; +}; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx deleted file mode 100644 index 7f4cf1fc7757b..0000000000000 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/create_integration.tsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 React from 'react'; -import { EuiText } from '@elastic/eui'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; -import type { Services } from '../../services/types'; - -interface CreateIntegrationProps { - services: Services; -} - -// TODO: Add TelemetryContextProvider -export const CreateIntegration = React.memo(({ services }) => ( - - - -)); -CreateIntegration.displayName = 'CreateIntegration'; - -// TODO: change to Router and navigation in a later task -const CreateIntegrationContent = React.memo(() => { - return ( - - - - -

Welcome to Automatic Import V2.

-
-
-
- ); -}); -CreateIntegrationContent.displayName = 'CreateIntegrationContent'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx deleted file mode 100644 index 4d379e4809bfc..0000000000000 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/index.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { EuiLoadingSpinner } from '@elastic/eui'; -import React, { Suspense } from 'react'; -import type { Services } from '../../services/types'; -import type { CreateIntegrationComponent } from './types'; - -const CreateIntegration = React.lazy(() => - import('./create_integration').then((module) => ({ - default: module.CreateIntegration, - })) -); - -export const getCreateIntegrationLazy = (services: Services): CreateIntegrationComponent => - React.memo(function CreateIntegrationLazy() { - return ( - }> - - - ); - }); diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx new file mode 100644 index 0000000000000..efc7f270487ba --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx @@ -0,0 +1,29 @@ +/* + * 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 { EuiLoadingSpinner } from '@elastic/eui'; +import React, { Suspense } from 'react'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import type { Services } from '../../services/types'; +import type { IntegrationManagementComponent } from './types'; + +const IntegrationManagementLazy = React.lazy(() => + import('./integration_management').then((module) => ({ + default: module.IntegrationManagement, + })) +); + +export const getIntegrationManagementLazy = (services: Services): IntegrationManagementComponent => + React.memo(function IntegrationManagement() { + return ( + + }> + + + + ); + }); diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/integration_management.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/integration_management.tsx new file mode 100644 index 0000000000000..8b03bb21e75d7 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/integration_management.tsx @@ -0,0 +1,23 @@ +/* + * 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 React from 'react'; +import { EuiText } from '@elastic/eui'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; + +export const IntegrationManagement = React.memo(() => { + return ( + + + + +

Welcome to Automatic Import V2 Integration Management.

+
+
+
+ ); +}); +IntegrationManagement.displayName = 'IntegrationManagement'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts similarity index 79% rename from x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts rename to x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts index 9fa3554d95040..1deb06a7982c2 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/create_integration/types.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts @@ -5,4 +5,4 @@ * 2.0. */ -export type CreateIntegrationComponent = React.ComponentType; +export type IntegrationManagementComponent = React.ComponentType; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts index e74e46a4c6cc3..c4b8b4efe1132 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts @@ -5,9 +5,16 @@ * 2.0. */ -import type { CoreStart, Plugin, CoreSetup, PluginInitializerContext } from '@kbn/core/public'; +import type { + CoreStart, + Plugin, + CoreSetup, + PluginInitializerContext, + AppMountParameters, +} from '@kbn/core/public'; -import { getCreateIntegrationLazy } from './components/create_integration'; +import { PLUGIN_ID, PLUGIN_NAME } from '../common/constants'; +import { getIntegrationManagementLazy } from './components/integration_management'; import type { AutomaticImportPluginSetup, AutomaticImportPluginStart, @@ -19,7 +26,20 @@ export class AutomaticImportPlugin { constructor(_: PluginInitializerContext) {} - public setup(core: CoreSetup): AutomaticImportPluginSetup { + public setup( + core: CoreSetup + ): AutomaticImportPluginSetup { + core.application.register({ + id: PLUGIN_ID, + title: PLUGIN_NAME, + visibleIn: [], + async mount(params: AppMountParameters) { + const { renderApp } = await import('./application'); + const [coreStart, plugins] = await core.getStartServices(); + return renderApp({ coreStart, plugins, params }); + }, + }); + return {}; } @@ -34,7 +54,7 @@ export class AutomaticImportPlugin return { components: { - CreateIntegration: getCreateIntegrationLazy(services), + IntegrationManagement: getIntegrationManagementLazy(services), }, }; } diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts index b46bd362f4ea8..2c9d0ce1e311d 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts @@ -9,7 +9,7 @@ import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import type { CreateIntegrationComponent } from './components/create_integration/types'; +import type { IntegrationManagementComponent } from './components/integration_management/types'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface AutomaticImportPluginSetup {} @@ -17,12 +17,10 @@ export interface AutomaticImportPluginSetup {} export interface AutomaticImportPluginStart { components: { /** - * Component that allows the user to create an integration. + * Component that allows the user to manage an integration. */ - CreateIntegration: CreateIntegrationComponent; + IntegrationManagement: IntegrationManagementComponent; }; - - // TODO: Include renderUpselling function in the future } export interface AutomaticImportPluginSetupDependencies { diff --git a/x-pack/platform/plugins/shared/fleet/kibana.jsonc b/x-pack/platform/plugins/shared/fleet/kibana.jsonc index 0e46d29599772..9da130586c023 100644 --- a/x-pack/platform/plugins/shared/fleet/kibana.jsonc +++ b/x-pack/platform/plugins/shared/fleet/kibana.jsonc @@ -44,7 +44,6 @@ "discover", "ingestPipelines", "automaticImport", - "automaticImportVTwo", "alerting" ], "requiredBundles": [ diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx index 30d4e94bb8591..70fa3fed682f7 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/hooks/use_breadcrumbs.tsx @@ -50,14 +50,6 @@ const breadcrumbGetters: { }), }, ], - integration_create_v2: () => [ - BASE_BREADCRUMB, - { - text: i18n.translate('xpack.fleet.breadcrumbs.createIntegrationV2PageTitle', { - defaultMessage: 'Create integration V2', - }), - }, - ], integration_details_overview: ({ pkgTitle }) => [BASE_BREADCRUMB, { text: pkgTitle }], integration_policy_edit: ({ pkgTitle, pkgkey, policyName }) => [ BASE_BREADCRUMB, diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx index ea02f3fa56b2f..303951eaf9461 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/index.tsx @@ -16,11 +16,11 @@ import { IntegrationsStateContextProvider, useBreadcrumbs, useStartServices } fr import { EPMHomePage } from './screens/home'; import { Detail } from './screens/detail'; import { Policy } from './screens/policy'; -import { CreateIntegration, CreateIntegrationV2 } from './screens/create'; +import { CreateIntegration } from './screens/create'; import { CustomLanguagesOverview } from './screens/detail/custom_languages_overview'; export const EPMApp: React.FunctionComponent = () => { - const { automaticImport, automaticImportVTwo } = useStartServices(); + const { automaticImport } = useStartServices(); useBreadcrumbs('integrations'); return ( @@ -45,11 +45,6 @@ export const EPMApp: React.FunctionComponent = () => { )} - {automaticImportVTwo && ( - - - - )} diff --git a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx index cb84e76047de8..7486870d16e54 100644 --- a/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/create/index.tsx @@ -17,12 +17,3 @@ export const CreateIntegration = React.memo(() => { return CreateAutomaticImport ? : null; }); - -export const CreateIntegrationV2 = React.memo(() => { - const { automaticImportVTwo } = useStartServices(); - useBreadcrumbs('integration_create_v2'); - - const CreateAutomaticImportV2 = automaticImportVTwo?.components.CreateIntegration; - - return CreateAutomaticImportV2 ? : null; -}); diff --git a/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts b/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts index 5e1eac1ae7c36..5c712649b4582 100644 --- a/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts +++ b/x-pack/platform/plugins/shared/fleet/public/constants/page_paths.ts @@ -12,7 +12,6 @@ export type StaticPage = | 'overview' | 'integrations' | 'integration_create' - | 'integration_create_v2' | 'policies' | 'policies_list' | 'enrollment_tokens' @@ -103,7 +102,6 @@ export const INTEGRATIONS_ROUTING_PATHS = { integrations_installed: '/installed/:category?', integrations_installed_updates_available: '/installed/updates_available/:category?', integrations_create: '/create', - integrations_create_v2: '/create_v2', integration_details: '/detail/:pkgkey/:panel?', integration_details_overview: '/detail/:pkgkey/overview', integration_details_policies: '/detail/:pkgkey/policies', @@ -172,7 +170,6 @@ export const pagePathGetters: { return [INTEGRATIONS_BASE_PATH, `/installed/updates_available${categoryPath}${queryParams}`]; }, integration_create: () => [INTEGRATIONS_BASE_PATH, `/create`], - integration_create_v2: () => [INTEGRATIONS_BASE_PATH, `/create_v2`], integration_details_overview: ({ pkgkey, integration, returnAppId, returnPath }) => { const qs = stringify({ integration, returnAppId, returnPath }); return [INTEGRATIONS_BASE_PATH, `/detail/${pkgkey}/overview${qs ? `?${qs}` : ''}`]; diff --git a/x-pack/platform/plugins/shared/fleet/public/plugin.ts b/x-pack/platform/plugins/shared/fleet/public/plugin.ts index 366d7e5bdd6a8..9370e67436776 100644 --- a/x-pack/platform/plugins/shared/fleet/public/plugin.ts +++ b/x-pack/platform/plugins/shared/fleet/public/plugin.ts @@ -53,7 +53,6 @@ import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import { Subject } from 'rxjs'; import type { AutomaticImportPluginStart } from '@kbn/automatic-import-plugin/public'; -import type { AutomaticImportPluginStart as AutomaticImportV2PluginStart } from '@kbn/automatic-import-v2-plugin/public'; import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; @@ -139,7 +138,6 @@ export interface FleetStartDeps { customIntegrations: CustomIntegrationsStart; share: SharePluginStart; automaticImport?: AutomaticImportPluginStart; - automaticImportVTwo?: AutomaticImportV2PluginStart; cloud?: CloudStart; usageCollection?: UsageCollectionStart; embeddable: EmbeddableStart; @@ -151,7 +149,6 @@ export interface FleetStartServices extends CoreStart, Exclude Date: Mon, 1 Dec 2025 17:52:49 +0000 Subject: [PATCH 09/16] Changes from node scripts/regenerate_moon_projects.js --update --- x-pack/platform/plugins/shared/fleet/moon.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/fleet/moon.yml b/x-pack/platform/plugins/shared/fleet/moon.yml index 6366471f5ec5d..49d31d63418e7 100644 --- a/x-pack/platform/plugins/shared/fleet/moon.yml +++ b/x-pack/platform/plugins/shared/fleet/moon.yml @@ -118,7 +118,6 @@ dependsOn: - '@kbn/setup-node-env' - '@kbn/react-query' - '@kbn/fs' - - '@kbn/automatic-import-v2-plugin' tags: - plugin - prod From 48793dbfc868f126e0853f9ad10007711f8fa64e Mon Sep 17 00:00:00 2001 From: robester0403 Date: Tue, 2 Dec 2025 18:03:35 -0500 Subject: [PATCH 10/16] feat: added telemetry and prospective list of events to be used. --- .../public/application.tsx | 10 +- .../types.ts => common/hooks/index.ts} | 2 +- .../public/common/hooks/use_kibana.ts | 11 ++ .../public/common/index.ts | 8 + .../integration_management/index.tsx | 29 --- .../integration_management/telemetry.tsx | 153 +++++++++++++++ .../automatic_import_v2/public/plugin.ts | 29 +-- .../public/services/index.ts | 8 + .../public/services/telemetry/events.ts | 175 ++++++++++++++++++ .../services/telemetry/mocks/service.ts | 14 ++ .../public/services/telemetry/service.ts | 42 +++++ .../public/services/telemetry/types.ts | 68 +++++++ .../public/services/types.ts | 6 +- .../automatic_import_v2/public/types.ts | 11 +- 14 files changed, 510 insertions(+), 56 deletions(-) rename x-pack/platform/plugins/shared/automatic_import_v2/public/{components/integration_management/types.ts => common/hooks/index.ts} (79%) create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/use_kibana.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/common/index.ts delete mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/telemetry.tsx create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/index.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/events.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/mocks/service.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/service.ts create mode 100644 x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/types.ts diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx index cf58209a74c18..0626cb942bf5e 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/application.tsx @@ -4,34 +4,40 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import React from 'react'; import ReactDOM from 'react-dom'; import type { AppMountParameters, CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { IntegrationManagement } from './components/integration_management/integration_management'; +import { TelemetryContextProvider } from './components/integration_management/telemetry'; import type { Services } from './services/types'; +import type { TelemetryService } from './services/telemetry/service'; import type { AutomaticImportPluginStartDependencies } from './types'; export const renderApp = ({ coreStart, plugins, params, + telemetry, }: { coreStart: CoreStart; plugins: AutomaticImportPluginStartDependencies; params: AppMountParameters; + telemetry: TelemetryService; }) => { const { element } = params; const services: Services = { ...coreStart, ...plugins, + telemetry, }; ReactDOM.render( coreStart.rendering.addContext( - + + + ), element diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/index.ts similarity index 79% rename from x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts rename to x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/index.ts index 1deb06a7982c2..9687863a35e28 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/types.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export type IntegrationManagementComponent = React.ComponentType; +export { useKibana } from './use_kibana'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/use_kibana.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/use_kibana.ts new file mode 100644 index 0000000000000..440c504d6b334 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/hooks/use_kibana.ts @@ -0,0 +1,11 @@ +/* + * 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 { useKibana as _useKibana } from '@kbn/kibana-react-plugin/public'; +import type { Services } from '../../services'; + +export const useKibana = () => _useKibana(); diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/common/index.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/index.ts new file mode 100644 index 0000000000000..686556a7b5d68 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/common/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { useKibana } from './hooks'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx deleted file mode 100644 index efc7f270487ba..0000000000000 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 { EuiLoadingSpinner } from '@elastic/eui'; -import React, { Suspense } from 'react'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import type { Services } from '../../services/types'; -import type { IntegrationManagementComponent } from './types'; - -const IntegrationManagementLazy = React.lazy(() => - import('./integration_management').then((module) => ({ - default: module.IntegrationManagement, - })) -); - -export const getIntegrationManagementLazy = (services: Services): IntegrationManagementComponent => - React.memo(function IntegrationManagement() { - return ( - - }> - - - - ); - }); diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/telemetry.tsx b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/telemetry.tsx new file mode 100644 index 0000000000000..6c1e4ddfa01d8 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/components/integration_management/telemetry.tsx @@ -0,0 +1,153 @@ +/* + * 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 React, { useCallback, useMemo, useRef } from 'react'; +import { v4 as uuidV4 } from 'uuid'; +import { TelemetryEventType } from '../../services/telemetry/types'; +import { useKibana } from '../../common/hooks/use_kibana'; + +type ReportIntegrationManagementOpen = () => void; + +type ReportDataStreamFlyoutOpen = (params: { datastreamName: string }) => void; + +type ReportUploadLogsComplete = (params: { datastreamName: string; error?: string }) => void; + +type ReportViewResultsFlyoutOpen = (params: { + datastreamName: string; + sampleRows: number; + model: string; + provider: string; + error?: string; +}) => void; + +type ReportAutomaticImportComplete = (params: { + integrationName: string; + integrationDescription: string; + dataStreamNames: string[]; + inputTypes: string[]; + actionTypeId: string; + model: string; + provider: string; + error?: string; +}) => void; + +interface TelemetryContextProps { + reportIntegrationManagementOpen: ReportIntegrationManagementOpen; + reportDataStreamFlyoutOpen: ReportDataStreamFlyoutOpen; + reportUploadLogsComplete: ReportUploadLogsComplete; + reportViewResultsFlyoutOpen: ReportViewResultsFlyoutOpen; + reportAutomaticImportComplete: ReportAutomaticImportComplete; +} + +const TelemetryContext = React.createContext(null); + +/** + * Hook to easily use telemetry reporting functions. + * Restricted by the events defined in the telemetry service. + * @throws Error if used outside provider + */ +export const useTelemetry = () => { + const context = React.useContext(TelemetryContext); + if (!context) { + throw new Error('useTelemetry must be used within a TelemetryContextProvider'); + } + return context; +}; + +export const TelemetryContextProvider: React.FC<{ children: React.ReactNode }> = React.memo( + ({ children }) => { + const sessionData = useRef({ sessionId: uuidV4(), startedAt: Date.now() }); + const { telemetry } = useKibana().services; + + const reportIntegrationManagementOpen = useCallback(() => { + const sessionId = uuidV4(); + sessionData.current = { sessionId, startedAt: Date.now() }; + telemetry.reportEvent(TelemetryEventType.IntegrationManagementOpen, { + sessionId, + }); + }, [telemetry]); + + const reportDataStreamFlyoutOpen = useCallback( + ({ datastreamName }) => { + telemetry.reportEvent(TelemetryEventType.CreateManageDataStreamFlyoutOpen, { + sessionId: sessionData.current.sessionId, + datastreamName, + }); + }, + [telemetry] + ); + + const reportUploadLogsComplete = useCallback( + ({ datastreamName, error }) => { + telemetry.reportEvent(TelemetryEventType.UploadDatastreamLogsZipCompleteData, { + datastreamName, + errorMessage: error, + }); + }, + [telemetry] + ); + + const reportViewResultsFlyoutOpen = useCallback( + ({ datastreamName, sampleRows, model, provider, error }) => { + telemetry.reportEvent(TelemetryEventType.ViewResultsFlyoutOpen, { + sessionId: sessionData.current.sessionId, + datastreamName, + sampleRows, + model, + provider, + errorMessage: error, + }); + }, + [telemetry] + ); + + const reportAutomaticImportComplete = useCallback( + ({ + integrationName, + integrationDescription, + dataStreamNames, + inputTypes, + actionTypeId, + model, + provider, + error, + }) => { + telemetry.reportEvent(TelemetryEventType.AutomaticImportComplete, { + sessionId: sessionData.current.sessionId, + integrationName, + integrationDescription, + dataStreamNames, + inputTypes, + actionTypeId, + model, + provider, + errorMessage: error, + }); + }, + [telemetry] + ); + + const value = useMemo( + () => ({ + reportIntegrationManagementOpen, + reportDataStreamFlyoutOpen, + reportUploadLogsComplete, + reportViewResultsFlyoutOpen, + reportAutomaticImportComplete, + }), + [ + reportIntegrationManagementOpen, + reportDataStreamFlyoutOpen, + reportUploadLogsComplete, + reportViewResultsFlyoutOpen, + reportAutomaticImportComplete, + ] + ); + + return {children}; + } +); +TelemetryContextProvider.displayName = 'TelemetryContextProvider'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts index c4b8b4efe1132..95c69c775f32c 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts @@ -14,21 +14,26 @@ import type { } from '@kbn/core/public'; import { PLUGIN_ID, PLUGIN_NAME } from '../common/constants'; -import { getIntegrationManagementLazy } from './components/integration_management'; import type { AutomaticImportPluginSetup, AutomaticImportPluginStart, AutomaticImportPluginStartDependencies, } from './types'; +import { Telemetry } from './services/telemetry/service'; export class AutomaticImportPlugin implements Plugin { + private telemetry = new Telemetry(); + constructor(_: PluginInitializerContext) {} public setup( core: CoreSetup ): AutomaticImportPluginSetup { + this.telemetry.setup(core.analytics); + + const telemetry = this.telemetry; core.application.register({ id: PLUGIN_ID, title: PLUGIN_NAME, @@ -36,7 +41,12 @@ export class AutomaticImportPlugin async mount(params: AppMountParameters) { const { renderApp } = await import('./application'); const [coreStart, plugins] = await core.getStartServices(); - return renderApp({ coreStart, plugins, params }); + return renderApp({ + coreStart, + plugins, + params, + telemetry: telemetry.start(), + }); }, }); @@ -44,19 +54,10 @@ export class AutomaticImportPlugin } public start( - core: CoreStart, - dependencies: AutomaticImportPluginStartDependencies + _core: CoreStart, + _dependencies: AutomaticImportPluginStartDependencies ): AutomaticImportPluginStart { - const services = { - ...core, - ...dependencies, - }; - - return { - components: { - IntegrationManagement: getIntegrationManagementLazy(services), - }, - }; + return {}; } public stop() {} diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/index.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/index.ts new file mode 100644 index 0000000000000..c78eb48c12739 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ +export type * from './types'; +export { Telemetry } from './telemetry/service'; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/events.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/events.ts new file mode 100644 index 0000000000000..05fd93ac0f94e --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/events.ts @@ -0,0 +1,175 @@ +/* + * 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 { RootSchema } from '@kbn/core-analytics-browser'; +import { TelemetryEventType, type TelemetryEventTypeData } from './types'; + +type TelemetryEventsSchemas = { + [T in TelemetryEventType]: RootSchema>; +}; + +/** + * telemetryEventsSchemas + * Defines the schema for each of the event types + * */ +export const telemetryEventsSchemas: TelemetryEventsSchemas = { + [TelemetryEventType.IntegrationManagementOpen]: { + sessionId: { + type: 'keyword', + _meta: { + description: 'The ID to identify all the events the same session', + optional: false, + }, + }, + }, + [TelemetryEventType.CreateManageDataStreamFlyoutOpen]: { + sessionId: { + type: 'keyword', + _meta: { + description: 'The ID to identify all the events the same session', + optional: false, + }, + }, + datastreamName: { + type: 'keyword', + _meta: { + description: 'The name of the data stream', + optional: false, + }, + }, + }, + [TelemetryEventType.UploadDatastreamLogsZipCompleteData]: { + datastreamName: { + type: 'keyword', + _meta: { + description: 'The name of the data stream', + optional: false, + }, + }, + errorMessage: { + type: 'text', + _meta: { + description: 'The error message if the upload failed', + optional: true, + }, + }, + }, + [TelemetryEventType.ViewResultsFlyoutOpen]: { + sessionId: { + type: 'keyword', + _meta: { + description: 'The ID to identify all the events the same session', + optional: false, + }, + }, + datastreamName: { + type: 'keyword', + _meta: { + description: 'The name of the data stream', + optional: false, + }, + }, + sampleRows: { + type: 'long', + _meta: { + description: 'The number of sample rows', + optional: false, + }, + }, + errorMessage: { + type: 'text', + _meta: { + description: 'The error message if the upload failed', + optional: true, + }, + }, + model: { + type: 'keyword', + _meta: { + description: 'The model used to generate the integration', + optional: false, + }, + }, + provider: { + type: 'keyword', + _meta: { + description: 'The provider of the LLM', + optional: false, + }, + }, + }, + [TelemetryEventType.AutomaticImportComplete]: { + sessionId: { + type: 'keyword', + _meta: { + description: 'The ID to identify all the events the same session', + optional: false, + }, + }, + integrationName: { + type: 'keyword', + _meta: { + description: 'The name of the integration', + optional: false, + }, + }, + integrationDescription: { + type: 'keyword', + _meta: { + description: 'The description of the integration', + optional: false, + }, + }, + dataStreamNames: { + type: 'array', + items: { + type: 'keyword', + _meta: { + description: 'The name of the data stream', + optional: false, + }, + }, + }, + inputTypes: { + type: 'array', + items: { + type: 'keyword', + _meta: { + description: 'The input type', + optional: false, + }, + }, + }, + actionTypeId: { + type: 'keyword', + _meta: { + description: 'The action type ID', + optional: false, + }, + }, + model: { + type: 'keyword', + _meta: { + description: 'The model used to generate the integration', + optional: false, + }, + }, + provider: { + type: 'keyword', + _meta: { + description: 'The provider of the LLM', + optional: false, + }, + }, + errorMessage: { + type: 'text', + _meta: { + description: 'The error message if the upload failed', + optional: true, + }, + }, + }, +}; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/mocks/service.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/mocks/service.ts new file mode 100644 index 0000000000000..63b7aa1fa4ba5 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/mocks/service.ts @@ -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. + */ + +export const mockReportEvent = jest.fn(); + +export const telemetryServiceMock = { + createStart: () => ({ + reportEvent: mockReportEvent, + }), +}; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/service.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/service.ts new file mode 100644 index 0000000000000..647cd79df37eb --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/service.ts @@ -0,0 +1,42 @@ +/* + * 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 { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; +import { telemetryEventsSchemas } from './events'; +import type { TelemetryEventType, TelemetryEventTypeData } from './types'; + +export interface TelemetryService { + reportEvent: ( + eventType: T, + eventData: TelemetryEventTypeData + ) => void; +} + +/** + * Service that interacts with the Core's analytics module + */ +export class Telemetry { + private analytics?: AnalyticsServiceSetup; + + public setup(analytics: AnalyticsServiceSetup) { + this.analytics = analytics; + + Object.entries(telemetryEventsSchemas).forEach(([eventType, schema]) => { + const event = { eventType, schema }; + analytics.registerEventType>(event); + }); + } + + public start(): TelemetryService { + const reportEvent = this.analytics?.reportEvent.bind(this.analytics); + if (!reportEvent) { + throw new Error( + 'The Telemetry.setup() method has not been invoked, be sure to call it during the plugin setup.' + ); + } + return { reportEvent }; + } +} diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/types.ts new file mode 100644 index 0000000000000..51e527adb8434 --- /dev/null +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/telemetry/types.ts @@ -0,0 +1,68 @@ +/* + * 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. + */ + +// Prospective Event type definitions +export enum TelemetryEventType { + IntegrationManagementOpen = 'integration_management_open', + CreateManageDataStreamFlyoutOpen = 'create_manage_data_stream_flyout_open', + UploadDatastreamLogsZipCompleteData = 'upload_integration_logs_zip_complete', + ViewResultsFlyoutOpen = 'view_results_flyout_open', + AutomaticImportComplete = 'automatic_import_complete', +} + +// Prospective rough draft event data definitions +interface IntegrationManagementOpenData { + sessionId: string; +} + +interface CreateManageDataStreamFlyoutOpenData { + sessionId: string; + datastreamName: string; +} + +interface UploadDatastreamLogsZipCompleteData { + datastreamName: string; + errorMessage?: string; +} + +interface ViewResultsFlyoutOpenData { + sessionId: string; + datastreamName: string; + sampleRows: number; + errorMessage?: string; + model: string; + provider: string; +} + +interface AutomaticImportCompleteData { + sessionId: string; + integrationName: string; + integrationDescription: string; + dataStreamNames: string[]; + inputTypes: string[]; + actionTypeId: string; + model: string; + provider: string; + errorMessage?: string; +} + +/** + * TelemetryEventTypeData + * Defines the relation between event types and their corresponding event data + * */ +export type TelemetryEventTypeData = + T extends TelemetryEventType.IntegrationManagementOpen + ? IntegrationManagementOpenData + : T extends TelemetryEventType.UploadDatastreamLogsZipCompleteData + ? UploadDatastreamLogsZipCompleteData + : T extends TelemetryEventType.CreateManageDataStreamFlyoutOpen + ? CreateManageDataStreamFlyoutOpenData + : T extends TelemetryEventType.ViewResultsFlyoutOpen + ? ViewResultsFlyoutOpenData + : T extends TelemetryEventType.AutomaticImportComplete + ? AutomaticImportCompleteData + : never; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts index c8dafeb04b12e..1f3b0c2cf07dc 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/services/types.ts @@ -6,5 +6,9 @@ */ import type { CoreStart } from '@kbn/core/public'; import type { AutomaticImportPluginStartDependencies } from '../types'; +import type { TelemetryService } from './telemetry/service'; -export type Services = CoreStart & AutomaticImportPluginStartDependencies; +export type Services = CoreStart & + AutomaticImportPluginStartDependencies & { + telemetry: TelemetryService; + }; diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts index 2c9d0ce1e311d..48d1555a522b2 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/types.ts @@ -9,19 +9,12 @@ import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import type { IntegrationManagementComponent } from './components/integration_management/types'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface AutomaticImportPluginSetup {} -export interface AutomaticImportPluginStart { - components: { - /** - * Component that allows the user to manage an integration. - */ - IntegrationManagement: IntegrationManagementComponent; - }; -} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AutomaticImportPluginStart {} export interface AutomaticImportPluginSetupDependencies { triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; From 1f49afc99fb600dff6c58d6097d1bf4bd6decda4 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Wed, 3 Dec 2025 10:47:56 -0500 Subject: [PATCH 11/16] fix: merge linter issues --- .../plugins/shared/automatic_import_v2/public/plugin.ts | 7 ++++--- .../data_management/schema_editor/flyout/index.tsx | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts index 7fc734f944dc7..95c69c775f32c 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts +++ b/x-pack/platform/plugins/shared/automatic_import_v2/public/plugin.ts @@ -22,10 +22,11 @@ import type { import { Telemetry } from './services/telemetry/service'; export class AutomaticImportPlugin - implements Plugin { + implements Plugin +{ private telemetry = new Telemetry(); - constructor(_: PluginInitializerContext) { } + constructor(_: PluginInitializerContext) {} public setup( core: CoreSetup @@ -59,5 +60,5 @@ export class AutomaticImportPlugin return {}; } - public stop() { } + public stop() {} } diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx index ffc7a1cb0caa0..0f9e15f0ee918 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx @@ -116,6 +116,7 @@ export const SchemaEditorFlyout = ({ {isIgnoredField && ( Date: Wed, 3 Dec 2025 10:51:19 -0500 Subject: [PATCH 12/16] Fix: Revert unneeded changes from merge --- x-pack/platform/plugins/shared/fleet/tsconfig.json | 8 +++++--- .../data_management/schema_editor/flyout/index.tsx | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/platform/plugins/shared/fleet/tsconfig.json b/x-pack/platform/plugins/shared/fleet/tsconfig.json index fdc65bcc5043f..85e1c278f2c9e 100644 --- a/x-pack/platform/plugins/shared/fleet/tsconfig.json +++ b/x-pack/platform/plugins/shared/fleet/tsconfig.json @@ -3,9 +3,7 @@ "compilerOptions": { "outDir": "target/types" }, - "exclude": [ - "target/**/*" - ], + "exclude": ["target/**/*"], "include": [ // add all the folders containing files to be compiled ".storybook/**/*", @@ -21,17 +19,20 @@ "kbn_references": [ "@kbn/core", // add references to other TypeScript projects the plugin depends on + // requiredPlugins from ./kibana.json "@kbn/licensing-plugin", "@kbn/data-plugin", "@kbn/encrypted-saved-objects-plugin", "@kbn/files-plugin", + // optionalPlugins from ./kibana.json "@kbn/security-plugin", "@kbn/features-plugin", "@kbn/cloud-plugin", "@kbn/usage-collection-plugin", "@kbn/home-plugin", + // requiredBundles from ./kibana.json "@kbn/kibana-react-plugin", "@kbn/es-ui-shared-plugin", @@ -42,6 +43,7 @@ "@kbn/share-plugin", "@kbn/i18n-react", "@kbn/custom-integrations-plugin", + // packages "@kbn/core-application-common", "@kbn/core-capabilities-common", diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx index 0f9e15f0ee918..ffc7a1cb0caa0 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/schema_editor/flyout/index.tsx @@ -116,7 +116,6 @@ export const SchemaEditorFlyout = ({ {isIgnoredField && ( Date: Wed, 3 Dec 2025 11:47:25 -0500 Subject: [PATCH 13/16] Fix: removed unneeded optimizer changes --- packages/kbn-optimizer/limits.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index ecbf63fa22105..4afa6e475e8a8 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -23,10 +23,7 @@ pageLoadAssetSize: contentConnectors: 33014 contentManagement: 8350 controls: 12234 - - core: 564938 - cps: 5918 crossClusterReplication: 12662 customIntegrations: 11715 @@ -160,10 +157,7 @@ pageLoadAssetSize: searchQueryRules: 6689 searchSynonyms: 6371 security: 79627 - - securitySolution: 187862 - securitySolutionEss: 38689 securitySolutionServerless: 52082 serverless: 7451 From ce682aeaadb4d6da916d7d450771b35b7f774fd8 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:25:34 +0000 Subject: [PATCH 14/16] Changes from node scripts/lint_ts_projects --fix --- .../platform/plugins/shared/automatic_import_v2/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json b/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json index 79b3bb1453355..d7d008b62eee4 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json +++ b/x-pack/platform/plugins/shared/automatic_import_v2/tsconfig.json @@ -37,6 +37,7 @@ "@kbn/core-application-common", "@kbn/i18n", "@kbn/features-plugin", - "@kbn/task-manager-plugin" + "@kbn/task-manager-plugin", + "@kbn/core-analytics-browser" ] } From ad44adbb2a958ca8ca0bb1384e4fc60a13932c65 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:54:08 +0000 Subject: [PATCH 15/16] Changes from node scripts/regenerate_moon_projects.js --update --- x-pack/platform/plugins/shared/automatic_import_v2/moon.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml b/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml index baf968627aaf5..41e48cf7b27b9 100644 --- a/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml +++ b/x-pack/platform/plugins/shared/automatic_import_v2/moon.yml @@ -42,6 +42,7 @@ dependsOn: - '@kbn/i18n' - '@kbn/features-plugin' - '@kbn/task-manager-plugin' + - '@kbn/core-analytics-browser' tags: - plugin - prod From e8813a112f1c37b9b1cc97b54f615e6eb1f198b8 Mon Sep 17 00:00:00 2001 From: robester0403 Date: Wed, 3 Dec 2025 13:49:07 -0500 Subject: [PATCH 16/16] Chore: update limits --- packages/kbn-optimizer/limits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 4afa6e475e8a8..1e082a68ee868 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -7,7 +7,7 @@ pageLoadAssetSize: apm: 38573 apmSourcesAccess: 2278 automaticImport: 12162 - automaticImportVTwo: 4694 + automaticImportVTwo: 8223 banners: 4087 canvas: 15142 cases: 153204