Skip to content

Commit

Permalink
fix help text
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Dec 8, 2020
1 parent ec343c8 commit 05605de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import React, { useEffect, useState, useCallback } from 'react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { PainlessLang, PainlessContext } from '@kbn/monaco';
import {
EuiFlexGroup,
Expand Down Expand Up @@ -260,20 +261,24 @@ const RuntimeFieldFormComp = ({
error={getErrorsMessages()}
isInvalid={!isValid}
helpText={
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiLink
href={links.runtimePainless}
target="_blank"
external
data-test-subj="painlessSyntaxLearnMoreLink"
>
{i18n.translate('xpack.runtimeFields.form.script.learnMoreLinkText', {
defaultMessage: 'Learn more about syntax.',
})}
</EuiLink>
</EuiFlexItem>
</EuiFlexGroup>
<FormattedMessage
id="xpack.runtimeFields.form.source.scriptFieldHelpText"
defaultMessage="Runtime fields without a script retrieve values from a field with the same name in _source. If a field with the same name doesn’t exist, no values are returned when a search request includes the runtime field. {learnMoreLink}"
values={{
learnMoreLink: (
<EuiLink
href={links.runtimePainless}
target="_blank"
external
data-test-subj="painlessSyntaxLearnMoreLink"
>
{i18n.translate('xpack.runtimeFields.form.script.learnMoreLinkText', {
defaultMessage: 'Learn more about syntax.',
})}
</EuiLink>
),
}}
/>
}
fullWidth
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export const schema: FormSchema<RuntimeField> = {
label: i18n.translate('xpack.runtimeFields.form.defineFieldLabel', {
defaultMessage: 'Define field (optional)',
}),
helpText: i18n.translate('xpack.runtimeFields.form.source.scriptFieldHelpText', {
defaultMessage:
'Runtime fields without a script retrieve values from a field with the same name in _source. If a field with the same name doesn’t exist, no values are returned when a search request includes the runtime field.',
}),
},
},
};

0 comments on commit 05605de

Please sign in to comment.