mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Enterprise Search] 8.4 copy fixes (#138033)
* Fix API integration tile copy * DRY out new index steps
This commit is contained in:
parent
c4407569cd
commit
9c36b9ac20
5 changed files with 108 additions and 178 deletions
|
@ -13,6 +13,7 @@ import { EuiSteps, EuiText } from '@elastic/eui';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
|
||||
import { NewSearchIndexTemplate } from '../new_search_index_template';
|
||||
|
||||
import { MethodApiLogic } from './method_api_logic';
|
||||
|
@ -32,30 +33,7 @@ export const MethodApi: React.FC = () => {
|
|||
>
|
||||
<EuiSteps
|
||||
steps={[
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content',
|
||||
{
|
||||
defaultMessage:
|
||||
'Provide a unique name for your index and select an optional index language.',
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
|
||||
{
|
||||
defaultMessage: 'Create an Elasticsearch index',
|
||||
}
|
||||
),
|
||||
|
||||
titleSize: 'xs',
|
||||
},
|
||||
CREATE_ELASTICSEARCH_INDEX_STEP,
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
|
@ -79,29 +57,7 @@ export const MethodApi: React.FC = () => {
|
|||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.api.steps.buildSearchExperience.content',
|
||||
{
|
||||
defaultMessage:
|
||||
'Connect your newly created Elasticsearch index to an App Search engine to build a cusomtizable search experience.',
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
|
||||
{
|
||||
defaultMessage: 'Build a search experience',
|
||||
}
|
||||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
BUILD_SEARCH_EXPERIENCE_STEP,
|
||||
]}
|
||||
/>
|
||||
</NewSearchIndexTemplate>
|
||||
|
|
|
@ -15,17 +15,12 @@ import { i18n } from '@kbn/i18n';
|
|||
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import {
|
||||
APP_SEARCH_URL,
|
||||
ENTERPRISE_SEARCH_ELASTICSEARCH_URL,
|
||||
} from '../../../../../../common/constants';
|
||||
|
||||
import { HttpError, Status } from '../../../../../../common/types/api';
|
||||
import { ErrorCode } from '../../../../../../common/types/error_codes';
|
||||
import { docLinks } from '../../../../shared/doc_links';
|
||||
import { EuiLinkTo } from '../../../../shared/react_router_helpers';
|
||||
import { AddConnectorPackageApiLogic } from '../../../api/connector_package/add_connector_package_api_logic';
|
||||
|
||||
import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
|
||||
import { NewSearchIndexLogic } from '../new_search_index_logic';
|
||||
import { NewSearchIndexTemplate } from '../new_search_index_template';
|
||||
|
||||
|
@ -133,37 +128,7 @@ export const MethodConnector: React.FC = () => {
|
|||
>
|
||||
<EuiSteps
|
||||
steps={[
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.newIndex.methodConnector.steps.createConnectorIndex.content"
|
||||
defaultMessage="Provide a unique index name and optionally set a default {languageAnalyzerDocLink} for the index. This index will hold your data source content, and is optimized with default field mappings for relevant search experiences."
|
||||
values={{
|
||||
languageAnalyzerDocLink: (
|
||||
<EuiLink href={docLinks.languageAnalyzers} target="_blank" external>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.createConnectorIndex.languageAnalyzerLink',
|
||||
{ defaultMessage: 'language analyzer' }
|
||||
)}
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
|
||||
{
|
||||
defaultMessage: 'Create an Elasticsearch index',
|
||||
}
|
||||
),
|
||||
|
||||
titleSize: 'xs',
|
||||
},
|
||||
CREATE_ELASTICSEARCH_INDEX_STEP,
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
|
@ -194,52 +159,7 @@ export const MethodConnector: React.FC = () => {
|
|||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.newIndex.connector.steps.buildSearchExperience.content"
|
||||
defaultMessage="After building your connector, your content is ready. Build your first search experience with {elasticsearchLink}, or explore the search experience tools provided by {appSearchLink}. We recommend that you create a {searchEngineLink} for the best balance of flexible power and turnkey simplicity."
|
||||
values={{
|
||||
appSearchLink: (
|
||||
<EuiLinkTo to={APP_SEARCH_URL} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.appSearchLink',
|
||||
{ defaultMessage: 'App Search' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
elasticsearchLink: (
|
||||
<EuiLinkTo to={ENTERPRISE_SEARCH_ELASTICSEARCH_URL} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.elasticsearchLink',
|
||||
{ defaultMessage: 'Elasticsearch' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
searchEngineLink: (
|
||||
<EuiLinkTo to={`${APP_SEARCH_URL}/engines/new`} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.methodConnector.steps.buildConnector.searchEngineLink',
|
||||
{ defaultMessage: 'search engine' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
|
||||
{
|
||||
defaultMessage: 'Build a search experience',
|
||||
}
|
||||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
BUILD_SEARCH_EXPERIENCE_STEP,
|
||||
]}
|
||||
/>
|
||||
{confirmModal}
|
||||
|
|
|
@ -16,6 +16,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { Status } from '../../../../../../common/types/api';
|
||||
import { docLinks } from '../../../../shared/doc_links';
|
||||
import { CreateCrawlerIndexApiLogic } from '../../../api/crawler/create_crawler_index_api_logic';
|
||||
import { CREATE_ELASTICSEARCH_INDEX_STEP, BUILD_SEARCH_EXPERIENCE_STEP } from '../method_steps';
|
||||
import { NewSearchIndexTemplate } from '../new_search_index_template';
|
||||
|
||||
import { MethodCrawlerLogic } from './method_crawler_logic';
|
||||
|
@ -41,30 +42,7 @@ export const MethodCrawler: React.FC = () => {
|
|||
>
|
||||
<EuiSteps
|
||||
steps={[
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.content',
|
||||
{
|
||||
defaultMessage:
|
||||
'Provide a unique name for your index and select an optional index language.',
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.title',
|
||||
{
|
||||
defaultMessage: 'Create an Elasticsearch index',
|
||||
}
|
||||
),
|
||||
|
||||
titleSize: 'xs',
|
||||
},
|
||||
CREATE_ELASTICSEARCH_INDEX_STEP,
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
|
@ -88,29 +66,7 @@ export const MethodCrawler: React.FC = () => {
|
|||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
{
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.crawler.steps.buildSearchExperience.content',
|
||||
{
|
||||
defaultMessage:
|
||||
'Connect your newly created Elasticsearch index to an App Search engine to build a cusomtizable search experience.',
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
|
||||
{
|
||||
defaultMessage: 'Build a search experience',
|
||||
}
|
||||
),
|
||||
titleSize: 'xs',
|
||||
},
|
||||
BUILD_SEARCH_EXPERIENCE_STEP,
|
||||
]}
|
||||
/>
|
||||
</NewSearchIndexTemplate>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* 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 { EuiLink, EuiText } from '@elastic/eui';
|
||||
|
||||
import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import {
|
||||
APP_SEARCH_URL,
|
||||
ENTERPRISE_SEARCH_ELASTICSEARCH_URL,
|
||||
} from '../../../../../common/constants';
|
||||
import { docLinks } from '../../../shared/doc_links';
|
||||
import { EuiLinkTo } from '../../../shared/react_router_helpers';
|
||||
|
||||
export const CREATE_ELASTICSEARCH_INDEX_STEP: EuiContainedStepProps = {
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.newIndex.steps.createIndex.content"
|
||||
defaultMessage="Provide a unique index name and optionally set a default {languageAnalyzerDocLink} for the index. This index will hold your data source content, and is optimized with default field mappings for relevant search experiences."
|
||||
values={{
|
||||
languageAnalyzerDocLink: (
|
||||
<EuiLink href={docLinks.languageAnalyzers} target="_blank" external>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.createIndex.languageAnalyzerLink',
|
||||
{ defaultMessage: 'language analyzer' }
|
||||
)}
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate('xpack.enterpriseSearch.content.newIndex.steps.createIndex.title', {
|
||||
defaultMessage: 'Create an Elasticsearch index',
|
||||
}),
|
||||
|
||||
titleSize: 'xs',
|
||||
};
|
||||
|
||||
export const BUILD_SEARCH_EXPERIENCE_STEP: EuiContainedStepProps = {
|
||||
children: (
|
||||
<EuiText size="s">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.content"
|
||||
defaultMessage="After building your connector, your content is ready. Build your first search experience with {elasticsearchLink}, or explore the search experience tools provided by {appSearchLink}. We recommend that you create a {searchEngineLink} for the best balance of flexible power and turnkey simplicity."
|
||||
values={{
|
||||
appSearchLink: (
|
||||
<EuiLinkTo to={APP_SEARCH_URL} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.appSearchLink',
|
||||
{ defaultMessage: 'App Search' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
elasticsearchLink: (
|
||||
<EuiLinkTo to={ENTERPRISE_SEARCH_ELASTICSEARCH_URL} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.elasticsearchLink',
|
||||
{ defaultMessage: 'Elasticsearch' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
searchEngineLink: (
|
||||
<EuiLinkTo to={`${APP_SEARCH_URL}/engines/new`} shouldNotCreateHref>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.searchEngineLink',
|
||||
{ defaultMessage: 'search engine' }
|
||||
)}
|
||||
</EuiLinkTo>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</EuiText>
|
||||
),
|
||||
status: 'incomplete',
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.title',
|
||||
{
|
||||
defaultMessage: 'Build a search experience',
|
||||
}
|
||||
),
|
||||
titleSize: 'xs',
|
||||
};
|
|
@ -363,7 +363,7 @@ export const registerEnterpriseSearchIntegrations = (
|
|||
defaultMessage: 'API',
|
||||
}),
|
||||
description: i18n.translate('xpack.enterpriseSearch.integrations.apiDescription', {
|
||||
defaultMessage: "Add search to your application with App Search's robust APIs.",
|
||||
defaultMessage: "Add search to your application with Elasticsearch's robust APIs.",
|
||||
}),
|
||||
categories: ['enterprise_search', 'custom', 'elastic_stack'],
|
||||
uiInternalPath: '/app/enterprise_search/content/search_indices/new_index?method=api',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue