mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Enterprise Search] Rebrand home card & Page left-nav (#161478)
## Summary Rebranding the Enterprise Search home card and page left nav from "Enterprise Search" to "Search" We were initially going to change the Icon, but have since decided to stick with the Enterprise Search logo and just change the title. ### Screenshots <img width="1676" alt="image" src="df5ec636
-fa66-44b5-b22d-88de573c100f"> <img width="1676" alt="image" src="4ffc10d4
-39c1-476b-90cd-2d590a2eb1df"> (Note: Overview page and breadcrumbs will be updated in another PR)
This commit is contained in:
parent
ddd58d9bfd
commit
9522282637
24 changed files with 93 additions and 91 deletions
|
@ -10,11 +10,16 @@ import { i18n } from '@kbn/i18n';
|
|||
import { ProductFeatures } from './types';
|
||||
import { IngestPipelineParams } from './types/connectors';
|
||||
|
||||
export const SEARCH_PRODUCT_NAME = i18n.translate('xpack.enterpriseSearch.search.productName', {
|
||||
defaultMessage: 'Search',
|
||||
});
|
||||
export const ENTERPRISE_SEARCH_PRODUCT_NAME = i18n.translate('xpack.enterpriseSearch.productName', {
|
||||
defaultMessage: 'Enterprise Search',
|
||||
});
|
||||
|
||||
export const ENTERPRISE_SEARCH_OVERVIEW_PLUGIN = {
|
||||
ID: 'enterpriseSearch',
|
||||
NAME: i18n.translate('xpack.enterpriseSearch.overview.productName', {
|
||||
defaultMessage: 'Enterprise Search',
|
||||
}),
|
||||
NAME: SEARCH_PRODUCT_NAME,
|
||||
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.overview.navTitle', {
|
||||
defaultMessage: 'Overview',
|
||||
}),
|
||||
|
@ -27,9 +32,7 @@ export const ENTERPRISE_SEARCH_OVERVIEW_PLUGIN = {
|
|||
|
||||
export const ENTERPRISE_SEARCH_CONTENT_PLUGIN = {
|
||||
ID: 'enterpriseSearchContent',
|
||||
NAME: i18n.translate('xpack.enterpriseSearch.content.productName', {
|
||||
defaultMessage: 'Enterprise Search',
|
||||
}),
|
||||
NAME: SEARCH_PRODUCT_NAME,
|
||||
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.content.navTitle', {
|
||||
defaultMessage: 'Content',
|
||||
}),
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('EnterpriseSearchAnalyticsPageTemplate', () => {
|
|||
);
|
||||
|
||||
expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Enterprise Search', items: [] });
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
|
||||
expect(wrapper.find('.hello').text()).toEqual('world');
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import React from 'react';
|
|||
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
|
||||
|
||||
import { ErrorStatePrompt } from '../../../shared/error_state';
|
||||
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
|
||||
|
||||
export const ErrorConnecting: React.FC = () => {
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('EnterpriseSearchContentPageTemplate', () => {
|
|||
);
|
||||
|
||||
expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Enterprise Search', items: [] });
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
|
||||
expect(wrapper.find('.hello').text()).toEqual('world');
|
||||
});
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import { SetEnterpriseSearchChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome } from '../../../shared/kibana_chrome';
|
||||
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
|
||||
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
|
||||
|
||||
|
@ -28,7 +28,7 @@ describe('EnterpriseSearchOverviewPageTemplate', () => {
|
|||
);
|
||||
|
||||
expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Enterprise Search', items: [] });
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
|
||||
expect(wrapper.find('.hello').text()).toEqual('world');
|
||||
});
|
||||
|
||||
|
@ -39,7 +39,7 @@ describe('EnterpriseSearchOverviewPageTemplate', () => {
|
|||
.find(EnterpriseSearchPageTemplateWrapper)
|
||||
.prop('setPageChrome') as any;
|
||||
|
||||
expect(setPageChrome.type).toEqual(SetEnterpriseSearchChrome);
|
||||
expect(setPageChrome.type).toEqual(SetSearchChrome);
|
||||
expect(setPageChrome.props.trail).toEqual(['Some page']);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
|
||||
import { ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../../../../../common/constants';
|
||||
import { SetEnterpriseSearchChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome } from '../../../shared/kibana_chrome';
|
||||
import { EnterpriseSearchPageTemplateWrapper, PageTemplateProps } from '../../../shared/layout';
|
||||
import { useEnterpriseSearchNav } from '../../../shared/layout';
|
||||
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
|
||||
|
@ -26,7 +26,7 @@ export const EnterpriseSearchOverviewPageTemplate: React.FC<PageTemplateProps> =
|
|||
name: ENTERPRISE_SEARCH_CONTENT_PLUGIN.NAME,
|
||||
items: useEnterpriseSearchNav(),
|
||||
}}
|
||||
setPageChrome={pageChrome && <SetEnterpriseSearchChrome trail={pageChrome} />}
|
||||
setPageChrome={pageChrome && <SetSearchChrome trail={pageChrome} />}
|
||||
>
|
||||
{pageViewTelemetry && (
|
||||
<SendEnterpriseSearchTelemetry action="viewed" metric={pageViewTelemetry} />
|
||||
|
|
|
@ -30,7 +30,7 @@ import {
|
|||
import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt';
|
||||
import { docLinks } from '../../../shared/doc_links';
|
||||
import { KibanaLogic } from '../../../shared/kibana';
|
||||
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
|
||||
|
||||
import { EnterpriseSearchOverviewPageTemplate } from '../layout';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetupGuideLayout } from '../../../shared/setup_guide';
|
||||
|
||||
import { SetupGuide } from '.';
|
||||
|
|
|
@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import { ENTERPRISE_SEARCH_OVERVIEW_PLUGIN } from '../../../../../common/constants';
|
||||
import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
|
||||
import { SetupGuideLayout, SETUP_GUIDE_TITLE } from '../../../shared/setup_guide';
|
||||
import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('EnterpriseSearchSearchExperiencesPageTemplate', () => {
|
|||
);
|
||||
|
||||
expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Enterprise Search', items: [] });
|
||||
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
|
||||
expect(wrapper.find('.hello').text()).toEqual('world');
|
||||
});
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import {
|
|||
APP_SEARCH_PLUGIN,
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN,
|
||||
ENTERPRISE_SEARCH_PRODUCT_NAME,
|
||||
ESRE_PLUGIN,
|
||||
SEARCH_EXPERIENCES_PLUGIN,
|
||||
VECTOR_SEARCH_PLUGIN,
|
||||
|
@ -102,7 +103,7 @@ export const useEuiBreadcrumbs = (breadcrumbs: Breadcrumbs): EuiBreadcrumb[] =>
|
|||
export const useEnterpriseSearchBreadcrumbs = (breadcrumbs: Breadcrumbs = []) =>
|
||||
useEuiBreadcrumbs([
|
||||
{
|
||||
text: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME,
|
||||
text: ENTERPRISE_SEARCH_PRODUCT_NAME,
|
||||
path: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
|
||||
shouldNotCreateHref: true,
|
||||
},
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
generateTitle,
|
||||
enterpriseSearchTitle,
|
||||
appSearchTitle,
|
||||
workplaceSearchTitle,
|
||||
} from './generate_title';
|
||||
import { generateTitle, searchTitle, appSearchTitle, workplaceSearchTitle } from './generate_title';
|
||||
|
||||
describe('generateTitle', () => {
|
||||
it('creates a hyphen separated string from an array of page titles', () => {
|
||||
|
@ -19,20 +14,20 @@ describe('generateTitle', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('enterpriseSearchTitle', () => {
|
||||
describe('searchTitle', () => {
|
||||
it('automatically appends the Enterprise Search product onto the pages array', () => {
|
||||
const title = enterpriseSearchTitle(['Setup Guide']);
|
||||
expect(title).toEqual('Setup Guide - Enterprise Search');
|
||||
const title = searchTitle(['Setup Guide']);
|
||||
expect(title).toEqual('Setup Guide - Search');
|
||||
});
|
||||
|
||||
it('can be mixed and matched', () => {
|
||||
const title = enterpriseSearchTitle([appSearchTitle(['Some Page'])]);
|
||||
expect(title).toEqual('Some Page - App Search - Enterprise Search');
|
||||
const title = searchTitle([appSearchTitle(['Some Page'])]);
|
||||
expect(title).toEqual('Some Page - App Search - Search');
|
||||
});
|
||||
|
||||
it('falls back to product name', () => {
|
||||
const title = enterpriseSearchTitle();
|
||||
expect(title).toEqual('Enterprise Search');
|
||||
const title = searchTitle();
|
||||
expect(title).toEqual('Search');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN,
|
||||
ANALYTICS_PLUGIN,
|
||||
APP_SEARCH_PLUGIN,
|
||||
WORKPLACE_SEARCH_PLUGIN,
|
||||
SEARCH_EXPERIENCES_PLUGIN,
|
||||
SEARCH_PRODUCT_NAME,
|
||||
ESRE_PLUGIN,
|
||||
VECTOR_SEARCH_PLUGIN,
|
||||
} from '../../../../common/constants';
|
||||
|
@ -33,8 +33,7 @@ export const generateTitle = (pages: Title) => pages.join(' - ');
|
|||
* Product-specific helpers
|
||||
*/
|
||||
|
||||
export const enterpriseSearchTitle = (page: Title = []) =>
|
||||
generateTitle([...page, ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME]);
|
||||
export const searchTitle = (page: Title = []) => generateTitle([...page, SEARCH_PRODUCT_NAME]);
|
||||
|
||||
export const analyticsTitle = (page: Title = []) => generateTitle([...page, ANALYTICS_PLUGIN.NAME]);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
export {
|
||||
SetEnterpriseSearchChrome,
|
||||
SetSearchChrome,
|
||||
SetAnalyticsChrome,
|
||||
SetEnterpriseSearchContentChrome,
|
||||
SetElasticsearchChrome,
|
||||
|
|
|
@ -26,13 +26,13 @@ import {
|
|||
} from './generate_breadcrumbs';
|
||||
|
||||
jest.mock('./generate_title', () => ({
|
||||
enterpriseSearchTitle: jest.fn((title: any) => title),
|
||||
searchTitle: jest.fn((title: any) => title),
|
||||
appSearchTitle: jest.fn((title: any) => title),
|
||||
workplaceSearchTitle: jest.fn((title: any) => title),
|
||||
}));
|
||||
import { enterpriseSearchTitle, appSearchTitle, workplaceSearchTitle } from './generate_title';
|
||||
import { searchTitle, appSearchTitle, workplaceSearchTitle } from './generate_title';
|
||||
|
||||
import { SetEnterpriseSearchChrome, SetAppSearchChrome, SetWorkplaceSearchChrome } from '.';
|
||||
import { SetSearchChrome, SetAppSearchChrome, SetWorkplaceSearchChrome } from '.';
|
||||
|
||||
describe('Set Kibana Chrome helpers', () => {
|
||||
const mockCurrentPath = (pathname: string) =>
|
||||
|
@ -48,11 +48,11 @@ describe('Set Kibana Chrome helpers', () => {
|
|||
expect(mockKibanaValues.setDocTitle).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe('SetEnterpriseSearchChrome', () => {
|
||||
describe('SetSearchChrome', () => {
|
||||
it('sets breadcrumbs and document title', () => {
|
||||
shallow(<SetEnterpriseSearchChrome trail={['Hello World']} />);
|
||||
shallow(<SetSearchChrome trail={['Hello World']} />);
|
||||
|
||||
expect(enterpriseSearchTitle).toHaveBeenCalledWith(['Hello World']);
|
||||
expect(searchTitle).toHaveBeenCalledWith(['Hello World']);
|
||||
expect(useEnterpriseSearchBreadcrumbs).toHaveBeenCalledWith([
|
||||
{
|
||||
text: 'Hello World',
|
||||
|
@ -62,9 +62,9 @@ describe('Set Kibana Chrome helpers', () => {
|
|||
});
|
||||
|
||||
it('handles empty trails as a root-level page', () => {
|
||||
shallow(<SetEnterpriseSearchChrome />);
|
||||
shallow(<SetSearchChrome />);
|
||||
|
||||
expect(enterpriseSearchTitle).toHaveBeenCalledWith([]);
|
||||
expect(searchTitle).toHaveBeenCalledWith([]);
|
||||
expect(useEnterpriseSearchBreadcrumbs).toHaveBeenCalledWith([]);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
useVectorSearchBreadcrumbs,
|
||||
} from './generate_breadcrumbs';
|
||||
import {
|
||||
enterpriseSearchTitle,
|
||||
searchTitle,
|
||||
analyticsTitle,
|
||||
elasticsearchTitle,
|
||||
appSearchTitle,
|
||||
|
@ -57,11 +57,11 @@ interface SetChromeProps {
|
|||
trail?: BreadcrumbTrail;
|
||||
}
|
||||
|
||||
export const SetEnterpriseSearchChrome: React.FC<SetChromeProps> = ({ trail = [] }) => {
|
||||
export const SetSearchChrome: React.FC<SetChromeProps> = ({ trail = [] }) => {
|
||||
const { setBreadcrumbs, setDocTitle } = useValues(KibanaLogic);
|
||||
|
||||
const title = reverseArray(trail);
|
||||
const docTitle = enterpriseSearchTitle(title);
|
||||
const docTitle = searchTitle(title);
|
||||
|
||||
const crumbs = useGenerateBreadcrumbs(trail);
|
||||
const breadcrumbs = useEnterpriseSearchBreadcrumbs(crumbs);
|
||||
|
@ -69,7 +69,7 @@ export const SetEnterpriseSearchChrome: React.FC<SetChromeProps> = ({ trail = []
|
|||
useEffect(() => {
|
||||
setBreadcrumbs(breadcrumbs);
|
||||
setDocTitle(docTitle);
|
||||
}, [trail]);
|
||||
}, [trail.join('|')]);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
|
|
@ -103,7 +103,7 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
name: 'Applications',
|
||||
},
|
||||
{
|
||||
id: 'standaloneExperiences',
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
{
|
||||
href: '/app/enterprise_search/app_search',
|
||||
|
@ -116,7 +116,7 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
name: 'Workplace Search',
|
||||
},
|
||||
],
|
||||
name: 'Standalone Experiences',
|
||||
name: 'Enterprise Search',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
@ -136,8 +136,8 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
mockKibanaValues.uiSettings.get.mockReturnValue(false);
|
||||
|
||||
const esNav = useEnterpriseSearchNav();
|
||||
const standAloneNav = esNav?.find((item) => item.id === 'standaloneExperiences');
|
||||
expect(standAloneNav).toBeUndefined();
|
||||
const legacyESNav = esNav?.find((item) => item.id === 'enterpriseSearch');
|
||||
expect(legacyESNav).toBeUndefined();
|
||||
});
|
||||
|
||||
it('excludes App Search when the user has no access to it', () => {
|
||||
|
@ -154,10 +154,10 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
});
|
||||
|
||||
const esNav = useEnterpriseSearchNav();
|
||||
const standAloneNav = esNav?.find((item) => item.id === 'standaloneExperiences');
|
||||
expect(standAloneNav).not.toBeUndefined();
|
||||
expect(standAloneNav).toEqual({
|
||||
id: 'standaloneExperiences',
|
||||
const legacyESNav = esNav?.find((item) => item.id === 'enterpriseSearch');
|
||||
expect(legacyESNav).not.toBeUndefined();
|
||||
expect(legacyESNav).toEqual({
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
{
|
||||
href: '/app/enterprise_search/workplace_search',
|
||||
|
@ -165,7 +165,7 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
name: 'Workplace Search',
|
||||
},
|
||||
],
|
||||
name: 'Standalone Experiences',
|
||||
name: 'Enterprise Search',
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -182,10 +182,10 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
});
|
||||
|
||||
const esNav = useEnterpriseSearchNav();
|
||||
const standAloneNav = esNav?.find((item) => item.id === 'standaloneExperiences');
|
||||
expect(standAloneNav).not.toBeUndefined();
|
||||
expect(standAloneNav).toEqual({
|
||||
id: 'standaloneExperiences',
|
||||
const legacyESNav = esNav?.find((item) => item.id === 'enterpriseSearch');
|
||||
expect(legacyESNav).not.toBeUndefined();
|
||||
expect(legacyESNav).toEqual({
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
{
|
||||
href: '/app/enterprise_search/app_search',
|
||||
|
@ -193,7 +193,7 @@ describe('useEnterpriseSearchContentNav', () => {
|
|||
name: 'App Search',
|
||||
},
|
||||
],
|
||||
name: 'Standalone Experiences',
|
||||
name: 'Enterprise Search',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -271,7 +271,7 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
name: 'Applications',
|
||||
},
|
||||
{
|
||||
id: 'standaloneExperiences',
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
{
|
||||
href: '/app/enterprise_search/app_search',
|
||||
|
@ -284,7 +284,7 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
name: 'Workplace Search',
|
||||
},
|
||||
],
|
||||
name: 'Standalone Experiences',
|
||||
name: 'Enterprise Search',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
@ -296,7 +296,7 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
'Overview',
|
||||
'Content',
|
||||
'Applications',
|
||||
'Standalone Experiences',
|
||||
'Enterprise Search',
|
||||
]);
|
||||
const searchItem = navItems?.find((ni) => ni.id === 'applications');
|
||||
expect(searchItem).not.toBeUndefined();
|
||||
|
@ -352,7 +352,7 @@ describe('useEnterpriseSearchApplicationNav', () => {
|
|||
'Overview',
|
||||
'Content',
|
||||
'Applications',
|
||||
'Standalone Experiences',
|
||||
'Enterprise Search',
|
||||
]);
|
||||
const searchItem = navItems?.find((ni) => ni.id === 'applications');
|
||||
expect(searchItem).not.toBeUndefined();
|
||||
|
@ -463,7 +463,7 @@ describe('useEnterpriseSearchAnalyticsNav', () => {
|
|||
name: 'Applications',
|
||||
},
|
||||
{
|
||||
id: 'standaloneExperiences',
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
{
|
||||
href: '/app/enterprise_search/app_search',
|
||||
|
@ -476,7 +476,7 @@ describe('useEnterpriseSearchAnalyticsNav', () => {
|
|||
name: 'Workplace Search',
|
||||
},
|
||||
],
|
||||
name: 'Standalone Experiences',
|
||||
name: 'Enterprise Search',
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ export const useEnterpriseSearchNav = () => {
|
|||
...(productAccess.hasAppSearchAccess || productAccess.hasWorkplaceSearchAccess
|
||||
? [
|
||||
{
|
||||
id: 'standaloneExperiences',
|
||||
id: 'enterpriseSearch',
|
||||
items: [
|
||||
...(productAccess.hasAppSearchAccess
|
||||
? [
|
||||
|
@ -181,8 +181,8 @@ export const useEnterpriseSearchNav = () => {
|
|||
]
|
||||
: []),
|
||||
],
|
||||
name: i18n.translate('xpack.enterpriseSearch.nav.standaloneExperiencesTitle', {
|
||||
defaultMessage: 'Standalone Experiences',
|
||||
name: i18n.translate('xpack.enterpriseSearch.nav.title', {
|
||||
defaultMessage: 'Enterprise Search',
|
||||
}),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -201,16 +201,29 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('automatically sets the Enterprise Search logo onto passed solution navs', () => {
|
||||
it('automatically sets the Search logo onto passed solution navs', () => {
|
||||
const wrapper = shallow(
|
||||
<EnterpriseSearchPageTemplateWrapper
|
||||
solutionNav={{ name: 'Enterprise Search', items: [] }}
|
||||
/>
|
||||
<EnterpriseSearchPageTemplateWrapper solutionNav={{ name: 'Search', items: [] }} />
|
||||
);
|
||||
|
||||
expect(wrapper.find(KibanaPageTemplate).prop('solutionNav')).toEqual({
|
||||
icon: 'logoEnterpriseSearch',
|
||||
name: 'Enterprise Search',
|
||||
name: 'Search',
|
||||
items: [],
|
||||
});
|
||||
});
|
||||
|
||||
it('sets the solutionNavIcon passed', () => {
|
||||
const wrapper = shallow(
|
||||
<EnterpriseSearchPageTemplateWrapper
|
||||
solutionNav={{ name: 'Search', items: [] }}
|
||||
solutionNavIcon="logoElasticsearch"
|
||||
/>
|
||||
);
|
||||
|
||||
expect(wrapper.find(KibanaPageTemplate).prop('solutionNav')).toEqual({
|
||||
icon: 'logoElasticsearch',
|
||||
name: 'Search',
|
||||
items: [],
|
||||
});
|
||||
});
|
||||
|
|
|
@ -42,6 +42,7 @@ export type PageTemplateProps = KibanaPageTemplateProps & {
|
|||
pageChrome?: BreadcrumbTrail;
|
||||
pageViewTelemetry?: string;
|
||||
setPageChrome?: React.ReactNode;
|
||||
solutionNavIcon?: string;
|
||||
};
|
||||
|
||||
export const EnterpriseSearchPageTemplateWrapper: React.FC<PageTemplateProps> = ({
|
||||
|
@ -54,12 +55,14 @@ export const EnterpriseSearchPageTemplateWrapper: React.FC<PageTemplateProps> =
|
|||
emptyState,
|
||||
setPageChrome,
|
||||
solutionNav,
|
||||
solutionNavIcon,
|
||||
...pageTemplateProps
|
||||
}) => {
|
||||
const { readOnlyMode } = useValues(HttpLogic);
|
||||
const hasCustomEmptyState = !!emptyState;
|
||||
const showCustomEmptyState = hasCustomEmptyState && isEmptyState;
|
||||
|
||||
const navIcon = solutionNavIcon ?? 'logoEnterpriseSearch';
|
||||
return (
|
||||
<KibanaPageTemplate
|
||||
restrictWidth={false}
|
||||
|
@ -73,11 +76,7 @@ export const EnterpriseSearchPageTemplateWrapper: React.FC<PageTemplateProps> =
|
|||
),
|
||||
}}
|
||||
isEmptyState={isEmptyState && !isLoading}
|
||||
solutionNav={
|
||||
solutionNav && solutionNav.items
|
||||
? { icon: 'logoEnterpriseSearch', ...solutionNav }
|
||||
: undefined
|
||||
}
|
||||
solutionNav={solutionNav && solutionNav.items ? { icon: navIcon, ...solutionNav } : undefined}
|
||||
>
|
||||
{setPageChrome}
|
||||
{readOnlyMode && (
|
||||
|
|
|
@ -34,6 +34,7 @@ import {
|
|||
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN,
|
||||
SEARCH_EXPERIENCES_PLUGIN,
|
||||
SEARCH_PRODUCT_NAME,
|
||||
VECTOR_SEARCH_PLUGIN,
|
||||
WORKPLACE_SEARCH_PLUGIN,
|
||||
} from '../common/constants';
|
||||
|
@ -350,7 +351,7 @@ export class EnterpriseSearchPlugin implements Plugin {
|
|||
id: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
|
||||
order: 100,
|
||||
path: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
|
||||
title: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME,
|
||||
title: SEARCH_PRODUCT_NAME,
|
||||
});
|
||||
|
||||
plugins.home.featureCatalogue.register({
|
||||
|
|
|
@ -13359,7 +13359,6 @@
|
|||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "En savoir plus sur les clés d’API",
|
||||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "Générer une clé d’API",
|
||||
"xpack.enterpriseSearch.content.overview.optimizedRequest.label": "Afficher la requête optimisée d'Enterprise Search",
|
||||
"xpack.enterpriseSearch.content.productName": "Enterprise Search",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.connect.pageTitle": "Connecter",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.indicesTabTitle": "Index",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.pageTitle": "Contenu",
|
||||
|
@ -13848,7 +13847,6 @@
|
|||
"xpack.enterpriseSearch.nav.searchApplicationsTitle": "Applications de recherche",
|
||||
"xpack.enterpriseSearch.nav.searchExperiencesTitle": "Expériences de recherche",
|
||||
"xpack.enterpriseSearch.nav.searchIndicesTitle": "Index",
|
||||
"xpack.enterpriseSearch.nav.standaloneExperiencesTitle": "Expériences autonomes",
|
||||
"xpack.enterpriseSearch.nav.workplaceSearchTitle": "Workplace Search",
|
||||
"xpack.enterpriseSearch.notFound.action1": "Retour à votre tableau de bord",
|
||||
"xpack.enterpriseSearch.notFound.action2": "Contacter le support technique",
|
||||
|
@ -13920,7 +13918,6 @@
|
|||
"xpack.enterpriseSearch.overview.insufficientPermissionsTitle": "Permissions insuffisantes",
|
||||
"xpack.enterpriseSearch.overview.navTitle": "Aperçu",
|
||||
"xpack.enterpriseSearch.overview.pageTitle": "Bienvenue dans Enterprise Search",
|
||||
"xpack.enterpriseSearch.overview.productName": "Enterprise Search",
|
||||
"xpack.enterpriseSearch.overview.productSelector.title": "Des expériences de recherche pour chaque cas d'utilisation",
|
||||
"xpack.enterpriseSearch.overview.searchIndices.image.altText": "Illustration d'index de recherche",
|
||||
"xpack.enterpriseSearch.overview.setupCta.description": "Ajoutez des fonctions de recherche à votre application ou à votre organisation interne avec Elastic App Search et Workplace Search. Regardez la vidéo pour savoir ce qu'il est possible de faire lorsque la recherche est facilitée.",
|
||||
|
|
|
@ -13358,7 +13358,6 @@
|
|||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "APIキーの詳細",
|
||||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "APIキーを生成",
|
||||
"xpack.enterpriseSearch.content.overview.optimizedRequest.label": "エンタープライズ サーチで最適化されたリクエストを表示",
|
||||
"xpack.enterpriseSearch.content.productName": "エンタープライズ サーチ",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.connect.pageTitle": "接続",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.indicesTabTitle": "インデックス",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.pageTitle": "コンテンツ",
|
||||
|
@ -13847,7 +13846,6 @@
|
|||
"xpack.enterpriseSearch.nav.searchApplicationsTitle": "検索アプリケーション",
|
||||
"xpack.enterpriseSearch.nav.searchExperiencesTitle": "検索エクスペリエンス",
|
||||
"xpack.enterpriseSearch.nav.searchIndicesTitle": "インデックス",
|
||||
"xpack.enterpriseSearch.nav.standaloneExperiencesTitle": "スタンドアロン経験",
|
||||
"xpack.enterpriseSearch.nav.workplaceSearchTitle": "Workplace Search",
|
||||
"xpack.enterpriseSearch.notFound.action1": "ダッシュボードに戻す",
|
||||
"xpack.enterpriseSearch.notFound.action2": "サポートに問い合わせる",
|
||||
|
@ -13919,7 +13917,6 @@
|
|||
"xpack.enterpriseSearch.overview.insufficientPermissionsTitle": "パーミッションがありません",
|
||||
"xpack.enterpriseSearch.overview.navTitle": "概要",
|
||||
"xpack.enterpriseSearch.overview.pageTitle": "エンタープライズ サーチへようこそ",
|
||||
"xpack.enterpriseSearch.overview.productName": "エンタープライズ サーチ",
|
||||
"xpack.enterpriseSearch.overview.productSelector.title": "すべてのユースケースの検索エクスペリエンス",
|
||||
"xpack.enterpriseSearch.overview.searchIndices.image.altText": "検索インデックスの例",
|
||||
"xpack.enterpriseSearch.overview.setupCta.description": "Elastic App Search および Workplace Search を使用して、アプリまたは社内組織に検索を追加できます。検索が簡単になるとどのような利点があるのかについては、動画をご覧ください。",
|
||||
|
|
|
@ -13358,7 +13358,6 @@
|
|||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore": "进一步了解 API 密钥",
|
||||
"xpack.enterpriseSearch.content.overview.generateApiKeyModal.title": "生成 API 密钥",
|
||||
"xpack.enterpriseSearch.content.overview.optimizedRequest.label": "查看 Enterprise Search 优化的请求",
|
||||
"xpack.enterpriseSearch.content.productName": "Enterprise Search",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.connect.pageTitle": "连接",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.indicesTabTitle": "索引",
|
||||
"xpack.enterpriseSearch.searchApplications.searchApplication.content.pageTitle": "内容",
|
||||
|
@ -13847,7 +13846,6 @@
|
|||
"xpack.enterpriseSearch.nav.searchApplicationsTitle": "搜索应用程序",
|
||||
"xpack.enterpriseSearch.nav.searchExperiencesTitle": "搜索体验",
|
||||
"xpack.enterpriseSearch.nav.searchIndicesTitle": "索引",
|
||||
"xpack.enterpriseSearch.nav.standaloneExperiencesTitle": "独立体验",
|
||||
"xpack.enterpriseSearch.nav.workplaceSearchTitle": "Workplace Search",
|
||||
"xpack.enterpriseSearch.notFound.action1": "返回到您的仪表板",
|
||||
"xpack.enterpriseSearch.notFound.action2": "联系支持人员",
|
||||
|
@ -13919,7 +13917,6 @@
|
|||
"xpack.enterpriseSearch.overview.insufficientPermissionsTitle": "权限不足",
|
||||
"xpack.enterpriseSearch.overview.navTitle": "概览",
|
||||
"xpack.enterpriseSearch.overview.pageTitle": "欢迎使用 Enterprise Search",
|
||||
"xpack.enterpriseSearch.overview.productName": "Enterprise Search",
|
||||
"xpack.enterpriseSearch.overview.productSelector.title": "每个用例的搜索体验",
|
||||
"xpack.enterpriseSearch.overview.searchIndices.image.altText": "搜索索引图示",
|
||||
"xpack.enterpriseSearch.overview.setupCta.description": "通过 Elastic App Search 和 Workplace Search,将搜索添加到您的应用或内部组织中。观看视频,了解方便易用的搜索功能可以帮您做些什么。",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue