[8.5] Fix index templates date validation 143412 (#145318) (#145603)

# Backport

This will backport the following commits from `main` to `8.5`:
- [Fix index templates date validation 143412
(#145318)](https://github.com/elastic/kibana/pull/145318)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"John
Dorlus","email":"jsdorlus@elastic.co"},"sourceCommit":{"committedDate":"2022-11-17T17:15:44Z","message":"Fix
index templates date validation 143412 (#145318)\n\nCloses
https://github.com/elastic/kibana/issues/94168\r\n\r\n##
Summary\r\n\r\nI took a look at the code and noticed that the only
validation rule was\r\nnot allowing spaces so I removed that code and
tested it. The validation\r\ncode wasn't performing any other
validations so I removed that.\r\n\r\nCo-authored-by: cuffs
<cuffs@cuffss-Office-MacBook-Pro.local>","sha":"67af5c4c6b788a0e03aa6c483e5dcba052628fcc","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Deployment
Management","release_note:skip","auto-backport","v8.6.0","v8.5.2"],"number":145318,"url":"https://github.com/elastic/kibana/pull/145318","mergeCommit":{"message":"Fix
index templates date validation 143412 (#145318)\n\nCloses
https://github.com/elastic/kibana/issues/94168\r\n\r\n##
Summary\r\n\r\nI took a look at the code and noticed that the only
validation rule was\r\nnot allowing spaces so I removed that code and
tested it. The validation\r\ncode wasn't performing any other
validations so I removed that.\r\n\r\nCo-authored-by: cuffs
<cuffs@cuffss-Office-MacBook-Pro.local>","sha":"67af5c4c6b788a0e03aa6c483e5dcba052628fcc"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.5"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.5","label":"v8.5.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: John Dorlus <jsdorlus@elastic.co>
This commit is contained in:
Kibana Machine 2022-11-17 14:23:40 -05:00 committed by GitHub
parent 57a67de01e
commit 0dc0a77b51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 19 deletions

View file

@ -12,10 +12,10 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { EuiLink, EuiCode } from '@elastic/eui';
import { documentationService } from '../../../../services/documentation';
import { FormSchema, FIELD_TYPES, VALIDATION_TYPES, fieldValidators } from '../../shared_imports';
import { FormSchema, FIELD_TYPES, fieldValidators } from '../../shared_imports';
import { ComboBoxOption } from '../../types';
const { containsCharsField, isJsonField } = fieldValidators;
const { isJsonField } = fieldValidators;
const fieldPathComboBoxConfig = {
helpText: i18n.translate(
@ -168,20 +168,6 @@ export const configurationFormSchema: FormSchema = {
),
type: FIELD_TYPES.COMBO_BOX,
defaultValue: ['strict_date_optional_time', 'yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z'],
validations: [
{
validator: containsCharsField({
message: i18n.translate(
'xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldValidationErrorMessage',
{
defaultMessage: 'Spaces are not allowed.',
}
),
chars: ' ',
}),
type: VALIDATION_TYPES.ARRAY_ITEM,
},
],
},
},
_routing: {

View file

@ -14154,7 +14154,6 @@
"xpack.idxMgmt.mappingsEditor.configuration.dateDetectionFieldLabel": "Mapper les chaînes de dates en tant que dates",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldDocumentionLink": "En savoir plus.",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldLabel": "Formats de dates",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldValidationErrorMessage": "Les espaces ne sont pas autorisés.",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicMappingStrictHelpText": "Par défaut, les champs non mappés sont ignorés silencieusement lorsque le mapping dynamique est désactivé. Vous pouvez aussi choisir de lever une exception lorsqu'un document contient un champ non mappé.",
"xpack.idxMgmt.mappingsEditor.configuration.enableDynamicMappingsLabel": "Activer le mapping dynamique",
"xpack.idxMgmt.mappingsEditor.configuration.excludeSourceFieldsLabel": "Exclure les champs",

View file

@ -14140,7 +14140,6 @@
"xpack.idxMgmt.mappingsEditor.configuration.dateDetectionFieldLabel": "日付文字列の日付としてのマッピング",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldDocumentionLink": "詳細情報",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldLabel": "日付フォーマット",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldValidationErrorMessage": "スペースは使用できません。",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicMappingStrictHelpText": "デフォルトとしては、動的マッピングが無効の場合、マップされていないフィールドは通知なし無視されます。オプションとして、ドキュメントがマッピングされていないフィールドを含む場合、例外を選択とすることも可能です。",
"xpack.idxMgmt.mappingsEditor.configuration.enableDynamicMappingsLabel": "動的マッピングの有効化",
"xpack.idxMgmt.mappingsEditor.configuration.excludeSourceFieldsLabel": "フィールドの除外",

View file

@ -14157,7 +14157,6 @@
"xpack.idxMgmt.mappingsEditor.configuration.dateDetectionFieldLabel": "将日期字符串映射为日期",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldDocumentionLink": "了解详情。",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldLabel": "日期格式",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicDatesFieldValidationErrorMessage": "不允许使用空格。",
"xpack.idxMgmt.mappingsEditor.configuration.dynamicMappingStrictHelpText": "默认情况下,禁用动态映射时,将会忽略未映射字段。文档包含未映射字段时,您可以根据需要引发异常。",
"xpack.idxMgmt.mappingsEditor.configuration.enableDynamicMappingsLabel": "启用动态映射",
"xpack.idxMgmt.mappingsEditor.configuration.excludeSourceFieldsLabel": "排除字段",