diff --git a/.buildkite/ftr_search_stateful_configs.yml b/.buildkite/ftr_search_stateful_configs.yml index 2d945df7accfd..3c64da3e23ef0 100644 --- a/.buildkite/ftr_search_stateful_configs.yml +++ b/.buildkite/ftr_search_stateful_configs.yml @@ -8,5 +8,4 @@ enabled: - x-pack/test/functional/apps/search_playground/config.ts - x-pack/solutions/search/test/functional/config/config.feature_flags.ts - x-pack/solutions/search/test/api_integration/apis/search_playground/config.ts - - x-pack/solutions/search/test/api_integration/apis/guided_onboarding/config.ts - x-pack/solutions/search/test/functional_solution_sidenav/config.ts diff --git a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/__snapshots__/guide_cards.test.tsx.snap b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/__snapshots__/guide_cards.test.tsx.snap index f02f50b835766..a9345b08e5a00 100644 --- a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/__snapshots__/guide_cards.test.tsx.snap +++ b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/__snapshots__/guide_cards.test.tsx.snap @@ -4,47 +4,6 @@ exports[`guide cards snapshots should render all cards 1`] = ` - - - , - } - } - />, - } - } - guidesState={Array []} - navigateToApp={[MockFunction]} - /> - - - - - , - }} - /> - ), - guideId: 'databaseSearch', - telemetryId: 'onboarding--search--database', - order: 1, - }, { solution: 'security', icon: 'securitySignal', diff --git a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/guide_filters.tsx b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/guide_filters.tsx index 139c0c61b2a3b..360d79891dba2 100644 --- a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/guide_filters.tsx +++ b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/classic_version/guide_filters.tsx @@ -66,19 +66,6 @@ export const GuideFilters = ({ activeFilter, setActiveFilter, application }: Gui /> - - - - - ): GuideCardConstants[] => [ - { - solution: 'search', - icon: 'pivot', - title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.elasticsearchApi.title', { - defaultMessage: 'Connect to the Elasticsearch API', - }), - telemetryId: 'onboarding--search--elasticsearchEndpointApi', - order: 1, - openEndpointModal: true, - }, - { - solution: 'search', - icon: 'database', - title: ( - , - }} - /> - ), - guideId: 'databaseSearch', - telemetryId: 'onboarding--search--database', - order: 1, - }, { solution: 'security', icon: 'securitySignal', diff --git a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/guide/guide_filters.tsx b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/guide/guide_filters.tsx index 54ecf4a2a0a48..97bd2e847b02d 100644 --- a/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/guide/guide_filters.tsx +++ b/src/platform/packages/shared/kbn-guided-onboarding/src/components/landing_page/guide/guide_filters.tsx @@ -66,20 +66,6 @@ export const GuideFilters = ({ return ( - - - - - { // check that production guides are present - ['siem', 'databaseSearch'].map((guideId) => { + ['siem'].map((guideId) => { it(`returns config for ${guideId}`, async () => { const response = await supertest .get(`${getConfigsPath}/${guideId}`) diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 6c8b63a52bb39..26a54766ada18 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -3944,12 +3944,10 @@ "guidedOnboarding.quitGuideModal.quitButtonLabel": "Quitter le guide", "guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "Sécuriser mes ressources cloud {lineBreak} grâce à la gestion du niveau de sécurité du cloud (CSPM)", "guidedOnboardingPackage.gettingStarted.cards.completeLabel": "Guide terminé", - "guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "Rechercher dans les bases de données {lineBreak} et les systèmes d'entreprise", "guidedOnboardingPackage.gettingStarted.cards.hostsSecurity.title": "Sécuriser mes hôtes {lineBreak} avec Endpoint Security", "guidedOnboardingPackage.gettingStarted.cards.progressLabel": "{numberCompleteSteps} étapes terminées sur {numberSteps}", "guidedOnboardingPackage.gettingStarted.cards.siemSecurity.title": "Détecter les menaces dans mes {lineBreak} données avec SIEM", "guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "Tous", - "guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch", "guidedOnboardingPackage.gettingStarted.guideFilter.security.buttonLabel": "Security", "home.addData.addDataButtonLabel": "Ajouter des intégrations", "home.addData.illustration.alt.text": "Illustration des intégrations de données Elastic", @@ -16937,14 +16935,6 @@ "xpack.enterpriseSearch.gettingStarted.pageTitle": "Prise en main de l'API d'Elastic", "xpack.enterpriseSearch.gettingStarted.pipeline.description": "Utilisez {ingestPipelinesLink} pour préparer vos données avant leur indexation dans Elasticsearch, ce qui est souvent plus facile que le post-traitement. Utilisez n'importe quelle combinaison de processeurs d'ingestion pour ajouter, supprimer ou transformer les champs dans vos documents.", "xpack.enterpriseSearch.gettingStarted.pipeline.description.createButtonLabel": "Créer un pipeline", - "xpack.enterpriseSearch.guideConfig.addDataStep.description": "Ingérez vos données, créez un index et enrichissez vos données avec des pipelines d'ingestion et d'inférence personnalisables.", - "xpack.enterpriseSearch.guideConfig.addDataStep.title": "Ajouter des données", - "xpack.enterpriseSearch.guideConfig.description": "Nous vous aiderons à créer une expérience de recherche avec vos données à l'aide du robot d'indexation, des connecteurs et des API d'Elastic.", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.description": "Découvrez plus d'informations sur Elastic Search UI, essayez notre tutoriel Search UI pour Elasticsearch et créez une expérience de recherche.", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverDescription": "Prenez le temps de découvrir comment utiliser l'interface utilisateur de recherche pour créer des expériences de recherche de classe mondiale. Lorsque vous serez prêt, cliquez sur le bouton Guide de configuration pour continuer.", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverTitle": "Explorer l'interface utilisateur de recherche", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.title": "Créer une expérience de recherche", - "xpack.enterpriseSearch.guideConfig.title": "Construire des expériences de recherche avec Elasticsearch", "xpack.enterpriseSearch.hiddenText": "Texte masqué", "xpack.enterpriseSearch.index.connector.rule.basicTable.policyTitle": "Politique", "xpack.enterpriseSearch.index.connector.syncRules.basicTable.fieldTitle": "Champ", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 606438b59674d..6e25f77d0594d 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -3946,12 +3946,10 @@ "guidedOnboarding.quitGuideModal.quitButtonLabel": "ガイドを終了", "guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "クラウドセキュリティ態勢管理(CSPM)でクラウド{lineBreak}資産を保護", "guidedOnboardingPackage.gettingStarted.cards.completeLabel": "ガイド完了", - "guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "データベースと{lineBreak}ビジネスシステムで検索", "guidedOnboardingPackage.gettingStarted.cards.hostsSecurity.title": "エンドポイントセキュリティで{lineBreak}ホストを保護", "guidedOnboardingPackage.gettingStarted.cards.progressLabel": "{numberCompleteSteps}/{numberSteps}ステップが完了しました", "guidedOnboardingPackage.gettingStarted.cards.siemSecurity.title": "SIEMで{lineBreak}データに存在する脅威を検出", "guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "すべて", - "guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch", "guidedOnboardingPackage.gettingStarted.guideFilter.security.buttonLabel": "セキュリティ", "home.addData.addDataButtonLabel": "統合の追加", "home.addData.illustration.alt.text": "Elasticデータ統合の例", @@ -16955,14 +16953,6 @@ "xpack.enterpriseSearch.gettingStarted.pageTitle": "Elastic APIを使いはじめる", "xpack.enterpriseSearch.gettingStarted.pipeline.description": "{ingestPipelinesLink}を使うと、Elasticsearchにインデックス化される前にデータを前処理することができます。通常、これは後処理よりも大幅に簡単です。インジェストプロセッサーを自由に組み合わせて、ドキュメント内のフィールドを追加、削除、変換できます。", "xpack.enterpriseSearch.gettingStarted.pipeline.description.createButtonLabel": "パイプラインを作成", - "xpack.enterpriseSearch.guideConfig.addDataStep.description": "カスタマイズ可能なインジェストパイプラインと推論パイプラインにより、データのインジェスト、インデックスの作成、データのリッチ化を実現します。", - "xpack.enterpriseSearch.guideConfig.addDataStep.title": "データの追加", - "xpack.enterpriseSearch.guideConfig.description": "Elasticのウェブクローラー、コネクター、APIを使って、お客様のデータで検索体験を構築するお手伝いをします。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.description": "ElasticのSearch UIの詳細については、ElasticsearchのSearch UIチュートリアルを試し、検索体験を構築してください。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverDescription": "Search UIを使用して、世界クラスの検索エクスペリエンスを構築する方法についてご覧ください。準備ができたら、[セットアップガイド]ボタンをクリックして続行します。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverTitle": "Search UIを見る", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.title": "検索エクスペリエンスを構築", - "xpack.enterpriseSearch.guideConfig.title": "Elasticsearchで検索エクスペリエンスを構築", "xpack.enterpriseSearch.hiddenText": "非表示のテキスト", "xpack.enterpriseSearch.index.connector.rule.basicTable.policyTitle": "ポリシー", "xpack.enterpriseSearch.index.connector.syncRules.basicTable.fieldTitle": "フィールド", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 27cbc51844859..0a0c8734b5b38 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -3940,11 +3940,9 @@ "guidedOnboarding.quitGuideModal.quitButtonLabel": "退出指南", "guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "借助云{lineBreak}安全态势管理 (CSPM) 保护我的云资产", "guidedOnboardingPackage.gettingStarted.cards.completeLabel": "指南完成", - "guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "跨数据库和{lineBreak}业务系统进行搜索", "guidedOnboardingPackage.gettingStarted.cards.progressLabel": "已完成 {numberCompleteSteps} 个(共 {numberSteps} 个)步骤", "guidedOnboardingPackage.gettingStarted.cards.siemSecurity.title": "通过 SIEM{lineBreak}在我的数据中检测威胁", "guidedOnboardingPackage.gettingStarted.guideFilter.all.buttonLabel": "全部", - "guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel": "Elasticsearch", "guidedOnboardingPackage.gettingStarted.guideFilter.security.buttonLabel": "安全", "home.addData.addDataButtonLabel": "添加集成", "home.addData.illustration.alt.text": "Elastic 数据集成的图示", @@ -16949,14 +16947,6 @@ "xpack.enterpriseSearch.gettingStarted.pageTitle": "开始使用 Elastic API", "xpack.enterpriseSearch.gettingStarted.pipeline.description": "使用 {ingestPipelinesLink} 在将您的数据索引到 Elasticsearch 之前预处理这些数据,这通常比后期处理更加方便。使用采集处理器的任意组合在您的文档中添加、删除或转换字段。", "xpack.enterpriseSearch.gettingStarted.pipeline.description.createButtonLabel": "创建管道", - "xpack.enterpriseSearch.guideConfig.addDataStep.description": "采集您的数据,创建索引,并使用可定制采集和推理管道扩充您的数据。", - "xpack.enterpriseSearch.guideConfig.addDataStep.title": "添加数据", - "xpack.enterpriseSearch.guideConfig.description": "我们将帮助您使用 Elastic 的网络爬虫、连接器和 API,利用您的数据构建搜索体验。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.description": "详细了解 Elastic 的搜索 UI,试用 Elasticsearch 的搜索 UI 教程,并构建搜索体验。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverDescription": "花时间了解如何使用搜索 UI 构建世界级的搜索体验。准备就绪后,单击“设置指南”按钮继续。", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverTitle": "了解搜索 UI", - "xpack.enterpriseSearch.guideConfig.searchExperienceStep.title": "构建搜索体验", - "xpack.enterpriseSearch.guideConfig.title": "使用 Elasticsearch 构建搜索体验", "xpack.enterpriseSearch.hiddenText": "隐藏文本", "xpack.enterpriseSearch.index.connector.rule.basicTable.policyTitle": "策略", "xpack.enterpriseSearch.index.connector.syncRules.basicTable.fieldTitle": "字段", diff --git a/x-pack/solutions/search/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts b/x-pack/solutions/search/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts deleted file mode 100644 index 084e69e00ad9b..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/common/guided_onboarding/search_guide_config.ts +++ /dev/null @@ -1,84 +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 type { GuideConfig, StepConfig } from '@kbn/guided-onboarding'; -import { i18n } from '@kbn/i18n'; - -export const databaseSearchGuideId = 'databaseSearch'; - -const apiRoutes = { - [databaseSearchGuideId]: '/connectors/select_connector', -}; - -export type EnterpriseSearchGuideIds = typeof databaseSearchGuideId; - -const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => { - return { - id: 'add_data', - title: i18n.translate('xpack.enterpriseSearch.guideConfig.addDataStep.title', { - defaultMessage: 'Add data', - }), - description: i18n.translate('xpack.enterpriseSearch.guideConfig.addDataStep.description', { - defaultMessage: - 'Ingest your data, create an index, and enrich your data with customizable ingest and inference pipelines.', - }), - location: { - appID: 'enterpriseSearchContent', - path: `${method ? apiRoutes[method] : '/search_indices/new_index'}`, - }, - }; -}; - -const getSearchExperienceStep: () => StepConfig = () => { - return { - id: 'search_experience', - title: i18n.translate('xpack.enterpriseSearch.guideConfig.searchExperienceStep.title', { - defaultMessage: 'Build a search experience', - }), - description: i18n.translate( - 'xpack.enterpriseSearch.guideConfig.searchExperienceStep.description', - { - defaultMessage: `Learn more about Elastic's Search UI, try our Search UI tutorial for Elasticsearch, and build a search experience.`, - } - ), - location: { - appID: 'searchExperiences', - path: '', - }, - manualCompletion: { - title: i18n.translate( - 'xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverTitle', - { - defaultMessage: 'Explore Search UI', - } - ), - description: i18n.translate( - 'xpack.enterpriseSearch.guideConfig.searchExperienceStep.manualCompletionPopoverDescription', - { - defaultMessage: `Take your time to explore how to use Search UI to build world-class search experiences. When you're ready, click the Setup guide button to continue.`, - } - ), - readyToCompleteOnNavigation: true, - }, - }; -}; - -const getGuideConfig: (telemetryId: EnterpriseSearchGuideIds) => GuideConfig = (telemetryId) => { - return { - telemetryId, - title: i18n.translate('xpack.enterpriseSearch.guideConfig.title', { - defaultMessage: 'Build search experiences with Elasticsearch', - }), - description: i18n.translate('xpack.enterpriseSearch.guideConfig.description', { - defaultMessage: `We'll help you build a search experience with your data using Elastic's web crawler, connectors, and APIs.`, - }), - guideName: 'Enterprise Search', - steps: [getAddDataStep(telemetryId), getSearchExperienceStep()], - }; -}; - -export const databaseSearchGuideConfig: GuideConfig = getGuideConfig(databaseSearchGuideId); diff --git a/x-pack/solutions/search/plugins/enterprise_search/common/types/kibana_deps.ts b/x-pack/solutions/search/plugins/enterprise_search/common/types/kibana_deps.ts index 2fe3d49a0fd2e..032ef88940a02 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/common/types/kibana_deps.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/common/types/kibana_deps.ts @@ -11,7 +11,6 @@ import type { ConsolePluginStart } from '@kbn/console-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { DiscoverStart } from '@kbn/discover-plugin/public'; import type { FeaturesPluginStart } from '@kbn/features-plugin/public'; -import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; import type { SearchIndicesPluginSetup } from '@kbn/search-indices/public'; @@ -26,7 +25,6 @@ export interface KibanaDeps { data: DataPublicPluginStart; discover: DiscoverStart; features: FeaturesPluginStart; - guidedOnboarding?: GuidedOnboardingPluginStart; licensing: LicensingPluginStart; navigation: NavigationPublicPluginStart; searchIndices: SearchIndicesPluginSetup; diff --git a/x-pack/solutions/search/plugins/enterprise_search/kibana.jsonc b/x-pack/solutions/search/plugins/enterprise_search/kibana.jsonc index 9802cd2545d20..073ba29967cc6 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/kibana.jsonc +++ b/x-pack/solutions/search/plugins/enterprise_search/kibana.jsonc @@ -34,7 +34,6 @@ "security", "spaces", "usageCollection", - "guidedOnboarding", "console", "contentConnectors", "searchPlayground", diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts index 1c9a291f52e52..1bc91b20871d6 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/__mocks__/kea_logic/kibana_logic.mock.ts @@ -47,7 +47,6 @@ export const mockKibanaValues = { }, getChromeStyle$: jest.fn().mockReturnValue(of('classic')), getNavLinks: jest.fn().mockReturnValue([]), - guidedOnboarding: {}, history: mockHistory, indexMappingComponent: null, isAgentlessEnabled: false, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx index 1f4d84c2ae784..43ec60030830a 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx @@ -61,21 +61,9 @@ export const ConnectorDetail: React.FC = () => { }>(); const { - guidedOnboarding, productFeatures: { hasDefaultIngestPipeline }, } = useValues(KibanaLogic); - useEffect(() => { - const subscription = guidedOnboarding?.guidedOnboardingApi - ?.isGuideStepActive$('databaseSearch', 'add_data') - .subscribe((isStepActive) => { - if (isStepActive && index?.count) { - guidedOnboarding.guidedOnboardingApi?.completeGuideStep('databaseSearch', 'add_data'); - } - }); - return () => subscription?.unsubscribe(); - }, [guidedOnboarding, index?.count]); - const ALL_INDICES_TABS = [ { content: , diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index 320bfb03b75fd..8e81cf0e7dba3 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -61,29 +61,12 @@ export const SearchIndex: React.FC = () => { const { indexName } = useValues(IndexNameLogic); - /** - * Guided Onboarding needs us to mark the add data step as complete as soon as the user has data in an index. - * This needs to be checked for any of the 3 registered search guideIds - * Putting it here guarantees that if a user is viewing an index with data, it'll be marked as complete - */ const { config, - guidedOnboarding, productFeatures: { hasDefaultIngestPipeline }, updateSideNavDefinition, } = useValues(KibanaLogic); - useEffect(() => { - const subscription = guidedOnboarding?.guidedOnboardingApi - ?.isGuideStepActive$('databaseSearch', 'add_data') - .subscribe((isStepActive) => { - if (isStepActive && index?.count) { - guidedOnboarding.guidedOnboardingApi?.completeGuideStep('databaseSearch', 'add_data'); - } - }); - return () => subscription?.unsubscribe(); - }, [guidedOnboarding, index?.count]); - useEffect(() => { return () => { updateSideNavDefinition({ indices: undefined }); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.test.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.test.tsx index 0ccdb7c63f0ca..6723224f779f2 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.test.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.test.tsx @@ -17,7 +17,6 @@ import { Observable } from 'rxjs'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { coreMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; -import { guidedOnboardingMock } from '@kbn/guided-onboarding-plugin/public/mocks'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { lensPluginMock } from '@kbn/lens-plugin/public/mocks'; @@ -41,7 +40,6 @@ describe('renderApp', () => { charts: chartPluginMock.createStartContract(), contentConnectors: searchConnectorsMock.createStart(), data: dataPluginMock.createStartContract(), - guidedOnboarding: guidedOnboardingMock.createStart(), indexManagement: { getIndexMappingComponent: jest.fn(), }, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.tsx index ac71606e2bb86..17dcdd232dd34 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/index.tsx @@ -63,7 +63,6 @@ export const renderApp = ( const { charts, cloud, - guidedOnboarding, indexManagement: indexManagementPlugin, lens, security, @@ -99,7 +98,6 @@ export const renderApp = ( fleet, getChromeStyle$: chrome.getChromeStyle$, getNavLinks: chrome.navLinks.getAll, - guidedOnboarding, history, indexMappingComponent, isSidebarEnabled, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts index 0e63b7c62dc79..6ab07383ec92c 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts @@ -24,7 +24,6 @@ import { import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { FleetStart } from '@kbn/fleet-plugin/public'; -import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import { IndexMappingProps } from '@kbn/index-management-shared-types'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; @@ -59,7 +58,6 @@ export interface KibanaLogicProps { fleet?: FleetStart; getChromeStyle$: ChromeStart['getChromeStyle$']; getNavLinks: ChromeStart['navLinks']['getAll']; - guidedOnboarding?: GuidedOnboardingPluginStart; history: ScopedHistory; indexMappingComponent?: React.FC; isSidebarEnabled: boolean; @@ -93,7 +91,6 @@ export interface KibanaValues { fleet: FleetStart | null; getChromeStyle$: ChromeStart['getChromeStyle$']; getNavLinks: ChromeStart['navLinks']['getAll']; - guidedOnboarding: GuidedOnboardingPluginStart | null; history: ScopedHistory; indexMappingComponent: React.FC | null; isAgentlessEnabled: boolean; @@ -136,7 +133,6 @@ export const KibanaLogic = kea>({ fleet: [props.fleet || null, {}], getChromeStyle$: [props.getChromeStyle$, {}], getNavLinks: [props.getNavLinks, {}], - guidedOnboarding: [props.guidedOnboarding || null, {}], history: [props.history, {}], indexMappingComponent: [props.indexMappingComponent || null, {}], isSidebarEnabled: [props.isSidebarEnabled, {}], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx index b5211f95aa2c6..bd37afd8775b3 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/test_helpers/test_utils.test_helper.tsx @@ -58,7 +58,6 @@ export const mockKibanaProps: KibanaLogicProps = { }, getChromeStyle$: jest.fn().mockReturnValue(of('classic')), getNavLinks: jest.fn().mockReturnValue([]), - guidedOnboarding: {}, history: mockHistory, indexMappingComponent: () => { return <>; diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/plugin.ts b/x-pack/solutions/search/plugins/enterprise_search/public/plugin.ts index b46a477e48545..8ee3332cb1a3c 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/plugin.ts @@ -25,7 +25,6 @@ import { } from '@kbn/core/public'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { FleetStart } from '@kbn/fleet-plugin/public'; -import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { i18n } from '@kbn/i18n'; import type { IndexManagementPluginStart } from '@kbn/index-management-shared-types'; @@ -82,7 +81,6 @@ export interface PluginsStart { contentConnectors?: SearchConnectorsPluginStart; data?: DataPublicPluginStart; fleet?: FleetStart; - guidedOnboarding?: GuidedOnboardingPluginStart; indexManagement?: IndexManagementPluginStart; lens?: LensPublicStart; licensing?: LicensingPluginStart; diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/plugin.ts b/x-pack/solutions/search/plugins/enterprise_search/server/plugin.ts index 4217896c24e3d..42316a0bcf5a1 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/plugin.ts @@ -33,11 +33,6 @@ import { SEARCH_INDEX_MANAGEMENT, } from '../common/constants'; -import { - databaseSearchGuideId, - databaseSearchGuideConfig, -} from '../common/guided_onboarding/search_guide_config'; - import { AS_TELEMETRY_NAME } from './collectors/app_search/telemetry'; import { registerTelemetryUsageCollector as registerCNTelemetryUsageCollector } from './collectors/connectors/telemetry'; import { @@ -94,7 +89,6 @@ export class EnterpriseSearchPlugin implements Plugin { - afterEach(async () => { - // Clean up saved objects - await kibanaServer.savedObjects.clean({ - types: [guideStateSavedObjectsType, pluginStateSavedObjectsType], - }); - }); - - it('returns an empty array if no guides', async () => { - const response = await supertest - .get(getGuidesPath) - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .expect(200); - expect(response.body).not.to.be.empty(); - expect(response.body.state).to.be.empty(); - }); - - it('returns all created guides (active and inactive)', async () => { - await createGuides(kibanaServer, [testGuideStep1ActiveState]); - const { body: responseBody } = await supertest - .get(getGuidesPath) - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .expect(200); - - expect(responseBody).not.to.be.empty(); - - const sortById = (a: { guideId: string }, b: { guideId: string }) => - a.guideId.localeCompare(b.guideId); - - // sort the guides in the response by ID for stable comparison - expect(responseBody.state.sort(sortById)).to.eql([testGuideStep1ActiveState]); - }); - }); -} diff --git a/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/index.ts b/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/index.ts deleted file mode 100644 index 0e63afb325abc..0000000000000 --- a/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/index.ts +++ /dev/null @@ -1,15 +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 type { FtrProviderContext } from '../../ftr_provider_context'; - -export default function apiIntegrationTests({ loadTestFile }: FtrProviderContext) { - describe('guided onboarding', () => { - loadTestFile(require.resolve('./get_guides')); - loadTestFile(require.resolve('./put_state')); - }); -} diff --git a/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/put_state.ts b/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/put_state.ts deleted file mode 100644 index 4c278ca77b9a1..0000000000000 --- a/x-pack/solutions/search/test/api_integration/apis/guided_onboarding/put_state.ts +++ /dev/null @@ -1,192 +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 expect from '@kbn/expect'; -import { - testGuideStep1ActiveState, - testGuideNotActiveState, - testGuideStep1InProgressState, - testGuideStep2ActiveState, - testGuideParams, -} from '@kbn/guided-onboarding-plugin/public/services/api.mocks'; -import { - pluginStateSavedObjectsType, - pluginStateSavedObjectsId, - guideStateSavedObjectsType, -} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup'; -import { testGuideId } from '@kbn/guided-onboarding'; -import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common'; -import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; -import { - createGuides, - createPluginState, -} from '@kbn/test-suites-src/api_integration/apis/guided_onboarding/helpers'; -import type { FtrProviderContext } from '../../ftr_provider_context'; - -const putStatePath = `${API_BASE_PATH}/state`; -export default function testPutState({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const kibanaServer = getService('kibanaServer'); - - describe(`PUT ${putStatePath}`, () => { - afterEach(async () => { - // Clean up saved objects - await kibanaServer.savedObjects.clean({ - types: [pluginStateSavedObjectsType, guideStateSavedObjectsType], - }); - }); - - it('creates a plugin saved object when updating the status and there is no state yet', async () => { - const response = await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - status: 'in_progress', - }) - .expect(200); - - expect(response.body).to.eql({ - pluginState: { - status: 'in_progress', - isActivePeriod: true, - }, - }); - - const createdSO = await kibanaServer.savedObjects.get({ - type: pluginStateSavedObjectsType, - id: pluginStateSavedObjectsId, - }); - - expect(createdSO.attributes.status).to.eql('in_progress'); - }); - - it('updates the plugin saved object when updating the status and there is already state', async () => { - await createPluginState(kibanaServer, { - status: 'not_started', - creationDate: new Date().toISOString(), - }); - - const response = await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - status: 'in_progress', - }) - .expect(200); - - expect(response.body).to.eql({ - pluginState: { - status: 'in_progress', - isActivePeriod: true, - }, - }); - - const createdSO = await kibanaServer.savedObjects.get({ - type: pluginStateSavedObjectsType, - id: pluginStateSavedObjectsId, - }); - - expect(createdSO.attributes.status).to.eql('in_progress'); - }); - - it('creates a guide saved object when updating the guide and there is no guide SO yet', async () => { - await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - guide: testGuideStep1ActiveState, - }) - .expect(200); - - const createdSO = await kibanaServer.savedObjects.get({ - type: guideStateSavedObjectsType, - id: testGuideId, - }); - - expect(createdSO.attributes).to.eql(testGuideStep1ActiveState); - }); - - it('updates the guide saved object when updating the guide and there is already guide SO', async () => { - await createGuides(kibanaServer, [testGuideStep1ActiveState]); - - await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - guide: testGuideNotActiveState, - }) - .expect(200); - - const createdSO = await kibanaServer.savedObjects.get({ - type: guideStateSavedObjectsType, - id: testGuideId, - }); - - expect(createdSO.attributes).to.eql(testGuideNotActiveState); - }); - - it('updates any existing active guides to inactive', async () => { - // create an active guide - await createGuides(kibanaServer, [testGuideStep1ActiveState]); - - // Create a new guide with isActive: true - await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - guide: { - ...testGuideStep1ActiveState, - guideId: 'kubernetes', - }, - }) - .expect(200); - - // Check that all guides except observability are inactive - const testGuideSO = await kibanaServer.savedObjects.get({ - type: guideStateSavedObjectsType, - id: testGuideId, - }); - expect(testGuideSO.attributes.isActive).to.eql(false); - - const kubernetesGuide = await kibanaServer.savedObjects.get({ - type: guideStateSavedObjectsType, - id: 'kubernetes', - }); - expect(kubernetesGuide.attributes.isActive).to.eql(true); - }); - - it('saves dynamic params if provided', async () => { - // create a guide - await createGuides(kibanaServer, [testGuideStep1InProgressState]); - - // complete step1 with dynamic params - await supertest - .put(putStatePath) - .set('kbn-xsrf', 'true') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ - guide: { - ...testGuideStep2ActiveState, - params: testGuideParams, - }, - }) - .expect(200); - - // check that params object was saved - const testGuideSO = await kibanaServer.savedObjects.get({ - type: guideStateSavedObjectsType, - id: testGuideId, - }); - expect(testGuideSO.attributes.params).to.eql(testGuideParams); - }); - }); -} diff --git a/x-pack/solutions/search/test/tsconfig.json b/x-pack/solutions/search/test/tsconfig.json index 7d8e82081529f..c8bfb82b40384 100644 --- a/x-pack/solutions/search/test/tsconfig.json +++ b/x-pack/solutions/search/test/tsconfig.json @@ -23,9 +23,6 @@ "@kbn/scout-info", "@kbn/test-suites-xpack-platform", "@kbn/expect", - "@kbn/guided-onboarding-plugin", - "@kbn/test-suites-src", - "@kbn/guided-onboarding", "@kbn/search-playground", "@kbn/tooling-log", "@kbn/test-suites-xpack",