Skip to content

Commit

Permalink
Use doc link services in index pattern management (elastic#89937)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Feb 4, 2021
1 parent c78a5a2 commit e4d19ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export class DocLinksService {
addData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`,
kibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`,
elasticsearch: {
mapping: `${ELASTICSEARCH_DOCS}mapping.html`,
remoteClusters: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html`,
remoteClustersProxy: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html#proxy-mode`,
remoteClusersProxySettings: `${ELASTICSEARCH_DOCS}modules-remote-clusters.html#remote-cluster-proxy-settings`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export const EditIndexPattern = withRouter(
chrome.docTitle.change(indexPattern.title);

const showTagsSection = Boolean(indexPattern.timeFieldName || (tags && tags.length > 0));

const kibana = useKibana();
const docsUrl = kibana.services.docLinks!.links.elasticsearch.mapping;
return (
<EuiPanel paddingSize={'l'}>
<div data-test-subj="editIndexPattern" role="region" aria-label={headingAriaLabel}>
Expand Down Expand Up @@ -182,11 +183,7 @@ export const EditIndexPattern = withRouter(
defaultMessage="This page lists every field in the {indexPatternTitle} index and the field's associated core type as recorded by Elasticsearch. To change a field type, use the Elasticsearch"
values={{ indexPatternTitle: <strong>{indexPattern.title}</strong> }}
/>{' '}
<EuiLink
href="http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html"
target="_blank"
external
>
<EuiLink href={docsUrl} target="_blank" external>
{mappingAPILink}
</EuiLink>
</p>
Expand Down

0 comments on commit e4d19ca

Please sign in to comment.