diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/engine_creation.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/engine_creation.tsx index 913aa4f0ec8452..18b8390081467e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/engine_creation.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_creation/engine_creation.tsx @@ -22,6 +22,7 @@ import { EuiButton, } from '@elastic/eui'; +import { ENGINES_TITLE } from '../engines'; import { AppSearchPageTemplate } from '../layout'; import { @@ -43,7 +44,7 @@ export const EngineCreation: React.FC = () => { return ( diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/components/empty_state.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/components/empty_state.test.tsx index 159a986096ae2a..9117fdd0be87dd 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/components/empty_state.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/components/empty_state.test.tsx @@ -53,7 +53,7 @@ describe('EmptyState', () => { }); it('sends a user to engine creation', () => { - expect(button.prop('to')).toEqual('/engine_creation'); + expect(button.prop('to')).toEqual('/engines/new'); }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation.tsx index 325e557acec0cd..1455444ab2b4bb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation.tsx @@ -25,6 +25,7 @@ import { } from '@elastic/eui'; import { AppLogic } from '../../app_logic'; +import { ENGINES_TITLE } from '../engines'; import { AppSearchPageTemplate } from '../layout'; import { @@ -73,7 +74,7 @@ export const MetaEngineCreation: React.FC = () => { return ( > = (props) = - - - {canManageEngines && ( @@ -117,6 +114,9 @@ export const AppSearchConfigured: React.FC> = (props) = )} + + + {canViewSettings && ( diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts index bd5bdb7b2f6651..d9d1935c648f72 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts @@ -18,7 +18,7 @@ export const CREDENTIALS_PATH = '/credentials'; export const ROLE_MAPPINGS_PATH = '/role_mappings'; export const ENGINES_PATH = '/engines'; -export const ENGINE_CREATION_PATH = '/engine_creation'; +export const ENGINE_CREATION_PATH = `${ENGINES_PATH}/new`; // This is safe from conflicting with an :engineName path because new is a reserved name export const ENGINE_PATH = `${ENGINES_PATH}/:engineName`; export const ENGINE_ANALYTICS_PATH = `${ENGINE_PATH}/analytics`; @@ -39,7 +39,7 @@ export const ENGINE_REINDEX_JOB_PATH = `${ENGINE_SCHEMA_PATH}/reindex_job/:reind export const ENGINE_CRAWLER_PATH = `${ENGINE_PATH}/crawler`; export const ENGINE_CRAWLER_DOMAIN_PATH = `${ENGINE_CRAWLER_PATH}/domains/:domainId`; -export const META_ENGINE_CREATION_PATH = '/meta_engine_creation'; +export const META_ENGINE_CREATION_PATH = `${ENGINES_PATH}/new_meta_engine`; // This is safe from conflicting with an :engineName path because engine names cannot have underscores export const META_ENGINE_SOURCE_ENGINES_PATH = `${ENGINE_PATH}/engines`; export const ENGINE_RELEVANCE_TUNING_PATH = `${ENGINE_PATH}/relevance_tuning`;