[Enterprise Search][ML Inference] Improve no models copy (#145772)

## Summary

Updated the no models learn more to link to the new machine learning
getting started guide
Updated the copy on the no models modal to be more explicit and provide
information on the types of models that are supported.

### Screenshot

![image](https://user-images.githubusercontent.com/1972968/203351794-260fd7a2-260f-4b8d-ae75-6b7bb41a889f.png)


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
This commit is contained in:
Rodney Norris 2022-11-28 09:40:51 -06:00 committed by GitHub
parent b32c8b9df8
commit 210b2f0f0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 19 deletions

View file

@ -138,6 +138,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
languageAnalyzers: `${ELASTICSEARCH_DOCS}analysis-lang-analyzer.html`,
languageClients: `${ENTERPRISE_SEARCH_DOCS}programming-language-clients.html`,
licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`,
machineLearningStart: `${ENTERPRISE_SEARCH_DOCS}machine-learning-start.html`,
mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`,
start: `${ENTERPRISE_SEARCH_DOCS}start.html`,
syncRules: `${ENTERPRISE_SEARCH_DOCS}sync-rules.html`,

View file

@ -123,6 +123,7 @@ export interface DocLinks {
readonly languageAnalyzers: string;
readonly languageClients: string;
readonly licenseManagement: string;
readonly machineLearningStart: string;
readonly mailService: string;
readonly start: string;
readonly syncRules: string;

View file

@ -10,6 +10,7 @@ import React from 'react';
import { EuiEmptyPrompt, EuiImage, EuiLink, EuiText, useEuiTheme } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import noMlModelsGraphicDark from '../../../../../../assets/images/no_ml_models_dark.svg';
import noMlModelsGraphicLight from '../../../../../../assets/images/no_ml_models_light.svg';
@ -28,32 +29,29 @@ export const NoModelsPanel: React.FC = () => {
src={colorMode === 'LIGHT' ? noMlModelsGraphicLight : noMlModelsGraphicDark}
alt={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.imageAlt',
{ defaultMessage: 'No ml models illustration' }
{ defaultMessage: 'No machine learning models illustration' }
)}
/>
<EuiText>
<EuiText size="s">
<p>
{i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.description',
{
defaultMessage:
'You have no trained models available. Please follow the documenation to add trained ml models to your cluster.',
}
)}
<FormattedMessage
id="xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.description"
defaultMessage="You have no trained machine learning models that can be used by an inference pipeline. {documentationLink}"
values={{
documentationLink: (
<EuiLink href={docLinks.machineLearningStart} target="_blank">
{i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.esDocs.link',
{ defaultMessage: 'Learn how to add a trained model' }
)}
</EuiLink>
),
}}
/>
</p>
</EuiText>
</>
}
footer={
<EuiLink href={docLinks.deployTrainedModels} target="_blank">
{i18n.translate(
'xpack.enterpriseSearch.appSearch.crawler.crawlRequestsTable.emptyPrompt.docsLink',
{
defaultMessage: 'Learn More',
}
)}
</EuiLink>
}
/>
);
};

View file

@ -41,3 +41,7 @@ export const DESCRIPTION_LABEL = i18n.translate('xpack.enterpriseSearch.descript
export const OPTIONAL_LABEL = i18n.translate('xpack.enterpriseSearch.optionalLabel', {
defaultMessage: 'Optional',
});
export const LEARN_MORE_LINK = i18n.translate('xpack.enterpriseSearch.learnMore.link', {
defaultMessage: 'Learn more',
});

View file

@ -78,6 +78,7 @@ class DocLinks {
public languageAnalyzers: string;
public languageClients: string;
public licenseManagement: string;
public machineLearningStart: string;
public pluginsIngestAttachment: string;
public queryDsl: string;
public searchUIAppSearch: string;
@ -191,6 +192,7 @@ class DocLinks {
this.languageAnalyzers = '';
this.languageClients = '';
this.licenseManagement = '';
this.machineLearningStart = '';
this.pluginsIngestAttachment = '';
this.queryDsl = '';
this.searchUIAppSearch = '';
@ -306,6 +308,7 @@ class DocLinks {
this.languageAnalyzers = docLinks.links.enterpriseSearch.languageAnalyzers;
this.languageClients = docLinks.links.enterpriseSearch.languageClients;
this.licenseManagement = docLinks.links.enterpriseSearch.licenseManagement;
this.machineLearningStart = docLinks.links.enterpriseSearch.machineLearningStart;
this.pluginsIngestAttachment = docLinks.links.plugins.ingestAttachment;
this.queryDsl = docLinks.links.query.queryDsl;
this.searchUIAppSearch = docLinks.links.searchUI.appSearch;