Skip to content

Commit

Permalink
[8.x] [Ent Search Deprecation] Update enterprise_search URLs to elast…
Browse files Browse the repository at this point in the history
…icsearch for elasticsearch->content (#202838) (#203890)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Ent Search Deprecation] Update enterprise_search URLs to
elasticsearch for elasticsearch->content
(#202838)](#202838)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Saikat
Sarkar","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T05:30:55Z","message":"[Ent
Search Deprecation] Update enterprise_search URLs to elasticsearch for
elasticsearch->content (#202838)\n\nThis PR resolves
this\r\n[issue](elastic/search-team#7961). In
this PR,\r\nwe changed the following Urls by replacing
'enterprise_search' with\r\n'elasticsearch'.\r\n\r\n| Old URL | New URL
|\r\n| :-------------------------------------
|\r\n:------------------------------------- |\r\n|
app/enterprise_search/overview | app/elasticsearch/overview | \r\n|
app/enterprise_search/content/search_indices
|\r\napp/elasticsearch/content/search_indices |\r\n|
app/enterprise_search/content/connectors
|\r\napp/elasticsearch/content/connectors |​\r\n|
app/enterprise_search/content/crawlers
|\r\napp/elasticsearch/content/crawlers
|\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"c5e8b7e72293d3fc6e39e603045b42afdfba8cc6","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:EnterpriseSearch","backport:prev-minor","v8.18.0"],"number":202838,"url":"https://github.com/elastic/kibana/pull/202838","mergeCommit":{"message":"[Ent
Search Deprecation] Update enterprise_search URLs to elasticsearch for
elasticsearch->content (#202838)\n\nThis PR resolves
this\r\n[issue](elastic/search-team#7961). In
this PR,\r\nwe changed the following Urls by replacing
'enterprise_search' with\r\n'elasticsearch'.\r\n\r\n| Old URL | New URL
|\r\n| :-------------------------------------
|\r\n:------------------------------------- |\r\n|
app/enterprise_search/overview | app/elasticsearch/overview | \r\n|
app/enterprise_search/content/search_indices
|\r\napp/elasticsearch/content/search_indices |\r\n|
app/enterprise_search/content/connectors
|\r\napp/elasticsearch/content/connectors |​\r\n|
app/enterprise_search/content/crawlers
|\r\napp/elasticsearch/content/crawlers
|\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"c5e8b7e72293d3fc6e39e603045b42afdfba8cc6"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202838","number":202838,"mergeCommit":{"message":"[Ent
Search Deprecation] Update enterprise_search URLs to elasticsearch for
elasticsearch->content (#202838)\n\nThis PR resolves
this\r\n[issue](elastic/search-team#7961). In
this PR,\r\nwe changed the following Urls by replacing
'enterprise_search' with\r\n'elasticsearch'.\r\n\r\n| Old URL | New URL
|\r\n| :-------------------------------------
|\r\n:------------------------------------- |\r\n|
app/enterprise_search/overview | app/elasticsearch/overview | \r\n|
app/enterprise_search/content/search_indices
|\r\napp/elasticsearch/content/search_indices |\r\n|
app/enterprise_search/content/connectors
|\r\napp/elasticsearch/content/connectors |​\r\n|
app/enterprise_search/content/crawlers
|\r\napp/elasticsearch/content/crawlers
|\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"c5e8b7e72293d3fc6e39e603045b42afdfba8cc6"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
  • Loading branch information
saikatsarkar056 authored Dec 12, 2024
1 parent 7c867ab commit 8bc619d
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 52 deletions.
8 changes: 4 additions & 4 deletions src/plugins/console/public/application/lib/load_from.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ describe('load from lib', () => {
it('works with a non-hash route', () => {
mockWindow.location = {
...mockWindow.location,
pathname: '/foo/app/enterprise_search/overview',
pathname: '/foo/app/elasticsearch/overview',
};
const codeSnippet = 'GET /_stats';
const expectedUrl =
'https://my-kibana.elastic.co/foo/app/enterprise_search/overview?load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA';
'https://my-kibana.elastic.co/foo/app/elasticsearch/overview?load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA';

setLoadFromParameter(codeSnippet);
expect(mockWindow.history.pushState).toHaveBeenCalledTimes(1);
Expand All @@ -121,12 +121,12 @@ describe('load from lib', () => {
it('works with a non-hash route and other params', () => {
mockWindow.location = {
...mockWindow.location,
pathname: '/foo/app/enterprise_search/overview',
pathname: '/foo/app/elasticsearch/overview',
search: '?foo=bar',
};
const codeSnippet = 'GET /_stats';
const expectedUrl =
'https://my-kibana.elastic.co/foo/app/enterprise_search/overview?foo=bar&load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA';
'https://my-kibana.elastic.co/foo/app/elasticsearch/overview?foo=bar&load_from=data%3Atext%2Fplain%2COIUQKgBA9A%2BgzgFwIYLkA';

setLoadFromParameter(codeSnippet);
expect(mockWindow.history.pushState).toHaveBeenCalledTimes(1);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/navigation/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const DEFAULT_ROUTE_UI_SETTING_ID = 'defaultRoute';

export const DEFAULT_ROUTES = {
classic: '/app/home',
es: '/app/enterprise_search/overview',
es: '/app/elasticsearch/overview',
oblt: '/app/observabilityOnboarding',
security: '/app/security/get_started',
};
4 changes: 2 additions & 2 deletions x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const ENTERPRISE_SEARCH_OVERVIEW_PLUGIN = {
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.overview.description', {
defaultMessage: 'Create search experiences with a refined set of APIs and tools.',
}),
URL: '/app/enterprise_search/overview',
URL: '/app/elasticsearch/overview',
LOGO: 'logoEnterpriseSearch',
};

Expand All @@ -55,7 +55,7 @@ export const ENTERPRISE_SEARCH_CONTENT_PLUGIN = {
defaultMessage:
'Enterprise search offers a number of ways to easily make your data searchable. Choose from the web crawler, Elasticsearch indices, API, direct uploads, or thrid party connectors.', // TODO: Make sure this content is correct.
}),
URL: '/app/enterprise_search/content',
URL: '/app/elasticsearch/content',
LOGO: 'logoEnterpriseSearch',
SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*/

export const ROUTES = {
CRAWLER_INDEX: '/app/enterprise_search/content/crawlers/new_crawler',
NEW_INDEX: '/app/enterprise_search/content/search_indices/new_index',
SEARCH_INDICES_OVERVIEW: '/app/enterprise_search/content/search_indices/',
SELECT_CONNECTOR: '/app/enterprise_search/content/connectors/select_connector',
CRAWLER_INDEX: '/app/elasticsearch/content/crawlers/new_crawler',
NEW_INDEX: '/app/elasticsearch/content/search_indices/new_index',
SEARCH_INDICES_OVERVIEW: '/app/elasticsearch/content/search_indices/',
SELECT_CONNECTOR: '/app/elasticsearch/content/connectors/select_connector',
};

export const SEARCH_INDICES = {
Expand Down Expand Up @@ -66,5 +66,5 @@ export const INDEX_OVERVIEW = {
};

export const getIndexRoute = (indexName: string) => {
return `/app/enterprise_search/content/search_indices/search-${indexName}/`;
return `/app/elasticsearch/content/search_indices/search-${indexName}/`;
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* 2.0.
*/

export const overviewPath = '/app/enterprise_search/overview';
export const overviewPath = '/app/elasticsearch/overview';
export const appSearchPath = '/app/enterprise_search/app_search';
export const workplaceSearchPath = '/app/enterprise_search/workplace_search';
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('useSearchBreadcrumbs', () => {
expect(useSearchBreadcrumbs(breadcrumbs)).toEqual([
{
text: 'Elasticsearch',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('useEnterpriseSearchBreadcrumbs', () => {
expect(useEnterpriseSearchBreadcrumbs(breadcrumbs)).toEqual([
{
text: 'Enterprise Search',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('useAppSearchBreadcrumbs', () => {
expect(useAppSearchBreadcrumbs(breadcrumbs)).toEqual([
{
text: 'Enterprise Search',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand All @@ -275,7 +275,7 @@ describe('useAppSearchBreadcrumbs', () => {
expect(useAppSearchBreadcrumbs()).toEqual([
{
text: 'Enterprise Search',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('useWorkplaceSearchBreadcrumbs', () => {
expect(useWorkplaceSearchBreadcrumbs(breadcrumbs)).toEqual([
{
text: 'Enterprise Search',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand All @@ -331,7 +331,7 @@ describe('useWorkplaceSearchBreadcrumbs', () => {
expect(useWorkplaceSearchBreadcrumbs()).toEqual([
{
text: 'Enterprise Search',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
onClick: expect.any(Function),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ describe('generateSideNavItems', () => {
const deepLinksMap = {
enterpriseSearch: {
id: 'enterpriseSearch',
url: '/app/enterprise_search/overview',
url: '/app/elasticsearch/overview',
title: 'Overview',
},
'enterpriseSearchContent:searchIndices': {
id: 'enterpriseSearchContent:searchIndices',
title: 'Indices',
url: '/app/enterprise_search/content/search_indices',
url: '/app/elasticsearch/content/search_indices',
},
'enterpriseSearchContent:connectors': {
id: 'enterpriseSearchContent:connectors',
title: 'Connectors',
url: '/app/enterprise_search/content/connectors',
url: '/app/elasticsearch/content/connectors',
},
'enterpriseSearchContent:webCrawlers': {
id: 'enterpriseSearchContent:webCrawlers',
title: 'Web Crawlers',
url: '/app/enterprise_search/content/crawlers',
url: '/app/elasticsearch/content/crawlers',
},
} as unknown as Record<string, ChromeNavLink | undefined>;
beforeEach(() => {
Expand All @@ -58,7 +58,7 @@ describe('generateSideNavItems', () => {

expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Overview',
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('generateSideNavItems', () => {
id: 'parent',
items: [
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Overview',
Expand All @@ -113,7 +113,7 @@ describe('generateSideNavItems', () => {

expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Home',
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('generateSideNavItems', () => {

expect(generateSideNavItems(classicNavItems, deepLinksMap)).toEqual([
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Home',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DEFAULT_PRODUCT_ACCESS: ProductAccess = {
const baseNavItems = [
expect.objectContaining({
'data-test-subj': 'searchSideNav-Home',
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'home',
items: undefined,
}),
Expand All @@ -45,21 +45,21 @@ const baseNavItems = [
items: [
{
'data-test-subj': 'searchSideNav-Indices',
href: '/app/enterprise_search/content/search_indices',
href: '/app/elasticsearch/content/search_indices',
id: 'search_indices',
items: [],
name: 'Indices',
},
{
'data-test-subj': 'searchSideNav-Connectors',
href: '/app/enterprise_search/content/connectors',
href: '/app/elasticsearch/content/connectors',
id: 'connectors',
items: undefined,
name: 'Connectors',
},
{
'data-test-subj': 'searchSideNav-Crawlers',
href: '/app/enterprise_search/content/crawlers',
href: '/app/elasticsearch/content/crawlers',
id: 'crawlers',
items: undefined,
name: 'Web Crawlers',
Expand Down Expand Up @@ -170,22 +170,22 @@ const baseNavItems = [
const mockNavLinks = [
{
id: 'enterpriseSearch',
url: '/app/enterprise_search/overview',
url: '/app/elasticsearch/overview',
},
{
id: 'enterpriseSearchContent:searchIndices',
title: 'Indices',
url: '/app/enterprise_search/content/search_indices',
url: '/app/elasticsearch/content/search_indices',
},
{
id: 'enterpriseSearchContent:connectors',
title: 'Connectors',
url: '/app/enterprise_search/content/connectors',
url: '/app/elasticsearch/content/connectors',
},
{
id: 'enterpriseSearchContent:webCrawlers',
title: 'Web Crawlers',
url: '/app/enterprise_search/content/crawlers',
url: '/app/elasticsearch/content/crawlers',
},
{
id: 'searchPlayground',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/public/navigation_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const getNavigationTreeDefinition = ({

return (
pathNameSerialized ===
prepend(`/app/enterprise_search/content${SEARCH_INDICES_PATH}`)
prepend(`/app/elasticsearch/content${SEARCH_INDICES_PATH}`)
);
},
link: 'enterpriseSearchContent:searchIndices',
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/enterprise_search/server/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const registerEnterpriseSearchIntegrations = (
defaultMessage: 'Add search to your website with the web crawler.',
}),
categories: ['search', 'web', 'elastic_stack', 'crawler'],
uiInternalPath: '/app/enterprise_search/content/crawlers/new_crawler',
uiInternalPath: '/app/elasticsearch/content/crawlers/new_crawler',
icons: [
{
type: 'eui',
Expand All @@ -49,7 +49,7 @@ export const registerEnterpriseSearchIntegrations = (
defaultMessage: "Add search to your application with Elasticsearch's robust APIs.",
}),
categories: ['search', 'custom', 'elastic_stack', 'sdk_search', 'language_client'],
uiInternalPath: '/app/enterprise_search/content/search_indices/new_index/api',
uiInternalPath: '/app/elasticsearch/content/search_indices/new_index/api',
icons: [
{
type: 'eui',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ describe('classicNavigationFactory', function () {
const mockedNavLinks: Array<Partial<ChromeNavLink>> = [
{
id: 'enterpriseSearch',
url: '/app/enterprise_search/overview',
url: '/app/elasticsearch/overview',
title: 'Overview',
},
{
id: 'enterpriseSearchContent:searchIndices',
title: 'Indices',
url: '/app/enterprise_search/content/search_indices',
url: '/app/elasticsearch/content/search_indices',
},
{
id: 'enterpriseSearchContent:connectors',
title: 'Connectors',
url: '/app/enterprise_search/content/connectors',
url: '/app/elasticsearch/content/connectors',
},
{
id: 'enterpriseSearchContent:webCrawlers',
title: 'Web Crawlers',
url: '/app/enterprise_search/content/crawlers',
url: '/app/elasticsearch/content/crawlers',
},
];
const mockedCoreStart = {
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('classicNavigationFactory', function () {
icon: 'logoEnterpriseSearch',
items: [
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Overview',
Expand All @@ -82,7 +82,7 @@ describe('classicNavigationFactory', function () {

it('will set isSelected', () => {
mockHistory.location.pathname = '/overview';
mockHistory.createHref.mockReturnValue('/app/enterprise_search/overview');
mockHistory.createHref.mockReturnValue('/app/elasticsearch/overview');

const items: ClassicNavItem[] = [
{
Expand All @@ -96,7 +96,7 @@ describe('classicNavigationFactory', function () {
const solutionNav = classicNavigationFactory(items, core, history);
expect(solutionNav!.items).toEqual([
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: true,
name: 'Overview',
Expand Down Expand Up @@ -132,14 +132,14 @@ describe('classicNavigationFactory', function () {
id: 'searchContent',
items: [
{
href: '/app/enterprise_search/content/search_indices',
href: '/app/elasticsearch/content/search_indices',
id: 'searchIndices',
isSelected: false,
name: 'Indices',
onClick: expect.any(Function),
},
{
href: '/app/enterprise_search/content/connectors',
href: '/app/elasticsearch/content/connectors',
id: 'searchConnectors',
isSelected: false,
name: 'Connectors',
Expand All @@ -163,7 +163,7 @@ describe('classicNavigationFactory', function () {
const solutionNav = classicNavigationFactory(items, core, history);
expect(solutionNav!.items).toEqual([
{
href: '/app/enterprise_search/content/search_indices',
href: '/app/elasticsearch/content/search_indices',
id: 'searchIndices',
isSelected: false,
name: 'Index Management',
Expand All @@ -190,7 +190,7 @@ describe('classicNavigationFactory', function () {
const solutionNav = classicNavigationFactory(items, core, history);
expect(solutionNav!.items).toEqual([
{
href: '/app/enterprise_search/overview',
href: '/app/elasticsearch/overview',
id: 'unit-test',
isSelected: false,
name: 'Overview',
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/accessibility/apps/group3/enterprise_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('Overview', () => {
before(async () => {
await common.navigateToApp('enterprise_search/overview');
await common.navigateToApp('elasticsearch/overview');
});

it('loads a landing page with product cards', async function () {
Expand Down Expand Up @@ -59,7 +59,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('Content', () => {
before(async () => {
await common.navigateToApp('enterprise_search/content/search_indices');
await common.navigateToApp('elasticsearch/content/search_indices');
});

it('loads the indices page', async function () {
Expand Down
Loading

0 comments on commit 8bc619d

Please sign in to comment.