Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
} from '@elastic/eui';

import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';

import { DEFAULT_PIPELINE_NAME } from '../../../../../../common/constants';

Expand Down Expand Up @@ -91,21 +92,43 @@ export const IngestPipelineModal: React.FC<IngestPipelineModalProps> = ({
<EuiFlexGroup direction="column" gutterSize="none">
<EuiFlexItem>
<EuiText color="subdued" size="s">
{displayOnly
? i18n.translate(
'xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalBodyAPIText',
{
defaultMessage:
'This pipeline runs automatically on all Crawler and Connector indices created through Enterprise Search. To use this configuration on API-based indices you can use the sample cURL request below.',
}
)
: i18n.translate(
'xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalBodyConnectorText',
{
defaultMessage:
'This pipeline runs automatically on all Crawler and Connector indices created through Enterprise Search.',
}
)}
{displayOnly ? (
<>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalBodyAPIText"
defaultMessage="{apiIndex} Changes made to the settings below are for reference only. These settings will not be persisted to your index or pipeline."
values={{
apiIndex: (
<strong>
{i18n.translate(
'xpack.enterpriseSearch.content.index.pipelines.ingestModal.apiIndex',
{ defaultMessage: 'This is an API-based index.' }
)}
</strong>
),
}}
/>
</p>
<p>
{i18n.translate(
'xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalBodyAPITextCont',
{
defaultMessage:
"In order to use this pipeline on your API-based indices you'll need to explicitly reference it in your API requests.",
}
)}
</p>
</>
) : (
i18n.translate(
'xpack.enterpriseSearch.content.index.pipelines.ingestModal.modalBodyConnectorText',
{
defaultMessage:
'This pipeline runs automatically on all Crawler and Connector indices created through Enterprise Search.',
}
)
)}
</EuiText>
</EuiFlexItem>
<EuiSpacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { i18n } from '@kbn/i18n';

import { DataPanel } from '../../../../shared/data_panel/data_panel';
import { docLinks } from '../../../../shared/doc_links';
import { isApiIndex } from '../../../utils/indices';

import { IngestPipelinesCard } from './ingest_pipelines_card';
import { AddMLInferencePipelineButton } from './ml_inference/add_ml_inference_button';
Expand All @@ -23,9 +24,15 @@ import { MlInferencePipelineProcessorsCard } from './ml_inference_pipeline_proce
import { PipelinesLogic } from './pipelines_logic';

export const SearchIndexPipelines: React.FC = () => {
const { showAddMlInferencePipelineModal } = useValues(PipelinesLogic);
const {
showAddMlInferencePipelineModal,
hasIndexIngestionPipeline,
index,
pipelineState: { name: pipelineName },
} = useValues(PipelinesLogic);
const { closeAddMlInferencePipelineModal, openAddMlInferencePipelineModal } =
useActions(PipelinesLogic);
const apiIndex = isApiIndex(index);

return (
<>
Expand Down Expand Up @@ -54,12 +61,23 @@ export const SearchIndexPipelines: React.FC = () => {
)}
</h2>
}
subtitle={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.subtitle',
{
defaultMessage: 'Ingest pipelines optimize your index for search applications',
}
)}
subtitle={
apiIndex
? i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.apiIndexSubtitle',
{
defaultMessage:
"Ingest pipelines optimize your index for search applications. If you'd like to use these pipelines in your API-based index, you'll need to reference them explicitly in your API requests.",
}
)
: i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.subtitle',
{
defaultMessage:
'Ingest pipelines optimize your index for search applications',
}
)
}
iconType="logstashInput"
>
<IngestPipelinesCard />
Expand Down Expand Up @@ -88,13 +106,26 @@ export const SearchIndexPipelines: React.FC = () => {
)}
</h2>
}
subtitle={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.subtitle',
{
defaultMessage:
'Inference pipelines will be run as processors from the Enterprise Search Ingest Pipeline',
}
)}
subtitle={
apiIndex && hasIndexIngestionPipeline
? i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.subtitleAPIindex',
{
defaultMessage:
"Inference pipelines will be run as processors from the Enterprise Search Ingest Pipeline. In order to use these pipeline on API-based indices you'll need to reference the {pipelineName} pipeline in your API requests.",
values: {
pipelineName,
},
}
)
: i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.subtitle',
{
defaultMessage:
'Inference pipelines will be run as processors from the Enterprise Search Ingest Pipeline',
}
)
}
iconType="compute"
action={
<AddMLInferencePipelineButton onClick={() => openAddMlInferencePipelineModal()} />
Expand Down