Skip to content

Commit

Permalink
[8.5] [Enterprise Search] Add ml doc links (#141921) (#142587)
Browse files Browse the repository at this point in the history
* [Enterprise Search] Add ml doc links (#141921)

* Add documentation links for ml inference card and modal

* Fix link

(cherry picked from commit b66d12a)

* Fix link type for 8.5

Co-authored-by: Efe Gürkan YALAMAN <[email protected]>
  • Loading branch information
kibanamachine and efegurkan authored Oct 4, 2022
1 parent d8fc49a commit 88c8949
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 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 @@ -129,6 +129,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
crawlerGettingStarted: `${ENTERPRISE_SEARCH_DOCS}crawler-getting-started.html`,
crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`,
crawlerOverview: `${ENTERPRISE_SEARCH_DOCS}crawler.html`,
deployTrainedModels: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-nlp-deploy-models.html`,
documentLevelSecurity: `${ELASTICSEARCH_DOCS}document-level-security.html`,
ingestPipelines: `${ENTERPRISE_SEARCH_DOCS}ingest-pipelines.html`,
languageAnalyzers: `${ELASTICSEARCH_DOCS}analysis-lang-analyzer.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 @@ -115,6 +115,7 @@ export interface DocLinks {
readonly crawlerGettingStarted: string;
readonly crawlerManaging: string;
readonly crawlerOverview: string;
readonly deployTrainedModels: string;
readonly documentLevelSecurity: string;
readonly ingestPipelines: string;
readonly languageAnalyzers: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import {

import { i18n } from '@kbn/i18n';

import { docLinks } from '../../../../../shared/doc_links';

import { MLInferenceLogic } from './ml_inference_logic';

export const ConfigurePipeline: React.FC = () => {
Expand All @@ -49,11 +51,7 @@ export const ConfigurePipeline: React.FC = () => {
}
)}
</p>
<EuiLink
// TODO replace with docs link
href="https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-deploy-models.html"
target="_blank"
>
<EuiLink href={docLinks.deployTrainedModels} target="_blank">
{i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.docsLink',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { i18n } from '@kbn/i18n';
import noMlModelsGraphicDark from '../../../../../../assets/images/no_ml_models_dark.svg';
import noMlModelsGraphicLight from '../../../../../../assets/images/no_ml_models_light.svg';

import { docLinks } from '../../../../../shared/doc_links';

export const NoModelsPanel: React.FC = () => {
const { colorMode } = useEuiTheme();

Expand Down Expand Up @@ -43,8 +45,7 @@ export const NoModelsPanel: React.FC = () => {
</>
}
footer={
// TODO: insert correct docsLink here
<EuiLink href="#" target="_blank">
<EuiLink href={docLinks.deployTrainedModels} target="_blank">
{i18n.translate(
'xpack.enterpriseSearch.appSearch.crawler.crawlRequestsTable.emptyPrompt.docsLink',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const SearchIndexPipelines: React.FC = () => {
<DataPanel
hasBorder
footerDocLink={
<EuiLink href="" external color="subdued">
<EuiLink href={docLinks.deployTrainedModels} target="_blank" color="subdued">
{i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.docLink',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class DocLinks {
public crawlerGettingStarted: string;
public crawlerManaging: string;
public crawlerOverview: string;
public deployTrainedModels: string;
public documentLevelSecurity: string;
public elasticsearchCreateIndex: string;
public elasticsearchGettingStarted: string;
Expand Down Expand Up @@ -178,6 +179,7 @@ class DocLinks {
this.crawlerGettingStarted = '';
this.crawlerManaging = '';
this.crawlerOverview = '';
this.deployTrainedModels = '';
this.documentLevelSecurity = '';
this.elasticsearchCreateIndex = '';
this.elasticsearchGettingStarted = '';
Expand Down Expand Up @@ -293,6 +295,7 @@ class DocLinks {
this.crawlerGettingStarted = docLinks.links.enterpriseSearch.crawlerGettingStarted;
this.crawlerManaging = docLinks.links.enterpriseSearch.crawlerManaging;
this.crawlerOverview = docLinks.links.enterpriseSearch.crawlerOverview;
this.deployTrainedModels = docLinks.links.enterpriseSearch.deployTrainedModels;
this.documentLevelSecurity = docLinks.links.enterpriseSearch.documentLevelSecurity;
this.elasticsearchCreateIndex = docLinks.links.elasticsearch.createIndex;
this.elasticsearchGettingStarted = docLinks.links.elasticsearch.gettingStarted;
Expand Down

0 comments on commit 88c8949

Please sign in to comment.