[8.x] [Search][Homepage] Remove usage (#194870) (#195137)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search][Homepage] Remove usage
(#194870)](https://github.com/elastic/kibana/pull/194870)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"rodney.norris@elastic.co"},"sourceCommit":{"committedDate":"2024-10-04T18:30:37Z","message":"[Search][Homepage]
Remove usage (#194870)\n\n## Summary\r\n\r\nRemoving search home usage
from serverless search and enterprise search.\r\nThe search home page
project is on hold while we re-assess requirements.\r\nUntil we know
when we are starting that back up I'm removing the feature\r\nflagged
usage to simplify other work. When we spin this back up usage\r\nwill
likely be different anyway with other projects like onboarding
and\r\nthe updating navigation refactor in
enterprise_search.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic
Machine
<elasticmachine@users.noreply.github.com>","sha":"a84b3f841cd952bc3fc511000bf4fbfae4d5b083","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"[Search][Homepage]
Remove usage
","number":194870,"url":"https://github.com/elastic/kibana/pull/194870","mergeCommit":{"message":"[Search][Homepage]
Remove usage (#194870)\n\n## Summary\r\n\r\nRemoving search home usage
from serverless search and enterprise search.\r\nThe search home page
project is on hold while we re-assess requirements.\r\nUntil we know
when we are starting that back up I'm removing the feature\r\nflagged
usage to simplify other work. When we spin this back up usage\r\nwill
likely be different anyway with other projects like onboarding
and\r\nthe updating navigation refactor in
enterprise_search.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic
Machine
<elasticmachine@users.noreply.github.com>","sha":"a84b3f841cd952bc3fc511000bf4fbfae4d5b083"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194870","number":194870,"mergeCommit":{"message":"[Search][Homepage]
Remove usage (#194870)\n\n## Summary\r\n\r\nRemoving search home usage
from serverless search and enterprise search.\r\nThe search home page
project is on hold while we re-assess requirements.\r\nUntil we know
when we are starting that back up I'm removing the feature\r\nflagged
usage to simplify other work. When we spin this back up usage\r\nwill
likely be different anyway with other projects like onboarding
and\r\nthe updating navigation refactor in
enterprise_search.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic
Machine
<elasticmachine@users.noreply.github.com>","sha":"a84b3f841cd952bc3fc511000bf4fbfae4d5b083"}}]}]
BACKPORT-->

Co-authored-by: Rodney Norris <rodney.norris@elastic.co>
This commit is contained in:
Kibana Machine 2024-10-05 06:16:52 +10:00 committed by GitHub
parent c3563d4017
commit 00462139aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 45 additions and 326 deletions

View file

@ -70,8 +70,5 @@ xpack.searchInferenceEndpoints.ui.enabled: false
# Search Notebooks
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json
# Search Homepage
xpack.search.homepage.ui.enabled: true
# Semantic text UI
xpack.index_management.dev.enableSemanticText: false

View file

@ -314,7 +314,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
// 'xpack.reporting.poll.jobsRefresh.intervalErrorMultiplier (number)',
'xpack.rollup.ui.enabled (boolean?)',
'xpack.saved_object_tagging.cache_refresh_interval (duration?)',
'xpack.search.homepage.ui.enabled (boolean?)',
'xpack.searchInferenceEndpoints.ui.enabled (boolean?)',
'xpack.searchPlayground.ui.enabled (boolean?)',
'xpack.security.loginAssistanceMessage (string?)',

View file

@ -7,9 +7,7 @@
"id": "enterpriseSearch",
"server": true,
"browser": true,
"configPath": [
"enterpriseSearch"
],
"configPath": ["enterpriseSearch"],
"requiredPlugins": [
"data",
"features",
@ -17,7 +15,7 @@
"logsShared",
"logsDataAccess",
"esUiShared",
"navigation",
"navigation"
],
"optionalPlugins": [
"customIntegrations",
@ -31,7 +29,6 @@
"guidedOnboarding",
"console",
"searchConnectors",
"searchHomepage",
"searchPlayground",
"searchInferenceEndpoints",
"embeddable",
@ -39,10 +36,8 @@
"charts",
"cloud",
"lens",
"share",
"share"
],
"requiredBundles": [
"kibanaReact"
]
"requiredBundles": ["kibanaReact"]
}
}

View file

@ -45,7 +45,6 @@ export const mockKibanaValues = {
history: mockHistory,
indexMappingComponent: null,
isCloud: false,
isSearchHomepageEnabled: false,
isSidebarEnabled: true,
lens: {
EmbeddableComponent: jest.fn(),
@ -65,7 +64,6 @@ export const mockKibanaValues = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchHomepage: null,
searchInferenceEndpoints: null,
searchPlayground: searchPlaygroundMock.createStart(),
security: securityMock.createStart(),

View file

@ -117,7 +117,6 @@ export const renderApp = (
guidedOnboarding,
history,
indexMappingComponent,
isSearchHomepageEnabled: plugins.searchHomepage?.isHomepageFeatureEnabled() ?? false,
isSidebarEnabled,
lens,
ml,
@ -128,7 +127,6 @@ export const renderApp = (
params.setHeaderActionMenu(
HeaderActions ? renderHeaderActions.bind(null, HeaderActions, store, params) : undefined
),
searchHomepage: plugins.searchHomepage,
searchPlayground: plugins.searchPlayground,
searchInferenceEndpoints: plugins.searchInferenceEndpoints,
security,

View file

@ -1,28 +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 { TestHelper } from '../../../test_helpers/test_utils.test_helper';
import { SearchHomepagePageTemplate } from './page_template';
describe('SearchHomepagePageTemplate', () => {
beforeAll(() => {
TestHelper.prepare();
});
it('renders as expected', async () => {
const { container } = TestHelper.render(
<SearchHomepagePageTemplate>
<div>Test</div>
</SearchHomepagePageTemplate>
);
expect(container.querySelector('.kbnSolutionNav__title')).toHaveTextContent('Search');
});
});

View file

@ -1,37 +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 { SEARCH_PRODUCT_NAME } from '../../../../../common/constants';
import { SetSearchChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper, PageTemplateProps } from '../../../shared/layout';
import { useEnterpriseSearchNav } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
export const SearchHomepagePageTemplate: React.FC<PageTemplateProps> = ({
children,
pageChrome,
pageViewTelemetry,
...pageTemplateProps
}) => {
return (
<EnterpriseSearchPageTemplateWrapper
{...pageTemplateProps}
solutionNav={{
name: SEARCH_PRODUCT_NAME,
items: useEnterpriseSearchNav(),
}}
setPageChrome={pageChrome && <SetSearchChrome trail={pageChrome} />}
>
{pageViewTelemetry && (
<SendEnterpriseSearchTelemetry action="viewed" metric={pageViewTelemetry} />
)}
{children}
</EnterpriseSearchPageTemplateWrapper>
);
};

View file

@ -1,35 +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 { useValues } from 'kea';
import { KibanaLogic } from '../../shared/kibana';
import { SetSearchChrome } from '../../shared/kibana_chrome';
import { SearchHomepagePageTemplate } from './layout/page_template';
export const SearchHomepagePage = () => {
const { isSearchHomepageEnabled, searchHomepage } = useValues(KibanaLogic);
if (!isSearchHomepageEnabled || !searchHomepage) {
return null;
}
return (
<SearchHomepagePageTemplate
restrictWidth={false}
grow={false}
offset={0}
pageViewTelemetry="searchHomepage"
>
<SetSearchChrome />
<searchHomepage.SearchHomepage />
</SearchHomepagePageTemplate>
);
};

View file

@ -1,42 +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 { Routes, Route } from '@kbn/shared-ux-router';
import { isVersionMismatch } from '../../../common/is_version_mismatch';
import type { InitialAppData } from '../../../common/types';
import { VersionMismatchPage } from '../shared/version_mismatch';
import { SearchHomepagePage } from './components/search_homepage';
export const SearchHomepage: React.FC<InitialAppData> = (props) => {
const { enterpriseSearchVersion, kibanaVersion } = props;
const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion);
const showView = () => {
if (incompatibleVersions) {
return (
<VersionMismatchPage
enterpriseSearchVersion={enterpriseSearchVersion}
kibanaVersion={kibanaVersion}
/>
);
}
return <SearchHomepagePage />;
};
return (
<Routes>
<Route exact path="/">
{showView()}
</Route>
</Routes>
);
};

View file

@ -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.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../../..',
roots: ['<rootDir>/x-pack/plugins/enterprise_search/public/applications/search_homepage'],
collectCoverage: true,
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/plugins/enterprise_search/public/applications/**/*.{ts,tsx}',
'!<rootDir>/x-pack/plugins/enterprise_search/public/*.ts',
'!<rootDir>/x-pack/plugins/enterprise_search/server/*.ts',
'!<rootDir>/x-pack/plugins/enterprise_search/public/applications/test_helpers/**/*.{ts,tsx}',
],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/plugins/enterprise_search/public/applications/search_homepage',
modulePathIgnorePatterns: [
'<rootDir>/x-pack/plugins/enterprise_search/public/applications/app_search/cypress',
'<rootDir>/x-pack/plugins/enterprise_search/public/applications/workplace_search/cypress',
],
};

View file

@ -29,7 +29,6 @@ import { LensPublicStart } from '@kbn/lens-plugin/public';
import { MlPluginStart } from '@kbn/ml-plugin/public';
import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants';
import { ConnectorDefinition } from '@kbn/search-connectors-plugin/public';
import type { SearchHomepagePluginStart } from '@kbn/search-homepage/public';
import { SearchInferenceEndpointsPluginStart } from '@kbn/search-inference-endpoints/public';
import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public';
import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/public';
@ -59,7 +58,6 @@ export interface KibanaLogicProps {
guidedOnboarding?: GuidedOnboardingPluginStart;
history: ScopedHistory;
indexMappingComponent?: React.FC<IndexMappingProps>;
isSearchHomepageEnabled: boolean;
isSidebarEnabled: boolean;
lens?: LensPublicStart;
ml?: MlPluginStart;
@ -67,7 +65,6 @@ export interface KibanaLogicProps {
productAccess: ProductAccess;
productFeatures: ProductFeatures;
renderHeaderActions(HeaderActions?: FC): void;
searchHomepage?: SearchHomepagePluginStart;
searchInferenceEndpoints?: SearchInferenceEndpointsPluginStart;
searchPlayground?: SearchPlaygroundPluginStart;
security?: SecurityPluginStart;
@ -94,7 +91,6 @@ export interface KibanaValues {
history: ScopedHistory;
indexMappingComponent: React.FC<IndexMappingProps> | null;
isCloud: boolean;
isSearchHomepageEnabled: boolean;
isSidebarEnabled: boolean;
lens: LensPublicStart | null;
ml: MlPluginStart | null;
@ -102,7 +98,6 @@ export interface KibanaValues {
productAccess: ProductAccess;
productFeatures: ProductFeatures;
renderHeaderActions(HeaderActions?: FC): void;
searchHomepage: SearchHomepagePluginStart | null;
searchInferenceEndpoints: SearchInferenceEndpointsPluginStart | null;
searchPlayground: SearchPlaygroundPluginStart | null;
security: SecurityPluginStart | null;
@ -134,7 +129,6 @@ export const KibanaLogic = kea<MakeLogicType<KibanaValues>>({
guidedOnboarding: [props.guidedOnboarding || null, {}],
history: [props.history, {}],
indexMappingComponent: [props.indexMappingComponent || null, {}],
isSearchHomepageEnabled: [props.isSearchHomepageEnabled, {}],
isSidebarEnabled: [props.isSidebarEnabled, {}],
lens: [props.lens || null, {}],
ml: [props.ml || null, {}],
@ -149,7 +143,6 @@ export const KibanaLogic = kea<MakeLogicType<KibanaValues>>({
productAccess: [props.productAccess, {}],
productFeatures: [props.productFeatures, {}],
renderHeaderActions: [props.renderHeaderActions, {}],
searchHomepage: [props.searchHomepage || null, {}],
searchInferenceEndpoints: [props.searchInferenceEndpoints || null, {}],
searchPlayground: [props.searchPlayground || null, {}],
security: [props.security || null, {}],

View file

@ -52,8 +52,7 @@ import { generateNavLink } from './nav_link_helpers';
* @returns The Enterprise Search navigation items
*/
export const useEnterpriseSearchNav = (alwaysReturn = false) => {
const { isSearchHomepageEnabled, searchHomepage, isSidebarEnabled, productAccess } =
useValues(KibanaLogic);
const { isSidebarEnabled, productAccess } = useValues(KibanaLogic);
const { hasEnterpriseLicense } = useValues(LicensingLogic);
@ -74,10 +73,7 @@ export const useEnterpriseSearchNav = (alwaysReturn = false) => {
...generateNavLink({
shouldNotCreateHref: true,
shouldShowActiveForSubroutes: true,
to:
isSearchHomepageEnabled && searchHomepage
? searchHomepage.app.appRoute
: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
to: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
}),
},
{

View file

@ -63,7 +63,6 @@ export const mockKibanaProps: KibanaLogicProps = {
indexMappingComponent: () => {
return <></>;
},
isSearchHomepageEnabled: false,
isSidebarEnabled: true,
lens: {
EmbeddableComponent: jest.fn(),
@ -86,7 +85,6 @@ export const mockKibanaProps: KibanaLogicProps = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchHomepage: undefined,
searchPlayground: searchPlaygroundMock.createStart(),
security: securityMock.createStart(),
setBreadcrumbs: jest.fn(),

View file

@ -69,14 +69,12 @@ const euiItemTypeToNodeDefinition = ({
export const getNavigationTreeDefinition = ({
dynamicItems$,
isSearchHomepageEnabled,
}: {
dynamicItems$: Observable<DynamicSideNavItems>;
isSearchHomepageEnabled: boolean;
}): AddSolutionNavigationArg => {
return {
dataTestSubj: 'searchSideNav',
homePage: isSearchHomepageEnabled ? 'searchHomepage' : 'enterpriseSearch',
homePage: 'enterpriseSearch',
icon,
id: 'es',
navigationTree$: dynamicItems$.pipe(
@ -88,7 +86,7 @@ export const getNavigationTreeDefinition = ({
breadcrumbStatus: 'hidden',
children: [
{
link: isSearchHomepageEnabled ? 'searchHomepage' : 'enterpriseSearch',
link: 'enterpriseSearch',
},
{
getIsActive: ({ pathNameSerialized, prepend }) => {

View file

@ -32,10 +32,6 @@ import { MlPluginStart } from '@kbn/ml-plugin/public';
import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants';
import { SearchConnectorsPluginStart } from '@kbn/search-connectors-plugin/public';
import type {
SearchHomepagePluginSetup,
SearchHomepagePluginStart,
} from '@kbn/search-homepage/public';
import { SearchInferenceEndpointsPluginStart } from '@kbn/search-inference-endpoints/public';
import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public';
import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public';
@ -70,7 +66,6 @@ import {
import { INFERENCE_ENDPOINTS_PATH } from './applications/enterprise_search_relevance/routes';
import { docLinks } from './applications/shared/doc_links';
import { setBreadcrumbHomeUrl } from './applications/shared/kibana_chrome/breadcrumbs_home';
import type { DynamicSideNavItems } from './navigation_tree';
export interface ClientData extends InitialAppData {
@ -85,7 +80,6 @@ interface PluginsSetup {
cloud?: CloudSetup;
licensing: LicensingPluginStart;
home?: HomePublicPluginSetup;
searchHomepage?: SearchHomepagePluginSetup;
security?: SecurityPluginSetup;
share?: SharePluginSetup;
}
@ -102,7 +96,6 @@ export interface PluginsStart {
ml?: MlPluginStart;
navigation: NavigationPublicPluginStart;
searchConnectors?: SearchConnectorsPluginStart;
searchHomepage?: SearchHomepagePluginStart;
searchPlayground?: SearchPlaygroundPluginStart;
searchInferenceEndpoints?: SearchInferenceEndpointsPluginStart;
security?: SecurityPluginStart;
@ -264,56 +257,29 @@ export class EnterpriseSearchPlugin implements Plugin {
}
const { cloud, share } = plugins;
const useSearchHomepage =
plugins.searchHomepage && plugins.searchHomepage.isHomepageFeatureEnabled();
core.application.register({
appRoute: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
euiIconType: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.LOGO,
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
mount: async (params: AppMountParameters) => {
const kibanaDeps = await this.getKibanaDeps(core, params, cloud);
const { chrome, http } = kibanaDeps.core;
chrome.docTitle.change(ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME);
if (useSearchHomepage) {
const { app } = plugins.searchHomepage!;
core.application.register({
...app,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
euiIconType: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.LOGO,
visibleIn: ['home', 'kibanaOverview', 'globalSearch', 'sideNav'],
mount: async (params: AppMountParameters) => {
const kibanaDeps = await this.getKibanaDeps(core, params, cloud);
const { chrome, http } = kibanaDeps.core;
chrome.docTitle.change(app.title);
await this.getInitialData(http);
const pluginData = this.getPluginData();
await this.getInitialData(http);
const pluginData = this.getPluginData();
const { renderApp } = await import('./applications');
const { EnterpriseSearchOverview } = await import(
'./applications/enterprise_search_overview'
);
const { renderApp } = await import('./applications');
const { SearchHomepage } = await import('./applications/search_homepage');
return renderApp(SearchHomepage, kibanaDeps, pluginData);
},
});
setBreadcrumbHomeUrl(app.appRoute);
} else {
core.application.register({
appRoute: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
euiIconType: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.LOGO,
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
mount: async (params: AppMountParameters) => {
const kibanaDeps = await this.getKibanaDeps(core, params, cloud);
const { chrome, http } = kibanaDeps.core;
chrome.docTitle.change(ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME);
await this.getInitialData(http);
const pluginData = this.getPluginData();
const { renderApp } = await import('./applications');
const { EnterpriseSearchOverview } = await import(
'./applications/enterprise_search_overview'
);
return renderApp(EnterpriseSearchOverview, kibanaDeps, pluginData);
},
title: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAV_TITLE,
visibleIn: ['home', 'kibanaOverview', 'globalSearch', 'sideNav'],
});
}
return renderApp(EnterpriseSearchOverview, kibanaDeps, pluginData);
},
title: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAV_TITLE,
visibleIn: ['home', 'kibanaOverview', 'globalSearch', 'sideNav'],
});
core.application.register({
appRoute: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL,
@ -568,27 +534,14 @@ export class EnterpriseSearchPlugin implements Plugin {
}
if (plugins.home) {
if (useSearchHomepage) {
const { searchHomepage } = plugins;
plugins.home.featureCatalogue.registerSolution({
description: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.DESCRIPTION,
icon: 'logoEnterpriseSearch',
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
order: 100,
path: searchHomepage!.app.appRoute,
title: SEARCH_PRODUCT_NAME,
});
} else {
plugins.home.featureCatalogue.registerSolution({
description: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.DESCRIPTION,
icon: 'logoEnterpriseSearch',
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
order: 100,
path: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
title: SEARCH_PRODUCT_NAME,
});
}
plugins.home.featureCatalogue.registerSolution({
description: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.DESCRIPTION,
icon: 'logoEnterpriseSearch',
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
order: 100,
path: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
title: SEARCH_PRODUCT_NAME,
});
plugins.home.featureCatalogue.register({
category: 'data',
@ -658,7 +611,6 @@ export class EnterpriseSearchPlugin implements Plugin {
return plugins.navigation.addSolutionNavigation(
getNavigationTreeDefinition({
dynamicItems$: this.sideNavDynamicItems$,
isSearchHomepageEnabled: plugins.searchHomepage?.isHomepageFeatureEnabled() ?? false,
})
);
});

View file

@ -80,7 +80,6 @@
"@kbn/try-in-console",
"@kbn/core-chrome-browser",
"@kbn/navigation-plugin",
"@kbn/search-homepage",
"@kbn/security-plugin-types-common",
"@kbn/core-security-server",
"@kbn/core-security-server-mocks"

View file

@ -11,7 +11,7 @@ import { PluginConfigDescriptor } from '@kbn/core/server';
export * from './types';
const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
enabled: schema.boolean({ defaultValue: false }),
ui: schema.object({
enabled: schema.boolean({ defaultValue: false }),
}),

View file

@ -7,11 +7,7 @@
"id": "serverlessSearch",
"server": true,
"browser": true,
"configPath": [
"xpack",
"serverless",
"search"
],
"configPath": ["xpack", "serverless", "search"],
"requiredPlugins": [
"cloud",
"console",
@ -29,13 +25,10 @@
"optionalPlugins": [
"indexManagement",
"searchConnectors",
"searchHomepage",
"searchIndices",
"searchInferenceEndpoints",
"usageCollection"
],
"requiredBundles": [
"kibanaReact"
]
"requiredBundles": ["kibanaReact"]
}
}

View file

@ -9,7 +9,7 @@ import type { NavigationTreeDefinition } from '@kbn/core-chrome-browser';
import { i18n } from '@kbn/i18n';
import { CONNECTORS_LABEL } from '../common/i18n_string';
export const navigationTree = (useSearchHomepage: boolean = false): NavigationTreeDefinition => ({
export const navigationTree = (): NavigationTreeDefinition => ({
body: [
{
type: 'navGroup',
@ -25,7 +25,7 @@ export const navigationTree = (useSearchHomepage: boolean = false): NavigationTr
title: i18n.translate('xpack.serverlessSearch.nav.home', {
defaultMessage: 'Home',
}),
link: useSearchHomepage ? 'searchHomepage' : 'serverlessElasticsearch',
link: 'serverlessElasticsearch',
spaceBefore: 'm',
},
{

View file

@ -43,9 +43,6 @@ export class ServerlessSearchPlugin
core: CoreSetup<ServerlessSearchPluginStartDependencies, ServerlessSearchPluginStart>,
setupDeps: ServerlessSearchPluginSetupDependencies
): ServerlessSearchPluginSetup {
const { searchHomepage } = setupDeps;
const useSearchHomepage = searchHomepage && searchHomepage.isHomepageFeatureEnabled();
const queryClient = new QueryClient({
mutationCache: new MutationCache({
onError: (error) => {
@ -77,23 +74,6 @@ export class ServerlessSearchPlugin
defaultMessage: 'Home',
});
if (useSearchHomepage) {
core.application.register({
id: 'serverlessHomeRedirect',
title: homeTitle,
appRoute: '/app/elasticsearch',
euiIconType: 'logoElastic',
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
visibleIn: [],
async mount({}: AppMountParameters) {
const [coreStart] = await core.getStartServices();
coreStart.chrome.docTitle.change(homeTitle);
coreStart.application.navigateToApp('searchHomepage');
return () => {};
},
});
}
core.application.register({
id: 'serverlessElasticsearch',
title: i18n.translate('xpack.serverlessSearch.app.elasticsearch.title', {
@ -101,7 +81,7 @@ export class ServerlessSearchPlugin
}),
euiIconType: 'logoElastic',
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
appRoute: useSearchHomepage ? '/app/elasticsearch/getting_started' : '/app/elasticsearch',
appRoute: '/app/elasticsearch',
async mount({ element, history }: AppMountParameters) {
const { renderApp } = await import('./application/elasticsearch');
const [coreStart, services] = await core.getStartServices();
@ -149,12 +129,11 @@ export class ServerlessSearchPlugin
core: CoreStart,
services: ServerlessSearchPluginStartDependencies
): ServerlessSearchPluginStart {
const { serverless, management, indexManagement, security, searchHomepage } = services;
const useSearchHomepage = searchHomepage && searchHomepage.isHomepageFeatureEnabled();
const { serverless, management, indexManagement, security } = services;
serverless.setProjectHome(useSearchHomepage ? '/app/elasticsearch/home' : '/app/elasticsearch');
serverless.setProjectHome('/app/elasticsearch');
const navigationTree$ = of(navigationTree(searchHomepage?.isHomepageFeatureEnabled() ?? false));
const navigationTree$ = of(navigationTree());
serverless.initNavigation('search', navigationTree$, { dataTestSubj: 'svlSearchSideNav' });
const extendCardNavDefinitions = serverless.getNavigationCards(

View file

@ -15,10 +15,6 @@ import type { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverle
import type { SharePluginStart } from '@kbn/share-plugin/public';
import type { IndexManagementPluginStart } from '@kbn/index-management-plugin/public';
import type { DiscoverSetup } from '@kbn/discover-plugin/public';
import type {
SearchHomepagePluginSetup,
SearchHomepagePluginStart,
} from '@kbn/search-homepage/public';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ServerlessSearchPluginSetup {}
@ -31,7 +27,6 @@ export interface ServerlessSearchPluginSetupDependencies {
management: ManagementSetup;
serverless: ServerlessPluginSetup;
discover: DiscoverSetup;
searchHomepage?: SearchHomepagePluginSetup;
}
export interface ServerlessSearchPluginStartDependencies {
@ -44,5 +39,4 @@ export interface ServerlessSearchPluginStartDependencies {
serverless: ServerlessPluginStart;
share: SharePluginStart;
indexManagement?: IndexManagementPluginStart;
searchHomepage?: SearchHomepagePluginStart;
}

View file

@ -50,7 +50,6 @@
"@kbn/search-playground",
"@kbn/security-api-key-management",
"@kbn/search-inference-endpoints",
"@kbn/search-homepage",
"@kbn/security-plugin-types-common",
]
}

View file

@ -25,6 +25,5 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./search_playground/playground_overview'));
loadTestFile(require.resolve('./ml'));
loadTestFile(require.resolve('./search_homepage'));
});
}