mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* add helpText with doc link to timestamp format * add internationalization * update snapshot
This commit is contained in:
parent
bc1234a9be
commit
eb5c780e77
2 changed files with 34 additions and 4 deletions
|
@ -74,6 +74,20 @@ exports[`Overrides render overrides 1`] = `
|
|||
describedByIds={Array []}
|
||||
fullWidth={false}
|
||||
hasEmptyLabelSpace={false}
|
||||
helpText={
|
||||
<EuiText
|
||||
size="xs"
|
||||
>
|
||||
<EuiLink
|
||||
color="primary"
|
||||
href="https://www.elastic.co/guide/en/elasticsearch/reference/jest-metadata-mock-branch/search-aggregations-bucket-daterange-aggregation.html#date-format-pattern"
|
||||
target="_blank"
|
||||
type="button"
|
||||
>
|
||||
See more on accepted formats
|
||||
</EuiLink>
|
||||
</EuiText>
|
||||
}
|
||||
label={
|
||||
<FormattedMessage
|
||||
defaultMessage="Timestamp format"
|
||||
|
|
|
@ -10,17 +10,20 @@ import { i18n } from '@kbn/i18n';
|
|||
import React, {
|
||||
Component,
|
||||
} from 'react';
|
||||
import { metadata } from 'ui/metadata';
|
||||
|
||||
import {
|
||||
EuiForm,
|
||||
EuiFormRow,
|
||||
EuiFieldText,
|
||||
EuiComboBox,
|
||||
EuiCheckbox,
|
||||
EuiFieldNumber,
|
||||
EuiFieldText,
|
||||
EuiForm,
|
||||
EuiFormRow,
|
||||
EuiLink,
|
||||
EuiSpacer,
|
||||
EuiText,
|
||||
EuiTitle,
|
||||
EuiTextArea,
|
||||
EuiFieldNumber,
|
||||
} from '@elastic/eui';
|
||||
|
||||
import {
|
||||
|
@ -260,6 +263,18 @@ export class Overrides extends Component {
|
|||
|
||||
const fieldOptions = getSortedFields(fields);
|
||||
const timestampFormatErrorsList = [this.customTimestampFormatErrors, timestampFormatError];
|
||||
// metadata.branch corresponds to the version used in documentation links.
|
||||
const docsUrl = `https://www.elastic.co/guide/en/elasticsearch/reference/${metadata.branch}/search-aggregations-bucket-daterange-aggregation.html#date-format-pattern`;
|
||||
|
||||
const timestampFormatHelp = (
|
||||
<EuiText size="xs">
|
||||
<EuiLink href={docsUrl} target="_blank">
|
||||
{i18n.translate('xpack.ml.fileDatavisualizer.editFlyout.overrides.timestampFormatHelpText', {
|
||||
defaultMessage: 'See more on accepted formats'
|
||||
})}
|
||||
</EuiLink>
|
||||
</EuiText>
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
|
@ -401,6 +416,7 @@ export class Overrides extends Component {
|
|||
</React.Fragment>
|
||||
}
|
||||
<EuiFormRow
|
||||
helpText={timestampFormatHelp}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id="xpack.ml.fileDatavisualizer.editFlyout.overrides.timestampFormatFormRowLabel"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue