Skip to content

Commit

Permalink
Search rename to elasticsearch (elastic#200774)
Browse files Browse the repository at this point in the history
This renames the Search solution to Elasticsearch to fit with our
rebranding efforts.
  • Loading branch information
sphilipse authored and paulinashakirova committed Nov 26, 2024
1 parent d4a277d commit 123a1a8
Show file tree
Hide file tree
Showing 28 changed files with 113 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DEFAULT_APP_CATEGORIES: Record<string, AppCategory> = Object.freeze
enterpriseSearch: {
id: 'enterpriseSearch',
label: i18n.translate('core.ui.searchNavList.label', {
defaultMessage: 'Search',
defaultMessage: 'Elasticsearch',
}),
order: 2000,
euiIconType: 'logoEnterpriseSearch',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const GuideFilters = ({ activeFilter, setActiveFilter, application }: Gui
>
<FormattedMessage
id="guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel"
defaultMessage="Search"
defaultMessage="Elasticsearch"
/>
</EuiButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const GuideFilters = ({
>
<FormattedMessage
id="guidedOnboardingPackage.gettingStarted.guideFilter.search.buttonLabel"
defaultMessage="Search"
defaultMessage="Elasticsearch"
/>
</EuiButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const names: Record<string, string> = {
defaultMessage: 'Reporting',
}),
[SEARCH_CATEGORY]: i18n.translate('management.settings.categoryNames.searchLabel', {
defaultMessage: 'Search',
defaultMessage: 'Elasticsearch',
}),
[SECURITY_SOLUTION_CATEGORY]: i18n.translate(
'management.settings.categoryNames.securitySolutionLabel',
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/custom_integrations/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
productivity_security: { title: 'Productivity', parent_id: 'security' },
proxy_security: { title: 'Proxy', parent_id: 'security' },
sdk_search: { title: 'SDK', parent_id: 'search' },
search: { title: 'Search', parent_id: undefined },
search: { title: 'Elasticsearch', parent_id: undefined },
security: { title: 'Security', parent_id: undefined },
stream_processing: { title: 'Stream Processing', parent_id: 'observability' },
support: { title: 'Support', parent_id: undefined },
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { IngestPipelineParams } from '@kbn/search-connectors';
import { ProductFeatures } from './types';

export const SEARCH_PRODUCT_NAME = i18n.translate('xpack.enterpriseSearch.search.productName', {
defaultMessage: 'Search',
defaultMessage: 'Elasticsearch',
});
export const ENTERPRISE_SEARCH_PRODUCT_NAME = i18n.translate('xpack.enterpriseSearch.productName', {
defaultMessage: 'Enterprise Search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const AISearchGuide: React.FC = () => {
bottomBorder={false}
pageHeader={{
pageTitle: i18n.translate('xpack.enterpriseSearch.aiSearch.guide.pageTitle', {
defaultMessage: 'Improve search revelance with AI',
defaultMessage: 'Improve search relevance with AI',
}),
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import React from 'react';

import { shallow } from 'enzyme';

import { i18n } from '@kbn/i18n';

import { SetAiSearchChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
Expand All @@ -23,12 +25,14 @@ describe('EnterpriseSearchAISearchPageTemplate', () => {
it('renders', () => {
const wrapper = shallow(
<EnterpriseSearchAISearchPageTemplate>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchAISearchPageTemplate>
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('EnterpriseSearchAnalyticsPageTemplate', () => {
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import React from 'react';

import { shallow } from 'enzyme';

import { i18n } from '@kbn/i18n';

import { SetElasticsearchChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
Expand All @@ -23,12 +25,14 @@ describe('EnterpriseSearchElasticsearchPageTemplate', () => {
it('renders', () => {
const wrapper = shallow(
<EnterpriseSearchElasticsearchPageTemplate>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchElasticsearchPageTemplate>
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import React from 'react';

import { shallow } from 'enzyme';

import { i18n } from '@kbn/i18n';

import { SetEnterpriseSearchContentChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
Expand All @@ -23,12 +25,14 @@ describe('EnterpriseSearchContentPageTemplate', () => {
it('renders', () => {
const wrapper = shallow(
<EnterpriseSearchContentPageTemplate>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchContentPageTemplate>
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import React from 'react';

import { shallow } from 'enzyme';

import { i18n } from '@kbn/i18n';

import { SetSearchChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
Expand All @@ -23,12 +25,14 @@ describe('EnterpriseSearchOverviewPageTemplate', () => {
it('renders', () => {
const wrapper = shallow(
<EnterpriseSearchOverviewPageTemplate>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchOverviewPageTemplate>
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('EnterpriseSearchRelevancePageTemplate', () => {
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ items: [], name: 'Search' });
expect(wrapper.prop('solutionNav')).toEqual({ items: [], name: 'Elasticsearch' });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import React from 'react';

import { shallow } from 'enzyme';

import { i18n } from '@kbn/i18n';

import { SetSearchExperiencesChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchPageTemplateWrapper } from '../../../shared/layout';
import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry';
Expand All @@ -23,12 +25,14 @@ describe('EnterpriseSearchSearchExperiencesPageTemplate', () => {
it('renders', () => {
const wrapper = shallow(
<EnterpriseSearchSearchExperiencesPageTemplate>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchSearchExperiencesPageTemplate>
);

expect(wrapper.type()).toEqual(EnterpriseSearchPageTemplateWrapper);
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Search', items: [] });
expect(wrapper.prop('solutionNav')).toEqual({ name: 'Elasticsearch', items: [] });
expect(wrapper.find('.hello').text()).toEqual('world');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe('useSearchBreadcrumbs', () => {

expect(useSearchBreadcrumbs(breadcrumbs)).toEqual([
{
text: 'Search',
text: 'Elasticsearch',
href: '/app/enterprise_search/overview',
onClick: expect.any(Function),
},
Expand All @@ -180,7 +180,7 @@ describe('useSearchBreadcrumbs', () => {
it('shows just the root if breadcrumbs is empty', () => {
expect(useSearchBreadcrumbs()).toEqual([
{
text: 'Search',
text: 'Elasticsearch',
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ describe('generateTitle', () => {
describe('searchTitle', () => {
it('automatically appends the Enterprise Search product onto the pages array', () => {
const title = searchTitle(['Setup Guide']);
expect(title).toEqual('Setup Guide - Search');
expect(title).toEqual('Setup Guide - Elasticsearch');
});

it('can be mixed and matched', () => {
const title = searchTitle([appSearchTitle(['Some Page'])]);
expect(title).toEqual('Some Page - App Search - Search');
expect(title).toEqual('Some Page - App Search - Elasticsearch');
});

it('falls back to product name', () => {
const title = searchTitle();
expect(title).toEqual('Search');
expect(title).toEqual('Elasticsearch');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import React from 'react';
import { shallow } from 'enzyme';

import { EuiCallOut } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';

Expand All @@ -35,7 +36,9 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {
it('renders children', () => {
const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchPageTemplateWrapper>
);

Expand Down Expand Up @@ -71,7 +74,13 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {
const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper
isEmptyState
emptyState={<div className="emptyState">Nothing here yet!</div>}
emptyState={
<div className="emptyState">
{i18n.translate('xpack.enterpriseSearch..div.nothingHereYetLabel', {
defaultMessage: 'Nothing here yet!',
})}
</div>
}
>
<div className="test" />
</EnterpriseSearchPageTemplateWrapper>
Expand All @@ -88,7 +97,13 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {
const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper
isEmptyState={false}
emptyState={<div className="emptyState">Nothing here yet!</div>}
emptyState={
<div className="emptyState">
{i18n.translate('xpack.enterpriseSearch..div.nothingHereYetLabel', {
defaultMessage: 'Nothing here yet!',
})}
</div>
}
>
<div className="test" />
</EnterpriseSearchPageTemplateWrapper>
Expand Down Expand Up @@ -201,37 +216,43 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {
);
});

it('automatically sets the Search logo onto passed solution navs', () => {
it('automatically sets the Elasticsearch logo onto passed solution navs', () => {
const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper solutionNav={{ name: 'Search', items: [] }} />
<EnterpriseSearchPageTemplateWrapper solutionNav={{ name: 'Elasticsearch', items: [] }} />
);

expect(wrapper.find(KibanaPageTemplate).prop('solutionNav')).toEqual({
icon: 'logoEnterpriseSearch',
name: 'Search',
name: 'Elasticsearch',
items: [],
});
});

it('sets the solutionNavIcon passed', () => {
const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper
solutionNav={{ name: 'Search', items: [] }}
solutionNav={{ name: 'Elasticsearch', items: [] }}
solutionNavIcon="logoElasticsearch"
/>
);

expect(wrapper.find(KibanaPageTemplate).prop('solutionNav')).toEqual({
icon: 'logoElasticsearch',
name: 'Search',
name: 'Elasticsearch',
items: [],
});
});
});

describe('Embedded Console', () => {
it('renders embedded console if available', () => {
const FakeEmbeddedConsole: React.FC = () => <div className="embedded_console">foo</div>;
const FakeEmbeddedConsole: React.FC = () => (
<div className="embedded_console">
{i18n.translate('xpack.enterpriseSearch.fakeEmbeddedConsole.div.fooLabel', {
defaultMessage: 'foo',
})}
</div>
);
const consolePlugin = { EmbeddableConsole: FakeEmbeddedConsole };

setMockValues({
Expand All @@ -241,14 +262,22 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {

const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchPageTemplateWrapper>
);

expect(wrapper.find(consolePlugin.EmbeddableConsole).exists()).toBe(true);
});
it('Hides embedded console if available but page template prop set to hide', () => {
const FakeEmbeddedConsole: React.FC = () => <div className="embedded_console">foo</div>;
const FakeEmbeddedConsole: React.FC = () => (
<div className="embedded_console">
{i18n.translate('xpack.enterpriseSearch.fakeEmbeddedConsole.div.fooLabel', {
defaultMessage: 'foo',
})}
</div>
);
const consolePlugin = { EmbeddableConsole: FakeEmbeddedConsole };

setMockValues({
Expand All @@ -258,7 +287,9 @@ describe('EnterpriseSearchPageTemplateWrapper', () => {

const wrapper = shallow(
<EnterpriseSearchPageTemplateWrapper hideEmbeddedConsole>
<div className="hello">world</div>
<div className="hello">
{i18n.translate('xpack.enterpriseSearch..div.worldLabel', { defaultMessage: 'world' })}
</div>
</EnterpriseSearchPageTemplateWrapper>
);

Expand Down
Loading

0 comments on commit 123a1a8

Please sign in to comment.