mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Use documentation link service for runtime fields (#95256)
This commit is contained in:
parent
6b59fe3d01
commit
68722313f2
8 changed files with 31 additions and 20 deletions
|
@ -24,7 +24,10 @@ const setup = (props?: Props) =>
|
|||
const docLinks: DocLinksStart = {
|
||||
ELASTIC_WEBSITE_URL: 'https://jestTest.elastic.co',
|
||||
DOC_LINK_VERSION: 'jest',
|
||||
links: {} as any,
|
||||
links: {
|
||||
runtimeFields: { mapping: 'https://jestTest.elastic.co/to-be-defined.html' },
|
||||
scriptedFields: {} as any,
|
||||
} as any,
|
||||
};
|
||||
|
||||
describe('Runtime field editor', () => {
|
||||
|
|
|
@ -23,7 +23,10 @@ const setup = (props?: Props) =>
|
|||
const docLinks: DocLinksStart = {
|
||||
ELASTIC_WEBSITE_URL: 'htts://jestTest.elastic.co',
|
||||
DOC_LINK_VERSION: 'jest',
|
||||
links: {} as any,
|
||||
links: {
|
||||
runtimeFields: { mapping: 'https://jestTest.elastic.co/to-be-defined.html' },
|
||||
scriptedFields: {} as any,
|
||||
} as any,
|
||||
};
|
||||
|
||||
const noop = () => {};
|
||||
|
|
|
@ -7,14 +7,11 @@
|
|||
|
||||
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 esDocsBase = `${docsBase}/elasticsearch/reference/${DOC_LINK_VERSION}`;
|
||||
const painlessDocsBase = `${docsBase}/elasticsearch/painless/${DOC_LINK_VERSION}`;
|
||||
|
||||
export const getLinks = ({ links }: DocLinksStart) => {
|
||||
const runtimePainless = `${links.runtimeFields.mapping}`;
|
||||
const painlessSyntax = `${links.scriptedFields.painlessLangSpec}`;
|
||||
return {
|
||||
runtimePainless: `${esDocsBase}/runtime.html#runtime-mapping-fields`,
|
||||
painlessSyntax: `${painlessDocsBase}/painless-lang-spec.html`,
|
||||
runtimePainless,
|
||||
painlessSyntax,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue