From e05a821bf3f6f343fd1f6d8a6cf0bb4a6f466d02 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sun, 8 Aug 2021 11:11:16 -0500 Subject: [PATCH 01/10] fix text --- .../__snapshots__/status_message.test.tsx.snap | 2 +- .../preview_panel/status_message/status_message.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index 8b492be417bff0..93e7ab8e39db9f 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -94,7 +94,7 @@ exports[`StatusMessage should render without a query 1`] = ` title={ = ({ From db3730d2d720912c8082655e9205dca8a8309a78 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Wed, 11 Aug 2021 21:51:18 -0500 Subject: [PATCH 02/10] text improvements --- .../empty_index_pattern_prompt.tsx | 2 +- .../form_fields/timestamp_field.tsx | 2 +- .../components/form_fields/title_field.tsx | 2 +- .../public/components/i18n_texts.ts | 26 ------------------- .../public/components/index.ts | 1 - .../status_message/status_message.tsx | 10 +++---- 6 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 src/plugins/index_pattern_editor/public/components/i18n_texts.ts diff --git a/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/empty_index_pattern_prompt.tsx b/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/empty_index_pattern_prompt.tsx index 054ff9d13b0437..57e131e8693cfd 100644 --- a/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/empty_index_pattern_prompt.tsx +++ b/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/empty_index_pattern_prompt.tsx @@ -59,7 +59,7 @@ export const EmptyIndexPatternPrompt = ({

diff --git a/src/plugins/index_pattern_editor/public/components/form_fields/timestamp_field.tsx b/src/plugins/index_pattern_editor/public/components/form_fields/timestamp_field.tsx index 93cb39ea1ba336..e034ccd131349d 100644 --- a/src/plugins/index_pattern_editor/public/components/form_fields/timestamp_field.tsx +++ b/src/plugins/index_pattern_editor/public/components/form_fields/timestamp_field.tsx @@ -63,7 +63,7 @@ const getTimestampConfig = ( }; const noTimestampOptionText = i18n.translate('indexPatternEditor.editor.form.noTimeFieldsLabel', { - defaultMessage: 'No matching data stream, index, or alias has a timestamp field.', + defaultMessage: 'No matching data stream, index, or index alias has a timestamp field.', }); const timestampFieldHelp = i18n.translate('indexPatternEditor.editor.form.timeFieldHelp', { diff --git a/src/plugins/index_pattern_editor/public/components/form_fields/title_field.tsx b/src/plugins/index_pattern_editor/public/components/form_fields/title_field.tsx index aa16351e0922f2..b03f3aa75cc237 100644 --- a/src/plugins/index_pattern_editor/public/components/form_fields/title_field.tsx +++ b/src/plugins/index_pattern_editor/public/components/form_fields/title_field.tsx @@ -51,7 +51,7 @@ const rollupIndexPatternTooManyMatchesError = { const mustMatchError = { message: i18n.translate('indexPatternEditor.createIndex.noMatch', { - defaultMessage: 'Name must match one or more data streams, indices, or aliases.', + defaultMessage: 'Name must match one or more data streams, indices, or index aliases.', }), }; diff --git a/src/plugins/index_pattern_editor/public/components/i18n_texts.ts b/src/plugins/index_pattern_editor/public/components/i18n_texts.ts deleted file mode 100644 index 5745714ae7bd80..00000000000000 --- a/src/plugins/index_pattern_editor/public/components/i18n_texts.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { i18n } from '@kbn/i18n'; - -export const geti18nTexts = () => { - return { - noTimestampOptionText: i18n.translate( - 'indexPatternEditor.createIndexPattern.stepTime.noTimeFieldsLabel', - { - defaultMessage: 'No matching data stream, index, or alias has a timestamp field.', - } - ), - timestampFieldHelp: i18n.translate('indexPatternEditor.editor.form.timeFieldHelp', { - defaultMessage: 'Select a timestamp field for use with the global time filter.', - }), - rollupLabel: i18n.translate('indexPatternEditor.rollupIndexPattern.createIndex.indexLabel', { - defaultMessage: 'Rollup', - }), - }; -}; diff --git a/src/plugins/index_pattern_editor/public/components/index.ts b/src/plugins/index_pattern_editor/public/components/index.ts index 82da708ac859d5..c32c4081e973f7 100644 --- a/src/plugins/index_pattern_editor/public/components/index.ts +++ b/src/plugins/index_pattern_editor/public/components/index.ts @@ -18,7 +18,6 @@ export { TimestampField, TypeField, TitleField } from './form_fields'; export { EmptyPrompts } from './empty_prompts'; export { PreviewPanel } from './preview_panel'; export { LoadingIndices } from './loading_indices'; -export { geti18nTexts } from './i18n_texts'; export { Footer } from './footer'; export { AdvancedParamsContent } from './advanced_params_content'; export { RollupBetaWarning } from './rollup_beta_warning'; diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx index 003b2e14f175f8..233b1753b8b1b8 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx @@ -25,7 +25,7 @@ const NoMatchStatusMessage = (allIndicesLength: number) => ( ( ); @@ -88,7 +88,7 @@ export const StatusMessage: React.FC = ({ ); @@ -97,7 +97,7 @@ export const StatusMessage: React.FC = ({ ); @@ -127,7 +127,7 @@ export const StatusMessage: React.FC = ({ Date: Wed, 11 Aug 2021 22:57:14 -0500 Subject: [PATCH 03/10] update test --- test/functional/apps/management/_index_pattern_create_delete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/apps/management/_index_pattern_create_delete.js b/test/functional/apps/management/_index_pattern_create_delete.js index 5be5cb3418bf80..cb00c34ca0143e 100644 --- a/test/functional/apps/management/_index_pattern_create_delete.js +++ b/test/functional/apps/management/_index_pattern_create_delete.js @@ -63,7 +63,7 @@ export default function ({ getService, getPageObjects }) { await retry.try(async () => { expect(await testSubjects.getVisibleText('createIndexPatternStatusMessage')).to.contain( - `The index pattern you've entered doesn't match any indices` + `The index pattern you entered doesn\'t match any data streams, indices, or index aliases.` ); }); }); From 8e3feb3a144f7e6297be1914ffc74cb11d7f3179 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 12:29:43 -0500 Subject: [PATCH 04/10] which => that, sources => data streams, indices, and index aliases --- .../components/preview_panel/status_message/status_message.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx index 233b1753b8b1b8..1d3e005c04a409 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx @@ -127,7 +127,7 @@ export const StatusMessage: React.FC = ({ Date: Fri, 13 Aug 2021 12:30:56 -0500 Subject: [PATCH 05/10] update snapshots --- .../__snapshots__/status_message.test.tsx.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index 93e7ab8e39db9f..64e25ec10abcc5 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -31,7 +31,7 @@ exports[`StatusMessage should render with no partial matches 1`] = ` title={ @@ -132,7 +132,7 @@ exports[`StatusMessage should show that system indices exist 1`] = ` title={ From 9b8328a76ae99de4d1103339f5ec7379f3297960 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 12:50:51 -0500 Subject: [PATCH 06/10] remove a couple of 'sources' usage --- .../status_message.test.tsx.snap | 29 +++------------- .../status_message/status_message.tsx | 33 +++---------------- 2 files changed, 9 insertions(+), 53 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index 64e25ec10abcc5..cf0ad7683aa3d3 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -31,21 +31,11 @@ exports[`StatusMessage should render with no partial matches 1`] = ` title={ - - , + "allIndicesLength": 2, } } /> @@ -62,22 +52,11 @@ exports[`StatusMessage should render with partial matches 1`] = ` title={ - - , } } /> @@ -94,7 +73,7 @@ exports[`StatusMessage should render without a query 1`] = ` title={ ( - - - ), + allIndicesLength, }} /> @@ -76,8 +65,8 @@ export const StatusMessage: React.FC = ({ @@ -127,25 +116,13 @@ export const StatusMessage: React.FC = ({ - - - ), }} /> From 362e1aff8d40736efd283698486a4030d954989e Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 12:52:53 -0500 Subject: [PATCH 07/10] pattern => index pattern --- .../status_message/__snapshots__/status_message.test.tsx.snap | 4 ++-- .../preview_panel/status_message/status_message.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index cf0ad7683aa3d3..07d27a18cd3f07 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -94,7 +94,7 @@ exports[`StatusMessage should show that no indices exist 1`] = ` title={ @@ -111,7 +111,7 @@ exports[`StatusMessage should show that system indices exist 1`] = ` title={ diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx index 3bb2ce2c1cd0a8..f8c89a135950b9 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx @@ -77,7 +77,7 @@ export const StatusMessage: React.FC = ({ ); @@ -86,7 +86,7 @@ export const StatusMessage: React.FC = ({ ); From 9d6cb477987cdfef20dbd8d370b99efe5ad15053 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 14:17:32 -0500 Subject: [PATCH 08/10] update snapshot --- .../__snapshots__/empty_index_pattern_prompt.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/__snapshots__/empty_index_pattern_prompt.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/__snapshots__/empty_index_pattern_prompt.test.tsx.snap index 6216f04c0a1a94..48f0e507ce4a64 100644 --- a/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/__snapshots__/empty_index_pattern_prompt.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/empty_prompts/empty_index_pattern_prompt/__snapshots__/empty_index_pattern_prompt.test.tsx.snap @@ -51,7 +51,7 @@ exports[`EmptyIndexPatternPrompt should render normally 1`] = `

From f0e99e4bd1ef7ad8f27290a75d97445a525a46af Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 18:22:52 -0500 Subject: [PATCH 09/10] restore a couple of 'source' references' --- .../public/components/form_schema.ts | 2 +- .../status_message.test.tsx.snap | 27 +++++++++++++++-- .../status_message/status_message.tsx | 29 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/form_schema.ts b/src/plugins/index_pattern_editor/public/components/form_schema.ts index 4e852285031caa..f6a3b23d9fbc1e 100644 --- a/src/plugins/index_pattern_editor/public/components/form_schema.ts +++ b/src/plugins/index_pattern_editor/public/components/form_schema.ts @@ -18,7 +18,7 @@ export const schema = { defaultValue: '', helpText: i18n.translate('indexPatternEditor.validations.titleHelpText', { defaultMessage: - 'Use an asterisk (*) to match multiple indices. Spaces and the characters , /, ?, ", <, >, | are not allowed.', + 'Use an asterisk (*) to match multiple characters. Spaces and the characters , /, ?, ", <, >, | are not allowed.', }), validations: [ { diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index 07d27a18cd3f07..72c056e2bbcc4d 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -31,11 +31,21 @@ exports[`StatusMessage should render with no partial matches 1`] = ` title={ + + , } } /> @@ -52,11 +62,22 @@ exports[`StatusMessage should render with partial matches 1`] = ` title={ + + , } } /> diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx index f8c89a135950b9..2577fdf20d58c6 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx @@ -26,9 +26,20 @@ const NoMatchStatusMessage = (allIndicesLength: number) => ( + + + ), }} /> @@ -116,13 +127,25 @@ export const StatusMessage: React.FC = ({ + + + ), }} /> From 0b9587127c961931e7f8b2b65e577caadb862932 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 13 Aug 2021 21:35:04 -0500 Subject: [PATCH 10/10] undo unwanted change --- .../__snapshots__/status_message.test.tsx.snap | 6 +++--- .../preview_panel/status_message/status_message.tsx | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap index 72c056e2bbcc4d..4fd36e61c3f7dd 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/__snapshots__/status_message.test.tsx.snap @@ -69,11 +69,11 @@ exports[`StatusMessage should render with partial matches 1`] = ` "matchedIndicesLength": 1, "strongIndices": diff --git a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx index 2577fdf20d58c6..adf76a96b1d9c8 100644 --- a/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx +++ b/src/plugins/index_pattern_editor/public/components/preview_panel/status_message/status_message.tsx @@ -137,12 +137,12 @@ export const StatusMessage: React.FC = ({ strongIndices: ( ),