Skip to content

Commit

Permalink
[Enterprise Search] Fix wording on content settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
sphilipse committed Apr 20, 2023
1 parent 0283b7a commit 71aca20
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`,
machineLearningStart: `${ENTERPRISE_SEARCH_DOCS}machine-learning-start.html`,
mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`,
mlDocumentEnrichment: `${ENTERPRISE_SEARCH_DOCS}document-enrichment.html`,
start: `${ENTERPRISE_SEARCH_DOCS}start.html`,
syncRules: `${ENTERPRISE_SEARCH_DOCS}sync-rules.html`,
troubleshootSetup: `${ENTERPRISE_SEARCH_DOCS}troubleshoot-setup.html`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export interface DocLinks {
readonly licenseManagement: string;
readonly machineLearningStart: string;
readonly mailService: string;
readonly mlDocumentEnrichment: string;
readonly start: string;
readonly syncRules: string;
readonly troubleshootSetup: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { useActions, useValues } from 'kea';
import { EuiButton, EuiLink, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

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

import { docLinks } from '../../../shared/doc_links';
import { EnterpriseSearchContentPageTemplate } from '../layout/page_template';

Expand All @@ -36,6 +38,21 @@ export const Settings: React.FC = () => {
}),
]}
pageHeader={{
description: (
<FormattedMessage
id="xpack.enterpriseSearch.content.settings.description"
defaultMessage="These settings apply to all new Elasticsearch indices created by Enterprise Search ingestion mechanisms. For API ingest-based indices, remember to include the pipeline when you ingest documents. These features are powered by ingest pipelines. {link}"
values={{
link: (
<EuiLink href={docLinks.ingestPipelines} target="_blank">
{i18n.translate('xpack.enterpriseSearch.content.settings.description', {
defaultMessage: 'Learn more about ingest pipelines.',
})}
</EuiLink>
),
}}
/>
),
pageTitle: i18n.translate('xpack.enterpriseSearch.content.settings.headerTitle', {
defaultMessage: 'Content Settings',
}),
Expand Down Expand Up @@ -69,19 +86,12 @@ export const Settings: React.FC = () => {
'xpack.enterpriseSearch.content.settings.contentExtraction.description',
{
defaultMessage:
'Allow all ingestion mechanisms on your Enterprise Search deployment to extract searchable content from binary files, like PDFs and Word documents. This setting applies to all new Elasticsearch indices created by an Enterprise Search ingestion mechanism.',
'Extract searchable content from binary files, like PDFs and Word documents.',
}
)}
label={i18n.translate('xpack.enterpriseSearch.content.settings.contactExtraction.label', {
defaultMessage: 'Content extraction',
})}
link={
<EuiLink href={docLinks.ingestPipelines} target="_blank">
{i18n.translate('xpack.enterpriseSearch.content.settings.contactExtraction.link', {
defaultMessage: 'Learn more about content extraction',
})}
</EuiLink>
}
onChange={() =>
setPipeline({
...pipelineState,
Expand All @@ -105,13 +115,6 @@ export const Settings: React.FC = () => {
label={i18n.translate('xpack.enterpriseSearch.content.settings.whitespaceReduction.label', {
defaultMessage: 'Whitespace reduction',
})}
link={
<EuiLink href={docLinks.ingestPipelines} external>
{i18n.translate('xpack.enterpriseSearch.content.settings.whitespaceReduction.link', {
defaultMessage: 'Learn more about whitespace reduction',
})}
</EuiLink>
}
onChange={() =>
setPipeline({
...pipelineState,
Expand Down Expand Up @@ -139,9 +142,9 @@ export const Settings: React.FC = () => {
defaultMessage: 'ML Inference',
})}
link={
<EuiLink href={docLinks.ingestPipelines} target="_blank">
<EuiLink href={docLinks.mlDocumentEnrichment} target="_blank">
{i18n.translate('xpack.enterpriseSearch.content.settings.mlInference.link', {
defaultMessage: 'Learn more about content extraction',
defaultMessage: 'Learn more about document enrichment with ML',
})}
</EuiLink>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n';
interface SettingsPanelProps {
description: string;
label: string;
link: React.ReactNode;
link?: React.ReactNode;
onChange: (event: EuiSwitchEvent) => void;
title: string;
value: boolean;
Expand Down Expand Up @@ -61,7 +61,7 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({
<EuiFlexItem>
<EuiSwitch checked={value} label={label} onChange={onChange} />
</EuiFlexItem>
<EuiFlexItem grow={false}>{link}</EuiFlexItem>
{link && <EuiFlexItem grow={false}>{link}</EuiFlexItem>}
</EuiFlexGroup>
</EuiSplitPanel.Inner>
</EuiSplitPanel.Outer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class DocLinks {
public languageClients: string;
public licenseManagement: string;
public machineLearningStart: string;
public mlDocumentEnrichment: string;
public pluginsIngestAttachment: string;
public queryDsl: string;
public searchUIAppSearch: string;
Expand Down Expand Up @@ -203,6 +204,7 @@ class DocLinks {
this.languageClients = '';
this.licenseManagement = '';
this.machineLearningStart = '';
this.mlDocumentEnrichment = '';
this.pluginsIngestAttachment = '';
this.queryDsl = '';
this.searchUIAppSearch = '';
Expand Down Expand Up @@ -323,6 +325,7 @@ class DocLinks {
this.languageClients = docLinks.links.enterpriseSearch.languageClients;
this.licenseManagement = docLinks.links.enterpriseSearch.licenseManagement;
this.machineLearningStart = docLinks.links.enterpriseSearch.machineLearningStart;
this.mlDocumentEnrichment = docLinks.links.enterpriseSearch.mlDocumentEnrichment;
this.pluginsIngestAttachment = docLinks.links.plugins.ingestAttachment;
this.queryDsl = docLinks.links.query.queryDsl;
this.searchUIAppSearch = docLinks.links.searchUI.appSearch;
Expand Down

0 comments on commit 71aca20

Please sign in to comment.