Skip to content

Commit

Permalink
Use doc link services in index pattern field editor
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed May 25, 2021
1 parent d5d658f commit 0bf68cb
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@

import { DocLinksStart } from 'src/core/public';

export const getLinks = (docLinks: DocLinksStart) => {
const { DOC_LINK_VERSION, ELASTIC_WEBSITE_URL } = docLinks;
const docsBase = `${ELASTIC_WEBSITE_URL}guide/en`;
const painlessDocsBase = `${docsBase}/elasticsearch/painless/${DOC_LINK_VERSION}`;
const kibanaDocsBase = `${docsBase}/kibana/${DOC_LINK_VERSION}`;

export const getLinks = ({ links }: DocLinksStart) => {
return {
runtimePainless: `${kibanaDocsBase}/managing-index-patterns.html#runtime-fields`,
painlessSyntax: `${painlessDocsBase}/painless-lang-spec.html`,
runtimePainless: links.indexPatterns.runtimeFields,
painlessSyntax: links.scriptedFields.painlessLangSpec,
};
};

0 comments on commit 0bf68cb

Please sign in to comment.