From 35e450418cf1b951b7125a02efc057afc130ca5c Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sun, 3 May 2020 14:59:37 -0500 Subject: [PATCH 01/45] worrk in progress - mostly working --- .../components/fetch_error/fetch_error.tsx | 2 +- .../kibana/public/management/index.js | 2 +- .../angular_template.html | 5 - .../create_index_pattern_wizard/index.js | 57 ----- .../create_index_pattern_wizard/render.js | 45 ---- .../edit_index_pattern/create_edit_field.html | 5 - .../edit_index_pattern.html | 12 -- .../edit_index_pattern/index.js | 176 ---------------- .../sections/index_patterns/index.html | 5 - .../sections/index_patterns/index.js | 172 --------------- .../index_pattern_table.tsx | 154 -------------- .../sections/index_patterns/list.html | 5 - .../server/lib/__tests__/relationships.js | 12 +- src/legacy/ui/public/_index.scss | 3 +- .../field_format_editor/register.ts | 43 ---- .../ui/ui_exports/ui_export_defaults.js | 4 +- .../advanced_settings/public/plugin.ts | 2 +- .../ensure_default_index_pattern.tsx | 2 +- .../index_patterns/index_pattern.ts | 2 +- .../data/public/index_patterns/utils.ts | 10 +- .../server/saved_objects/index_patterns.ts | 4 +- .../__snapshots__/add_data.test.js.snap | 8 +- .../public/application/components/add_data.js | 2 +- .../index_pattern_management/kibana.json | 2 +- .../public/components}/breadcrumbs.js | 8 +- .../create_button/create_button.tsx | 13 +- .../public/components}/create_button/index.ts | 0 .../create_index_pattern_prompt/index.tsx | 0 .../CREATE_INDEX_PATTERN.md | 0 .../create_index_pattern_wizard.test.tsx.snap | 0 .../__snapshots__/empty_state.test.tsx.snap | 0 .../empty_state/empty_state.test.tsx | 0 .../components/empty_state/empty_state.tsx | 0 .../components/empty_state/index.ts | 0 .../header/__snapshots__/header.test.tsx.snap | 0 .../components/header/header.test.tsx | 0 .../components/header/header.tsx | 0 .../components/header/index.ts | 0 .../__snapshots__/loading_state.test.tsx.snap | 0 .../components/loading_state/index.ts | 0 .../loading_state/loading_state.test.tsx | 0 .../loading_state/loading_state.tsx | 0 .../step_index_pattern.test.tsx.snap | 0 .../header/__snapshots__/header.test.tsx.snap | 0 .../components/header/header.test.tsx | 0 .../components/header/header.tsx | 0 .../components/header/index.ts | 0 .../__snapshots__/indices_list.test.tsx.snap | 0 .../components/indices_list/index.ts | 0 .../indices_list/indices_list.test.tsx | 0 .../components/indices_list/indices_list.tsx | 0 .../loading_indices.test.tsx.snap | 0 .../components/loading_indices/index.ts | 0 .../loading_indices/loading_indices.test.tsx | 0 .../loading_indices/loading_indices.tsx | 0 .../status_message.test.tsx.snap | 0 .../components/status_message/index.ts | 0 .../status_message/status_message.test.tsx | 0 .../status_message/status_message.tsx | 0 .../components/step_index_pattern/index.ts | 0 .../step_index_pattern.test.tsx | 0 .../step_index_pattern/step_index_pattern.tsx | 6 +- .../step_time_field.test.tsx.snap | 0 .../action_buttons/action_buttons.tsx | 0 .../components/action_buttons/index.ts | 0 .../advanced_options.test.tsx.snap | 0 .../advanced_options.test.tsx | 0 .../advanced_options/advanced_options.tsx | 0 .../components/advanced_options/index.ts | 0 .../header/__snapshots__/header.test.tsx.snap | 0 .../components/header/header.test.tsx | 0 .../components/header/header.tsx | 0 .../components/header/index.ts | 0 .../__snapshots__/time_field.test.tsx.snap | 0 .../components/time_field/index.ts | 0 .../components/time_field/time_field.css | 0 .../components/time_field/time_field.test.tsx | 0 .../components/time_field/time_field.tsx | 3 +- .../components/step_time_field/index.ts | 0 .../step_time_field/step_time_field.test.tsx | 0 .../step_time_field/step_time_field.tsx | 1 + .../constants/index.ts | 0 .../create_index_pattern_wizard.test.tsx | 2 +- .../create_index_pattern_wizard.tsx | 84 ++++---- .../create_index_pattern_wizard/index.ts | 20 ++ .../lib/can_append_wildcard.test.ts | 0 .../lib/can_append_wildcard.ts | 0 .../lib/contains_illegal_characters.ts | 0 .../lib/contains_invalid_characters.test.ts | 0 .../lib/ensure_minimum_time.test.ts | 0 .../lib/ensure_minimum_time.ts | 0 .../lib/extract_time_fields.test.ts | 0 .../lib/extract_time_fields.ts | 0 .../lib/get_indices.test.ts | 0 .../lib/get_indices.ts | 0 .../lib/get_matched_indices.test.ts | 0 .../lib/get_matched_indices.ts | 0 .../create_index_pattern_wizard/lib/index.ts | 0 .../render.test.js | 0 .../create_index_pattern_wizard/types.ts | 0 .../edit_index_pattern/constants.ts | 0 .../create_edit_field/create_edit_field.tsx | 71 ++++--- .../create_edit_field_container.tsx | 82 ++++++++ .../create_edit_field/index.ts | 21 ++ .../edit_index_pattern/edit_index_pattern.tsx | 158 ++++++++------ .../edit_index_pattern_container.tsx | 68 ++++++ .../edit_index_pattern_state_container.ts | 2 +- .../components/edit_index_pattern/index.tsx | 23 ++ .../edit_index_pattern/index_header/index.ts | 0 .../index_header/index_header.tsx | 0 .../indexed_fields_table.test.tsx.snap | 0 .../table/__snapshots__/table.test.tsx.snap | 0 .../components/table/index.ts | 0 .../components/table/table.test.tsx | 0 .../components/table/table.tsx | 0 .../indexed_fields_table/index.ts | 0 .../indexed_fields_table.test.tsx | 0 .../indexed_fields_table.tsx | 3 +- .../lib/get_field_format.test.ts | 0 .../lib/get_field_format.ts | 0 .../indexed_fields_table/lib/index.ts | 0 .../indexed_fields_table/types.ts | 2 +- .../scripted_field_table.test.tsx.snap | 10 +- .../__snapshots__/call_outs.test.tsx.snap | 0 .../components/call_outs/call_outs.test.tsx | 0 .../components/call_outs/call_outs.tsx | 0 .../components/call_outs/index.ts | 0 .../confirmation_modal.test.tsx.snap | 0 .../confirmation_modal.test.tsx | 0 .../confirmation_modal/confirmation_modal.tsx | 0 .../components/confirmation_modal/index.ts | 0 .../header/__snapshots__/header.test.tsx.snap | 0 .../components/header/header.test.tsx | 0 .../components/header/header.tsx | 0 .../components/header/index.ts | 0 .../scripted_fields_table/components/index.ts | 0 .../table/__snapshots__/table.test.tsx.snap | 0 .../components/table/index.ts | 0 .../components/table/table.test.tsx | 0 .../components/table/table.tsx | 2 +- .../scripted_fields_table/index.ts | 0 .../scripted_field_table.test.tsx | 7 +- .../scripted_fields_table.tsx | 17 +- .../scripted_fields_table/types.ts | 0 .../source_filters_table.test.tsx.snap | 0 .../__snapshots__/add_filter.test.tsx.snap | 0 .../components/add_filter/add_filter.test.tsx | 0 .../components/add_filter/add_filter.tsx | 0 .../components/add_filter/index.ts | 0 .../confirmation_modal.test.tsx.snap | 0 .../confirmation_modal.test.tsx | 0 .../confirmation_modal/confirmation_modal.tsx | 0 .../components/confirmation_modal/index.ts | 0 .../header/__snapshots__/header.test.tsx.snap | 0 .../components/header/header.test.tsx | 0 .../components/header/header.tsx | 0 .../components/header/index.ts | 0 .../source_filters_table/components/index.ts | 0 .../table/__snapshots__/table.test.tsx.snap | 0 .../components/table/index.ts | 0 .../components/table/table.test.tsx | 0 .../components/table/table.tsx | 0 .../source_filters_table/index.ts | 0 .../source_filters_table.test.tsx | 0 .../source_filters_table.tsx | 2 +- .../source_filters_table/types.ts | 0 .../edit_index_pattern/tabs/index.ts | 0 .../edit_index_pattern/tabs/tabs.tsx | 7 +- .../edit_index_pattern/tabs/utils.ts | 6 +- .../__snapshots__/field_editor.test.tsx.snap | 0 .../components}/field_editor/_index.scss | 0 .../field_format_editor.test.tsx.snap | 0 .../bytes/__snapshots__/bytes.test.tsx.snap | 0 .../editors/bytes/bytes.test.tsx | 0 .../editors/bytes/bytes.ts | 0 .../editors/bytes/index.ts | 0 .../color/__snapshots__/color.test.tsx.snap | 0 .../editors/color/color.test.tsx | 0 .../editors/color/color.tsx | 2 +- .../editors/color/index.ts | 0 .../date/__snapshots__/date.test.tsx.snap | 0 .../editors/date/date.test.tsx | 0 .../field_format_editor/editors/date/date.tsx | 0 .../field_format_editor/editors/date/index.ts | 0 .../__snapshots__/date_nanos.test.tsx.snap | 0 .../editors/date_nanos/date_nanos.test.tsx | 0 .../editors/date_nanos/date_nanos.tsx | 0 .../editors/date_nanos/index.ts | 0 .../__snapshots__/default.test.tsx.snap | 0 .../editors/default/default.test.tsx | 0 .../editors/default/default.tsx | 1 + .../editors/default/index.ts | 0 .../__snapshots__/duration.test.tsx.snap | 0 .../editors/duration/duration.test.tsx | 0 .../editors/duration/duration.tsx | 0 .../editors/duration/index.tsx | 0 .../field_format_editor/editors/index.ts | 31 +++ .../number/__snapshots__/number.test.tsx.snap | 0 .../editors/number/index.ts | 0 .../editors/number/number.test.tsx | 0 .../editors/number/number.tsx | 0 .../__snapshots__/percent.test.tsx.snap | 0 .../editors/percent/index.ts | 0 .../editors/percent/percent.test.tsx | 0 .../editors/percent/percent.tsx | 0 .../__snapshots__/static_lookup.test.tsx.snap | 0 .../editors/static_lookup/index.ts | 0 .../static_lookup/static_lookup.test.tsx | 0 .../editors/static_lookup/static_lookup.tsx | 0 .../string/__snapshots__/string.test.tsx.snap | 0 .../editors/string/index.ts | 0 .../editors/string/string.test.tsx | 0 .../editors/string/string.tsx | 0 .../__snapshots__/truncate.test.tsx.snap | 0 .../editors/truncate/index.ts | 0 .../editors/truncate/sample.ts | 0 .../editors/truncate/truncate.test.tsx | 0 .../editors/truncate/truncate.tsx | 0 .../label_template_flyout.test.tsx.snap | 0 .../url/__snapshots__/url.test.tsx.snap | 0 .../url_template_flyout.test.tsx.snap | 0 .../editors/url/icons/LICENSE.txt | 0 .../editors/url/icons/cv.png | Bin .../editors/url/icons/de.png | Bin .../editors/url/icons/go.png | Bin .../editors/url/icons/index.js | 3 + .../editors/url/icons/ne.png | Bin .../editors/url/icons/ni.png | Bin .../editors/url/icons/stop.png | Bin .../editors/url/icons/us.png | Bin .../field_format_editor/editors/url/index.ts | 0 .../url/label_template_flyout.test.tsx | 0 .../editors/url/label_template_flyout.tsx | 0 .../editors/url/url.test.tsx | 0 .../field_format_editor/editors/url/url.tsx | 0 .../editors/url/url_template_flyout.test.tsx | 0 .../editors/url/url_template_flyout.tsx | 0 .../field_format_editor.test.tsx | 0 .../field_format_editor.tsx | 4 +- .../components/field_format_editor/index.ts | 0 .../__snapshots__/samples.test.tsx.snap | 0 .../field_format_editor/samples/_index.scss | 0 .../field_format_editor/samples/_samples.scss | 0 .../field_format_editor/samples/index.ts | 0 .../samples/samples.test.tsx | 0 .../field_format_editor/samples/samples.tsx | 0 .../disabled_call_out.test.tsx.snap | 0 .../warning_call_out.test.tsx.snap | 0 .../disabled_call_out.test.tsx | 0 .../scripting_call_outs/disabled_call_out.tsx | 0 .../components/scripting_call_outs/index.ts | 0 .../warning_call_out.test.tsx | 0 .../scripting_call_outs/warning_call_out.tsx | 0 .../__snapshots__/help_flyout.test.tsx.snap | 0 .../scripting_help/_test_script.scss | 0 .../scripting_help/help_flyout.test.tsx | 0 .../components/scripting_help/help_flyout.tsx | 17 +- .../components/scripting_help/index.ts | 0 .../scripting_help/scripting_syntax.tsx | 0 .../components/scripting_help/test_script.tsx | 27 ++- .../field_editor/constants/index.ts | 2 +- .../field_editor/field_editor.test.tsx | 2 +- .../components}/field_editor/field_editor.tsx | 83 ++++---- .../public/components}/field_editor/index.ts | 0 .../components}/field_editor/lib/index.ts | 0 .../field_editor/lib/validate_script.ts | 9 +- .../public/components}/field_editor/types.ts | 2 +- .../public/components/index.ts | 27 +++ .../components/index_pattern_table/index.ts | 20 ++ .../index_pattern_table.tsx | 175 ++++++++++++++++ .../public/components/types.ts | 34 +++ .../index_pattern_management/public/index.ts | 6 +- .../public/management_app/index.tsx} | 2 - .../mount_management_section.tsx | 198 ++++++++++++++++++ .../index_pattern_management/public/plugin.ts | 45 +++- .../public/scripting_languages/index.ts | 5 +- .../public/service/creation/config.ts | 8 +- .../public/service/creation/index.ts | 2 +- .../public/service/creation/manager.ts | 9 +- .../field_format_editors.ts | 43 ++++ .../service/field_format_editors/index.ts} | 2 +- .../public/service/index.ts | 2 +- .../index_pattern_management_service.ts | 38 +++- .../url/kbn_url_storage.test.ts | 36 ++-- .../state_management/url/kbn_url_storage.ts | 8 +- .../saved_objects_table.test.tsx.snap | 4 +- .../__snapshots__/relationships.test.tsx.snap | 4 +- .../__snapshots__/table.test.tsx.snap | 8 +- .../components/relationships.test.tsx | 8 +- .../objects_table/components/table.test.tsx | 8 +- .../saved_objects_table.test.tsx | 4 +- .../objects_table/saved_objects_table.tsx | 2 +- .../apis/saved_objects_management/find.ts | 5 +- .../saved_objects_management/relationships.ts | 10 +- .../_index_pattern_create_delete.js | 2 +- .../guidance_panel/guidance_panel.tsx | 2 +- .../components/no_index_pattern_callout.js | 2 +- .../results_links/results_links.tsx | 4 +- .../rollup_index_pattern_creation_config.js | 2 +- ...ndex_patterns_missing_prompt.test.tsx.snap | 2 +- .../index_patterns_missing_prompt.tsx | 2 +- .../index_patterns_security.ts | 2 +- .../feature_controls/index_patterns_spaces.ts | 2 +- 303 files changed, 1231 insertions(+), 1037 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/angular_template.html delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/index.js delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.js delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field.html delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.html delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.html delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.js delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index_pattern_table.tsx delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index_patterns/list.html delete mode 100644 src/legacy/ui/public/field_editor/components/field_format_editor/register.ts rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/breadcrumbs.js (88%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_button/create_button.tsx (90%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_button/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_prompt/index.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/CREATE_INDEX_PATTERN.md (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/empty_state/empty_state.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/empty_state/empty_state.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/empty_state/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/header/header.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/header/header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/loading_state/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/loading_state/loading_state.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/loading_state/loading_state.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/__snapshots__/step_index_pattern.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/header/header.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/status_message/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx (98%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/__snapshots__/step_time_field.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/action_buttons/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/advanced_options/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/header/header.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/time_field/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx (99%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx (99%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/constants/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx (99%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/create_index_pattern_wizard.tsx (76%) create mode 100644 src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/index.ts rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/can_append_wildcard.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/can_append_wildcard.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/contains_illegal_characters.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/contains_invalid_characters.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/ensure_minimum_time.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/ensure_minimum_time.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/extract_time_fields.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/extract_time_fields.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/get_indices.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/get_indices.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/get_matched_indices.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/get_matched_indices.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/lib/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/render.test.js (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/create_index_pattern_wizard/types.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/constants.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/create_edit_field/create_edit_field.tsx (62%) create mode 100644 src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx create mode 100644 src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/index.ts rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/edit_index_pattern.tsx (62%) create mode 100644 src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/edit_index_pattern_state_container.ts (97%) create mode 100644 src/plugins/index_pattern_management/public/components/edit_index_pattern/index.tsx rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/index_header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/index_header/index_header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/components/table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/components/table/table.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx (98%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/lib/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/indexed_fields_table/types.ts (92%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap (95%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/call_outs/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/confirmation_modal/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/header/__snapshots__/header.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/header/header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/table/__snapshots__/table.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/components/table/table.tsx (98%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/scripted_field_table.test.tsx (95%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx (91%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/scripted_fields_table/types.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/__snapshots__/source_filters_table.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/add_filter/add_filter.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/add_filter/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/confirmation_modal/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/header/header.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/header/header.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/header/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/table/table.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/components/table/table.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/source_filters_table.test.tsx (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/source_filters_table.tsx (98%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/source_filters_table/types.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/tabs/index.ts (100%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/tabs/tabs.tsx (97%) rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns => plugins/index_pattern_management/public/components}/edit_index_pattern/tabs/utils.ts (94%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/__snapshots__/field_editor.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/_index.scss (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/bytes/bytes.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/bytes/bytes.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/bytes/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/color/color.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/color/color.tsx (98%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/color/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date/date.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date/date.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/date_nanos/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/default/default.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/default/default.tsx (99%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/default/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/duration/duration.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/duration/duration.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/duration/index.tsx (100%) create mode 100644 src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/number/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/number/number.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/number/number.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/percent/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/percent/percent.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/percent/percent.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/static_lookup/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/string/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/string/string.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/string/string.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/truncate/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/truncate/sample.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/truncate/truncate.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/truncate/truncate.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/cv.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/de.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/go.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/index.js (99%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/ne.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/ni.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/stop.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/icons/us.png (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/label_template_flyout.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/url.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/url.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/field_format_editor.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/field_format_editor.tsx (93%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/_index.scss (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/_samples.scss (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/samples.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/field_format_editor/samples/samples.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/disabled_call_out.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/disabled_call_out.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/warning_call_out.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_call_outs/warning_call_out.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/_test_script.scss (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/help_flyout.test.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/help_flyout.tsx (82%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/scripting_syntax.tsx (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/components/scripting_help/test_script.tsx (91%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/constants/index.ts (93%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/field_editor.test.tsx (99%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/field_editor.tsx (92%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/lib/index.ts (100%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/lib/validate_script.ts (95%) rename src/{legacy/ui/public => plugins/index_pattern_management/public/components}/field_editor/types.ts (97%) create mode 100644 src/plugins/index_pattern_management/public/components/index.ts create mode 100644 src/plugins/index_pattern_management/public/components/index_pattern_table/index.ts create mode 100644 src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx create mode 100644 src/plugins/index_pattern_management/public/components/types.ts rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/index.ts => plugins/index_pattern_management/public/management_app/index.tsx} (93%) create mode 100644 src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx rename src/{legacy/ui => plugins/index_pattern_management}/public/scripting_languages/index.ts (95%) create mode 100644 src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts rename src/{legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index.js => plugins/index_pattern_management/public/service/field_format_editors/index.ts} (92%) diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/fetch_error/fetch_error.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/fetch_error/fetch_error.tsx index f8fc966dec351..a57a1b6def320 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/components/fetch_error/fetch_error.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/components/fetch_error/fetch_error.tsx @@ -41,7 +41,7 @@ const DiscoverFetchError = ({ fetchError }: Props) => { const { chrome } = getServices(); const mangagementUrlObj = chrome.navLinks.get('kibana:stack_management'); const managementUrl = mangagementUrlObj ? mangagementUrlObj.url : ''; - const url = `${managementUrl}/kibana/index_patterns`; + const url = `${managementUrl}/kibana/indexPatterns`; body = (

diff --git a/src/legacy/core_plugins/kibana/public/management/index.js b/src/legacy/core_plugins/kibana/public/management/index.js index 6a36391c56b5c..8593cf601080f 100644 --- a/src/legacy/core_plugins/kibana/public/management/index.js +++ b/src/legacy/core_plugins/kibana/public/management/index.js @@ -21,7 +21,7 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { FormattedMessage } from '@kbn/i18n/react'; -import './sections'; +// import './sections'; import uiRoutes from 'ui/routes'; import { I18nContext } from 'ui/i18n'; import { uiModules } from 'ui/modules'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/angular_template.html b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/angular_template.html deleted file mode 100644 index a2bc83db904a4..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/angular_template.html +++ /dev/null @@ -1,5 +0,0 @@ - -

-
-
- diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/index.js deleted file mode 100644 index ed1fc026c560c..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/index.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import uiRoutes from 'ui/routes'; -import angularTemplate from './angular_template.html'; -import { npStart } from 'ui/new_platform'; -import { getCreateBreadcrumbs } from '../breadcrumbs'; - -import { renderCreateIndexPatternWizard, destroyCreateIndexPatternWizard } from './render'; - -uiRoutes.when('/management/kibana/index_pattern', { - template: angularTemplate, - k7Breadcrumbs: getCreateBreadcrumbs, - controller: function($scope, $injector) { - // Wait for the directives to execute - const kbnUrl = $injector.get('kbnUrl'); - $scope.$$postDigest(() => { - const $routeParams = $injector.get('$routeParams'); - const indexPatternCreationType = npStart.plugins.indexPatternManagement.creation.getType( - $routeParams.type - ); - const services = { - uiSettings: npStart.core.uiSettings, - es: npStart.plugins.data.search.__LEGACY.esClient, - indexPatterns: npStart.plugins.data.indexPatterns, - savedObjectsClient: npStart.core.savedObjects.client, - indexPatternCreationType, - changeUrl: url => { - $scope.$evalAsync(() => kbnUrl.changePath(url)); - }, - openConfirm: npStart.core.overlays.openConfirm, - }; - - const initialQuery = $routeParams.id ? decodeURIComponent($routeParams.id) : undefined; - - renderCreateIndexPatternWizard(initialQuery, services); - }); - - $scope.$on('$destroy', destroyCreateIndexPatternWizard); - }, -}); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.js deleted file mode 100644 index d09ad3f63f0a2..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; -import { CreateIndexPatternWizard } from './create_index_pattern_wizard'; - -import { I18nContext } from 'ui/i18n'; - -const CREATE_INDEX_PATTERN_DOM_ELEMENT_ID = 'createIndexPatternReact'; - -export function renderCreateIndexPatternWizard(initialQuery, services) { - const node = document.getElementById(CREATE_INDEX_PATTERN_DOM_ELEMENT_ID); - if (!node) { - return; - } - - render( - - - , - node - ); -} - -export function destroyCreateIndexPatternWizard() { - const node = document.getElementById(CREATE_INDEX_PATTERN_DOM_ELEMENT_ID); - node && unmountComponentAtNode(node); -} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field.html b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field.html deleted file mode 100644 index 2decaf423183e..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field.html +++ /dev/null @@ -1,5 +0,0 @@ - -
-
-
-
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.html b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.html deleted file mode 100644 index 0bf7c7f0bdfbe..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.html +++ /dev/null @@ -1,12 +0,0 @@ - -
-
-
-
-
-
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js deleted file mode 100644 index e2f387c0291a7..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { HashRouter } from 'react-router-dom'; -import { render, unmountComponentAtNode } from 'react-dom'; -import { RegistryFieldFormatEditorsProvider } from 'ui/registry/field_format_editors'; -import uiRoutes from 'ui/routes'; -import { uiModules } from 'ui/modules'; -import { I18nContext } from 'ui/i18n'; -import { npStart } from 'ui/new_platform'; -import template from './edit_index_pattern.html'; -import createEditFieldtemplate from './create_edit_field.html'; -import { - getEditBreadcrumbs, - getEditFieldBreadcrumbs, - getCreateFieldBreadcrumbs, -} from '../breadcrumbs'; -import { EditIndexPattern } from './edit_index_pattern'; -import { CreateEditField } from './create_edit_field'; - -const REACT_EDIT_INDEX_PATTERN_DOM_ELEMENT_ID = 'reactEditIndexPattern'; - -function destroyEditIndexPattern() { - const node = document.getElementById(REACT_EDIT_INDEX_PATTERN_DOM_ELEMENT_ID); - node && unmountComponentAtNode(node); -} - -function renderEditIndexPattern($scope, config, $route) { - $scope.$$postDigest(() => { - const node = document.getElementById(REACT_EDIT_INDEX_PATTERN_DOM_ELEMENT_ID); - if (!node) { - return; - } - - render( - - - - - , - node - ); - }); -} - -uiRoutes.when('/management/kibana/index_patterns/:indexPatternId', { - template, - k7Breadcrumbs: getEditBreadcrumbs, - resolve: { - indexPattern: function($route, Promise, redirectWhenMissing) { - const { indexPatterns } = npStart.plugins.data; - return Promise.resolve(indexPatterns.get($route.current.params.indexPatternId)).catch( - redirectWhenMissing('/management/kibana/index_patterns') - ); - }, - }, -}); - -uiModules - .get('apps/management') - .controller('managementIndexPatternsEdit', function($scope, $route, config) { - $scope.$on('$destroy', () => { - destroyEditIndexPattern(); - }); - - renderEditIndexPattern($scope, config, $route); - }); - -// routes for create edit field. Will be removed after migartion all component to react. -const REACT_FIELD_EDITOR_ID = 'reactFieldEditor'; -const renderCreateEditField = ($scope, $route, getConfig, fieldFormatEditors) => { - $scope.$$postDigest(() => { - const node = document.getElementById(REACT_FIELD_EDITOR_ID); - if (!node) { - return; - } - - render( - - - npStart.core.http, - notifications: npStart.core.notifications, - docTitle: npStart.core.chrome.docTitle, - docLinksScriptedFields: npStart.core.docLinks.links.scriptedFields, - }} - /> - - , - node - ); - }); -}; - -const destroyCreateEditField = () => { - const node = document.getElementById(REACT_FIELD_EDITOR_ID); - node && unmountComponentAtNode(node); -}; - -uiRoutes - .when('/management/kibana/index_patterns/:indexPatternId/field/:fieldName*', { - mode: 'edit', - k7Breadcrumbs: getEditFieldBreadcrumbs, - }) - .when('/management/kibana/index_patterns/:indexPatternId/create-field/', { - mode: 'create', - k7Breadcrumbs: getCreateFieldBreadcrumbs, - }) - .defaults(/management\/kibana\/index_patterns\/[^\/]+\/(field|create-field)(\/|$)/, { - template: createEditFieldtemplate, - mapBreadcrumbs($route, breadcrumbs) { - const { indexPattern } = $route.current.locals; - return breadcrumbs.map(crumb => { - if (crumb.id !== indexPattern.id) { - return crumb; - } - - return { - ...crumb, - display: indexPattern.title, - }; - }); - }, - resolve: { - indexPattern: function($route, Promise, redirectWhenMissing) { - const { indexPatterns } = npStart.plugins.data; - return Promise.resolve(indexPatterns.get($route.current.params.indexPatternId)).catch( - redirectWhenMissing('/management/kibana/index_patterns') - ); - }, - }, - controllerAs: 'fieldSettings', - controller: function FieldEditorPageController($scope, $route, Private, config) { - const getConfig = (...args) => config.get(...args); - const fieldFormatEditors = Private(RegistryFieldFormatEditorsProvider); - - renderCreateEditField($scope, $route, getConfig, fieldFormatEditors); - - $scope.$on('$destroy', () => { - destroyCreateEditField(); - }); - }, - }); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.html b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.html deleted file mode 100644 index 1af0fc2c33782..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
-
-
-
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.js deleted file mode 100644 index a8376c0e84bf9..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { management } from 'ui/management'; -import './create_index_pattern_wizard'; -import './edit_index_pattern'; -import uiRoutes from 'ui/routes'; -import { uiModules } from 'ui/modules'; -import indexTemplate from './index.html'; -import indexPatternListTemplate from './list.html'; -import { IndexPatternTable } from './index_pattern_table'; -import { npStart } from 'ui/new_platform'; -import { i18n } from '@kbn/i18n'; -import { I18nContext } from 'ui/i18n'; -import { UICapabilitiesProvider } from 'ui/capabilities/react'; -import { getListBreadcrumbs } from './breadcrumbs'; - -import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; - -const INDEX_PATTERN_LIST_DOM_ELEMENT_ID = 'indexPatternListReact'; - -export function updateIndexPatternList(indexPatterns, kbnUrl, indexPatternCreationOptions) { - const node = document.getElementById(INDEX_PATTERN_LIST_DOM_ELEMENT_ID); - if (!node) { - return; - } - - render( - - - - - , - node - ); -} - -export const destroyIndexPatternList = () => { - const node = document.getElementById(INDEX_PATTERN_LIST_DOM_ELEMENT_ID); - node && unmountComponentAtNode(node); -}; - -const indexPatternsResolutions = { - indexPatterns: function() { - const savedObjectsClient = npStart.core.savedObjects.client; - - return savedObjectsClient - .find({ - type: 'index-pattern', - fields: ['title', 'type'], - perPage: 10000, - }) - .then(response => response.savedObjects); - }, -}; - -// add a dependency to all of the subsection routes -uiRoutes.defaults(/management\/kibana\/(index_patterns|index_pattern)/, { - resolve: indexPatternsResolutions, - requireUICapability: 'management.kibana.index_patterns', - badge: uiCapabilities => { - if (uiCapabilities.indexPatterns.save) { - return undefined; - } - - return { - text: i18n.translate('kbn.management.indexPatterns.badge.readOnly.text', { - defaultMessage: 'Read only', - }), - tooltip: i18n.translate('kbn.management.indexPatterns.badge.readOnly.tooltip', { - defaultMessage: 'Unable to save index patterns', - }), - iconType: 'glasses', - }; - }, -}); - -uiRoutes.when('/management/kibana/index_patterns', { - template: indexPatternListTemplate, - k7Breadcrumbs: getListBreadcrumbs, -}); - -// wrapper directive, which sets some global stuff up like the left nav -uiModules - .get('apps/management') - .directive('kbnManagementIndexPatterns', function($route, config, kbnUrl) { - return { - restrict: 'E', - transclude: true, - template: indexTemplate, - link: async function($scope) { - const indexPatternCreationOptions = await npStart.plugins.indexPatternManagement.creation.getIndexPatternCreationOptions( - url => { - $scope.$evalAsync(() => kbnUrl.change(url)); - } - ); - - const renderList = () => { - $scope.indexPatternList = - $route.current.locals.indexPatterns - .map(pattern => { - const id = pattern.id; - const title = pattern.get('title'); - const isDefault = $scope.defaultIndex === id; - const tags = npStart.plugins.indexPatternManagement.list.getIndexPatternTags( - pattern, - isDefault - ); - - return { - id, - title, - url: kbnUrl.eval('#/management/kibana/index_patterns/{{id}}', { id: id }), - active: $scope.editingId === id, - default: isDefault, - tags, - //the prepending of 0 at the default pattern takes care of prioritization - //so the sorting will but the default index on top - //or on bottom of a the table - sort: `${isDefault ? '0' : '1'}${title}`, - }; - }) - .sort((a, b) => { - if (a.sort < b.sort) { - return -1; - } else if (a.sort > b.sort) { - return 1; - } else { - return 0; - } - }) || []; - - updateIndexPatternList($scope.indexPatternList, kbnUrl, indexPatternCreationOptions); - }; - - $scope.$on('$destroy', destroyIndexPatternList); - $scope.editingId = $route.current.params.indexPatternId; - $scope.$watch('defaultIndex', () => renderList()); - config.bindToScope($scope, 'defaultIndex'); - $scope.$apply(); - }, - }; - }); - -management.getSection('kibana').register('index_patterns', { - display: i18n.translate('kbn.management.indexPattern.sectionsHeader', { - defaultMessage: 'Index Patterns', - }), - order: 0, - url: '#/management/kibana/index_patterns/', -}); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index_pattern_table.tsx b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index_pattern_table.tsx deleted file mode 100644 index f254a6bc22a0d..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index_pattern_table.tsx +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { - EuiBadge, - EuiButtonEmpty, - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - // @ts-ignore - EuiInMemoryTable, - EuiPanel, - EuiSpacer, - EuiText, -} from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/react'; -import React from 'react'; -import { CreateButton } from '../create_button'; -import { CreateIndexPatternPrompt } from '../create_index_pattern_prompt'; -import { IndexPattern, IndexPatternCreationOption } from '../types'; - -const columns = [ - { - field: 'title', - name: 'Pattern', - render: ( - name: string, - index: { - id: string; - tags?: Array<{ - key: string; - name: string; - }>; - } - ) => ( - - {name} - {index.tags && - index.tags.map(({ key: tagKey, name: tagName }) => ( - - {tagName} - - ))} - - ), - dataType: 'string' as const, - sortable: ({ sort }: { sort: string }) => sort, - }, -]; - -const pagination = { - initialPageSize: 10, - pageSizeOptions: [5, 10, 25, 50], -}; - -const sorting = { - sort: { - field: 'title', - direction: 'asc' as const, - }, -}; - -const search = { - box: { - incremental: true, - schema: { - fields: { title: { type: 'string' } }, - }, - }, -}; - -interface Props { - indexPatterns: IndexPattern[]; - indexPatternCreationOptions: IndexPatternCreationOption[]; -} - -interface State { - showFlyout: boolean; -} - -export class IndexPatternTable extends React.Component { - public readonly state = { - showFlyout: this.props.indexPatterns.length === 0, - }; - - public render() { - return ( - - {this.state.showFlyout && ( - this.setState({ showFlyout: false })} /> - )} - - - - - -

- -

-
-
- - this.setState({ showFlyout: true })} - aria-label="Help" - /> - -
-
- - - - - -
- - -
- ); - } -} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/list.html b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/list.html deleted file mode 100644 index 928fb75384be1..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/list.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/src/legacy/core_plugins/kibana/server/lib/__tests__/relationships.js b/src/legacy/core_plugins/kibana/server/lib/__tests__/relationships.js index b06a5b443e709..0b90ea29af6e1 100644 --- a/src/legacy/core_plugins/kibana/server/lib/__tests__/relationships.js +++ b/src/legacy/core_plugins/kibana/server/lib/__tests__/relationships.js @@ -65,11 +65,11 @@ const savedObjectsManagement = getManagementaMock({ return obj.attributes.title; }, getEditUrl(obj) { - return `/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`; + return `/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`; }, getInAppUrl(obj) { return { - path: `/app/kibana#/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`, + path: `/app/kibana#/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`, uiCapabilitiesPath: 'management.kibana.index_patterns', }; }, @@ -323,9 +323,9 @@ describe('findRelationships', () => { meta: { icon: 'indexPatternApp', title: 'My Index Pattern', - editUrl: '/management/kibana/index_patterns/1', + editUrl: '/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/app/kibana#/management/kibana/index_patterns/1', + path: '/app/kibana#/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, @@ -437,9 +437,9 @@ describe('findRelationships', () => { meta: { icon: 'indexPatternApp', title: 'My Index Pattern', - editUrl: '/management/kibana/index_patterns/1', + editUrl: '/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/app/kibana#/management/kibana/index_patterns/1', + path: '/app/kibana#/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, diff --git a/src/legacy/ui/public/_index.scss b/src/legacy/ui/public/_index.scss index f10718ba58c2c..3a3c7a4388b09 100644 --- a/src/legacy/ui/public/_index.scss +++ b/src/legacy/ui/public/_index.scss @@ -12,6 +12,7 @@ @import './directives/index'; @import './error_url_overflow/index'; @import './exit_full_screen/index'; -@import './field_editor/index'; +// todo +@import '../../../plugins/index_pattern_management/public/components/field_editor/index'; @import './style_compile/index'; @import '../../../plugins/management/public/components/index'; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/register.ts b/src/legacy/ui/public/field_editor/components/field_format_editor/register.ts deleted file mode 100644 index 3062a3ba8ac14..0000000000000 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/register.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { RegistryFieldFormatEditorsProvider } from 'ui/registry/field_format_editors'; -import { BytesFormatEditor } from './editors/bytes'; -import { ColorFormatEditor } from './editors/color'; -import { DateFormatEditor } from './editors/date'; -import { DateNanosFormatEditor } from './editors/date_nanos'; -import { DurationFormatEditor } from './editors/duration'; -import { NumberFormatEditor } from './editors/number'; -import { PercentFormatEditor } from './editors/percent'; -import { StaticLookupFormatEditor } from './editors/static_lookup'; -import { StringFormatEditor } from './editors/string'; -import { TruncateFormatEditor } from './editors/truncate'; -import { UrlFormatEditor } from './editors/url/url'; - -RegistryFieldFormatEditorsProvider.register(() => BytesFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => ColorFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => DateFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => DateNanosFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => DurationFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => NumberFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => PercentFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => StaticLookupFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => StringFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => TruncateFormatEditor); -RegistryFieldFormatEditorsProvider.register(() => UrlFormatEditor); diff --git a/src/legacy/ui/ui_exports/ui_export_defaults.js b/src/legacy/ui/ui_exports/ui_export_defaults.js index 35e1f8b7d2127..1341777bc0991 100644 --- a/src/legacy/ui/ui_exports/ui_export_defaults.js +++ b/src/legacy/ui/ui_exports/ui_export_defaults.js @@ -43,7 +43,5 @@ export const UI_EXPORT_DEFAULTS = { }, })), - appExtensions: { - fieldFormatEditors: ['ui/field_editor/components/field_format_editor/register'], - }, + appExtensions: {}, }; diff --git a/src/plugins/advanced_settings/public/plugin.ts b/src/plugins/advanced_settings/public/plugin.ts index 04eeff1e1f3ce..aeb6087217df4 100644 --- a/src/plugins/advanced_settings/public/plugin.ts +++ b/src/plugins/advanced_settings/public/plugin.ts @@ -40,7 +40,7 @@ export class AdvancedSettingsPlugin this.managementApp = kibanaSection.registerApp({ id: 'settings', title, - order: 20, + order: 100000, async mount(params) { const { mountManagementSection } = await import( './management_app/mount_management_section' diff --git a/src/plugins/data/public/index_patterns/index_patterns/ensure_default_index_pattern.tsx b/src/plugins/data/public/index_patterns/index_patterns/ensure_default_index_pattern.tsx index 6b71739862f62..8c045a684740e 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/ensure_default_index_pattern.tsx +++ b/src/plugins/data/public/index_patterns/index_patterns/ensure_default_index_pattern.tsx @@ -61,7 +61,7 @@ export const createEnsureDefaultIndexPattern = (core: CoreStart) => { core.uiSettings.set('defaultIndex', defaultId); } else { const canManageIndexPatterns = core.application.capabilities.management.kibana.index_patterns; - const redirectTarget = canManageIndexPatterns ? '/management/kibana/index_pattern' : '/home'; + const redirectTarget = canManageIndexPatterns ? '/management/kibana/indexPatterns' : '/home'; if (timeoutId) { clearTimeout(timeoutId); diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts index 768029136879d..aee3ae2d58739 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts @@ -164,7 +164,7 @@ export class IndexPattern implements IIndexPattern { private updateFromElasticSearch(response: any, forceFieldRefresh: boolean = false) { if (!response.found) { - throw new SavedObjectNotFound(type, this.id, '#/management/kibana/index_pattern'); + throw new SavedObjectNotFound(type, this.id, '#/management/kibana/indexPatterns'); } _.forOwn(this.mapping, (fieldMapping: FieldMappingSpec, name: string | undefined) => { diff --git a/src/plugins/data/public/index_patterns/utils.ts b/src/plugins/data/public/index_patterns/utils.ts index 0ecc87f3080fd..cc4d5b2f8fbf3 100644 --- a/src/plugins/data/public/index_patterns/utils.ts +++ b/src/plugins/data/public/index_patterns/utils.ts @@ -51,10 +51,10 @@ export async function findByTitle( export function getRoutes() { return { - edit: '/management/kibana/index_patterns/{{id}}', - addField: '/management/kibana/index_patterns/{{id}}/create-field', - indexedFields: '/management/kibana/index_patterns/{{id}}?_a=(tab:indexedFields)', - scriptedFields: '/management/kibana/index_patterns/{{id}}?_a=(tab:scriptedFields)', - sourceFilters: '/management/kibana/index_patterns/{{id}}?_a=(tab:sourceFilters)', + edit: '/management/kibana/indexPatterns/patterns/{{id}}', + addField: '/management/kibana/indexPatterns/patterns/{{id}}/create-field', + indexedFields: '/management/kibana/indexPatterns/patterns/{{id}}?_a=(tab:indexedFields)', + scriptedFields: '/management/kibana/indexPatterns/patterns/{{id}}?_a=(tab:scriptedFields)', + sourceFilters: '/management/kibana/indexPatterns/patterns/{{id}}?_a=(tab:sourceFilters)', }; } diff --git a/src/plugins/data/server/saved_objects/index_patterns.ts b/src/plugins/data/server/saved_objects/index_patterns.ts index 497dbb7d6f630..a212d7f88e4eb 100644 --- a/src/plugins/data/server/saved_objects/index_patterns.ts +++ b/src/plugins/data/server/saved_objects/index_patterns.ts @@ -32,11 +32,11 @@ export const indexPatternSavedObjectType: SavedObjectsType = { return obj.attributes.title; }, getEditUrl(obj) { - return `/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`; + return `/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`; }, getInAppUrl(obj) { return { - path: `/app/kibana#/management/kibana/index_patterns/${encodeURIComponent(obj.id)}`, + path: `/app/kibana#/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`, uiCapabilitiesPath: 'management.kibana.index_patterns', }; }, diff --git a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap index c1dc560b4353f..fd4c373125168 100644 --- a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap +++ b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap @@ -277,7 +277,7 @@ exports[`apmUiEnabled 1`] = ` /> { void; }>; - uiCapabilities: UICapabilities; } -class CreateButtonComponent extends Component { +export class CreateButton extends Component { public state = { isPopoverOpen: false, }; public render() { - const { options, children, uiCapabilities } = this.props; + const { options, children } = this.props; const { isPopoverOpen } = this.state; if (!options || !options.length) { return null; } - if (!uiCapabilities.indexPatterns.save) { - return null; - } - if (options.length === 1) { return ( { ); }; } - -export const CreateButton = injectUICapabilities(CreateButtonComponent); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_button/index.ts b/src/plugins/index_pattern_management/public/components/create_button/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_button/index.ts rename to src/plugins/index_pattern_management/public/components/create_button/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_prompt/index.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_prompt/index.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/CREATE_INDEX_PATTERN.md b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/CREATE_INDEX_PATTERN.md similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/CREATE_INDEX_PATTERN.md rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/CREATE_INDEX_PATTERN.md diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/empty_state.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/empty_state.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/empty_state.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/empty_state.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/empty_state/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/header.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/header.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/header/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/loading_state.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/loading_state.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/loading_state.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/loading_state/loading_state.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__snapshots__/step_index_pattern.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/__snapshots__/step_index_pattern.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/__snapshots__/step_index_pattern.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/__snapshots__/step_index_pattern.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/header.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/header/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/indices_list.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx similarity index 98% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx index d8f677b7f6089..23037270ee3d1 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx @@ -25,8 +25,8 @@ import { indexPatterns, DataPublicPluginStart, IndexPatternAttributes, -} from '../../../../../../../../../../plugins/data/public'; -import { SavedObjectsClient, IUiSettingsClient } from '../../../../../../../../../../core/public'; +} from '../../../../../../../plugins/data/public'; +import { SavedObjectsClient, IUiSettingsClient } from '../../../../../../../core/public'; import { MAX_SEARCH_SIZE } from '../../constants'; import { getIndices, @@ -39,7 +39,7 @@ import { LoadingIndices } from './components/loading_indices'; import { StatusMessage } from './components/status_message'; import { IndicesList } from './components/indices_list'; import { Header } from './components/header'; -import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public'; +import { IndexPatternCreationConfig } from '../../../../../../../plugins/index_pattern_management/public'; import { MatchedIndex } from '../../types'; interface StepIndexPatternProps { diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/__snapshots__/step_time_field.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/__snapshots__/step_time_field.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/__snapshots__/step_time_field.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/__snapshots__/step_time_field.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/action_buttons/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/action_buttons/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/advanced_options/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/header.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/header/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx similarity index 99% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx index 876a3b79a8812..2f70c1b80b836 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx @@ -19,7 +19,8 @@ import React from 'react'; -import './time_field.css'; +// todo +// import './time_field.css'; import { EuiForm, diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx similarity index 99% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx index a58bf10c9dab8..572ca4ad90b4f 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx @@ -252,6 +252,7 @@ export class StepTimeField extends Component {error} + { expect(services.uiSettings.get).toBeCalled(); expect(create).toBeCalled(); expect(clear).toBeCalledWith('id'); - expect(services.changeUrl).toBeCalledWith(`/management/kibana/index_patterns/id`); + expect(services.changeUrl).toBeCalledWith(`/management/kibana/indexPatterns/patterns/id`); }); }); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/create_index_pattern_wizard.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx similarity index 76% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/create_index_pattern_wizard.tsx rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx index 4166d48349d35..bc9c115358eb1 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/create_index_pattern_wizard.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx @@ -19,10 +19,13 @@ import React, { ReactElement, Component } from 'react'; -import { EuiGlobalToastList, EuiGlobalToastListToast } from '@elastic/eui'; +import { EuiGlobalToastList, EuiGlobalToastListToast, EuiPanel } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { SavedObjectsClient, IUiSettingsClient, OverlayStart } from 'src/core/public'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; import { StepIndexPattern } from './components/step_index_pattern'; import { StepTimeField } from './components/step_time_field'; import { Header } from './components/header'; @@ -31,24 +34,16 @@ import { EmptyState } from './components/empty_state'; import { MAX_SEARCH_SIZE } from './constants'; import { ensureMinimumTime, getIndices } from './lib'; -import { - SavedObjectsClient, - IUiSettingsClient, - OverlayStart, -} from '../../../../../../../../core/public'; -import { DataPublicPluginStart } from '../../../../../../../../plugins/data/public'; -import { IndexPatternCreationConfig } from '../../../../../../../../plugins/index_pattern_management/public'; +import { IndexPatternCreationConfig, IndexPatternManagementStart } from '../..'; import { MatchedIndex } from './types'; -interface CreateIndexPatternWizardProps { - initialQuery: string; +interface CreateIndexPatternWizardProps extends RouteComponentProps { services: { - indexPatternCreationType: IndexPatternCreationConfig; + indexPatternCreation: IndexPatternManagementStart['creation']; es: DataPublicPluginStart['search']['__LEGACY']['esClient']; indexPatterns: DataPublicPluginStart['indexPatterns']; savedObjectsClient: SavedObjectsClient; uiSettings: IUiSettingsClient; - changeUrl: (url: string) => void; openConfirm: OverlayStart['openConfirm']; }; } @@ -61,21 +56,33 @@ interface CreateIndexPatternWizardState { isInitiallyLoadingIndices: boolean; isIncludingSystemIndices: boolean; toasts: EuiGlobalToastListToast[]; + indexPatternCreationType: IndexPatternCreationConfig; } export class CreateIndexPatternWizard extends Component< CreateIndexPatternWizardProps, CreateIndexPatternWizardState > { - state = { - step: 1, - indexPattern: '', - allIndices: [], - remoteClustersExist: false, - isInitiallyLoadingIndices: true, - isIncludingSystemIndices: false, - toasts: [], - }; + constructor(props: CreateIndexPatternWizardProps) { + super(props); + const { + services: { indexPatternCreation }, + location, + } = props; + + const type = new URLSearchParams(location.search).get('type') || undefined; + + this.state = { + step: 1, + indexPattern: '', + allIndices: [], + remoteClustersExist: false, + isInitiallyLoadingIndices: true, + isIncludingSystemIndices: false, + toasts: [], + indexPatternCreationType: indexPatternCreation.getType(type), + }; + } async UNSAFE_componentWillMount() { this.fetchData(); @@ -129,7 +136,7 @@ export class CreateIndexPatternWizard extends Component< // query local and remote indices, updating state independently ensureMinimumTime( this.catchAndWarn( - getIndices(services.es, services.indexPatternCreationType, `*`, MAX_SEARCH_SIZE), + getIndices(services.es, this.state.indexPatternCreationType, `*`, MAX_SEARCH_SIZE), [], indicesFailMsg ) @@ -140,7 +147,7 @@ export class CreateIndexPatternWizard extends Component< this.catchAndWarn( // if we get an error from remote cluster query, supply fallback value that allows user entry. // ['a'] is fallback value - getIndices(services.es, services.indexPatternCreationType, `*:*`, 1), + getIndices(services.es, this.state.indexPatternCreationType, `*:*`, 1), ['a'], clustersFailMsg ).then((remoteIndices: string[] | MatchedIndex[]) => @@ -149,7 +156,7 @@ export class CreateIndexPatternWizard extends Component< }; createIndexPattern = async (timeFieldName: string | undefined, indexPatternId: string) => { - const { services } = this.props; + const { services, history } = this.props; const { indexPattern } = this.state; const emptyPattern = await services.indexPatterns.make(); @@ -158,7 +165,7 @@ export class CreateIndexPatternWizard extends Component< id: indexPatternId, title: indexPattern, timeFieldName, - ...services.indexPatternCreationType.getIndexPatternMappings(), + ...this.state.indexPatternCreationType.getIndexPatternMappings(), }); const createdId = await emptyPattern.create(); @@ -175,7 +182,7 @@ export class CreateIndexPatternWizard extends Component< }); if (isConfirmed) { - return services.changeUrl(`/management/kibana/index_patterns/${indexPatternId}`); + return history.push(`/patterns/${indexPatternId}`); } else { return false; } @@ -186,7 +193,7 @@ export class CreateIndexPatternWizard extends Component< } services.indexPatterns.clearCache(createdId); - services.changeUrl(`/management/kibana/index_patterns/${createdId}`); + history.push(`/patterns/${createdId}`); }; goToTimeFieldStep = (indexPattern: string) => { @@ -205,16 +212,15 @@ export class CreateIndexPatternWizard extends Component< renderHeader() { const { isIncludingSystemIndices } = this.state; - const { services } = this.props; return (
); } @@ -239,7 +245,9 @@ export class CreateIndexPatternWizard extends Component< } if (step === 1) { - const { services, initialQuery } = this.props; + const { services, location } = this.props; + const initialQuery = new URLSearchParams(location.search).get('id') || undefined; + return ( @@ -262,7 +270,7 @@ export class CreateIndexPatternWizard extends Component< indexPatternsService={services.indexPatterns} goToPreviousStep={this.goToIndexPatternStep} createIndexPattern={this.createIndexPattern} - indexPatternCreationType={services.indexPatternCreationType} + indexPatternCreationType={this.state.indexPatternCreationType} /> ); } @@ -281,7 +289,7 @@ export class CreateIndexPatternWizard extends Component< const content = this.renderContent(); return ( - +
{header} {content} @@ -293,7 +301,9 @@ export class CreateIndexPatternWizard extends Component< }} toastLifeTimeMs={6000} /> - + ); } } + +export const CreateIndexPatternWizardWithRouter = withRouter(CreateIndexPatternWizard); diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/index.ts new file mode 100644 index 0000000000000..893021141aa24 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { CreateIndexPatternWizardWithRouter } from './create_index_pattern_wizard'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/can_append_wildcard.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/can_append_wildcard.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/can_append_wildcard.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/can_append_wildcard.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/can_append_wildcard.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/can_append_wildcard.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/can_append_wildcard.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/can_append_wildcard.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/contains_illegal_characters.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/contains_illegal_characters.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/contains_illegal_characters.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/contains_illegal_characters.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/contains_invalid_characters.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/contains_invalid_characters.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/contains_invalid_characters.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/contains_invalid_characters.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/ensure_minimum_time.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/ensure_minimum_time.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/ensure_minimum_time.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/ensure_minimum_time.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/ensure_minimum_time.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/ensure_minimum_time.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/ensure_minimum_time.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/ensure_minimum_time.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/extract_time_fields.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/extract_time_fields.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/extract_time_fields.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/extract_time_fields.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_indices.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_indices.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_indices.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_indices.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_indices.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_matched_indices.test.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_matched_indices.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_matched_indices.test.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_matched_indices.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_matched_indices.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_matched_indices.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/get_matched_indices.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/get_matched_indices.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/index.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/lib/index.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.test.js b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/render.test.js rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/types.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/types.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/types.ts rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/types.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/constants.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/constants.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/constants.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/constants.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx similarity index 62% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx index 564f115cf2c48..0815ab28e3fcf 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/create_edit_field.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx @@ -19,27 +19,35 @@ import React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; // @ts-ignore -import { FieldEditor } from 'ui/field_editor'; +// import { FieldEditor } from 'ui/field_editor'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { HttpStart, DocLinksStart } from 'src/core/public'; +import { ChromeDocTitle, NotificationsStart, IUiSettingsClient } from 'src/core/public'; +import { + IndexPattern, + IndexPatternField, + DataPublicPluginStart, +} from '../../../../../../plugins/data/public'; import { IndexHeader } from '../index_header'; -import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; -import { ChromeDocTitle, NotificationsStart } from '../../../../../../../../../core/public'; import { TAB_SCRIPTED_FIELDS, TAB_INDEXED_FIELDS } from '../constants'; +import { FieldEditor } from '../../field_editor'; + interface CreateEditFieldProps extends RouteComponentProps { indexPattern: IndexPattern; mode?: string; fieldName?: string; fieldFormatEditors: any; - getConfig: (name: string) => any; services: { - notifications: NotificationsStart; + UiSettings: IUiSettingsClient; docTitle: ChromeDocTitle; - getHttpStart: () => HttpStart; + http: HttpStart; docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; + SearchBar: DataPublicPluginStart['ui']['SearchBar']; + toasts: NotificationsStart['toasts']; + fieldFormats: DataPublicPluginStart['fieldFormats']; }; } @@ -56,7 +64,6 @@ export const CreateEditField = withRouter( mode, fieldName, fieldFormatEditors, - getConfig, services, history, }: CreateEditFieldProps) => { @@ -68,7 +75,7 @@ export const CreateEditField = withRouter( type: 'number', }); - const url = `/management/kibana/index_patterns/${indexPattern.id}`; + const url = `/patterns/${indexPattern.id}`; if (mode === 'edit' && !field) { const message = i18n.translate('kbn.management.editIndexPattern.scripted.noFieldLabel', { @@ -76,7 +83,7 @@ export const CreateEditField = withRouter( "'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'", values: { indexPatternTitle: indexPattern.title, fieldName }, }); - services.notifications.toasts.addWarning(message); + services.toasts.addWarning(message); history.push(url); } @@ -90,24 +97,32 @@ export const CreateEditField = withRouter( if (field) { return ( - - - - - - - - + + + + + + + + + + ); } else { return <>; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx new file mode 100644 index 0000000000000..25595a5d5c9ae --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx @@ -0,0 +1,82 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React, { useEffect, useState } from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; + +import { + HttpStart, + DocLinksStart, + ChromeDocTitle, + NotificationsStart, + IUiSettingsClient, +} from 'src/core/public'; + +import { IndexPattern, DataPublicPluginStart } from '../../../../../../plugins/data/public'; +import { CreateEditField } from './create_edit_field'; + +export interface CreateEditFieldContainerProps + extends RouteComponentProps<{ id: string; fieldName: string }> { + getIndexPattern: (id: string) => Promise; + fieldFormatEditors: any; + getConfig: IUiSettingsClient; + services: { + UiSettings: IUiSettingsClient; + notifications: NotificationsStart; + docTitle: ChromeDocTitle; + http: HttpStart; + docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; + SearchBar: DataPublicPluginStart['ui']['SearchBar']; + toasts: NotificationsStart['toasts']; + fieldFormats: DataPublicPluginStart['fieldFormats']; + }; +} + +const CreateEditFieldCont: React.FC = ({ ...props }) => { + const [indexPattern, setIndexPattern] = useState(); + + useEffect(() => { + props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => setIndexPattern(ip)); + }, [props.match.params.id, props.getIndexPattern, props]); + + if (indexPattern) { + return ( + + ); + } else { + return <>; + } +}; + +// todo rename +export const CreateEditFieldContainer = withRouter(CreateEditFieldCont); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/index.ts new file mode 100644 index 0000000000000..84dce3b0f8301 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/index.ts @@ -0,0 +1,21 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { CreateEditField } from './create_edit_field'; +export { CreateEditFieldContainer } from './create_edit_field_container'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx similarity index 62% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx index e869ac84c2db2..5e666e743a996 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -29,23 +29,27 @@ import { EuiLink, EuiIcon, EuiCallOut, + EuiPanel, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { IndexPattern, IndexPatternField } from '../../../../../../../../plugins/data/public'; import { ChromeDocTitle, NotificationsStart, OverlayStart, -} from '../../../../../../../../core/public'; -import { IndexPatternManagementStart } from '../../../../../../../../plugins/index_pattern_management/public'; + IUiSettingsClient, +} from 'src/core/public'; +import { IndexPattern, IndexPatternField } from '../../../../../plugins/data/public'; +import { IndexPatternManagementStart } from '../..'; import { Tabs } from './tabs'; import { IndexHeader } from './index_header'; +import { IndexPatternTableItem } from '../types'; -interface EditIndexPatternProps extends RouteComponentProps { +export interface EditIndexPatternProps extends RouteComponentProps { indexPattern: IndexPattern; - indexPatterns: IndexPattern[]; - config: Record; + // getIndexPattern: (id: string) => Promise; + indexPatterns: IndexPatternTableItem[]; + config: IUiSettingsClient; services: { notifications: NotificationsStart; docTitle: ChromeDocTitle; @@ -91,7 +95,17 @@ const confirmModalOptionsDelete = { }; export const EditIndexPattern = withRouter( - ({ indexPattern, indexPatterns, config, services, history, location }: EditIndexPatternProps) => { + ({ + indexPattern, + // getIndexPattern, + indexPatterns, + config, + services, + history, + location, + }: EditIndexPatternProps) => { + // console.log('EditIndexPattern render', match.params.id); + // todo - load async const [fields, setFields] = useState(indexPattern.getNonScriptedFields()); const [conflictedFields, setConflictedFields] = useState( indexPattern.fields.filter(field => field.type === 'conflict') @@ -102,7 +116,7 @@ export const EditIndexPattern = withRouter( useEffect(() => { setFields(indexPattern.getNonScriptedFields()); setConflictedFields(indexPattern.fields.filter(field => field.type === 'conflict')); - }, [indexPattern, indexPattern.fields]); + }, [indexPattern]); useEffect(() => { const indexPatternTags = @@ -143,7 +157,7 @@ export const EditIndexPattern = withRouter( } Promise.resolve(indexPattern.destroy()).then(function() { - history.push('/management/kibana/index_patterns'); + history.push('/management/kibana/indexPatterns'); }); } @@ -168,71 +182,79 @@ export const EditIndexPattern = withRouter( } ); + const headingAriaLabel = i18n.translate('kbn.management.editIndexPattern.detailsAria', { + defaultMessage: 'Index pattern details', + }); + services.docTitle.change(indexPattern.title); const showTagsSection = Boolean(indexPattern.timeFieldName || (tags && tags.length > 0)); return ( - - - - - {showTagsSection && ( - - {Boolean(indexPattern.timeFieldName) && ( - - {timeFilterHeader} - + +
+ + + + + {showTagsSection && ( + + {Boolean(indexPattern.timeFieldName) && ( + + {timeFilterHeader} + + )} + {tags.map((tag: any) => ( + + {tag.name} + + ))} + + )} + + +

+ {indexPattern.title} }} + />{' '} + + {mappingAPILink} + + +

+
+ {conflictedFields.length > 0 && ( + +

{mappingConflictLabel}

+
)} - {tags.map((tag: any) => ( - - {tag.name} - - ))} -
- )} - - -

- {indexPattern.title} }} - />{' '} - - {mappingAPILink} - - -

-
- {conflictedFields.length > 0 && ( - -

{mappingConflictLabel}

-
- )} - - - - - + + + + + +
+
); } ); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx new file mode 100644 index 0000000000000..9b4e18778848a --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -0,0 +1,68 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React, { useEffect, useState } from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import { + ChromeDocTitle, + NotificationsStart, + OverlayStart, + IUiSettingsClient, +} from 'src/core/public'; +import { IndexPattern } from '../../../../../plugins/data/public'; +import { IndexPatternManagementStart } from '../..'; +import { IndexPatternTableItem } from '../types'; + +import { EditIndexPattern } from '../edit_index_pattern'; + +export interface EditIndexPatternContainerProps extends RouteComponentProps<{ id: string }> { + getIndexPattern: (id: string) => Promise; + indexPatterns: IndexPatternTableItem[]; + config: IUiSettingsClient; + services: { + notifications: NotificationsStart; + docTitle: ChromeDocTitle; + overlays: OverlayStart; + indexPatternManagement: IndexPatternManagementStart; + }; +} + +const EditIndexPatternCont: React.FC = ({ ...props }) => { + const [indexPattern, setIndexPattern] = useState(); + + useEffect(() => { + props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => setIndexPattern(ip)); + }, [props.match.params.id, props.getIndexPattern, props]); + + if (indexPattern) { + return ( + + ); + } else { + return <>; + } +}; + +// todo rename +export const EditIndexPatternContainer = withRouter(EditIndexPatternCont); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern_state_container.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_state_container.ts similarity index 97% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern_state_container.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_state_container.ts index 5723a596f95d5..f99a5b072b423 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/edit_index_pattern_state_container.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_state_container.ts @@ -22,7 +22,7 @@ import { createStateContainer, syncState, createKbnUrlStateStorage, -} from '../../../../../../../../plugins/kibana_utils/public'; +} from '../../../../../plugins/kibana_utils/public'; interface IEditIndexPatternState { tab: string; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index.tsx new file mode 100644 index 0000000000000..288ce115a7803 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index.tsx @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { EditIndexPattern } from './edit_index_pattern'; +export { EditIndexPatternContainer } from './edit_index_pattern_container'; +export { CreateEditField } from './create_edit_field'; +export { CreateEditFieldContainer } from './create_edit_field/create_edit_field_container'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx similarity index 98% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx index c69063967b1e2..6b1048d3c9d0c 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx @@ -23,7 +23,7 @@ import { IndexPatternField, IIndexPattern, IFieldType, -} from '../../../../../../../../../plugins/data/public'; +} from '../../../../../../plugins/data/public'; import { Table } from './components/table'; import { getFieldFormat } from './lib'; import { IndexedFieldItem } from './types'; @@ -108,7 +108,6 @@ export class IndexedFieldsTable extends Component< render() { const { indexPattern } = this.props; - const fields = this.getFilteredFields(this.state, this.props); return ( diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/lib/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/types.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/types.ts similarity index 92% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/types.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/types.ts index f27f4608bf5d5..30466bc57bada 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/types.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { IFieldType } from '../../../../../../../../../plugins/data/public'; +import { IFieldType } from '../../../../../../plugins/data/public'; export interface IndexedFieldItem extends IFieldType { info: string[]; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap similarity index 95% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap index 202b09ddc6066..332f5665fd433 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap @@ -3,7 +3,7 @@ exports[`ScriptedFieldsTable should filter based on the lang filter 1`] = `
({ EuiTitle: 'eui-title', @@ -46,11 +46,6 @@ jest.mock('./components/table', () => ({ }, })); -jest.mock('ui/scripting_languages', () => ({ - getSupportedScriptingLanguages: () => ['painless'], - getDeprecatedScriptingLanguages: () => [], -})); - jest.mock('ui/documentation_links', () => ({ documentationLinks: { scriptedFields: { diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx similarity index 91% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index f2c2727c5c0bb..d16a55f1c1407 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -18,18 +18,16 @@ */ import React, { Component } from 'react'; +import { EuiSpacer } from '@elastic/eui'; import { getSupportedScriptingLanguages, getDeprecatedScriptingLanguages, -} from 'ui/scripting_languages'; -import { documentationLinks } from 'ui/documentation_links'; - -import { EuiSpacer } from '@elastic/eui'; +} from '../../../scripting_languages'; import { Table, Header, CallOuts, DeleteScritpedFieldConfirmationModal } from './components'; import { ScriptedFieldItem } from './types'; -import { IIndexPattern } from '../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../plugins/data/public'; interface ScriptedFieldsTableProps { indexPattern: IIndexPattern; @@ -40,6 +38,7 @@ interface ScriptedFieldsTableProps { getRouteHref?: Function; }; onRemoveField?: () => void; + painlessDocLink: string; } interface ScriptedFieldsTableState { @@ -136,23 +135,25 @@ export class ScriptedFieldsTable extends Component< }; render() { - const { indexPattern } = this.props; + const { indexPattern, painlessDocLink } = this.props; const { fieldToDelete, deprecatedLangsInUse } = this.state; const items = this.getFilteredItems(); + // todo url return ( <>
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/types.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/scripted_fields_table/types.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/types.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/__snapshots__/source_filters_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/__snapshots__/source_filters_table.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/__snapshots__/source_filters_table.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/__snapshots__/source_filters_table.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/add_filter.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/add_filter.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/add_filter/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/confirmation_modal.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/confirmation_modal/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/header.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/header.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/header/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/table.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/components/table/table.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/source_filters_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/source_filters_table.test.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/source_filters_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx similarity index 98% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/source_filters_table.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx index dcf8ae9e1323f..ccdda3915e979 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/source_filters_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.tsx @@ -22,7 +22,7 @@ import { createSelector } from 'reselect'; import { EuiSpacer } from '@elastic/eui'; import { AddFilter, Table, Header, DeleteFilterConfirmationModal } from './components'; -import { IIndexPattern } from '../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../plugins/data/public'; import { SourceFiltersTableFilter } from './types'; export interface SourceFiltersTableProps { diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/types.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/types.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/source_filters_table/types.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/types.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/index.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/index.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx similarity index 97% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx index bfd507876a9d6..1860541d78f81 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/tabs.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx @@ -30,9 +30,9 @@ import { EuiSelectOption, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { fieldWildcardMatcher } from '../../../../../../../../../plugins/kibana_utils/public'; -import { IndexPatternManagementStart } from '../../../../../../../../../plugins/index_pattern_management/public'; -import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; +import { fieldWildcardMatcher } from '../../../../../kibana_utils/public'; +import { IndexPatternManagementStart } from '../../../../../../plugins/index_pattern_management/public'; +import { IndexPattern, IndexPatternField } from '../../../../../../plugins/data/public'; import { createEditIndexPatternPageStateContainer } from '../edit_index_pattern_state_container'; import { TAB_INDEXED_FIELDS, TAB_SCRIPTED_FIELDS, TAB_SOURCE_FILTERS } from '../constants'; import { SourceFiltersTable } from '../source_filters_table'; @@ -183,6 +183,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location }, }} onRemoveField={refreshFilters} + painlessDocLink={'todo'} /> ); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/utils.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts similarity index 94% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/utils.ts rename to src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts index bdb1436c37efb..76e30ded20819 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/tabs/utils.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts @@ -19,8 +19,8 @@ import { Dictionary, countBy, defaults, unique } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; -import { IndexPatternManagementStart } from '../../../../../../../../../plugins/index_pattern_management/public'; +import { IndexPattern, IndexPatternField } from '../../../../../../plugins/data/public'; +import { IndexPatternManagementStart } from '../../../../../../plugins/index_pattern_management/public'; import { TAB_INDEXED_FIELDS, TAB_SCRIPTED_FIELDS, TAB_SOURCE_FILTERS } from '../constants'; function filterByName(items: IndexPatternField[], filter: string) { @@ -114,7 +114,7 @@ export function getTabs( } export function getPath(field: IndexPatternField) { - return `/management/kibana/index_patterns/${field.indexPattern?.id}/field/${field.name}`; + return `${field.indexPattern?.id}/field/${field.name}`; } const allTypesDropDown = i18n.translate('kbn.management.editIndexPattern.fields.allTypesDropDown', { diff --git a/src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/__snapshots__/field_editor.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/_index.scss b/src/plugins/index_pattern_management/public/components/field_editor/_index.scss similarity index 100% rename from src/legacy/ui/public/field_editor/_index.scss rename to src/plugins/index_pattern_management/public/components/field_editor/_index.scss diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/__snapshots__/field_format_editor.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/bytes.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/bytes.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/bytes.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/bytes.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/bytes.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/bytes.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/bytes.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/bytes.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/bytes/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/color.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/color.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/color.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx similarity index 98% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/color.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx index 1fdc36d4e8549..15f0c2c145bdf 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/color.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { DefaultFormatEditor, FormatEditorProps } from '../default'; -import { fieldFormats } from '../../../../../../../../plugins/data/public'; +import { fieldFormats } from '../../../../../../../../../plugins/data/public'; interface Color { range?: string; diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/color/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/date.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/date.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/date.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/date.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/date_nanos/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/__snapshots__/default.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx similarity index 99% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx index 8a98e57966558..577e420691585 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/default.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx @@ -86,6 +86,7 @@ export class DefaultFormatEditor

extends PureComponent< FormatEditorProps

, FormatEditorState & S > { + static formatId = 'default'; state = defaultState as FormatEditorState & S; static getDerivedStateFromProps(nextProps: FormatEditorProps<{}>, state: FormatEditorState) { diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/default/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/duration.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/duration.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/duration.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/duration.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/index.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/index.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/duration/index.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/index.tsx diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts new file mode 100644 index 0000000000000..78bb67d4e969a --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts @@ -0,0 +1,31 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { BytesFormatEditor } from './bytes'; +export { ColorFormatEditor } from './color'; +export { DateFormatEditor } from './date'; +export { DateNanosFormatEditor } from './date_nanos'; +export { DurationFormatEditor } from './duration'; +export { NumberFormatEditor } from './number'; +export { PercentFormatEditor } from './percent'; +export { StaticLookupFormatEditor } from './static_lookup'; +export { StringFormatEditor } from './string'; +export { TruncateFormatEditor } from './truncate'; +export { UrlFormatEditor } from './url'; +// export { DefaultFormatEditor } from './default'; hoping I don't need this diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/number.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/number.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/number.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/number/number.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/percent.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/percent.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/percent.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/percent/percent.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/__snapshots__/string.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/string.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/string.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/string.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/string/string.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/sample.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/sample.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/sample.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/sample.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/truncate/truncate.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/cv.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/cv.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/cv.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/cv.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/de.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/de.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/de.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/de.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/go.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/go.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/go.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/go.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/index.js b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/index.js similarity index 99% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/index.js rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/index.js index 2dc9a1835f582..009020bcb8147 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/index.js +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/index.js @@ -17,6 +17,8 @@ * under the License. */ +/* + todo import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/go.png'; import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/stop.png'; import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/de.png'; @@ -24,3 +26,4 @@ import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_f import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/us.png'; import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/ni.png'; import '!!file-loader?name=[path][name].[ext]!ui/field_editor/components/field_format_editor/editors/url/icons/cv.png'; +*/ diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/ne.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ne.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/ne.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ne.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/ni.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ni.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/ni.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ni.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/stop.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/stop.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/stop.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/stop.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/us.png b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/us.png similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/us.png rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/us.png diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/label_template_flyout.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/label_template_flyout.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.tsx similarity index 93% rename from src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.tsx index 2de6dff5d251a..05aeba1ca107b 100644 --- a/src/legacy/ui/public/field_editor/components/field_format_editor/field_format_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.tsx @@ -49,13 +49,13 @@ export class FieldFormatEditor extends PureComponent< constructor(props: FieldFormatEditorProps) { super(props); this.state = { - EditorComponent: props.fieldFormatEditors.byFormatId[props.fieldFormatId], + EditorComponent: props.fieldFormatEditors.getById(props.fieldFormatId), }; } static getDerivedStateFromProps(nextProps: FieldFormatEditorProps) { return { - EditorComponent: nextProps.fieldFormatEditors.byFormatId[nextProps.fieldFormatId] || null, + EditorComponent: nextProps.fieldFormatEditors.getById(nextProps.fieldFormatId) || null, }; } diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/_index.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/_index.scss rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/_samples.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_samples.scss similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/_samples.scss rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_samples.scss diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/index.ts diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/index.ts diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_call_outs/warning_call_out.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/_test_script.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/_test_script.scss similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/_test_script.scss rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/_test_script.scss diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx similarity index 82% rename from src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx index 6f51379c796d4..b22028df30de2 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_help/help_flyout.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx @@ -18,15 +18,16 @@ */ import React from 'react'; -import { HttpStart, DocLinksStart } from 'src/core/public'; +import { HttpStart, DocLinksStart, IUiSettingsClient } from 'src/core/public'; import { EuiFlyout, EuiFlyoutBody, EuiTabbedContent } from '@elastic/eui'; import { ScriptingSyntax } from './scripting_syntax'; import { TestScript } from './test_script'; -import { IndexPattern } from '../../../../../../plugins/data/public'; +// import { IndexPattern } from '../../../../../../../../../../plugins/data/public'; import { ExecuteScript } from '../../types'; +import { IndexPattern, DataPublicPluginStart } from '../../../../../../data/public'; interface ScriptingHelpFlyoutProps { indexPattern: IndexPattern; @@ -36,8 +37,10 @@ interface ScriptingHelpFlyoutProps { executeScript: ExecuteScript; isVisible: boolean; onClose: () => void; - getHttpStart: () => HttpStart; + http: HttpStart; docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; + UiSettings: IUiSettingsClient; + SearchBar: DataPublicPluginStart['ui']['SearchBar']; } export const ScriptingHelpFlyout: React.FC = ({ @@ -48,8 +51,10 @@ export const ScriptingHelpFlyout: React.FC = ({ name, script, executeScript, - getHttpStart, + http, docLinksScriptedFields, + UiSettings, + SearchBar, }) => { const tabs = [ { @@ -69,7 +74,9 @@ export const ScriptingHelpFlyout: React.FC = ({ name={name} script={script} executeScript={executeScript} - getHttpStart={getHttpStart} + http={http} + uiSettings={UiSettings} + SearchBar={SearchBar} /> ), }, diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/index.ts diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/scripting_syntax.tsx similarity index 100% rename from src/legacy/ui/public/field_editor/components/scripting_help/scripting_syntax.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/scripting_syntax.tsx diff --git a/src/legacy/ui/public/field_editor/components/scripting_help/test_script.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx similarity index 91% rename from src/legacy/ui/public/field_editor/components/scripting_help/test_script.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx index 8d3a83a155553..ac31519ecb242 100644 --- a/src/legacy/ui/public/field_editor/components/scripting_help/test_script.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx @@ -18,7 +18,8 @@ */ import React, { Component, Fragment } from 'react'; -import { HttpStart } from 'src/core/public'; +import { HttpStart, IUiSettingsClient } from 'src/core/public'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; import { EuiButton, @@ -34,12 +35,7 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { npStart } from 'ui/new_platform'; -const { SearchBar } = npStart.plugins.data.ui; - -const { uiSettings } = npStart.core; - -import { esQuery, IndexPattern, Query } from '../../../../../../plugins/data/public'; +import { esQuery, IndexPattern, Query } from '../../../../../../../plugins/data/public'; import { ExecuteScript } from '../../types'; interface TestScriptProps { @@ -48,7 +44,9 @@ interface TestScriptProps { name?: string; script?: string; executeScript: ExecuteScript; - getHttpStart: () => HttpStart; + http: HttpStart; + uiSettings: IUiSettingsClient; + SearchBar: DataPublicPluginStart['ui']['SearchBar']; } interface AdditionalField { @@ -80,7 +78,7 @@ export class TestScript extends Component { } previewScript = async (searchContext?: { query?: Query | undefined }) => { - const { indexPattern, lang, name, script, executeScript, getHttpStart } = this.props; + const { indexPattern, lang, name, script, executeScript, http } = this.props; if (!script || script.length === 0) { return; @@ -92,7 +90,7 @@ export class TestScript extends Component { let query; if (searchContext) { - const esQueryConfigs = esQuery.getEsQueryConfig(uiSettings); + const esQueryConfigs = esQuery.getEsQueryConfig(this.props.uiSettings); query = esQuery.buildEsQuery( this.props.indexPattern, searchContext.query || [], @@ -108,7 +106,7 @@ export class TestScript extends Component { indexPatternTitle: indexPattern.title, query, additionalFields: this.state.additionalFields.map((option: AdditionalField) => option.value), - getHttpStart, + http, }); if (scriptResponse.status !== 200) { @@ -182,7 +180,7 @@ export class TestScript extends Component { ); } - renderToolbar() { + renderToolbar(SearchBar: DataPublicPluginStart['ui']['SearchBar']) { const fieldsByTypeMap = new Map(); const fields: EuiComboBoxOptionOption[] = []; @@ -242,7 +240,7 @@ export class TestScript extends Component { showFilterBar={false} showDatePicker={false} showQueryInput={true} - query={{ language: uiSettings.get('search:queryLanguage'), query: '' }} + query={{ language: this.props.uiSettings.get('search:queryLanguage'), query: '' }} onQuerySubmit={this.previewScript} indexPatterns={[this.props.indexPattern]} customSubmitButton={ @@ -264,6 +262,7 @@ export class TestScript extends Component { } render() { + const { SearchBar } = this.props; return ( @@ -284,7 +283,7 @@ export class TestScript extends Component {

- {this.renderToolbar()} + {this.renderToolbar(SearchBar)} {this.renderPreview(this.state.previewData)} diff --git a/src/legacy/ui/public/field_editor/constants/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/constants/index.ts similarity index 93% rename from src/legacy/ui/public/field_editor/constants/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/constants/index.ts index 9bf93f39f5315..cc15380d89d4c 100644 --- a/src/legacy/ui/public/field_editor/constants/index.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/constants/index.ts @@ -17,7 +17,7 @@ * under the License. */ -import { getKbnTypeNames } from '../../../../../plugins/data/public'; +import { getKbnTypeNames } from '../../../../../data/public'; export const FIELD_TYPES_BY_LANG = { painless: ['number', 'string', 'date', 'boolean'], diff --git a/src/legacy/ui/public/field_editor/field_editor.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx similarity index 99% rename from src/legacy/ui/public/field_editor/field_editor.test.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx index 5716305b51483..2a321879c2895 100644 --- a/src/legacy/ui/public/field_editor/field_editor.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; -import { npStart } from 'ui/new_platform'; +// import { npStart } from 'ui/new_platform'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; import { Field, diff --git a/src/legacy/ui/public/field_editor/field_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx similarity index 92% rename from src/legacy/ui/public/field_editor/field_editor.tsx rename to src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx index aa62a53f2c32a..f5681aa490ba8 100644 --- a/src/legacy/ui/public/field_editor/field_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx @@ -19,15 +19,7 @@ import React, { PureComponent, Fragment } from 'react'; import { intersection, union, get } from 'lodash'; -import { HttpStart, DocLinksStart } from 'src/core/public'; - -import { - getEnabledScriptingLanguages, - getDeprecatedScriptingLanguages, - getSupportedScriptingLanguages, -} from 'ui/scripting_languages'; - -import { npStart } from 'ui/new_platform'; +import { HttpStart, DocLinksStart, NotificationsStart, IUiSettingsClient } from 'src/core/public'; import { EuiBasicTable, @@ -54,14 +46,20 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { + getEnabledScriptingLanguages, + getDeprecatedScriptingLanguages, + getSupportedScriptingLanguages, +} from '../../scripting_languages'; import { IndexPattern, IFieldType, KBN_FIELD_TYPES, ES_FIELD_TYPES, -} from '../../../../plugins/data/public'; -import { FieldFormatInstanceType } from '../../../../plugins/data/common'; -import { Field } from '../../../../plugins/data/public'; + DataPublicPluginStart, +} from '../../../../../plugins/data/public'; +import { FieldFormatInstanceType } from '../../../../../plugins/data/common'; +import { Field } from '../../../../../plugins/data/public'; import { ScriptingDisabledCallOut, ScriptingWarningCallOut, @@ -72,6 +70,7 @@ import { ScriptingHelpFlyout } from './components/scripting_help'; import { FieldFormatEditor } from './components/field_format_editor'; import { DefaultFormatEditor } from './components/field_format_editor/editors/default'; +import { IndexPatternManagementStart } from '../../plugin'; import { FIELD_TYPES_BY_LANG, DEFAULT_FIELD_TYPES } from './constants'; import { executeScript, isScriptValid } from './lib'; @@ -79,13 +78,11 @@ import { executeScript, isScriptValid } from './lib'; // This loads Ace editor's "groovy" mode, used below to highlight the script. import 'brace/mode/groovy'; -const getFieldFormats = () => npStart.plugins.data.fieldFormats; - const getFieldTypeFormatsList = ( field: IFieldType, - defaultFieldFormat: FieldFormatInstanceType + defaultFieldFormat: FieldFormatInstanceType, + fieldFormats: DataPublicPluginStart['fieldFormats'] ) => { - const fieldFormats = getFieldFormats(); const formatsByType = fieldFormats .getByFieldType(field.type as KBN_FIELD_TYPES) .map(({ id, title }) => ({ @@ -141,11 +138,14 @@ export interface FieldEdiorProps { indexPattern: IndexPattern; field: Field; helpers: { - getConfig: (key: string) => any; - getHttpStart: () => HttpStart; - fieldFormatEditors: DefaultFormatEditor[]; + http: HttpStart; + fieldFormatEditors: IndexPatternManagementStart['fieldFormatEditors']; redirectAway: () => void; docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; + fieldFormats: DataPublicPluginStart['fieldFormats']; + toasts: NotificationsStart['toasts']; + UiSettings: IUiSettingsClient; + SearchBar: DataPublicPluginStart['ui']['SearchBar']; }; } @@ -180,11 +180,11 @@ export class FieldEditor extends PureComponent { - const { getConfig } = this.props.helpers; + const { UiSettings } = this.props.helpers; const { field } = this.state; - const fieldFormats = getFieldFormats(); - const DefaultFieldFormat = fieldFormats.getDefaultType(type) as FieldFormatInstanceType; + const DefaultFieldFormat = this.props.helpers.fieldFormats.getDefaultType( + type + ) as FieldFormatInstanceType; field.type = type; - field.format = new DefaultFieldFormat(null, getConfig); + field.format = new DefaultFieldFormat(null, UiSettings.get); this.setState({ - fieldTypeFormats: getFieldTypeFormatsList(field, DefaultFieldFormat), + fieldTypeFormats: getFieldTypeFormatsList( + field, + DefaultFieldFormat, + this.props.helpers.fieldFormats + ), fieldFormatId: DefaultFieldFormat.id, fieldFormatParams: field.format.params(), }); @@ -250,13 +255,13 @@ export class FieldEditor extends PureComponent { - const fieldFormats = getFieldFormats(); const { field, fieldTypeFormats } = this.state; - const FieldFormat = fieldFormats.getType( + + const FieldFormat = this.props.helpers.fieldFormats.getType( formatId || (fieldTypeFormats[0] as InitialFieldTypeFormat).defaultFieldFormat.id ) as FieldFormatInstanceType; - field.format = new FieldFormat(params, this.props.helpers.getConfig); + field.format = new FieldFormat(params, this.props.helpers.UiSettings.get); this.setState({ fieldFormatId: FieldFormat.id, @@ -364,7 +369,7 @@ export class FieldEditor extends PureComponent ); @@ -774,7 +781,7 @@ export class FieldEditor extends PureComponent { const message = i18n.translate('common.ui.fieldEditor.deleteField.savedHeader', { defaultMessage: "Saved '{fieldName}'", values: { fieldName: field.name }, }); - npStart.core.notifications.toasts.addSuccess(message); + this.props.helpers.toasts.addSuccess(message); redirectAway(); }); }; diff --git a/src/legacy/ui/public/field_editor/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/index.ts diff --git a/src/legacy/ui/public/field_editor/lib/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/lib/index.ts similarity index 100% rename from src/legacy/ui/public/field_editor/lib/index.ts rename to src/plugins/index_pattern_management/public/components/field_editor/lib/index.ts diff --git a/src/legacy/ui/public/field_editor/lib/validate_script.ts b/src/plugins/index_pattern_management/public/components/field_editor/lib/validate_script.ts similarity index 95% rename from src/legacy/ui/public/field_editor/lib/validate_script.ts rename to src/plugins/index_pattern_management/public/components/field_editor/lib/validate_script.ts index 4db827a4229fd..518cf1086e1d7 100644 --- a/src/legacy/ui/public/field_editor/lib/validate_script.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/lib/validate_script.ts @@ -28,7 +28,7 @@ export const executeScript = async ({ indexPatternTitle, query, additionalFields = [], - getHttpStart, + http, }: ExecuteScriptParams): Promise => { // Using _msearch because _search with index name in path dorks everything up const header = { @@ -62,7 +62,6 @@ export const executeScript = async ({ } const body = `${JSON.stringify(header)}\n${JSON.stringify(search)}\n`; - const http = await getHttpStart(); const esResp = await http.fetch('/elasticsearch/_msearch', { method: 'POST', body }); // unwrap _msearch response return esResp.responses[0]; @@ -73,20 +72,20 @@ export const isScriptValid = async ({ lang, script, indexPatternTitle, - getHttpStart, + http, }: { name: string; lang: string; script: string; indexPatternTitle: string; - getHttpStart: () => HttpStart; + http: HttpStart; }) => { const scriptResponse = await executeScript({ name, lang, script, indexPatternTitle, - getHttpStart, + http, }); if (scriptResponse.status !== 200) { diff --git a/src/legacy/ui/public/field_editor/types.ts b/src/plugins/index_pattern_management/public/components/field_editor/types.ts similarity index 97% rename from src/legacy/ui/public/field_editor/types.ts rename to src/plugins/index_pattern_management/public/components/field_editor/types.ts index 174cb7da73ceb..7519cc05e7fae 100644 --- a/src/legacy/ui/public/field_editor/types.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/types.ts @@ -33,7 +33,7 @@ export interface ExecuteScriptParams { indexPatternTitle: string; query?: Query['query']; additionalFields?: string[]; - getHttpStart: () => HttpStart; + http: HttpStart; } export interface ExecuteScriptResult { diff --git a/src/plugins/index_pattern_management/public/components/index.ts b/src/plugins/index_pattern_management/public/components/index.ts new file mode 100644 index 0000000000000..e0acb9d05bc84 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/index.ts @@ -0,0 +1,27 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { IndexPatternTableWithRouter } from './index_pattern_table'; +export { + EditIndexPattern, + EditIndexPatternContainer, + CreateEditField, + CreateEditFieldContainer, +} from './edit_index_pattern'; +export { CreateIndexPatternWizardWithRouter } from './create_index_pattern_wizard'; diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index.ts b/src/plugins/index_pattern_management/public/components/index_pattern_table/index.ts new file mode 100644 index 0000000000000..29d1c886bab58 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index.ts @@ -0,0 +1,20 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { IndexPatternTableWithRouter } from './index_pattern_table'; diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx new file mode 100644 index 0000000000000..5d45756e1cb0e --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -0,0 +1,175 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + EuiBadge, + EuiButtonEmpty, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiInMemoryTable, + EuiPanel, + EuiSpacer, + EuiText, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import React, { useState, useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { CreateButton } from '../create_button'; +import { CreateIndexPatternPrompt } from '../create_index_pattern_prompt'; +import { IndexPatternTableItem, IndexPatternCreationOption } from '../types'; +import { IndexPatternManagementStart } from '../../plugin'; + +const columns = [ + { + field: 'title', + name: 'Pattern', + render: ( + name: string, + index: { + id: string; + tags?: Array<{ + key: string; + name: string; + }>; + } + ) => ( + + {name} + {index.tags && + index.tags.map(({ key: tagKey, name: tagName }) => ( + + {tagName} + + ))} + + ), + dataType: 'string' as const, + sortable: ({ sort }: { sort: string }) => sort, + }, +]; + +const pagination = { + initialPageSize: 10, + pageSizeOptions: [5, 10, 25, 50], +}; + +const sorting = { + sort: { + field: 'title', + direction: 'asc' as const, + }, +}; + +const search = { + box: { + incremental: true, + schema: { + fields: { title: { type: 'string' } }, + }, + }, +}; + +const ariaRegion = i18n.translate('kbn.management.editIndexPatternLiveRegionAriaLabel', { + defaultMessage: 'Index patterns', +}); + +interface Props extends RouteComponentProps { + indexPatterns: IndexPatternTableItem[]; + getIndexPatternCreationOptions: IndexPatternManagementStart['creation']['getIndexPatternCreationOptions']; + canSave: boolean; +} + +export const IndexPatternTable = ({ + indexPatterns, + getIndexPatternCreationOptions, + canSave, + history, +}: Props) => { + const [showFlyout, setShowFlyout] = useState(indexPatterns.length === 0); + const [creationOptions, setCreationOptions] = useState([]); + + useEffect(() => { + // setCreationOptions(await getIndexPatternCreationOptions(history.push)); + getIndexPatternCreationOptions(history.push).then(options => { + setCreationOptions(options); + }); + }, [getIndexPatternCreationOptions, history.push]); + + const createButton = canSave ? ( + + + + ) : ( + <> + ); + + return ( + + {showFlyout && setShowFlyout(false)} />} + + + + + +

+ +

+
+
+ + setShowFlyout(true)} + aria-label="Help" + /> + +
+
+ {createButton} +
+ + +
+ ); +}; + +export const IndexPatternTableWithRouter = withRouter(IndexPatternTable); diff --git a/src/plugins/index_pattern_management/public/components/types.ts b/src/plugins/index_pattern_management/public/components/types.ts new file mode 100644 index 0000000000000..7a002bfe040a7 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/types.ts @@ -0,0 +1,34 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export interface IndexPatternCreationOption { + text: string; + description?: string; + onClick: () => void; +} + +export interface IndexPatternTableItem { + id: string; + title: string; + url: string; + // active: boolean; + default: boolean; + tag?: string[]; + sort: string; +} diff --git a/src/plugins/index_pattern_management/public/index.ts b/src/plugins/index_pattern_management/public/index.ts index da482c0c51f0a..2d6db13757eea 100644 --- a/src/plugins/index_pattern_management/public/index.ts +++ b/src/plugins/index_pattern_management/public/index.ts @@ -36,4 +36,8 @@ export function plugin(initializerContext: PluginInitializerContext) { return new IndexPatternManagementPlugin(initializerContext); } -export { IndexPatternCreationConfig, IndexPatternListConfig } from './service'; +export { + IndexPatternCreationConfig, + IndexPatternCreationOption, + IndexPatternListConfig, +} from './service'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/index.ts b/src/plugins/index_pattern_management/public/management_app/index.tsx similarity index 93% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/index.ts rename to src/plugins/index_pattern_management/public/management_app/index.tsx index 473a8f5b57c82..9880b336e76e5 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/create_edit_field/index.ts +++ b/src/plugins/index_pattern_management/public/management_app/index.tsx @@ -16,5 +16,3 @@ * specific language governing permissions and limitations * under the License. */ - -export { CreateEditField } from './create_edit_field'; diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx new file mode 100644 index 0000000000000..d4ca90e22ef2e --- /dev/null +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -0,0 +1,198 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { HashRouter, Switch, Route } from 'react-router-dom'; + +import { i18n } from '@kbn/i18n'; +import { I18nProvider } from '@kbn/i18n/react'; +import { StartServicesAccessor } from 'src/core/public'; +import { IIndexPattern } from 'src/plugins/data/public'; + +import { ManagementAppMountParams } from '../../../management/public'; +import { + IndexPatternTableWithRouter, + EditIndexPatternContainer, + CreateEditFieldContainer, + CreateIndexPatternWizardWithRouter, +} from '../components'; +import { IndexPatternManagementStartDependencies, IndexPatternManagementStart } from '../plugin'; + +const appTitle = i18n.translate('indexPatternManagement.appLabel', { + defaultMessage: 'Index pattern management', +}); +const crumb = [{ text: appTitle }]; + +const readOnlyBadge = { + text: i18n.translate('kbn.management.indexPatterns.badge.readOnly.text', { + defaultMessage: 'Read only', + }), + tooltip: i18n.translate('kbn.management.indexPatterns.badge.readOnly.tooltip', { + defaultMessage: 'Unable to save index patterns', + }), + iconType: 'glasses', +}; + +export async function mountManagementSection( + getStartServices: StartServicesAccessor, + params: ManagementAppMountParams + // indexPatternCreationOptions: IndexPatternCreationOption[], + // getIndexPatternTags: (pattern: IIndexPattern, isDefault: boolean) => IndexPatternTag[] +) { + params.setBreadcrumbs(crumb); + const [ + { chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks }, + { data }, + indexPatternManagementStart, + ] = await getStartServices(); + const defaultIndex = uiSettings.get('defaultIndex'); + const canSave = application.capabilities.indexPatterns.save as boolean; + + if (!canSave) { + chrome.setBadge(readOnlyBadge); + } + + const indexPatterns = + (await savedObjects.client + .find({ + type: 'index-pattern', + fields: ['title', 'type'], + perPage: 10000, + }) + .then(response => + response.savedObjects + .map(pattern => { + const id = pattern.id; + const title = pattern.get('title'); + const isDefault = defaultIndex === id; + + const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( + pattern, + isDefault + ); + + return { + id, + title, + url: '', + // url: kbnUrl.eval('#/management/kibana/indexPatterns/create{{id}}', { id }), + // active: $scope.editingId === id, + default: isDefault, + tags, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${isDefault ? '0' : '1'}${title}`, + }; + }) + .sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + }) + )) || []; + + // todo - need new path to create index pattern + // todo navigate to items + // todo path w/o slash + // + // indexPattern, indexPatterns + + // data.indexPatterns.get() + + ReactDOM.render( + + + + + + + + + + + + + + + + + + , + params.element + ); + return () => { + ReactDOM.unmountComponentAtNode(params.element); + }; +} diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index 93bb0ead1df4a..7aac4543df166 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -16,23 +16,34 @@ * specific language governing permissions and limitations * under the License. */ +import { i18n } from '@kbn/i18n'; import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; import { IndexPatternManagementService, IndexPatternManagementServiceSetup, IndexPatternManagementServiceStart, } from './service'; -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface IndexPatternManagementSetupDependencies {} +import { ManagementSetup, ManagementApp } from '../../management/public'; + +export interface IndexPatternManagementSetupDependencies { + management: ManagementSetup; +} // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface IndexPatternManagementStartDependencies {} +export interface IndexPatternManagementStartDependencies { + data: DataPublicPluginStart; +} export type IndexPatternManagementSetup = IndexPatternManagementServiceSetup; export type IndexPatternManagementStart = IndexPatternManagementServiceStart; +const title = i18n.translate('indexPatternManagement.appLabel', { + defaultMessage: 'Index Patterns', +}); + export class IndexPatternManagementPlugin implements Plugin< @@ -42,14 +53,40 @@ export class IndexPatternManagementPlugin IndexPatternManagementStartDependencies > { private readonly indexPattern = new IndexPatternManagementService(); + private managementApp?: ManagementApp; constructor(initializerContext: PluginInitializerContext) {} - public setup(core: CoreSetup) { + public setup( + core: CoreSetup, + { management }: IndexPatternManagementSetupDependencies + ) { + const kibanaSection = management.sections.getSection('kibana'); + if (!kibanaSection) { + throw new Error('`kibana` management section not found.'); + } + + this.managementApp = kibanaSection.registerApp({ + id: 'indexPatterns', + title, + order: 0, + mount: async params => { + const { mountManagementSection } = await import( + './management_app/mount_management_section' + ); + + return mountManagementSection(core.getStartServices, params); + // return mountManagementSection(core.getStartServices, params, component.start); + }, + }); + return this.indexPattern.setup({ httpClient: core.http }); } public start(core: CoreStart, plugins: IndexPatternManagementStartDependencies) { + if (!core.application.capabilities.management.kibana.index_patterns) { + this.managementApp!.disable(); + } return this.indexPattern.start(); } diff --git a/src/legacy/ui/public/scripting_languages/index.ts b/src/plugins/index_pattern_management/public/scripting_languages/index.ts similarity index 95% rename from src/legacy/ui/public/scripting_languages/index.ts rename to src/plugins/index_pattern_management/public/scripting_languages/index.ts index 459e72c0c67c1..a5efb52aad173 100644 --- a/src/legacy/ui/public/scripting_languages/index.ts +++ b/src/plugins/index_pattern_management/public/scripting_languages/index.ts @@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n'; import { HttpStart } from 'src/core/public'; -import { toastNotifications } from '../notify'; +// import { toastNotifications } from '../notify'; export function getSupportedScriptingLanguages(): string[] { return ['painless']; @@ -31,10 +31,13 @@ export function getDeprecatedScriptingLanguages(): string[] { export const getEnabledScriptingLanguages = (http: HttpStart) => http.get('/api/kibana/scripts/languages').catch(() => { + /* + todo toastNotifications.addDanger( i18n.translate('common.ui.scriptingLanguages.errorFetchingToastDescription', { defaultMessage: 'Error getting available scripting languages from Elasticsearch', }) ); + */ return []; }); diff --git a/src/plugins/index_pattern_management/public/service/creation/config.ts b/src/plugins/index_pattern_management/public/service/creation/config.ts index 29ab0ebfc3d5f..95a91fd7594ca 100644 --- a/src/plugins/index_pattern_management/public/service/creation/config.ts +++ b/src/plugins/index_pattern_management/public/service/creation/config.ts @@ -18,7 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { MatchedIndex } from '../../../../../legacy/core_plugins/kibana/public/management/sections/index_patterns/create_index_pattern_wizard/types'; +import { MatchedIndex } from '../../components/create_index_pattern_wizard/types'; const indexPatternTypeName = i18n.translate( 'indexPatternManagement.editIndexPattern.createIndex.defaultTypeName', @@ -74,15 +74,13 @@ export class IndexPatternCreationConfig { this.isBeta = isBeta; } - public async getIndexPatternCreationOption( - urlHandler: UrlHandler - ): Promise { + public getIndexPatternCreationOption(urlHandler: UrlHandler): IndexPatternCreationOption { return { text: indexPatternButtonText, description: indexPatternButtonDescription, testSubj: `createStandardIndexPatternButton`, onClick: () => { - urlHandler('/management/kibana/index_pattern'); + urlHandler('/create'); }, }; } diff --git a/src/plugins/index_pattern_management/public/service/creation/index.ts b/src/plugins/index_pattern_management/public/service/creation/index.ts index 84c4c28aa2260..1df97a74c496d 100644 --- a/src/plugins/index_pattern_management/public/service/creation/index.ts +++ b/src/plugins/index_pattern_management/public/service/creation/index.ts @@ -17,5 +17,5 @@ * under the License. */ -export { IndexPatternCreationConfig } from './config'; +export { IndexPatternCreationConfig, IndexPatternCreationOption } from './config'; export { IndexPatternCreationManager } from './manager'; diff --git a/src/plugins/index_pattern_management/public/service/creation/manager.ts b/src/plugins/index_pattern_management/public/service/creation/manager.ts index 32b3e7ee7a133..297c97e45a5b2 100644 --- a/src/plugins/index_pattern_management/public/service/creation/manager.ts +++ b/src/plugins/index_pattern_management/public/service/creation/manager.ts @@ -37,10 +37,15 @@ export class IndexPatternCreationManager { this.configs.push(config); }; - public getType(key: string | undefined): IndexPatternCreationConfig | null { + public getType(key: string | undefined): IndexPatternCreationConfig { if (key) { const index = this.configs.findIndex(config => config.key === key); - return this.configs[index] || null; + const config = this.configs[index]; + if (config) { + return config; + } else { + throw new Error(`Index pattern creation type not found: ${key}`); + } } else { return this.getType('default'); } diff --git a/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts b/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts new file mode 100644 index 0000000000000..018ed5533117a --- /dev/null +++ b/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// todo better path +import { DefaultFormatEditor } from '../../components/field_editor/components/field_format_editor/editors/default'; + +export class FieldFormatEditors { + private editors: Array = []; + private register(editor: typeof DefaultFormatEditor) { + this.editors.push(editor); + } + + public setup() { + return { + register: this.register.bind(this), + }; + } + + public start() { + return { + getAll: () => [...this.editors], + getById: (id: string) => { + return this.editors.find(editor => editor.formatId === id); + }, + }; + } +} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index.js b/src/plugins/index_pattern_management/public/service/field_format_editors/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index.js rename to src/plugins/index_pattern_management/public/service/field_format_editors/index.ts index cd258eb033915..799586654073c 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/index_pattern_table/index.js +++ b/src/plugins/index_pattern_management/public/service/field_format_editors/index.ts @@ -17,4 +17,4 @@ * under the License. */ -export { IndexPatternTable } from './index_pattern_table'; +export { FieldFormatEditors } from './field_format_editors'; diff --git a/src/plugins/index_pattern_management/public/service/index.ts b/src/plugins/index_pattern_management/public/service/index.ts index 2abe13eb0e292..2c590f85fe8ea 100644 --- a/src/plugins/index_pattern_management/public/service/index.ts +++ b/src/plugins/index_pattern_management/public/service/index.ts @@ -18,5 +18,5 @@ */ export * from './index_pattern_management_service'; -export { IndexPatternCreationConfig } from './creation'; +export { IndexPatternCreationConfig, IndexPatternCreationOption } from './creation'; export { IndexPatternListConfig } from './list'; diff --git a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts index 4780fa00ed468..8b354a59a6d5a 100644 --- a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts +++ b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts @@ -20,6 +20,21 @@ import { HttpSetup } from '../../../../core/public'; import { IndexPatternCreationManager, IndexPatternCreationConfig } from './creation'; import { IndexPatternListManager, IndexPatternListConfig } from './list'; +import { FieldFormatEditors } from './field_format_editors'; + +import { + BytesFormatEditor, + ColorFormatEditor, + DateFormatEditor, + DateNanosFormatEditor, + DurationFormatEditor, + NumberFormatEditor, + PercentFormatEditor, + StaticLookupFormatEditor, + StringFormatEditor, + TruncateFormatEditor, + UrlFormatEditor, +} from '../components/field_editor/components/field_format_editor/editors'; interface SetupDependencies { httpClient: HttpSetup; @@ -33,20 +48,38 @@ interface SetupDependencies { export class IndexPatternManagementService { indexPatternCreationManager: IndexPatternCreationManager; indexPatternListConfig: IndexPatternListManager; + fieldFormatEditors: FieldFormatEditors; constructor() { this.indexPatternCreationManager = new IndexPatternCreationManager(); this.indexPatternListConfig = new IndexPatternListManager(); + this.fieldFormatEditors = new FieldFormatEditors(); } public setup({ httpClient }: SetupDependencies) { const creationManagerSetup = this.indexPatternCreationManager.setup(httpClient); creationManagerSetup.addCreationConfig(IndexPatternCreationConfig); - this.indexPatternListConfig.setup().addListConfig(IndexPatternListConfig); + + const indexPatternListConfigSetup = this.indexPatternListConfig.setup(); + indexPatternListConfigSetup.addListConfig(IndexPatternListConfig); + + const fieldFormatEditorsSetup = this.fieldFormatEditors.setup(); + fieldFormatEditorsSetup.register(BytesFormatEditor); + fieldFormatEditorsSetup.register(ColorFormatEditor); + fieldFormatEditorsSetup.register(DateFormatEditor); + fieldFormatEditorsSetup.register(DateNanosFormatEditor); + fieldFormatEditorsSetup.register(DurationFormatEditor); + fieldFormatEditorsSetup.register(NumberFormatEditor); + fieldFormatEditorsSetup.register(PercentFormatEditor); + fieldFormatEditorsSetup.register(StaticLookupFormatEditor); + fieldFormatEditorsSetup.register(StringFormatEditor); + fieldFormatEditorsSetup.register(TruncateFormatEditor); + fieldFormatEditorsSetup.register(UrlFormatEditor); return { creation: creationManagerSetup, - list: this.indexPatternListConfig.setup(), + list: indexPatternListConfigSetup, + fieldFormatEditors: fieldFormatEditorsSetup, }; } @@ -54,6 +87,7 @@ export class IndexPatternManagementService { return { creation: this.indexPatternCreationManager.start(), list: this.indexPatternListConfig.start(), + fieldFormatEditors: this.fieldFormatEditors.start(), }; } diff --git a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts index 513c70e60048a..8db1d60f09d72 100644 --- a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts +++ b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts @@ -35,7 +35,7 @@ import { ScopedHistory } from '../../../../../core/public'; describe('kbn_url_storage', () => { describe('getStateFromUrl & setStateToUrl', () => { - const url = 'http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id'; + const url = 'http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id'; const state1 = { testStr: '123', testNumber: 0, @@ -50,14 +50,14 @@ describe('kbn_url_storage', () => { it('should set expanded state to url', () => { let newUrl = setStateToKbnUrl('_s', state1, { useHash: false }, url); expect(newUrl).toMatchInlineSnapshot( - `"http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_s=(testArray:!(1,2,()),testNull:!n,testNumber:0,testObj:(test:'123'),testStr:'123')"` + `"http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_s=(testArray:!(1,2,()),testNull:!n,testNumber:0,testObj:(test:'123'),testStr:'123')"` ); const retrievedState1 = getStateFromKbnUrl('_s', newUrl); expect(retrievedState1).toEqual(state1); newUrl = setStateToKbnUrl('_s', state2, { useHash: false }, newUrl); expect(newUrl).toMatchInlineSnapshot( - `"http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_s=(test:'123')"` + `"http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_s=(test:'123')"` ); const retrievedState2 = getStateFromKbnUrl('_s', newUrl); expect(retrievedState2).toEqual(state2); @@ -66,14 +66,14 @@ describe('kbn_url_storage', () => { it('should set hashed state to url', () => { let newUrl = setStateToKbnUrl('_s', state1, { useHash: true }, url); expect(newUrl).toMatchInlineSnapshot( - `"http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_s=h@a897fac"` + `"http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_s=h@a897fac"` ); const retrievedState1 = getStateFromKbnUrl('_s', newUrl); expect(retrievedState1).toEqual(state1); newUrl = setStateToKbnUrl('_s', state2, { useHash: true }, newUrl); expect(newUrl).toMatchInlineSnapshot( - `"http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_s=h@40f94d5"` + `"http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_s=h@40f94d5"` ); const retrievedState2 = getStateFromKbnUrl('_s', newUrl); expect(retrievedState2).toEqual(state2); @@ -244,66 +244,66 @@ describe('kbn_url_storage', () => { it('should extract path relative to browser history without basename', () => { const history = createBrowserHistory(); const url = - "http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const relativePath = getRelativeToHistoryPath(url, history); expect(relativePath).toEqual( - "/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); it('should extract path relative to browser history with basename', () => { const url = - "http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const history1 = createBrowserHistory({ basename: '/oxf/app/' }); const relativePath1 = getRelativeToHistoryPath(url, history1); expect(relativePath1).toEqual( - "/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); const history2 = createBrowserHistory({ basename: '/oxf/app/kibana/' }); const relativePath2 = getRelativeToHistoryPath(url, history2); expect(relativePath2).toEqual( - "#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); it('should extract path relative to browser history with basename from relative url', () => { const history = createBrowserHistory({ basename: '/oxf/app/' }); const url = - "/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const relativePath = getRelativeToHistoryPath(url, history); expect(relativePath).toEqual( - "/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); it('should extract path relative to hash history without basename', () => { const history = createHashHistory(); const url = - "http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const relativePath = getRelativeToHistoryPath(url, history); expect(relativePath).toEqual( - "/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); it('should extract path relative to hash history with basename', () => { const history = createHashHistory({ basename: 'management' }); const url = - "http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const relativePath = getRelativeToHistoryPath(url, history); expect(relativePath).toEqual( - "/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); it('should extract path relative to hash history with basename from relative url', () => { const history = createHashHistory({ basename: 'management' }); const url = - "/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; + "/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')"; const relativePath = getRelativeToHistoryPath(url, history); expect(relativePath).toEqual( - "/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" + "/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')" ); }); }); diff --git a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts index 337d122e2854b..6d2570b932204 100644 --- a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts +++ b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts @@ -31,7 +31,7 @@ import { url as urlUtils } from '../../../common'; * e.g.: * * given an url: - * http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') + * http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') * will return object: * {_a: {tab: 'indexedFields'}, _b: {f: 'test', i: '', l: ''}}; */ @@ -57,7 +57,7 @@ export function getStatesFromKbnUrl( * e.g.: * * given an url: - * http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') + * http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') * and key '_a' * will return object: * {tab: 'indexedFields'} @@ -74,12 +74,12 @@ export function getStateFromKbnUrl( * Doesn't actually updates history * * e.g.: - * given a url: http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') + * given a url: http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'') * key: '_a' * and state: {tab: 'other'} * * will return url: - * http://localhost:5601/oxf/app/kibana#/management/kibana/index_patterns/id?_a=(tab:other)&_b=(f:test,i:'',l:'') + * http://localhost:5601/oxf/app/kibana#/management/kibana/indexPatterns/patterns/id?_a=(tab:other)&_b=(f:test,i:'',l:'') */ export function setStateToKbnUrl( key: string, diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap index 1860a4625afc0..9de236921f1ff 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap @@ -389,10 +389,10 @@ exports[`SavedObjectsTable should render normally 1`] = ` Object { "id": "1", "meta": Object { - "editUrl": "#/management/kibana/index_patterns/1", + "editUrl": "#/management/kibana/indexPatterns/patterns/1", "icon": "indexPatternApp", "inAppUrl": Object { - "path": "/management/kibana/index_patterns/1", + "path": "/management/kibana/indexPatterns/patterns/1", "uiCapabilitiesPath": "management.kibana.index_patterns", }, "title": "MyIndexPattern*", diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/relationships.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/relationships.test.tsx.snap index a8bb691cd54e9..0e740c96cd1ca 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/relationships.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/relationships.test.tsx.snap @@ -472,10 +472,10 @@ exports[`Relationships should render searches normally 1`] = ` Object { "id": "1", "meta": Object { - "editUrl": "/management/kibana/index_patterns/1", + "editUrl": "/management/kibana/indexPatterns/patterns/1", "icon": "indexPatternApp", "inAppUrl": Object { - "path": "/app/kibana#/management/kibana/index_patterns/1", + "path": "/app/kibana#/management/kibana/indexPatterns/patterns/1", "uiCapabilitiesPath": "management.kibana.index_patterns", }, "title": "My Index Pattern", diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap index d09dd6f8b868b..92e4e637e0d3f 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap @@ -174,10 +174,10 @@ exports[`Table prevents saved objects from being deleted 1`] = ` "attributes": Object {}, "id": "1", "meta": Object { - "editUrl": "#/management/kibana/index_patterns/1", + "editUrl": "#/management/kibana/indexPatterns/patterns/1", "icon": "indexPatternApp", "inAppUrl": Object { - "path": "/management/kibana/index_patterns/1", + "path": "/management/kibana/indexPatterns/patterns/1", "uiCapabilitiesPath": "management.kibana.index_patterns", }, "title": "MyIndexPattern*", @@ -389,10 +389,10 @@ exports[`Table should render normally 1`] = ` "attributes": Object {}, "id": "1", "meta": Object { - "editUrl": "#/management/kibana/index_patterns/1", + "editUrl": "#/management/kibana/indexPatterns/patterns/1", "icon": "indexPatternApp", "inAppUrl": Object { - "path": "/management/kibana/index_patterns/1", + "path": "/management/kibana/indexPatterns/patterns/1", "uiCapabilitiesPath": "management.kibana.index_patterns", }, "title": "MyIndexPattern*", diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx index 347f2d977015c..6736556b40d31 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.test.tsx @@ -74,9 +74,9 @@ describe('Relationships', () => { meta: { title: 'MyIndexPattern*', icon: 'indexPatternApp', - editUrl: '#/management/kibana/index_patterns/1', + editUrl: '#/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/management/kibana/index_patterns/1', + path: '/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, @@ -109,10 +109,10 @@ describe('Relationships', () => { id: '1', relationship: 'child', meta: { - editUrl: '/management/kibana/index_patterns/1', + editUrl: '/management/kibana/indexPatterns/patterns/1', icon: 'indexPatternApp', inAppUrl: { - path: '/app/kibana#/management/kibana/index_patterns/1', + path: '/app/kibana#/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, title: 'My Index Pattern', diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx index 356f227773610..b9dad983cb42d 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx @@ -38,9 +38,9 @@ const defaultProps: TableProps = { meta: { title: `MyIndexPattern*`, icon: 'indexPatternApp', - editUrl: '#/management/kibana/index_patterns/1', + editUrl: '#/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/management/kibana/index_patterns/1', + path: '/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, @@ -65,9 +65,9 @@ const defaultProps: TableProps = { meta: { title: `MyIndexPattern*`, icon: 'indexPatternApp', - editUrl: '#/management/kibana/index_patterns/1', + editUrl: '#/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/management/kibana/index_patterns/1', + path: '/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.test.tsx index 6b975a9cd1709..3b7bb89bdb1c8 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.test.tsx @@ -155,9 +155,9 @@ describe('SavedObjectsTable', () => { meta: { title: `MyIndexPattern*`, icon: 'indexPatternApp', - editUrl: '#/management/kibana/index_patterns/1', + editUrl: '#/management/kibana/indexPatterns/patterns/1', inAppUrl: { - path: '/management/kibana/index_patterns/1', + path: '/management/kibana/indexPatterns/patterns/1', uiCapabilitiesPath: 'management.kibana.index_patterns', }, }, diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx index b9ebaf2b236f4..0ed6a49275f67 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx @@ -456,7 +456,7 @@ export class SavedObjectsTable extends Component - + = ({ /> } description="" - href={`${basePath.get()}/app/kibana#/management/kibana/index_patterns/${ - createIndexPattern ? indexPatternId : '' + href={`${basePath.get()}/app/kibana#/management/kibana/indexPatterns/${ + createIndexPattern ? `patterns/${indexPatternId}` : '' }`} /> diff --git a/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js b/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js index c29fba44285be..a1c1fb4c7b388 100644 --- a/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js +++ b/x-pack/plugins/rollup/public/index_pattern_creation/rollup_index_pattern_creation_config.js @@ -84,7 +84,7 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig testSubj: `createRollupIndexPatternButton`, isBeta: this.isBeta, onClick: () => { - urlHandler('/management/kibana/index_pattern?type=rollup'); + urlHandler('/create?type=rollup'); }, } : null; diff --git a/x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap index 171926b53e5b9..2f063bfbea288 100644 --- a/x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap +++ b/x-pack/plugins/siem/public/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap @@ -6,7 +6,7 @@ exports[`IndexPatternsMissingPrompt renders correctly against snapshot 1`] = ` Configure index patterns diff --git a/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx index abd33505b67b9..2e0d11a1c83c2 100644 --- a/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx +++ b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx @@ -61,7 +61,7 @@ export const IndexPatternsMissingPromptComponent = () => { } actions={ { - await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/index_patterns', { + await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/indexPatterns', { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts index 7d9bee37bbbc4..6bd740a88453b 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts @@ -70,7 +70,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { }); it(`redirects to Kibana home`, async () => { - await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/index_patterns', { + await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/indexPatterns', { basePath: `/s/custom_space`, ensureCurrentUrl: false, shouldLoginIfPrompted: false, From 3c7c3bad00d53ef4cd3f3b69fe90a05753e0d468 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sun, 3 May 2020 18:40:29 -0500 Subject: [PATCH 02/45] eslint fixes --- .../public/management/sections/index.js | 20 ------ .../render.test.js | 63 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/index.js delete mode 100644 src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index.js deleted file mode 100644 index adc1741f57263..0000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import './index_patterns'; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js deleted file mode 100644 index 1b9dafb6daf23..0000000000000 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/render.test.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const render = jest.fn(); -const unmountComponentAtNode = jest.fn(); - -jest.doMock('react-dom', () => ({ render, unmountComponentAtNode })); - -jest.mock('ui/chrome', () => ({ - getUiSettingsClient: () => ({ - get: () => '', - }), - addBasePath: () => {}, -})); - -jest.mock('ui/i18n', () => ({ - I18nContext: () => {}, -})); - -const { renderCreateIndexPatternWizard, destroyCreateIndexPatternWizard } = require('./render'); - -describe('CreateIndexPatternWizardRender', () => { - beforeEach(() => { - jest.spyOn(document, 'getElementById').mockImplementation(() => ({})); - render.mockClear(); - unmountComponentAtNode.mockClear(); - }); - - it('should call render', () => { - renderCreateIndexPatternWizard('', { - es: {}, - indexPatterns: {}, - savedObjectsClient: {}, - config: {}, - changeUrl: () => {}, - indexPatternCreationType: {}, - openConfirm: jest.fn(), - }); - - expect(render.mock.calls.length).toBe(1); - }); - - it('should call unmountComponentAtNode', () => { - destroyCreateIndexPatternWizard(); - expect(unmountComponentAtNode.mock.calls.length).toBe(1); - }); -}); From 701c88c2940ba91999316947aca89b535777b1dd Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sun, 3 May 2020 22:21:00 -0500 Subject: [PATCH 03/45] update i18n --- .../public/components/breadcrumbs.js | 6 +- .../create_button/create_button.tsx | 2 +- .../create_index_pattern_prompt/index.tsx | 18 +- .../__snapshots__/empty_state.test.tsx.snap | 12 +- .../components/empty_state/empty_state.tsx | 12 +- .../header/__snapshots__/header.test.tsx.snap | 14 +- .../components/header/header.tsx | 8 +- .../__snapshots__/loading_state.test.tsx.snap | 2 +- .../loading_state/loading_state.tsx | 2 +- .../header/__snapshots__/header.test.tsx.snap | 20 +- .../components/header/header.tsx | 12 +- .../__snapshots__/indices_list.test.tsx.snap | 10 +- .../components/indices_list/indices_list.tsx | 2 +- .../loading_indices.test.tsx.snap | 4 +- .../loading_indices/loading_indices.tsx | 4 +- .../status_message.test.tsx.snap | 22 +- .../status_message/status_message.tsx | 20 +- .../step_index_pattern/step_index_pattern.tsx | 4 +- .../step_time_field.test.tsx.snap | 8 +- .../action_buttons/action_buttons.tsx | 4 +- .../advanced_options.test.tsx.snap | 8 +- .../advanced_options/advanced_options.tsx | 10 +- .../header/__snapshots__/header.test.tsx.snap | 4 +- .../components/header/header.tsx | 4 +- .../__snapshots__/time_field.test.tsx.snap | 24 +- .../components/time_field/time_field.tsx | 12 +- .../step_time_field/step_time_field.tsx | 10 +- .../create_index_pattern_wizard.tsx | 24 +- .../lib/extract_time_fields.ts | 11 +- .../create_edit_field/create_edit_field.tsx | 15 +- .../edit_index_pattern/edit_index_pattern.tsx | 31 +- .../index_header/index_header.tsx | 26 +- .../components/table/table.tsx | 69 ++- .../__snapshots__/call_outs.test.tsx.snap | 6 +- .../components/call_outs/call_outs.tsx | 6 +- .../confirmation_modal/confirmation_modal.tsx | 15 +- .../header/__snapshots__/header.test.tsx.snap | 6 +- .../components/header/header.tsx | 6 +- .../components/table/table.tsx | 52 +- .../__snapshots__/add_filter.test.tsx.snap | 4 +- .../components/add_filter/add_filter.tsx | 13 +- .../confirmation_modal.test.tsx.snap | 6 +- .../confirmation_modal/confirmation_modal.tsx | 6 +- .../header/__snapshots__/header.test.tsx.snap | 6 +- .../components/header/header.tsx | 6 +- .../table/__snapshots__/table.test.tsx.snap | 2 +- .../components/table/table.tsx | 46 +- .../edit_index_pattern/tabs/tabs.tsx | 11 +- .../edit_index_pattern/tabs/utils.ts | 24 +- .../__snapshots__/field_editor.test.tsx.snap | 106 ++-- .../bytes/__snapshots__/bytes.test.tsx.snap | 6 +- .../color/__snapshots__/color.test.tsx.snap | 30 +- .../editors/color/color.tsx | 18 +- .../date/__snapshots__/date.test.tsx.snap | 6 +- .../field_format_editor/editors/date/date.tsx | 4 +- .../__snapshots__/date_nanos.test.tsx.snap | 6 +- .../editors/date_nanos/date_nanos.tsx | 4 +- .../editors/default/default.tsx | 2 +- .../__snapshots__/duration.test.tsx.snap | 10 +- .../editors/duration/duration.tsx | 8 +- .../number/__snapshots__/number.test.tsx.snap | 6 +- .../editors/number/number.tsx | 4 +- .../__snapshots__/percent.test.tsx.snap | 6 +- .../__snapshots__/static_lookup.test.tsx.snap | 16 +- .../editors/static_lookup/static_lookup.tsx | 19 +- .../string/__snapshots__/string.test.tsx.snap | 2 +- .../editors/string/string.tsx | 2 +- .../__snapshots__/truncate.test.tsx.snap | 2 +- .../editors/truncate/truncate.tsx | 2 +- .../label_template_flyout.test.tsx.snap | 14 +- .../url/__snapshots__/url.test.tsx.snap | 44 +- .../url_template_flyout.test.tsx.snap | 16 +- .../editors/url/label_template_flyout.tsx | 26 +- .../field_format_editor/editors/url/url.tsx | 20 +- .../editors/url/url_template_flyout.tsx | 18 +- .../__snapshots__/samples.test.tsx.snap | 2 +- .../field_format_editor/samples/samples.tsx | 6 +- .../disabled_call_out.test.tsx.snap | 4 +- .../warning_call_out.test.tsx.snap | 14 +- .../scripting_call_outs/disabled_call_out.tsx | 4 +- .../scripting_call_outs/warning_call_out.tsx | 10 +- .../scripting_help/scripting_syntax.tsx | 46 +- .../components/scripting_help/test_script.tsx | 14 +- .../components/field_editor/field_editor.tsx | 79 ++- .../index_pattern_table.tsx | 6 +- .../mount_management_section.tsx | 8 +- .../index_pattern_management/public/plugin.ts | 2 +- .../public/scripting_languages/index.ts | 15 +- .../translations/translations/ja-JP.json | 584 +++++++++--------- .../translations/translations/zh-CN.json | 584 +++++++++--------- 90 files changed, 1249 insertions(+), 1175 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/breadcrumbs.js b/src/plugins/index_pattern_management/public/components/breadcrumbs.js index a4ebcc79922b6..d66e0aebfbdea 100644 --- a/src/plugins/index_pattern_management/public/components/breadcrumbs.js +++ b/src/plugins/index_pattern_management/public/components/breadcrumbs.js @@ -22,7 +22,7 @@ import { i18n } from '@kbn/i18n'; export function getListBreadcrumbs() { return [ { - text: i18n.translate('kbn.management.indexPatterns.listBreadcrumb', { + text: i18n.translate('indexPatternManagement.indexPatterns.listBreadcrumb', { defaultMessage: 'Index patterns', }), href: '#/management/kibana/indexPatterns', @@ -34,7 +34,7 @@ export function getCreateBreadcrumbs() { return [ ...getListBreadcrumbs(), { - text: i18n.translate('kbn.management.indexPatterns.createBreadcrumb', { + text: i18n.translate('indexPatternManagement.indexPatterns.createBreadcrumb', { defaultMessage: 'Create index pattern', }), href: '#/management/kibana/indexPattern', @@ -69,7 +69,7 @@ export function getCreateFieldBreadcrumbs($route) { return [ ...getEditBreadcrumbs($route), { - text: i18n.translate('kbn.management.indexPatterns.createFieldBreadcrumb', { + text: i18n.translate('indexPatternManagement.indexPatterns.createFieldBreadcrumb', { defaultMessage: 'Create field', }), }, diff --git a/src/plugins/index_pattern_management/public/components/create_button/create_button.tsx b/src/plugins/index_pattern_management/public/components/create_button/create_button.tsx index 3357c674909f7..d8a44675d80a0 100644 --- a/src/plugins/index_pattern_management/public/components/create_button/create_button.tsx +++ b/src/plugins/index_pattern_management/public/components/create_button/create_button.tsx @@ -139,7 +139,7 @@ export class CreateButton extends Component { return ( diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx index 174b3af930550..ab3b90177bcfd 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_prompt/index.tsx @@ -37,7 +37,7 @@ export const CreateIndexPatternPrompt = ({ onClose }: { onClose: () => void }) =

@@ -47,7 +47,7 @@ export const CreateIndexPatternPrompt = ({ onClose }: { onClose: () => void }) =

@@ -57,7 +57,7 @@ export const CreateIndexPatternPrompt = ({ onClose }: { onClose: () => void }) =

@@ -66,38 +66,38 @@ export const CreateIndexPatternPrompt = ({ onClose }: { onClose: () => void }) = diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap index 2e68efb5cce39..f27ddf35a24d9 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/__snapshots__/empty_state.test.tsx.snap @@ -7,7 +7,7 @@ exports[`EmptyState should render normally 1`] = ` title={ } @@ -15,7 +15,7 @@ exports[`EmptyState should render normally 1`] = `

, @@ -32,7 +32,7 @@ exports[`EmptyState should render normally 1`] = ` > , @@ -41,7 +41,7 @@ exports[`EmptyState should render normally 1`] = ` > , @@ -57,7 +57,7 @@ exports[`EmptyState should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx index 676f4d38f409b..64bd9e491d0df 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/empty_state/empty_state.tsx @@ -29,20 +29,20 @@ export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => ( color="warning" title={ } >

@@ -50,7 +50,7 @@ export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => ( learnHowLink: ( @@ -58,7 +58,7 @@ export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => ( getStartedLink: ( @@ -74,7 +74,7 @@ export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => ( color="warning" > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap index a6b22ebf32a43..4afc04b0de753 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap @@ -6,14 +6,14 @@ exports[`Header should render a different name, prompt, and beta tag if provided

- + @@ -35,7 +35,7 @@ exports[`Header should render a different name, prompt, and beta tag if provided > @@ -61,7 +61,7 @@ exports[`Header should render normally 1`] = `

@@ -106,7 +106,7 @@ exports[`Header should render without including system indices 1`] = `

diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx index 928c1ef2b6299..858dbc3463f6d 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx @@ -52,7 +52,7 @@ export const Header = ({

{' '} @@ -76,7 +76,7 @@ export const Header = ({

@@ -88,7 +88,7 @@ export const Header = ({ } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap index 3adc497a639c4..1e6ac56d437e1 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/__snapshots__/loading_state.test.tsx.snap @@ -22,7 +22,7 @@ exports[`LoadingState should render normally 1`] = ` >

diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx index e9b68033090cf..26653adfd14a6 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/loading_state/loading_state.tsx @@ -29,7 +29,7 @@ export const LoadingState = () => (

diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap index f2fb17cdb0d60..3021292953ff5 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/__snapshots__/header.test.tsx.snap @@ -8,7 +8,7 @@ exports[`Header should mark the input as invalid 1`] = `

@@ -42,7 +42,7 @@ exports[`Header should mark the input as invalid 1`] = `

@@ -55,7 +55,7 @@ exports[`Header should mark the input as invalid 1`] = `

@@ -71,7 +71,7 @@ exports[`Header should mark the input as invalid 1`] = ` label={ } @@ -99,7 +99,7 @@ exports[`Header should mark the input as invalid 1`] = ` > @@ -116,7 +116,7 @@ exports[`Header should render normally 1`] = `

@@ -146,7 +146,7 @@ exports[`Header should render normally 1`] = `

@@ -159,7 +159,7 @@ exports[`Header should render normally 1`] = `

@@ -175,7 +175,7 @@ exports[`Header should render normally 1`] = ` label={ } @@ -203,7 +203,7 @@ exports[`Header should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx index f9d86d5d9d53d..9ce72aeeea6e3 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx @@ -57,7 +57,7 @@ export const Header: React.FC = ({

@@ -69,7 +69,7 @@ export const Header: React.FC = ({ } @@ -79,14 +79,14 @@ export const Header: React.FC = ({

* }} />

{characterList} }} /> @@ -97,7 +97,7 @@ export const Header: React.FC = ({ = ({ data-test-subj="createIndexPatternGoToStep2Button" > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap index a759b3b3e9881..598de4d90e893 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap @@ -44,7 +44,7 @@ exports[`IndicesList should change pages 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap index d8b4253de78bb..9d67ca913d415 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/__snapshots__/loading_indices.test.tsx.snap @@ -21,7 +21,7 @@ exports[`LoadingIndices should render normally 1`] = ` > @@ -39,7 +39,7 @@ exports[`LoadingIndices should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx index 2f91f961b6c18..16e8d1a9f3e98 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/loading_indices/loading_indices.tsx @@ -33,7 +33,7 @@ export const LoadingIndices = ({ ...rest }) => ( @@ -42,7 +42,7 @@ export const LoadingIndices = ({ ...rest }) => ( diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap index eb99424cb12a8..4bc1cc3b38bfe 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap @@ -12,16 +12,16 @@ exports[`StatusMessage should render with exact matches 1`] = ` type="check" /> -   + , @@ -55,14 +55,14 @@ exports[`StatusMessage should render with no partial matches 1`] = ` @@ -149,7 +149,7 @@ exports[`StatusMessage should show that no indices exist 1`] = ` @@ -168,7 +168,7 @@ exports[`StatusMessage should show that system indices exist 1`] = ` diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx index ad7f58fa4e879..ccdd1833ea9bf 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/status_message.tsx @@ -55,7 +55,7 @@ export const StatusMessage: React.FC = ({ statusMessage = ( {allIndicesLength} indices }} /> @@ -65,7 +65,7 @@ export const StatusMessage: React.FC = ({ statusMessage = ( @@ -75,7 +75,7 @@ export const StatusMessage: React.FC = ({ statusMessage = ( @@ -88,13 +88,13 @@ export const StatusMessage: React.FC = ({   @@ -102,7 +102,7 @@ export const StatusMessage: React.FC = ({ strongIndices: ( @@ -118,7 +118,7 @@ export const StatusMessage: React.FC = ({ statusMessage = ( = ({ strongIndices: ( @@ -142,14 +142,14 @@ export const StatusMessage: React.FC = ({ statusMessage = ( diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx index 23037270ee3d1..b3396cf55d0f3 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx @@ -237,7 +237,7 @@ export class StepIndexPattern extends Component @@ -270,7 +270,7 @@ export class StepIndexPattern extends Component } @@ -60,7 +60,7 @@ exports[`StepTimeField should render "Custom index pattern ID already exists" wh

@@ -92,7 +92,7 @@ exports[`StepTimeField should render a loading state when creating the index pat @@ -269,7 +269,7 @@ exports[`StepTimeField should render any error message 1`] = ` title={ } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx index 342876712eb28..d7c55f2573a17 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/action_buttons/action_buttons.tsx @@ -36,7 +36,7 @@ export const ActionButtons = ({ @@ -49,7 +49,7 @@ export const ActionButtons = ({ onClick={createIndexPattern} > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap index 02ceed3454a00..d1b10fb532020 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/__snapshots__/advanced_options.test.tsx.snap @@ -8,7 +8,7 @@ exports[`AdvancedOptions should hide if not showing 1`] = ` > @@ -26,7 +26,7 @@ exports[`AdvancedOptions should render normally 1`] = ` > @@ -43,14 +43,14 @@ exports[`AdvancedOptions should render normally 1`] = ` helpText={ } label={ } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx index fd2c1db1eacd7..b8f34095743ba 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.tsx @@ -44,12 +44,12 @@ export const AdvancedOptions: React.FC = ({ > {isVisible ? ( ) : ( )} @@ -60,13 +60,13 @@ export const AdvancedOptions: React.FC = ({ } helpText={ @@ -78,7 +78,7 @@ export const AdvancedOptions: React.FC = ({ value={indexPatternId} onChange={onChangeIndexPatternId} placeholder={i18n.translate( - 'kbn.management.createIndexPattern.stepTime.options.patternPlaceholder', + 'indexPatternManagement.createIndexPattern.stepTime.options.patternPlaceholder', { defaultMessage: 'custom-index-pattern-id', } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap index 5c53558286b0d..63008ec5b52e7 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/__snapshots__/header.test.tsx.snap @@ -8,7 +8,7 @@ exports[`Header should render normally 1`] = `

@@ -21,7 +21,7 @@ exports[`Header should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx index 5c2f184e8038b..22e245f7ac137 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/header/header.tsx @@ -33,7 +33,7 @@ export const Header: React.FC = ({ indexPattern, indexPatternName }

@@ -41,7 +41,7 @@ export const Header: React.FC = ({ indexPattern, indexPatternName } {indexPattern}
, diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap index e997cb80a2a14..7d056433f55df 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/__snapshots__/time_field.test.tsx.snap @@ -13,14 +13,14 @@ exports[`TimeField should render a loading state 1`] = `

@@ -38,7 +38,7 @@ exports[`TimeField should render a loading state 1`] = ` @@ -84,14 +84,14 @@ exports[`TimeField should render a selected time field 1`] = `

@@ -109,7 +109,7 @@ exports[`TimeField should render a selected time field 1`] = ` @@ -123,7 +123,7 @@ exports[`TimeField should render a selected time field 1`] = ` > @@ -165,14 +165,14 @@ exports[`TimeField should render normally 1`] = `

@@ -190,7 +190,7 @@ exports[`TimeField should render normally 1`] = ` @@ -204,7 +204,7 @@ exports[`TimeField should render normally 1`] = ` > @@ -239,7 +239,7 @@ exports[`TimeField should render something if hiding time field 1`] = `

diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx index 2f70c1b80b836..529847975b04d 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx @@ -61,7 +61,7 @@ export const TimeField: React.FC = ({ @@ -72,7 +72,7 @@ export const TimeField: React.FC = ({ ) : ( @@ -84,13 +84,13 @@ export const TimeField: React.FC = ({

@@ -104,7 +104,7 @@ export const TimeField: React.FC = ({ options={[ { text: i18n.translate( - 'kbn.management.createIndexPattern.stepTime.field.loadingDropDown', + 'indexPatternManagement.createIndexPattern.stepTime.field.loadingDropDown', { defaultMessage: 'Loading…', } @@ -130,7 +130,7 @@ export const TimeField: React.FC = ({

diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx index 572ca4ad90b4f..5ec862b01082c 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx @@ -34,8 +34,8 @@ import { Header } from './components/header'; import { TimeField } from './components/time_field'; import { AdvancedOptions } from './components/advanced_options'; import { ActionButtons } from './components/action_buttons'; -import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public'; -import { DataPublicPluginStart } from '../../../../../../../../../../plugins/data/public'; +import { IndexPatternCreationConfig } from '../../../..'; +import { DataPublicPluginStart } from '../../../../../../data/public'; interface StepTimeFieldProps { indexPattern: string; @@ -157,7 +157,7 @@ export class StepTimeField extends Component ) : ( @@ -187,7 +187,7 @@ export class StepTimeField extends Component @@ -218,7 +218,7 @@ export class StepTimeField extends Component } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx index bc9c115358eb1..55d809d31a1ab 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx @@ -121,14 +121,14 @@ export class CreateIndexPatternWizard extends Component< const indicesFailMsg = ( ); const clustersFailMsg = ( ); @@ -170,15 +170,21 @@ export class CreateIndexPatternWizard extends Component< const createdId = await emptyPattern.create(); if (!createdId) { - const confirmMessage = i18n.translate('kbn.management.indexPattern.titleExistsLabel', { - values: { title: emptyPattern.title }, - defaultMessage: "An index pattern with the title '{title}' already exists.", - }); + const confirmMessage = i18n.translate( + 'indexPatternManagement.indexPattern.titleExistsLabel', + { + values: { title: emptyPattern.title }, + defaultMessage: "An index pattern with the title '{title}' already exists.", + } + ); const isConfirmed = await services.openConfirm(confirmMessage, { - confirmButtonText: i18n.translate('kbn.management.indexPattern.goToPatternButtonLabel', { - defaultMessage: 'Go to existing pattern', - }), + confirmButtonText: i18n.translate( + 'indexPatternManagement.indexPattern.goToPatternButtonLabel', + { + defaultMessage: 'Go to existing pattern', + } + ), }); if (isConfirmed) { diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts index 0b95ec0a120da..0ccdf5735d1b8 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts @@ -22,9 +22,12 @@ import { IFieldType } from '../../../../../../../../../plugins/data/public'; export function extractTimeFields(fields: IFieldType[]) { const dateFields = fields.filter(field => field.type === 'date'); - const label = i18n.translate('kbn.management.createIndexPattern.stepTime.noTimeFieldsLabel', { - defaultMessage: "The indices which match this index pattern don't contain any time fields.", - }); + const label = i18n.translate( + 'indexPatternManagement.createIndexPattern.stepTime.noTimeFieldsLabel', + { + defaultMessage: "The indices which match this index pattern don't contain any time fields.", + } + ); if (dateFields.length === 0) { return [ @@ -40,7 +43,7 @@ export function extractTimeFields(fields: IFieldType[]) { fieldName: '', }; const noTimeFieldLabel = i18n.translate( - 'kbn.management.createIndexPattern.stepTime.noTimeFieldOptionLabel', + 'indexPatternManagement.createIndexPattern.stepTime.noTimeFieldOptionLabel', { defaultMessage: "I don't want to use the Time Filter", } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx index 0815ab28e3fcf..fca0ae206e010 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx @@ -52,7 +52,7 @@ interface CreateEditFieldProps extends RouteComponentProps { } const newFieldPlaceholder = i18n.translate( - 'kbn.management.editIndexPattern.scripted.newFieldPlaceholder', + 'indexPatternManagement.editIndexPattern.scripted.newFieldPlaceholder', { defaultMessage: 'New Scripted Field', } @@ -78,11 +78,14 @@ export const CreateEditField = withRouter( const url = `/patterns/${indexPattern.id}`; if (mode === 'edit' && !field) { - const message = i18n.translate('kbn.management.editIndexPattern.scripted.noFieldLabel', { - defaultMessage: - "'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'", - values: { indexPatternTitle: indexPattern.title, fieldName }, - }); + const message = i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.noFieldLabel', + { + defaultMessage: + "'{indexPatternTitle}' index pattern doesn't have a scripted field called '{fieldName}'", + values: { indexPatternTitle: indexPattern.title, fieldName }, + } + ); services.toasts.addWarning(message); history.push(url); } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx index 5e666e743a996..6c9a40fd32b42 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -59,37 +59,37 @@ export interface EditIndexPatternProps extends RouteComponentProps { } const mappingAPILink = i18n.translate( - 'kbn.management.editIndexPattern.timeFilterLabel.mappingAPILink', + 'indexPatternManagement.editIndexPattern.timeFilterLabel.mappingAPILink', { defaultMessage: 'Mapping API', } ); const mappingConflictHeader = i18n.translate( - 'kbn.management.editIndexPattern.mappingConflictHeader', + 'indexPatternManagement.editIndexPattern.mappingConflictHeader', { defaultMessage: 'Mapping conflict', } ); -const confirmMessage = i18n.translate('kbn.management.editIndexPattern.refreshLabel', { +const confirmMessage = i18n.translate('indexPatternManagement.editIndexPattern.refreshLabel', { defaultMessage: 'This action resets the popularity counter of each field.', }); const confirmModalOptionsRefresh = { - confirmButtonText: i18n.translate('kbn.management.editIndexPattern.refreshButton', { + confirmButtonText: i18n.translate('indexPatternManagement.editIndexPattern.refreshButton', { defaultMessage: 'Refresh', }), - title: i18n.translate('kbn.management.editIndexPattern.refreshHeader', { + title: i18n.translate('indexPatternManagement.editIndexPattern.refreshHeader', { defaultMessage: 'Refresh field list?', }), }; const confirmModalOptionsDelete = { - confirmButtonText: i18n.translate('kbn.management.editIndexPattern.deleteButton', { + confirmButtonText: i18n.translate('indexPatternManagement.editIndexPattern.deleteButton', { defaultMessage: 'Delete', }), - title: i18n.translate('kbn.management.editIndexPattern.deleteHeader', { + title: i18n.translate('indexPatternManagement.editIndexPattern.deleteHeader', { defaultMessage: 'Delete index pattern?', }), }; @@ -168,13 +168,16 @@ export const EditIndexPattern = withRouter( }); }; - const timeFilterHeader = i18n.translate('kbn.management.editIndexPattern.timeFilterHeader', { - defaultMessage: "Time Filter field name: '{timeFieldName}'", - values: { timeFieldName: indexPattern.timeFieldName }, - }); + const timeFilterHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.timeFilterHeader', + { + defaultMessage: "Time Filter field name: '{timeFieldName}'", + values: { timeFieldName: indexPattern.timeFieldName }, + } + ); const mappingConflictLabel = i18n.translate( - 'kbn.management.editIndexPattern.mappingConflictLabel', + 'indexPatternManagement.editIndexPattern.mappingConflictLabel', { defaultMessage: '{conflictFieldsLength, plural, one {A field is} other {# fields are}} defined as several types (string, integer, etc) across the indices that match this pattern. You may still be able to use these conflict fields in parts of Kibana, but they will be unavailable for functions that require Kibana to know their type. Correcting this issue will require reindexing your data.', @@ -182,7 +185,7 @@ export const EditIndexPattern = withRouter( } ); - const headingAriaLabel = i18n.translate('kbn.management.editIndexPattern.detailsAria', { + const headingAriaLabel = i18n.translate('indexPatternManagement.editIndexPattern.detailsAria', { defaultMessage: 'Index pattern details', }); @@ -221,7 +224,7 @@ export const EditIndexPattern = withRouter(

{indexPattern.title} }} />{' '} diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx index a06671ef6a470..a9b26c8af7be4 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx @@ -37,27 +37,33 @@ interface IndexHeaderProps { deleteIndexPattern?: () => void; } -const setDefaultAriaLabel = i18n.translate('kbn.management.editIndexPattern.setDefaultAria', { - defaultMessage: 'Set as default index.', -}); +const setDefaultAriaLabel = i18n.translate( + 'indexPatternManagement.editIndexPattern.setDefaultAria', + { + defaultMessage: 'Set as default index.', + } +); -const setDefaultTooltip = i18n.translate('kbn.management.editIndexPattern.setDefaultTooltip', { - defaultMessage: 'Set as default index.', -}); +const setDefaultTooltip = i18n.translate( + 'indexPatternManagement.editIndexPattern.setDefaultTooltip', + { + defaultMessage: 'Set as default index.', + } +); -const refreshAriaLabel = i18n.translate('kbn.management.editIndexPattern.refreshAria', { +const refreshAriaLabel = i18n.translate('indexPatternManagement.editIndexPattern.refreshAria', { defaultMessage: 'Reload field list.', }); -const refreshTooltip = i18n.translate('kbn.management.editIndexPattern.refreshTooltip', { +const refreshTooltip = i18n.translate('indexPatternManagement.editIndexPattern.refreshTooltip', { defaultMessage: 'Refresh field list.', }); -const removeAriaLabel = i18n.translate('kbn.management.editIndexPattern.removeAria', { +const removeAriaLabel = i18n.translate('indexPatternManagement.editIndexPattern.removeAria', { defaultMessage: 'Remove index pattern.', }); -const removeTooltip = i18n.translate('kbn.management.editIndexPattern.removeTooltip', { +const removeTooltip = i18n.translate('indexPatternManagement.editIndexPattern.removeTooltip', { defaultMessage: 'Remove index pattern.', }); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx index aa8e8b8e13a07..a6d218c1e655f 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx @@ -23,112 +23,125 @@ import { EuiIcon, EuiInMemoryTable, EuiIconTip, EuiBasicTableColumn } from '@ela import { i18n } from '@kbn/i18n'; -import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; +// import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../../data/public'; import { IndexedFieldItem } from '../../types'; // localized labels const additionalInfoAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.additionalInfoAriaLabel', + 'indexPatternManagement.editIndexPattern.fields.table.additionalInfoAriaLabel', { defaultMessage: 'Additional field information' } ); const primaryTimeAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.primaryTimeAriaLabel', + 'indexPatternManagement.editIndexPattern.fields.table.primaryTimeAriaLabel', { defaultMessage: 'Primary time field' } ); const primaryTimeTooltip = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.primaryTimeTooltip', + 'indexPatternManagement.editIndexPattern.fields.table.primaryTimeTooltip', { defaultMessage: 'This field represents the time that events occurred.' } ); const multiTypeAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.multiTypeAria', + 'indexPatternManagement.editIndexPattern.fields.table.multiTypeAria', { defaultMessage: 'Multiple type field', } ); const multiTypeTooltip = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.multiTypeTooltip', + 'indexPatternManagement.editIndexPattern.fields.table.multiTypeTooltip', { defaultMessage: 'The type of this field changes across indices. It is unavailable for many analysis functions.', } ); -const nameHeader = i18n.translate('kbn.management.editIndexPattern.fields.table.nameHeader', { - defaultMessage: 'Name', -}); +const nameHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.table.nameHeader', + { + defaultMessage: 'Name', + } +); -const typeHeader = i18n.translate('kbn.management.editIndexPattern.fields.table.typeHeader', { - defaultMessage: 'Type', -}); +const typeHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.table.typeHeader', + { + defaultMessage: 'Type', + } +); -const formatHeader = i18n.translate('kbn.management.editIndexPattern.fields.table.formatHeader', { - defaultMessage: 'Format', -}); +const formatHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.table.formatHeader', + { + defaultMessage: 'Format', + } +); const searchableHeader = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.searchableHeader', + 'indexPatternManagement.editIndexPattern.fields.table.searchableHeader', { defaultMessage: 'Searchable', } ); const searchableDescription = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.searchableDescription', + 'indexPatternManagement.editIndexPattern.fields.table.searchableDescription', { defaultMessage: 'These fields can be used in the filter bar' } ); const isSearchableAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.isSearchableAria', + 'indexPatternManagement.editIndexPattern.fields.table.isSearchableAria', { defaultMessage: 'Is searchable', } ); const aggregatableLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.aggregatableLabel', + 'indexPatternManagement.editIndexPattern.fields.table.aggregatableLabel', { defaultMessage: 'Aggregatable', } ); const aggregatableDescription = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.aggregatableDescription', + 'indexPatternManagement.editIndexPattern.fields.table.aggregatableDescription', { defaultMessage: 'These fields can be used in visualization aggregations' } ); const isAggregatableAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.isAggregatableAria', + 'indexPatternManagement.editIndexPattern.fields.table.isAggregatableAria', { defaultMessage: 'Is aggregatable', } ); -const excludedLabel = i18n.translate('kbn.management.editIndexPattern.fields.table.excludedLabel', { - defaultMessage: 'Excluded', -}); +const excludedLabel = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.table.excludedLabel', + { + defaultMessage: 'Excluded', + } +); const excludedDescription = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.excludedDescription', + 'indexPatternManagement.editIndexPattern.fields.table.excludedDescription', { defaultMessage: 'Fields that are excluded from _source when it is fetched' } ); const isExcludedAriaLabel = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.isExcludedAria', + 'indexPatternManagement.editIndexPattern.fields.table.isExcludedAria', { defaultMessage: 'Is excluded', } ); -const editLabel = i18n.translate('kbn.management.editIndexPattern.fields.table.editLabel', { +const editLabel = i18n.translate('indexPatternManagement.editIndexPattern.fields.table.editLabel', { defaultMessage: 'Edit', }); const editDescription = i18n.translate( - 'kbn.management.editIndexPattern.fields.table.editDescription', + 'indexPatternManagement.editIndexPattern.fields.table.editDescription', { defaultMessage: 'Edit' } ); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap index 4dfda1b9339b1..75ed855123524 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap @@ -8,7 +8,7 @@ exports[`CallOuts should render normally 1`] = ` title={ } @@ -16,7 +16,7 @@ exports[`CallOuts should render normally 1`] = `

, diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.tsx index 8e38b569a32fa..31d1e4e40bcd5 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.tsx @@ -37,7 +37,7 @@ export const CallOuts = ({ deprecatedLangsInUse, painlessDocLink }: CallOutsProp } @@ -46,7 +46,7 @@ export const CallOuts = ({ deprecatedLangsInUse, painlessDocLink }: CallOutsProp >

diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.tsx index 1e82174f863b0..ece706798a55f 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/confirmation_modal/confirmation_modal.tsx @@ -35,16 +35,19 @@ export const DeleteScritpedFieldConfirmationModal = ({ hideDeleteConfirmationModal, deleteField, }: DeleteScritpedFieldConfirmationModalProps) => { - const title = i18n.translate('kbn.management.editIndexPattern.scripted.deleteFieldLabel', { - defaultMessage: "Delete scripted field '{fieldName}'?", - values: { fieldName: field.name }, - }); + const title = i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.deleteFieldLabel', + { + defaultMessage: "Delete scripted field '{fieldName}'?", + values: { fieldName: field.name }, + } + ); const cancelButtonText = i18n.translate( - 'kbn.management.editIndexPattern.scripted.deleteField.cancelButton', + 'indexPatternManagement.editIndexPattern.scripted.deleteField.cancelButton', { defaultMessage: 'Cancel' } ); const confirmButtonText = i18n.translate( - 'kbn.management.editIndexPattern.scripted.deleteField.deleteButton', + 'indexPatternManagement.editIndexPattern.scripted.deleteField.deleteButton', { defaultMessage: 'Delete' } ); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/__snapshots__/header.test.tsx.snap index 2e694b6363117..f554afef208b8 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/__snapshots__/header.test.tsx.snap @@ -11,7 +11,7 @@ exports[`Header should render normally 1`] = `

@@ -20,7 +20,7 @@ exports[`Header should render normally 1`] = `

@@ -35,7 +35,7 @@ exports[`Header should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx index b8f832dad72af..d23a973eb5fad 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx @@ -32,7 +32,7 @@ export const Header = ({ addScriptedFieldUrl }: HeaderProps) => (

@@ -40,7 +40,7 @@ export const Header = ({ addScriptedFieldUrl }: HeaderProps) => (

@@ -51,7 +51,7 @@ export const Header = ({ addScriptedFieldUrl }: HeaderProps) => ( diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.tsx index 0f34d49592af7..51ca59ee7b032 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.tsx @@ -46,11 +46,11 @@ export class Table extends PureComponent { const columns: Array> = [ { field: 'displayName', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.nameHeader', { + name: i18n.translate('indexPatternManagement.editIndexPattern.scripted.table.nameHeader', { defaultMessage: 'Name', }), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.nameDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.nameDescription', { defaultMessage: 'Name of the field' } ), dataType: 'string', @@ -59,11 +59,11 @@ export class Table extends PureComponent { }, { field: 'lang', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.langHeader', { + name: i18n.translate('indexPatternManagement.editIndexPattern.scripted.table.langHeader', { defaultMessage: 'Lang', }), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.langDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.langDescription', { defaultMessage: 'Language used for the field' } ), dataType: 'string', @@ -72,11 +72,14 @@ export class Table extends PureComponent { }, { field: 'script', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.scriptHeader', { - defaultMessage: 'Script', - }), + name: i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.table.scriptHeader', + { + defaultMessage: 'Script', + } + ), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.scriptDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.scriptDescription', { defaultMessage: 'Script for the field' } ), dataType: 'string', @@ -84,11 +87,14 @@ export class Table extends PureComponent { }, { field: 'name', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.formatHeader', { - defaultMessage: 'Format', - }), + name: i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.table.formatHeader', + { + defaultMessage: 'Format', + } + ), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.formatDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.formatDescription', { defaultMessage: 'Format used for the field' } ), render: this.renderFormatCell, @@ -99,11 +105,14 @@ export class Table extends PureComponent { actions: [ { type: 'icon', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.editHeader', { - defaultMessage: 'Edit', - }), + name: i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.table.editHeader', + { + defaultMessage: 'Edit', + } + ), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.editDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.editDescription', { defaultMessage: 'Edit this field' } ), icon: 'pencil', @@ -111,11 +120,14 @@ export class Table extends PureComponent { }, { type: 'icon', - name: i18n.translate('kbn.management.editIndexPattern.scripted.table.deleteHeader', { - defaultMessage: 'Delete', - }), + name: i18n.translate( + 'indexPatternManagement.editIndexPattern.scripted.table.deleteHeader', + { + defaultMessage: 'Delete', + } + ), description: i18n.translate( - 'kbn.management.editIndexPattern.scripted.table.deleteDescription', + 'indexPatternManagement.editIndexPattern.scripted.table.deleteDescription', { defaultMessage: 'Delete this field' } ), icon: 'trash', diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap index 879ea555d3300..92998bc3f07e3 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/__snapshots__/add_filter.test.tsx.snap @@ -19,7 +19,7 @@ exports[`AddFilter should ignore strings with just spaces 1`] = ` > @@ -46,7 +46,7 @@ exports[`AddFilter should render normally 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx index d0f397637de33..2a5e29827ccc5 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/add_filter/add_filter.tsx @@ -27,10 +27,13 @@ interface AddFilterProps { onAddFilter: (filter: string) => void; } -const sourcePlaceholder = i18n.translate('kbn.management.editIndexPattern.sourcePlaceholder', { - defaultMessage: - "source filter, accepts wildcards (e.g., `user*` to filter fields starting with 'user')", -}); +const sourcePlaceholder = i18n.translate( + 'indexPatternManagement.editIndexPattern.sourcePlaceholder', + { + defaultMessage: + "source filter, accepts wildcards (e.g., `user*` to filter fields starting with 'user')", + } +); export const AddFilter = ({ onAddFilter }: AddFilterProps) => { const [filter, setFilter] = useState(''); @@ -53,7 +56,7 @@ export const AddFilter = ({ onAddFilter }: AddFilterProps) => { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap index 62376b498d887..0020adb19983d 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/confirmation_modal/__snapshots__/confirmation_modal.test.tsx.snap @@ -7,14 +7,14 @@ exports[`Header should render normally 1`] = ` cancelButtonText={ } confirmButtonText={ } @@ -24,7 +24,7 @@ exports[`Header should render normally 1`] = ` title={ } buttonColor="danger" confirmButtonText={ } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap index cde0de79caacd..1f380d68a5af5 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap @@ -8,7 +8,7 @@ exports[`Header should render normally 1`] = `

@@ -17,14 +17,14 @@ exports[`Header should render normally 1`] = `

diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx index 7b37f75043dd5..709908a1bb253 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx @@ -27,7 +27,7 @@ export const Header = () => (

@@ -35,7 +35,7 @@ export const Header = () => (

diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap index c70d0871bb854..cb8abdefec266 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/__snapshots__/table.test.tsx.snap @@ -29,7 +29,7 @@ exports[`Table editing should update the matches dynamically as input value is c diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx index db2b74bbc9824..0b337a7712e52 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx @@ -34,39 +34,51 @@ import { SourceFiltersTableFilter } from '../../types'; import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; -const filterHeader = i18n.translate('kbn.management.editIndexPattern.source.table.filterHeader', { - defaultMessage: 'Filter', -}); +const filterHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.source.table.filterHeader', + { + defaultMessage: 'Filter', + } +); const filterDescription = i18n.translate( - 'kbn.management.editIndexPattern.source.table.filterDescription', + 'indexPatternManagement.editIndexPattern.source.table.filterDescription', { defaultMessage: 'Filter name' } ); -const matchesHeader = i18n.translate('kbn.management.editIndexPattern.source.table.matchesHeader', { - defaultMessage: 'Matches', -}); +const matchesHeader = i18n.translate( + 'indexPatternManagement.editIndexPattern.source.table.matchesHeader', + { + defaultMessage: 'Matches', + } +); const matchesDescription = i18n.translate( - 'kbn.management.editIndexPattern.source.table.matchesDescription', + 'indexPatternManagement.editIndexPattern.source.table.matchesDescription', { defaultMessage: 'Language used for the field' } ); -const editAria = i18n.translate('kbn.management.editIndexPattern.source.table.editAria', { +const editAria = i18n.translate('indexPatternManagement.editIndexPattern.source.table.editAria', { defaultMessage: 'Edit', }); -const saveAria = i18n.translate('kbn.management.editIndexPattern.source.table.saveAria', { +const saveAria = i18n.translate('indexPatternManagement.editIndexPattern.source.table.saveAria', { defaultMessage: 'Save', }); -const deleteAria = i18n.translate('kbn.management.editIndexPattern.source.table.deleteAria', { - defaultMessage: 'Delete', -}); +const deleteAria = i18n.translate( + 'indexPatternManagement.editIndexPattern.source.table.deleteAria', + { + defaultMessage: 'Delete', + } +); -const cancelAria = i18n.translate('kbn.management.editIndexPattern.source.table.cancelAria', { - defaultMessage: 'Cancel', -}); +const cancelAria = i18n.translate( + 'indexPatternManagement.editIndexPattern.source.table.cancelAria', + { + defaultMessage: 'Cancel', + } +); export interface TableProps { indexPattern: IIndexPattern; @@ -161,7 +173,7 @@ export class Table extends Component { return ( diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx index 1860541d78f81..c48b6eb02c61b 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx @@ -49,12 +49,15 @@ interface TabsProps extends Pick { }; } -const filterAriaLabel = i18n.translate('kbn.management.editIndexPattern.fields.filterAria', { - defaultMessage: 'Filter', -}); +const filterAriaLabel = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.filterAria', + { + defaultMessage: 'Filter', + } +); const filterPlaceholder = i18n.translate( - 'kbn.management.editIndexPattern.fields.filterPlaceholder', + 'indexPatternManagement.editIndexPattern.fields.filterPlaceholder', { defaultMessage: 'Filter', } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts index 76e30ded20819..8cf7009510288 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/utils.ts @@ -56,17 +56,17 @@ function getTitle(type: string, filteredCount: Dictionary, totalCount: D let title = ''; switch (type) { case 'indexed': - title = i18n.translate('kbn.management.editIndexPattern.tabs.fieldsHeader', { + title = i18n.translate('indexPatternManagement.editIndexPattern.tabs.fieldsHeader', { defaultMessage: 'Fields', }); break; case 'scripted': - title = i18n.translate('kbn.management.editIndexPattern.tabs.scriptedHeader', { + title = i18n.translate('indexPatternManagement.editIndexPattern.tabs.scriptedHeader', { defaultMessage: 'Scripted fields', }); break; case 'sourceFilters': - title = i18n.translate('kbn.management.editIndexPattern.tabs.sourceHeader', { + title = i18n.translate('indexPatternManagement.editIndexPattern.tabs.sourceHeader', { defaultMessage: 'Source filters', }); break; @@ -117,13 +117,19 @@ export function getPath(field: IndexPatternField) { return `${field.indexPattern?.id}/field/${field.name}`; } -const allTypesDropDown = i18n.translate('kbn.management.editIndexPattern.fields.allTypesDropDown', { - defaultMessage: 'All field types', -}); +const allTypesDropDown = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.allTypesDropDown', + { + defaultMessage: 'All field types', + } +); -const allLangsDropDown = i18n.translate('kbn.management.editIndexPattern.fields.allLangsDropDown', { - defaultMessage: 'All languages', -}); +const allLangsDropDown = i18n.translate( + 'indexPatternManagement.editIndexPattern.fields.allLangsDropDown', + { + defaultMessage: 'All languages', + } +); export function convertToEuiSelectOption(options: string[], type: string) { const euiOptions = diff --git a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap index dc11bdfefa46b..be5a76b873887 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -6,7 +6,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = `

@@ -127,14 +127,14 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` helpText={ } label={ } @@ -168,7 +168,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` error={ } @@ -188,7 +188,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` @@ -205,7 +205,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` > @@ -224,7 +224,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` > @@ -238,7 +238,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` > @@ -258,7 +258,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = `

} label={ } @@ -435,7 +435,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` @@ -452,7 +452,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` > @@ -471,7 +471,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` > @@ -485,7 +485,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` > @@ -503,7 +503,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` > @@ -525,7 +525,7 @@ exports[`FieldEditor should show conflict field warning 1`] = `

@@ -602,10 +602,10 @@ exports[`FieldEditor should show conflict field warning 1`] = ` size="s" type="alert" /> -   + @@ -614,7 +614,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` "mappingConflict": , @@ -690,14 +690,14 @@ exports[`FieldEditor should show conflict field warning 1`] = ` helpText={ } label={ } @@ -731,7 +731,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` error={ } @@ -751,7 +751,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` @@ -768,7 +768,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` > @@ -787,7 +787,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` > @@ -801,7 +801,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` > @@ -821,7 +821,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = `

-   + -   + @@ -925,7 +925,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` > , @@ -1032,14 +1032,14 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` helpText={ } label={ } @@ -1088,7 +1088,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` @@ -1105,7 +1105,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` > @@ -1124,7 +1124,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` > @@ -1138,7 +1138,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` > @@ -1156,7 +1156,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` > @@ -1178,7 +1178,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai

@@ -1255,10 +1255,10 @@ exports[`FieldEditor should show multiple type field warning with a table contai size="s" type="alert" /> -   + @@ -1267,7 +1267,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai "mappingConflict": , @@ -1350,14 +1350,14 @@ exports[`FieldEditor should show multiple type field warning with a table contai title={ } > @@ -1399,14 +1399,14 @@ exports[`FieldEditor should show multiple type field warning with a table contai helpText={ } label={ } @@ -1440,7 +1440,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai error={ } @@ -1460,7 +1460,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai @@ -1477,7 +1477,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai > @@ -1496,7 +1496,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai > @@ -1510,7 +1510,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai > diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap index bf1682faf9a9d..cccedfabc89b3 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/bytes/__snapshots__/bytes.test.tsx.snap @@ -16,10 +16,10 @@ exports[`BytesFormatEditor should render normally 1`] = ` > -   + @@ -30,7 +30,7 @@ exports[`BytesFormatEditor should render normally 1`] = ` label={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap index e93c3c0661c16..c66e7789aa511 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/__snapshots__/color.test.tsx.snap @@ -9,7 +9,7 @@ exports[`ColorFormatEditor should render multiple colors 1`] = ` "field": "regex", "name": , "render": [Function], @@ -18,7 +18,7 @@ exports[`ColorFormatEditor should render multiple colors 1`] = ` "field": "text", "name": , "render": [Function], @@ -27,7 +27,7 @@ exports[`ColorFormatEditor should render multiple colors 1`] = ` "field": "background", "name": , "render": [Function], @@ -35,7 +35,7 @@ exports[`ColorFormatEditor should render multiple colors 1`] = ` Object { "name": , "render": [Function], @@ -89,7 +89,7 @@ exports[`ColorFormatEditor should render multiple colors 1`] = ` > @@ -108,7 +108,7 @@ exports[`ColorFormatEditor should render other type normally (range field) 1`] = "field": "range", "name": , "render": [Function], @@ -117,7 +117,7 @@ exports[`ColorFormatEditor should render other type normally (range field) 1`] = "field": "text", "name": , "render": [Function], @@ -126,7 +126,7 @@ exports[`ColorFormatEditor should render other type normally (range field) 1`] = "field": "background", "name": , "render": [Function], @@ -134,7 +134,7 @@ exports[`ColorFormatEditor should render other type normally (range field) 1`] = Object { "name": , "render": [Function], @@ -181,7 +181,7 @@ exports[`ColorFormatEditor should render other type normally (range field) 1`] = > @@ -200,7 +200,7 @@ exports[`ColorFormatEditor should render string type normally (regex field) 1`] "field": "regex", "name": , "render": [Function], @@ -209,7 +209,7 @@ exports[`ColorFormatEditor should render string type normally (regex field) 1`] "field": "text", "name": , "render": [Function], @@ -218,7 +218,7 @@ exports[`ColorFormatEditor should render string type normally (regex field) 1`] "field": "background", "name": , "render": [Function], @@ -226,7 +226,7 @@ exports[`ColorFormatEditor should render string type normally (regex field) 1`] Object { "name": , "render": [Function], @@ -273,7 +273,7 @@ exports[`ColorFormatEditor should render string type normally (regex field) 1`] > diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx index 15f0c2c145bdf..ba3e114800600 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.tsx @@ -97,7 +97,7 @@ export class ColorFormatEditor extends DefaultFormatEditor ), @@ -121,7 +121,7 @@ export class ColorFormatEditor extends DefaultFormatEditor ), @@ -145,7 +145,7 @@ export class ColorFormatEditor extends DefaultFormatEditor ), @@ -169,7 +169,7 @@ export class ColorFormatEditor extends DefaultFormatEditor ), @@ -192,7 +192,7 @@ export class ColorFormatEditor extends DefaultFormatEditor ), @@ -211,15 +211,15 @@ export class ColorFormatEditor extends DefaultFormatEditor { @@ -240,7 +240,7 @@ export class ColorFormatEditor extends DefaultFormatEditor diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap index 2d73f775e316c..4ce76126d6736 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap @@ -16,10 +16,10 @@ exports[`DateFormatEditor should render normally 1`] = ` > -   + @@ -30,7 +30,7 @@ exports[`DateFormatEditor should render normally 1`] = ` label={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx index 8bbb379f5df5d..55860707a3ee9 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/date.tsx @@ -56,7 +56,7 @@ export class DateFormatEditor extends DefaultFormatEditor{defaultPattern}, @@ -69,7 +69,7 @@ export class DateFormatEditor extends DefaultFormatEditor   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap index 1456deaa13e47..a2e6ea6b84a85 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap @@ -16,10 +16,10 @@ exports[`DateFormatEditor should render normally 1`] = ` > -   + @@ -30,7 +30,7 @@ exports[`DateFormatEditor should render normally 1`] = ` label={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx index bfce3c973a1fa..25152370ac928 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.tsx @@ -51,7 +51,7 @@ export class DateNanosFormatEditor extends DefaultFormatEditor{defaultPattern}, @@ -64,7 +64,7 @@ export class DateNanosFormatEditor extends DefaultFormatEditor   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx index 577e420691585..be174cb75f89c 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/default/default.tsx @@ -41,7 +41,7 @@ export const convertSampleInput = ( }; }); } catch (e) { - error = i18n.translate('common.ui.fieldEditor.defaultErrorMessage', { + error = i18n.translate('indexPatternManagement.defaultErrorMessage', { defaultMessage: 'An error occurred while trying to use this format configuration: {message}', values: { message: e.message }, }); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap index dbebd324b16b6..b606e60949af5 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/__snapshots__/duration.test.tsx.snap @@ -12,7 +12,7 @@ exports[`DurationFormatEditor should render human readable output normally 1`] = label={ } @@ -42,7 +42,7 @@ exports[`DurationFormatEditor should render human readable output normally 1`] = label={ } @@ -124,7 +124,7 @@ exports[`DurationFormatEditor should render non-human readable output normally 1 label={ } @@ -154,7 +154,7 @@ exports[`DurationFormatEditor should render non-human readable output normally 1 label={ } @@ -189,7 +189,7 @@ exports[`DurationFormatEditor should render non-human readable output normally 1 label={ } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx index aed3264bad440..cdda56b4f1f51 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.tsx @@ -75,7 +75,7 @@ export class DurationFormatEditor extends DefaultFormatEditor< !(nextProps.format as DurationFormat).isHuman() && nextProps.formatParams.outputPrecision > 20 ) { - error = i18n.translate('common.ui.fieldEditor.durationErrorMessage', { + error = i18n.translate('indexPatternManagement.durationErrorMessage', { defaultMessage: 'Decimal places must be between 0 and 20', }); nextProps.onError(error); @@ -101,7 +101,7 @@ export class DurationFormatEditor extends DefaultFormatEditor< } @@ -125,7 +125,7 @@ export class DurationFormatEditor extends DefaultFormatEditor< } @@ -149,7 +149,7 @@ export class DurationFormatEditor extends DefaultFormatEditor< } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap index cf04dd19428e5..52acd4c53c9d2 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap @@ -16,10 +16,10 @@ exports[`NumberFormatEditor should render normally 1`] = ` > -   + @@ -30,7 +30,7 @@ exports[`NumberFormatEditor should render normally 1`] = ` label={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx index 9279eef7aedeb..05771afdd33e2 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/number.tsx @@ -47,7 +47,7 @@ export class NumberFormatEditor extends DefaultFormatEditor{defaultPattern} }} /> @@ -56,7 +56,7 @@ export class NumberFormatEditor extends DefaultFormatEditor   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap index 0784a3f5e407d..984a98d6a8cff 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap @@ -16,10 +16,10 @@ exports[`PercentFormatEditor should render normally 1`] = ` > -   + @@ -30,7 +30,7 @@ exports[`PercentFormatEditor should render normally 1`] = ` label={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap index 2e3c801881f51..46267b0c3c0e9 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.tsx.snap @@ -9,7 +9,7 @@ exports[`StaticLookupFormatEditor should render multiple lookup entries and unkn "field": "key", "name": , "render": [Function], @@ -18,7 +18,7 @@ exports[`StaticLookupFormatEditor should render multiple lookup entries and unkn "field": "value", "name": , "render": [Function], @@ -73,7 +73,7 @@ exports[`StaticLookupFormatEditor should render multiple lookup entries and unkn > @@ -89,7 +89,7 @@ exports[`StaticLookupFormatEditor should render multiple lookup entries and unkn label={ } @@ -116,7 +116,7 @@ exports[`StaticLookupFormatEditor should render normally 1`] = ` "field": "key", "name": , "render": [Function], @@ -125,7 +125,7 @@ exports[`StaticLookupFormatEditor should render normally 1`] = ` "field": "value", "name": , "render": [Function], @@ -174,7 +174,7 @@ exports[`StaticLookupFormatEditor should render normally 1`] = ` > @@ -190,7 +190,7 @@ exports[`StaticLookupFormatEditor should render normally 1`] = ` label={ } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx index f998e271b6c99..fbbbb22e3d18f 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.tsx @@ -84,7 +84,10 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< { field: 'key', name: ( - + ), render: (value: number, item: StaticLookupItem) => { return ( @@ -106,7 +109,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< field: 'value', name: ( ), @@ -128,15 +131,15 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< }, { field: 'actions', - name: i18n.translate('common.ui.fieldEditor.staticLookup.actions', { + name: i18n.translate('indexPatternManagement.staticLookup.actions', { defaultMessage: 'actions', }), actions: [ { - name: i18n.translate('common.ui.fieldEditor.staticLookup.deleteAria', { + name: i18n.translate('indexPatternManagement.staticLookup.deleteAria', { defaultMessage: 'Delete', }), - description: i18n.translate('common.ui.fieldEditor.staticLookup.deleteTitle', { + description: i18n.translate('indexPatternManagement.staticLookup.deleteTitle', { defaultMessage: 'Delete entry', }), onClick: (item: StaticLookupItem) => { @@ -158,7 +161,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< @@ -166,7 +169,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< } @@ -174,7 +177,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor< } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx index f13fe44ee4280..d1befb77bae64 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/string/string.tsx @@ -58,7 +58,7 @@ export class StringFormatEditor extends DefaultFormatEditor } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap index f646d5b4afca8..2d1ee496d2786 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/__snapshots__/truncate.test.tsx.snap @@ -12,7 +12,7 @@ exports[`TruncateFormatEditor should render normally 1`] = ` label={ } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx index 9fd44c5f9655d..9b4d5a0f033a9 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/truncate/truncate.tsx @@ -48,7 +48,7 @@ export class TruncateFormatEditor extends DefaultFormatEditor } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap index cba8e85a65249..da3675b0b6dde 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap @@ -16,14 +16,14 @@ exports[`LabelTemplateFlyout should render normally 1`] = `

@@ -38,10 +38,10 @@ exports[`LabelTemplateFlyout should render normally 1`] = ` value - —  + — @@ -49,10 +49,10 @@ exports[`LabelTemplateFlyout should render normally 1`] = ` url - —  + — @@ -60,7 +60,7 @@ exports[`LabelTemplateFlyout should render normally 1`] = `

diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap index a3418077ad258..aa69b8da6cf60 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap @@ -19,7 +19,7 @@ exports[`UrlFormatEditor should render label template help 1`] = ` label={ } @@ -58,7 +58,7 @@ exports[`UrlFormatEditor should render label template help 1`] = ` > @@ -67,7 +67,7 @@ exports[`UrlFormatEditor should render label template help 1`] = ` label={ } @@ -91,7 +91,7 @@ exports[`UrlFormatEditor should render label template help 1`] = ` > @@ -100,7 +100,7 @@ exports[`UrlFormatEditor should render label template help 1`] = ` label={ } @@ -138,7 +138,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` label={ } @@ -177,7 +177,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` > @@ -186,7 +186,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` label={ } @@ -210,7 +210,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` > @@ -219,7 +219,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` label={ } @@ -257,7 +257,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` label={ } @@ -296,7 +296,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` > @@ -305,7 +305,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` label={ } @@ -329,7 +329,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` > @@ -338,7 +338,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` label={ } @@ -376,7 +376,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` label={ } @@ -416,7 +416,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` > @@ -425,7 +425,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` label={ } @@ -449,7 +449,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` > @@ -458,7 +458,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` label={ } @@ -479,7 +479,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` label={ } @@ -500,7 +500,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = ` label={ } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap index 849e307f7b527..931c0d98b1af9 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/url_template_flyout.test.tsx.snap @@ -16,14 +16,14 @@ exports[`UrlTemplateFlyout should render normally 1`] = `

@@ -32,7 +32,7 @@ exports[`UrlTemplateFlyout should render normally 1`] = ` "strongUrlTemplate": , @@ -45,10 +45,10 @@ exports[`UrlTemplateFlyout should render normally 1`] = ` value - —  + — @@ -56,10 +56,10 @@ exports[`UrlTemplateFlyout should render normally 1`] = ` rawValue - —  + — @@ -67,7 +67,7 @@ exports[`UrlTemplateFlyout should render normally 1`] = `

diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx index 1ce7bec579e16..d04ee58f26b0a 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/label_template_flyout.tsx @@ -35,13 +35,13 @@ const items: LabelTemplateExampleItem[] = [ { input: 1234, urlTemplate: 'http://company.net/profiles?user_id={{value}}', - labelTemplate: i18n.translate('common.ui.fieldEditor.labelTemplate.example.idLabel', { + labelTemplate: i18n.translate('indexPatternManagement.labelTemplate.example.idLabel', { defaultMessage: 'User #{value}', values: { value: '{{value}}' }, }), output: '' + - i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.idLabel', { + i18n.translate('indexPatternManagement.labelTemplate.example.output.idLabel', { defaultMessage: 'User', }) + ' #1234', @@ -49,12 +49,12 @@ const items: LabelTemplateExampleItem[] = [ { input: '/assets/main.css', urlTemplate: 'http://site.com{{rawValue}}', - labelTemplate: i18n.translate('common.ui.fieldEditor.labelTemplate.example.pathLabel', { + labelTemplate: i18n.translate('indexPatternManagement.labelTemplate.example.pathLabel', { defaultMessage: 'View Asset', }), output: '' + - i18n.translate('common.ui.fieldEditor.labelTemplate.example.output.pathLabel', { + i18n.translate('indexPatternManagement.labelTemplate.example.output.pathLabel', { defaultMessage: 'View Asset', }) + '', @@ -68,13 +68,13 @@ export const LabelTemplateFlyout = ({ isVisible = false, onClose = () => {} }) =

{} }) =

  • value — 
  • url — 
  • @@ -108,26 +108,26 @@ export const LabelTemplateFlyout = ({ isVisible = false, onClose = () => {} }) = columns={[ { field: 'input', - name: i18n.translate('common.ui.fieldEditor.labelTemplate.inputHeader', { + name: i18n.translate('indexPatternManagement.labelTemplate.inputHeader', { defaultMessage: 'Input', }), width: '160px', }, { field: 'urlTemplate', - name: i18n.translate('common.ui.fieldEditor.labelTemplate.urlHeader', { + name: i18n.translate('indexPatternManagement.labelTemplate.urlHeader', { defaultMessage: 'URL Template', }), }, { field: 'labelTemplate', - name: i18n.translate('common.ui.fieldEditor.labelTemplate.labelHeader', { + name: i18n.translate('indexPatternManagement.labelTemplate.labelHeader', { defaultMessage: 'Label Template', }), }, { field: 'output', - name: i18n.translate('common.ui.fieldEditor.labelTemplate.outputHeader', { + name: i18n.translate('indexPatternManagement.labelTemplate.outputHeader', { defaultMessage: 'Output', }), render: (value: LabelTemplateExampleItem['output']) => { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx index 73a130d442eb0..d228d156246fb 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url.tsx @@ -146,7 +146,7 @@ export class UrlFormatEditor extends DefaultFormatEditor< + } > + } > + } > } @@ -220,9 +220,9 @@ export class UrlFormatEditor extends DefaultFormatEditor< + ) : ( - + ) } checked={!formatParams.openLinkInCurrentTab} @@ -236,14 +236,14 @@ export class UrlFormatEditor extends DefaultFormatEditor< } helpText={ @@ -263,14 +263,14 @@ export class UrlFormatEditor extends DefaultFormatEditor< } helpText={ diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx index 8194bb731ad14..c1b144b0d9eac 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/url_template_flyout.tsx @@ -31,13 +31,13 @@ export const UrlTemplateFlyout = ({ isVisible = false, onClose = () => {} }) =>

    {} }) => strongUrlTemplate: ( @@ -58,21 +58,21 @@ export const UrlTemplateFlyout = ({ isVisible = false, onClose = () => {} }) =>

  • value — 
  • rawValue — 
  • @@ -97,20 +97,20 @@ export const UrlTemplateFlyout = ({ isVisible = false, onClose = () => {} }) => columns={[ { field: 'input', - name: i18n.translate('common.ui.fieldEditor.urlTemplate.inputHeader', { + name: i18n.translate('indexPatternManagement.urlTemplate.inputHeader', { defaultMessage: 'Input', }), width: '160px', }, { field: 'template', - name: i18n.translate('common.ui.fieldEditor.urlTemplate.templateHeader', { + name: i18n.translate('indexPatternManagement.urlTemplate.templateHeader', { defaultMessage: 'Template', }), }, { field: 'output', - name: i18n.translate('common.ui.fieldEditor.urlTemplate.outputHeader', { + name: i18n.translate('indexPatternManagement.urlTemplate.outputHeader', { defaultMessage: 'Output', }), }, diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap index 2883ffb6bc8a1..ce8c9e70433c8 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.tsx.snap @@ -10,7 +10,7 @@ exports[`FormatEditorSamples should render normally 1`] = ` label={ } diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx index d63674bf4d205..8fba45e9250d8 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx @@ -41,7 +41,7 @@ export class FormatEditorSamples extends PureComponent const columns = [ { field: 'input', - name: i18n.translate('common.ui.fieldEditor.samples.inputHeader', { + name: i18n.translate('indexPatternManagement.samples.inputHeader', { defaultMessage: 'Input', }), render: (input: {} | string) => { @@ -50,7 +50,7 @@ export class FormatEditorSamples extends PureComponent }, { field: 'output', - name: i18n.translate('common.ui.fieldEditor.samples.outputHeader', { + name: i18n.translate('indexPatternManagement.samples.outputHeader', { defaultMessage: 'Output', }), render: (output: string) => { @@ -72,7 +72,7 @@ export class FormatEditorSamples extends PureComponent return samples.length ? ( + } > diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap index 87e1341b47355..648f68edcbb10 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/disabled_call_out.test.tsx.snap @@ -9,7 +9,7 @@ exports[`ScriptingDisabledCallOut should render normally 1`] = ` } @@ -17,7 +17,7 @@ exports[`ScriptingDisabledCallOut should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap index b331c1e38eb34..2a9d36fb7ac40 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap @@ -8,7 +8,7 @@ exports[`ScriptingWarningCallOut should render normally 1`] = ` title={ } @@ -16,7 +16,7 @@ exports[`ScriptingWarningCallOut should render normally 1`] = `

    -   + @@ -37,10 +37,10 @@ exports[`ScriptingWarningCallOut should render normally 1`] = ` > -   + @@ -52,7 +52,7 @@ exports[`ScriptingWarningCallOut should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx index 9abca813fe434..0bfec7a54a662 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/disabled_call_out.tsx @@ -29,7 +29,7 @@ export const ScriptingDisabledCallOut = ({ isVisible = false }) => { @@ -39,7 +39,7 @@ export const ScriptingDisabledCallOut = ({ isVisible = false }) => { >

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx index 7dac6681fa1ea..fed756f11f08b 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.tsx @@ -38,7 +38,7 @@ export const ScriptingWarningCallOut = ({ } @@ -47,13 +47,13 @@ export const ScriptingWarningCallOut = ({ >

      @@ -63,7 +63,7 @@ export const ScriptingWarningCallOut = ({ scriptsInAggregation: (   @@ -75,7 +75,7 @@ export const ScriptingWarningCallOut = ({

    - +

    {' '} @@ -56,21 +56,21 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps

      @@ -80,7 +80,7 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps syntax: (   @@ -92,21 +92,21 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps

      @@ -118,26 +118,26 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps

    • @@ -145,21 +145,21 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps

    • + - * / % }} />
    • | & ^ ~ << >> >>>, @@ -168,28 +168,28 @@ export const ScriptingSyntax = ({ docLinksScriptedFields }: ScriptingSyntaxProps
    • && || ! ?: }} />
    • < <= == >= > }} />
    • abs ceil exp floor ln log10 logn max min sqrt pow }} />
    • haversin }} />
    • min, max }} /> diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx index ac31519ecb242..9ec9dcde2e7b1 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx @@ -141,7 +141,7 @@ export class TestScript extends Component { if (previewData.error) { return ( {

      @@ -217,13 +217,13 @@ export class TestScript extends Component { return ( { data-test-subj="runScriptButton" > @@ -269,13 +269,13 @@ export class TestScript extends Component {

        @@ -319,7 +316,7 @@ export class FieldEditor extends PureComponent   @@ -402,7 +399,7 @@ export class FieldEditor extends PureComponent } size="s" > @@ -482,14 +479,14 @@ export class FieldEditor extends PureComponent{defaultFormat}, }} /> ) : ( - + ); return ( @@ -498,7 +495,7 @@ export class FieldEditor extends PureComponent @@ -535,7 +532,7 @@ export class FieldEditor extends PureComponent ) : ( ); @@ -580,7 +577,7 @@ export class FieldEditor extends PureComponent @@ -598,7 +595,7 @@ export class FieldEditor extends PureComponent {`doc['some_field'].value`} }} /> @@ -606,7 +603,7 @@ export class FieldEditor extends PureComponent @@ -634,7 +631,7 @@ export class FieldEditor extends PureComponent

      {isCreating ? ( ) : ( )} @@ -714,7 +711,7 @@ export class FieldEditor extends PureComponent @@ -725,7 +722,7 @@ export class FieldEditor extends PureComponent @@ -777,7 +774,7 @@ export class FieldEditor extends PureComponent { - const message = i18n.translate('common.ui.fieldEditor.deleteField.deletedHeader', { + const message = i18n.translate('indexPatternManagement.deleteField.deletedHeader', { defaultMessage: "Deleted '{fieldName}'", values: { fieldName: field.name }, }); @@ -832,7 +829,7 @@ export class FieldEditor extends PureComponent { - const message = i18n.translate('common.ui.fieldEditor.deleteField.savedHeader', { + const message = i18n.translate('indexPatternManagement.deleteField.savedHeader', { defaultMessage: "Saved '{fieldName}'", values: { fieldName: field.name }, }); @@ -866,12 +863,12 @@ export class FieldEditor extends PureComponent {isCreating ? ( ) : ( diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index 5d45756e1cb0e..f9ea61f87f67a 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -87,7 +87,7 @@ const search = { }, }; -const ariaRegion = i18n.translate('kbn.management.editIndexPatternLiveRegionAriaLabel', { +const ariaRegion = i18n.translate('indexPatternManagement.editIndexPatternLiveRegionAriaLabel', { defaultMessage: 'Index patterns', }); @@ -116,7 +116,7 @@ export const IndexPatternTable = ({ const createButton = canSave ? ( @@ -139,7 +139,7 @@ export const IndexPatternTable = ({

      diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index d4ca90e22ef2e..859a7a616bfef 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -35,16 +35,16 @@ import { } from '../components'; import { IndexPatternManagementStartDependencies, IndexPatternManagementStart } from '../plugin'; -const appTitle = i18n.translate('indexPatternManagement.appLabel', { - defaultMessage: 'Index pattern management', +const appTitle = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', { + defaultMessage: 'Index Patterns', }); const crumb = [{ text: appTitle }]; const readOnlyBadge = { - text: i18n.translate('kbn.management.indexPatterns.badge.readOnly.text', { + text: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.text', { defaultMessage: 'Read only', }), - tooltip: i18n.translate('kbn.management.indexPatterns.badge.readOnly.tooltip', { + tooltip: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.tooltip', { defaultMessage: 'Unable to save index patterns', }), iconType: 'glasses', diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index 7aac4543df166..5232b178e18f7 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -40,7 +40,7 @@ export type IndexPatternManagementSetup = IndexPatternManagementServiceSetup; export type IndexPatternManagementStart = IndexPatternManagementServiceStart; -const title = i18n.translate('indexPatternManagement.appLabel', { +const title = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', { defaultMessage: 'Index Patterns', }); diff --git a/src/plugins/index_pattern_management/public/scripting_languages/index.ts b/src/plugins/index_pattern_management/public/scripting_languages/index.ts index a5efb52aad173..eb793f7fc91f7 100644 --- a/src/plugins/index_pattern_management/public/scripting_languages/index.ts +++ b/src/plugins/index_pattern_management/public/scripting_languages/index.ts @@ -18,7 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { HttpStart } from 'src/core/public'; +import { HttpStart, NotificationsStart } from 'src/core/public'; // import { toastNotifications } from '../notify'; export function getSupportedScriptingLanguages(): string[] { @@ -29,15 +29,16 @@ export function getDeprecatedScriptingLanguages(): string[] { return []; } -export const getEnabledScriptingLanguages = (http: HttpStart) => +export const getEnabledScriptingLanguages = ( + http: HttpStart, + toasts: NotificationsStart['toasts'] +) => http.get('/api/kibana/scripts/languages').catch(() => { - /* - todo - toastNotifications.addDanger( - i18n.translate('common.ui.scriptingLanguages.errorFetchingToastDescription', { + toasts.addDanger( + i18n.translate('indexPatternManagement.scriptingLanguages.errorFetchingToastDescription', { defaultMessage: 'Error getting available scripting languages from Elasticsearch', }) ); - */ + return []; }); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index d1270ea92c51e..5fb2c6b946394 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -148,139 +148,139 @@ "common.ui.errorUrlOverflow.howTofixError.removeStuffFromDashboardText": "ダッシュボードからいくつか項目を取り除きましょう。これにより URL が短くなり、IE の動作が改善されます。", "common.ui.errorUrlOverflow.howTofixErrorDescription": "これは大抵大規模で複雑なダッシュボードで起こるため、いくつかのオプションがあります。", "common.ui.errorUrlOverflow.howTofixErrorTitle": "どうすれば良いのでしょう?", - "common.ui.fieldEditor.actions.cancelButton": "キャンセル", - "common.ui.fieldEditor.actions.createButton": "フィールドを作成", - "common.ui.fieldEditor.actions.deleteButton": "削除", - "common.ui.fieldEditor.actions.saveButton": "フィールドを保存", - "common.ui.fieldEditor.color.addColorButton": "色を追加", - "common.ui.fieldEditor.color.backgroundLabel": "背景色", - "common.ui.fieldEditor.color.deleteAria": "削除", - "common.ui.fieldEditor.color.deleteTitle": "色のフォーマットを削除", - "common.ui.fieldEditor.color.exampleLabel": "例", - "common.ui.fieldEditor.color.patternLabel": "パターン (正規表現)", - "common.ui.fieldEditor.color.rangeLabel": "範囲 (min:max)", - "common.ui.fieldEditor.color.textColorLabel": "文字の色", - "common.ui.fieldEditor.createHeader": "スクリプトフィールドを作成", - "common.ui.fieldEditor.date.documentationLabel": "ドキュメント", - "common.ui.fieldEditor.date.momentLabel": "Moment.js のフォーマットパターン (デフォルト: {defaultPattern})", - "common.ui.fieldEditor.defaultErrorMessage": "このフォーマット構成の使用を試みた際にエラーが発生しました: {message}", - "common.ui.fieldEditor.defaultFormatDropDown": "- デフォルト -", - "common.ui.fieldEditor.defaultFormatHeader": "フォーマット (デフォルト: {defaultFormat})", - "common.ui.fieldEditor.deleteField.cancelButton": "キャンセル", - "common.ui.fieldEditor.deleteField.deleteButton": "削除", - "common.ui.fieldEditor.deleteField.deletedHeader": "「{fieldName}」が削除されました", - "common.ui.fieldEditor.deleteField.savedHeader": "「{fieldName}」が保存されました", - "common.ui.fieldEditor.deleteFieldHeader": "フィールド「{fieldName}」を削除", - "common.ui.fieldEditor.deleteFieldLabel": "削除されたフィールドは復元できません。{separator}続行してよろしいですか?", - "common.ui.fieldEditor.disabledCallOutHeader": "スクリプティングが無効です", - "common.ui.fieldEditor.disabledCallOutLabel": "Elasticsearch でのすべてのインラインスクリプティングが無効になっています。Kibana でスクリプトフィールドを使用するには、インラインスクリプティングを有効にする必要があります。", - "common.ui.fieldEditor.duration.decimalPlacesLabel": "小数部分の桁数", - "common.ui.fieldEditor.duration.inputFormatLabel": "インプット形式", - "common.ui.fieldEditor.duration.outputFormatLabel": "アウトプット形式", - "common.ui.fieldEditor.durationErrorMessage": "小数部分の桁数は 0 から 20 までの間で指定する必要があります", - "common.ui.fieldEditor.editHeader": "{fieldName} を編集", - "common.ui.fieldEditor.fieldTypeConflict": "フィールドタイプの矛盾", - "common.ui.fieldEditor.formatHeader": "フォーマット", - "common.ui.fieldEditor.formatLabel": "フォーマットは、特定の値の表示形式を管理できます。また、値を完全に変更したり、ディスカバリでのハイライト機能を無効にしたりすることも可能です。", - "common.ui.fieldEditor.indexNameLabel": "インデックス名", - "common.ui.fieldEditor.labelTemplate.example.idLabel": "ユーザー #{value}", - "common.ui.fieldEditor.labelTemplate.example.output.idLabel": "ユーザー", - "common.ui.fieldEditor.labelTemplate.example.output.pathLabel": "アセットを表示", - "common.ui.fieldEditor.labelTemplate.example.pathLabel": "アセットを表示", - "common.ui.fieldEditor.labelTemplate.examplesHeader": "例", - "common.ui.fieldEditor.labelTemplate.inputHeader": "インプット", - "common.ui.fieldEditor.labelTemplate.labelHeader": "ラベルテンプレート", - "common.ui.fieldEditor.labelTemplate.outputHeader": "アウトプット", - "common.ui.fieldEditor.labelTemplate.urlHeader": "URL テンプレート", - "common.ui.fieldEditor.labelTemplate.urlLabel": "フォーマット済み URL", - "common.ui.fieldEditor.labelTemplate.valueLabel": "フィールド値", - "common.ui.fieldEditor.labelTemplateHeader": "ラベルテンプレート", - "common.ui.fieldEditor.labelTemplateLabel": "このフィールドの URL が長い場合、URL のテキストバージョン用の代替テンプレートを使用すると良いかもしれません。URL の代わりに表示されますが、URL にリンクされます。このフォーマットは、値の投入に二重中括弧の表記 {doubleCurlyBraces} を使用する文字列です。次の値にアクセスできます。", - "common.ui.fieldEditor.languageLabel": "言語", - "common.ui.fieldEditor.mappingConflictLabel.mappingConflictDetail": "{mappingConflict} 既に「{fieldName}」という名前のフィールドが存在します。スクリプトフィールドに同じ名前を付けると、同時に両方のフィールドにクエリが実行できなくなります。", - "common.ui.fieldEditor.mappingConflictLabel.mappingConflictLabel": "マッピングの矛盾:", - "common.ui.fieldEditor.multiTypeLabelDesc": "フィールドのタイプがインデックスごとに変わります。多くの分析機能には使用できません。タイプごとのインデックスは次の通りです:", - "common.ui.fieldEditor.nameErrorMessage": "名前が必要です", - "common.ui.fieldEditor.nameLabel": "名前", - "common.ui.fieldEditor.namePlaceholder": "新規スクリプトフィールド", - "common.ui.fieldEditor.number.documentationLabel": "ドキュメント", - "common.ui.fieldEditor.number.numeralLabel": "Numeral.js のフォーマットパターン (デフォルト: {defaultPattern})", - "common.ui.fieldEditor.popularityLabel": "利用頻度", - "common.ui.fieldEditor.samples.inputHeader": "インプット", - "common.ui.fieldEditor.samples.outputHeader": "アウトプット", - "common.ui.fieldEditor.samplesHeader": "サンプル", - "common.ui.fieldEditor.script.accessWithLabel": "{code} でフィールドにアクセスします。", - "common.ui.fieldEditor.script.getHelpLabel": "構文のヒントを得たり、スクリプトの結果をプレビューしたりできます。", - "common.ui.fieldEditor.scriptInvalidErrorMessage": "スクリプトが無効です。スクリプトのプレビューで詳細を確認", - "common.ui.fieldEditor.scriptLabel": "スクリプト", - "common.ui.fieldEditor.scriptRequiredErrorMessage": "スクリプトが必要です", - "common.ui.fieldEditor.staticLookup.addEntryButton": "エントリーを追加", - "common.ui.fieldEditor.staticLookup.deleteAria": "削除", - "common.ui.fieldEditor.staticLookup.deleteTitle": "エントリーの削除", - "common.ui.fieldEditor.staticLookup.keyLabel": "キー", - "common.ui.fieldEditor.staticLookup.leaveBlankPlaceholder": "値をそのままにするには空欄にします", - "common.ui.fieldEditor.staticLookup.unknownKeyLabel": "不明なキーの値", - "common.ui.fieldEditor.staticLookup.valueLabel": "値", - "common.ui.fieldEditor.string.transformLabel": "変換", - "common.ui.fieldEditor.syntax.default.formatLabel": "doc['some_field'].値", - "common.ui.fieldEditor.syntax.defaultLabel.defaultDetail": "デフォルトで、Kibana のスクリプトフィールドは Elasticsearch での使用を目的に特別に開発されたシンプルでセキュアなスクリプト言語の {painless} を使用します。ドキュメントの値にアクセスするには次のフォーマットを使用します。", - "common.ui.fieldEditor.syntax.defaultLabel.painlessLink": "Painless", - "common.ui.fieldEditor.syntax.kibanaLabel": "Kibana は現在 Painless スクリプトに特別な制限が 1 つあります。Named 関数を含めることができません。", - "common.ui.fieldEditor.syntax.lucene.commonLabel.commonDetail": "Kibana の旧バージョンからのアップグレードですか?お馴染みの {lucene} は引き続きご利用いただけます。Lucene 表現は JavaScript と非常に似ていますが、基本的な計算、ビット処理、比較オペレーション用に開発されたものです。", - "common.ui.fieldEditor.syntax.lucene.commonLabel.luceneLink": "Lucene 表現", - "common.ui.fieldEditor.syntax.lucene.limits.fieldsLabel": "格納されたフィールドは利用できません", - "common.ui.fieldEditor.syntax.lucene.limits.sparseLabel": "フィールドがまばらな (ドキュメントの一部にしか値がない) 場合、値がないドキュメントには 0 の値が入力されます", - "common.ui.fieldEditor.syntax.lucene.limits.typesLabel": "数字、ブール、日付、、geo_point フィールドのみアクセスできます", - "common.ui.fieldEditor.syntax.lucene.limitsLabel": "Lucene 表現には次のいくつかの制限があります。", - "common.ui.fieldEditor.syntax.lucene.operations.arithmeticLabel": "算術演算子: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.bitwiseLabel": "ビット処理演算子: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.booleanLabel": "ブール演算子 (三項演算子を含む): {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.comparisonLabel": "比較演算子: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.distanceLabel": "距離関数: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.mathLabel": "一般的な関数: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.miscellaneousLabel": "その他関数: {operators}", - "common.ui.fieldEditor.syntax.lucene.operations.trigLabel": "三角ライブラリ関数: {operators}", - "common.ui.fieldEditor.syntax.lucene.operationsLabel": "Lucene 表現で利用可能なオペレーションは次の通りです。", - "common.ui.fieldEditor.syntax.painlessLabel.javaAPIsLink": "ネイティブ Java API", - "common.ui.fieldEditor.syntax.painlessLabel.painlessDetail": "Painless は非常に強力かつ使いやすい言語です。多くの {javaAPIs} にアクセスすることができます。{syntax} について読めば、すぐに習得することができます!", - "common.ui.fieldEditor.syntax.painlessLabel.syntaxLink": "構文", - "common.ui.fieldEditor.syntaxHeader": "構文", - "common.ui.fieldEditor.testScript.errorMessage": "スクリプト内にエラーがあります", - "common.ui.fieldEditor.testScript.fieldsLabel": "追加フィールド", - "common.ui.fieldEditor.testScript.fieldsPlaceholder": "選択してください…", - "common.ui.fieldEditor.testScript.instructions": "スクリプトを実行すると、最初の検索結果10件をプレビューできます。追加フィールドを選択して結果に含み、コンテクストをさらに加えたり、特定の文書上でフィルタにクエリを追加したりすることもできます。", - "common.ui.fieldEditor.testScript.resultsLabel": "最初の10件", - "common.ui.fieldEditor.testScript.resultsTitle": "結果を表示", - "common.ui.fieldEditor.testScript.submitButtonLabel": "スクリプトを実行", - "common.ui.fieldEditor.truncate.lengthLabel": "フィールドの長さ", - "common.ui.fieldEditor.typeLabel": "タイプ", - "common.ui.fieldEditor.url.heightLabel": "高さ", - "common.ui.fieldEditor.url.labelTemplateHelpText": "ラベルテンプレートのヘルプ", - "common.ui.fieldEditor.url.labelTemplateLabel": "ラベルテンプレート", - "common.ui.fieldEditor.url.offLabel": "オフ", - "common.ui.fieldEditor.url.onLabel": "オン", - "common.ui.fieldEditor.url.openTabLabel": "新規タブで開く", - "common.ui.fieldEditor.url.template.helpLinkText": "URL テンプレートのヘルプ", - "common.ui.fieldEditor.url.typeLabel": "タイプ", - "common.ui.fieldEditor.url.urlTemplateLabel": "URL テンプレート", - "common.ui.fieldEditor.url.widthLabel": "幅", - "common.ui.fieldEditor.urlTemplate.examplesHeader": "例", - "common.ui.fieldEditor.urlTemplate.inputHeader": "インプット", - "common.ui.fieldEditor.urlTemplate.outputHeader": "アウトプット", - "common.ui.fieldEditor.urlTemplate.rawValueLabel": "非エスケープ値", - "common.ui.fieldEditor.urlTemplate.templateHeader": "テンプレート", - "common.ui.fieldEditor.urlTemplate.valueLabel": "URL エスケープ値", - "common.ui.fieldEditor.urlTemplateHeader": "URL テンプレート", - "common.ui.fieldEditor.urlTemplateLabel.fieldDetail": "フィールドに URL の一部のみが含まれている場合、{strongUrlTemplate} でその値を完全な URL としてフォーマットできます。このフォーマットは、値の投入に二重中括弧の表記 {doubleCurlyBraces} を使用する文字列です。次の値にアクセスできます。", - "common.ui.fieldEditor.urlTemplateLabel.strongUrlTemplateLabel": "URL テンプレート", - "common.ui.fieldEditor.warningCallOut.descriptionLabel": "計算値の表示と集約にスクリプトフィールドが使用できます。そのため非常に遅い場合があり、適切に行わないと Kibana が使用できなくなる可能性もあります。この場合安全策はありません。入力ミスがあると、あちこちに予期せぬ例外が起こります!", - "common.ui.fieldEditor.warningCallOutHeader": "十分ご注意ください", - "common.ui.fieldEditor.warningCallOutLabel.callOutDetail": "スクリプトフィールドを使う前に、{scripFields} と {scriptsInAggregation} についてよく理解するようにしてください。", - "common.ui.fieldEditor.warningCallOutLabel.scripFieldsLink": "スクリプトフィールド", - "common.ui.fieldEditor.warningCallOutLabel.scriptsInAggregationLink": "集約におけるスクリプト", - "common.ui.fieldEditor.warningHeader": "廃止警告:", - "common.ui.fieldEditor.warningLabel.painlessLinkLabel": "Painless", - "common.ui.fieldEditor.warningLabel.warningDetail": "{language} は廃止され、Kibana と Elasticsearch の次のメジャーなバージョンではサポートされなくなります。新規スクリプトフィールドには {painlessLink} を使うことをお勧めします。", + "indexPatternManagement.actions.cancelButton": "キャンセル", + "indexPatternManagement.actions.createButton": "フィールドを作成", + "indexPatternManagement.actions.deleteButton": "削除", + "indexPatternManagement.actions.saveButton": "フィールドを保存", + "indexPatternManagement.color.addColorButton": "色を追加", + "indexPatternManagement.color.backgroundLabel": "背景色", + "indexPatternManagement.color.deleteAria": "削除", + "indexPatternManagement.color.deleteTitle": "色のフォーマットを削除", + "indexPatternManagement.color.exampleLabel": "例", + "indexPatternManagement.color.patternLabel": "パターン (正規表現)", + "indexPatternManagement.color.rangeLabel": "範囲 (min:max)", + "indexPatternManagement.color.textColorLabel": "文字の色", + "indexPatternManagement.createHeader": "スクリプトフィールドを作成", + "indexPatternManagement.date.documentationLabel": "ドキュメント", + "indexPatternManagement.date.momentLabel": "Moment.js のフォーマットパターン (デフォルト: {defaultPattern})", + "indexPatternManagement.defaultErrorMessage": "このフォーマット構成の使用を試みた際にエラーが発生しました: {message}", + "indexPatternManagement.defaultFormatDropDown": "- デフォルト -", + "indexPatternManagement.defaultFormatHeader": "フォーマット (デフォルト: {defaultFormat})", + "indexPatternManagement.deleteField.cancelButton": "キャンセル", + "indexPatternManagement.deleteField.deleteButton": "削除", + "indexPatternManagement.deleteField.deletedHeader": "「{fieldName}」が削除されました", + "indexPatternManagement.deleteField.savedHeader": "「{fieldName}」が保存されました", + "indexPatternManagement.deleteFieldHeader": "フィールド「{fieldName}」を削除", + "indexPatternManagement.deleteFieldLabel": "削除されたフィールドは復元できません。{separator}続行してよろしいですか?", + "indexPatternManagement.disabledCallOutHeader": "スクリプティングが無効です", + "indexPatternManagement.disabledCallOutLabel": "Elasticsearch でのすべてのインラインスクリプティングが無効になっています。Kibana でスクリプトフィールドを使用するには、インラインスクリプティングを有効にする必要があります。", + "indexPatternManagement.duration.decimalPlacesLabel": "小数部分の桁数", + "indexPatternManagement.duration.inputFormatLabel": "インプット形式", + "indexPatternManagement.duration.outputFormatLabel": "アウトプット形式", + "indexPatternManagement.durationErrorMessage": "小数部分の桁数は 0 から 20 までの間で指定する必要があります", + "indexPatternManagement.editHeader": "{fieldName} を編集", + "indexPatternManagement.fieldTypeConflict": "フィールドタイプの矛盾", + "indexPatternManagement.formatHeader": "フォーマット", + "indexPatternManagement.formatLabel": "フォーマットは、特定の値の表示形式を管理できます。また、値を完全に変更したり、ディスカバリでのハイライト機能を無効にしたりすることも可能です。", + "indexPatternManagement.indexNameLabel": "インデックス名", + "indexPatternManagement.labelTemplate.example.idLabel": "ユーザー #{value}", + "indexPatternManagement.labelTemplate.example.output.idLabel": "ユーザー", + "indexPatternManagement.labelTemplate.example.output.pathLabel": "アセットを表示", + "indexPatternManagement.labelTemplate.example.pathLabel": "アセットを表示", + "indexPatternManagement.labelTemplate.examplesHeader": "例", + "indexPatternManagement.labelTemplate.inputHeader": "インプット", + "indexPatternManagement.labelTemplate.labelHeader": "ラベルテンプレート", + "indexPatternManagement.labelTemplate.outputHeader": "アウトプット", + "indexPatternManagement.labelTemplate.urlHeader": "URL テンプレート", + "indexPatternManagement.labelTemplate.urlLabel": "フォーマット済み URL", + "indexPatternManagement.labelTemplate.valueLabel": "フィールド値", + "indexPatternManagement.labelTemplateHeader": "ラベルテンプレート", + "indexPatternManagement.labelTemplateLabel": "このフィールドの URL が長い場合、URL のテキストバージョン用の代替テンプレートを使用すると良いかもしれません。URL の代わりに表示されますが、URL にリンクされます。このフォーマットは、値の投入に二重中括弧の表記 {doubleCurlyBraces} を使用する文字列です。次の値にアクセスできます。", + "indexPatternManagement.languageLabel": "言語", + "indexPatternManagement.mappingConflictLabel.mappingConflictDetail": "{mappingConflict} 既に「{fieldName}」という名前のフィールドが存在します。スクリプトフィールドに同じ名前を付けると、同時に両方のフィールドにクエリが実行できなくなります。", + "indexPatternManagement.mappingConflictLabel.mappingConflictLabel": "マッピングの矛盾:", + "indexPatternManagement.multiTypeLabelDesc": "フィールドのタイプがインデックスごとに変わります。多くの分析機能には使用できません。タイプごとのインデックスは次の通りです:", + "indexPatternManagement.nameErrorMessage": "名前が必要です", + "indexPatternManagement.nameLabel": "名前", + "indexPatternManagement.namePlaceholder": "新規スクリプトフィールド", + "indexPatternManagement.number.documentationLabel": "ドキュメント", + "indexPatternManagement.number.numeralLabel": "Numeral.js のフォーマットパターン (デフォルト: {defaultPattern})", + "indexPatternManagement.popularityLabel": "利用頻度", + "indexPatternManagement.samples.inputHeader": "インプット", + "indexPatternManagement.samples.outputHeader": "アウトプット", + "indexPatternManagement.samplesHeader": "サンプル", + "indexPatternManagement.script.accessWithLabel": "{code} でフィールドにアクセスします。", + "indexPatternManagement.script.getHelpLabel": "構文のヒントを得たり、スクリプトの結果をプレビューしたりできます。", + "indexPatternManagement.scriptInvalidErrorMessage": "スクリプトが無効です。スクリプトのプレビューで詳細を確認", + "indexPatternManagement.scriptLabel": "スクリプト", + "indexPatternManagement.scriptRequiredErrorMessage": "スクリプトが必要です", + "indexPatternManagement.staticLookup.addEntryButton": "エントリーを追加", + "indexPatternManagement.staticLookup.deleteAria": "削除", + "indexPatternManagement.staticLookup.deleteTitle": "エントリーの削除", + "indexPatternManagement.staticLookup.keyLabel": "キー", + "indexPatternManagement.staticLookup.leaveBlankPlaceholder": "値をそのままにするには空欄にします", + "indexPatternManagement.staticLookup.unknownKeyLabel": "不明なキーの値", + "indexPatternManagement.staticLookup.valueLabel": "値", + "indexPatternManagement.string.transformLabel": "変換", + "indexPatternManagement.syntax.default.formatLabel": "doc['some_field'].値", + "indexPatternManagement.syntax.defaultLabel.defaultDetail": "デフォルトで、Kibana のスクリプトフィールドは Elasticsearch での使用を目的に特別に開発されたシンプルでセキュアなスクリプト言語の {painless} を使用します。ドキュメントの値にアクセスするには次のフォーマットを使用します。", + "indexPatternManagement.syntax.defaultLabel.painlessLink": "Painless", + "indexPatternManagement.syntax.kibanaLabel": "Kibana は現在 Painless スクリプトに特別な制限が 1 つあります。Named 関数を含めることができません。", + "indexPatternManagement.syntax.lucene.commonLabel.commonDetail": "Kibana の旧バージョンからのアップグレードですか?お馴染みの {lucene} は引き続きご利用いただけます。Lucene 表現は JavaScript と非常に似ていますが、基本的な計算、ビット処理、比較オペレーション用に開発されたものです。", + "indexPatternManagement.syntax.lucene.commonLabel.luceneLink": "Lucene 表現", + "indexPatternManagement.syntax.lucene.limits.fieldsLabel": "格納されたフィールドは利用できません", + "indexPatternManagement.syntax.lucene.limits.sparseLabel": "フィールドがまばらな (ドキュメントの一部にしか値がない) 場合、値がないドキュメントには 0 の値が入力されます", + "indexPatternManagement.syntax.lucene.limits.typesLabel": "数字、ブール、日付、、geo_point フィールドのみアクセスできます", + "indexPatternManagement.syntax.lucene.limitsLabel": "Lucene 表現には次のいくつかの制限があります。", + "indexPatternManagement.syntax.lucene.operations.arithmeticLabel": "算術演算子: {operators}", + "indexPatternManagement.syntax.lucene.operations.bitwiseLabel": "ビット処理演算子: {operators}", + "indexPatternManagement.syntax.lucene.operations.booleanLabel": "ブール演算子 (三項演算子を含む): {operators}", + "indexPatternManagement.syntax.lucene.operations.comparisonLabel": "比較演算子: {operators}", + "indexPatternManagement.syntax.lucene.operations.distanceLabel": "距離関数: {operators}", + "indexPatternManagement.syntax.lucene.operations.mathLabel": "一般的な関数: {operators}", + "indexPatternManagement.syntax.lucene.operations.miscellaneousLabel": "その他関数: {operators}", + "indexPatternManagement.syntax.lucene.operations.trigLabel": "三角ライブラリ関数: {operators}", + "indexPatternManagement.syntax.lucene.operationsLabel": "Lucene 表現で利用可能なオペレーションは次の通りです。", + "indexPatternManagement.syntax.painlessLabel.javaAPIsLink": "ネイティブ Java API", + "indexPatternManagement.syntax.painlessLabel.painlessDetail": "Painless は非常に強力かつ使いやすい言語です。多くの {javaAPIs} にアクセスすることができます。{syntax} について読めば、すぐに習得することができます!", + "indexPatternManagement.syntax.painlessLabel.syntaxLink": "構文", + "indexPatternManagement.syntaxHeader": "構文", + "indexPatternManagement.testScript.errorMessage": "スクリプト内にエラーがあります", + "indexPatternManagement.testScript.fieldsLabel": "追加フィールド", + "indexPatternManagement.testScript.fieldsPlaceholder": "選択してください…", + "indexPatternManagement.testScript.instructions": "スクリプトを実行すると、最初の検索結果10件をプレビューできます。追加フィールドを選択して結果に含み、コンテクストをさらに加えたり、特定の文書上でフィルタにクエリを追加したりすることもできます。", + "indexPatternManagement.testScript.resultsLabel": "最初の10件", + "indexPatternManagement.testScript.resultsTitle": "結果を表示", + "indexPatternManagement.testScript.submitButtonLabel": "スクリプトを実行", + "indexPatternManagement.truncate.lengthLabel": "フィールドの長さ", + "indexPatternManagement.typeLabel": "タイプ", + "indexPatternManagement.url.heightLabel": "高さ", + "indexPatternManagement.url.labelTemplateHelpText": "ラベルテンプレートのヘルプ", + "indexPatternManagement.url.labelTemplateLabel": "ラベルテンプレート", + "indexPatternManagement.url.offLabel": "オフ", + "indexPatternManagement.url.onLabel": "オン", + "indexPatternManagement.url.openTabLabel": "新規タブで開く", + "indexPatternManagement.url.template.helpLinkText": "URL テンプレートのヘルプ", + "indexPatternManagement.url.typeLabel": "タイプ", + "indexPatternManagement.url.urlTemplateLabel": "URL テンプレート", + "indexPatternManagement.url.widthLabel": "幅", + "indexPatternManagement.urlTemplate.examplesHeader": "例", + "indexPatternManagement.urlTemplate.inputHeader": "インプット", + "indexPatternManagement.urlTemplate.outputHeader": "アウトプット", + "indexPatternManagement.urlTemplate.rawValueLabel": "非エスケープ値", + "indexPatternManagement.urlTemplate.templateHeader": "テンプレート", + "indexPatternManagement.urlTemplate.valueLabel": "URL エスケープ値", + "indexPatternManagement.urlTemplateHeader": "URL テンプレート", + "indexPatternManagement.urlTemplateLabel.fieldDetail": "フィールドに URL の一部のみが含まれている場合、{strongUrlTemplate} でその値を完全な URL としてフォーマットできます。このフォーマットは、値の投入に二重中括弧の表記 {doubleCurlyBraces} を使用する文字列です。次の値にアクセスできます。", + "indexPatternManagement.urlTemplateLabel.strongUrlTemplateLabel": "URL テンプレート", + "indexPatternManagement.warningCallOut.descriptionLabel": "計算値の表示と集約にスクリプトフィールドが使用できます。そのため非常に遅い場合があり、適切に行わないと Kibana が使用できなくなる可能性もあります。この場合安全策はありません。入力ミスがあると、あちこちに予期せぬ例外が起こります!", + "indexPatternManagement.warningCallOutHeader": "十分ご注意ください", + "indexPatternManagement.warningCallOutLabel.callOutDetail": "スクリプトフィールドを使う前に、{scripFields} と {scriptsInAggregation} についてよく理解するようにしてください。", + "indexPatternManagement.warningCallOutLabel.scripFieldsLink": "スクリプトフィールド", + "indexPatternManagement.warningCallOutLabel.scriptsInAggregationLink": "集約におけるスクリプト", + "indexPatternManagement.warningHeader": "廃止警告:", + "indexPatternManagement.warningLabel.painlessLinkLabel": "Painless", + "indexPatternManagement.warningLabel.warningDetail": "{language} は廃止され、Kibana と Elasticsearch の次のメジャーなバージョンではサポートされなくなります。新規スクリプトフィールドには {painlessLink} を使うことをお勧めします。", "common.ui.flotCharts.aprLabel": "4 月", "common.ui.flotCharts.augLabel": "8 月", "common.ui.flotCharts.decLabel": "12 月", @@ -301,7 +301,7 @@ "common.ui.flotCharts.thuLabel": "木", "common.ui.flotCharts.tueLabel": "火", "common.ui.flotCharts.wedLabel": "水", - "common.ui.scriptingLanguages.errorFetchingToastDescription": "Elasticsearch から利用可能なスクリプト言語の取得中にエラーが発生しました", + "indexPatternManagement.scriptingLanguages.errorFetchingToastDescription": "Elasticsearch から利用可能なスクリプト言語の取得中にエラーが発生しました", "common.ui.stackManagement.breadcrumb": "管理", "common.ui.stateManagement.unableToParseUrlErrorMessage": "URL をパースできません", "common.ui.stateManagement.unableToRestoreUrlErrorMessage": "URL を完全に復元できません。共有機能を使用していることを確認してください。", @@ -2121,164 +2121,164 @@ "kbn.embeddable.inspectorRequestDataTitle": "データ", "kbn.embeddable.inspectorRequestDescription": "このリクエストは Elasticsearch にクエリをかけ、検索データを取得します。", "kbn.embeddable.search.displayName": "検索", - "kbn.management.createIndexPattern.betaLabel": "ベータ", - "kbn.management.createIndexPattern.emptyState.checkDataButton": "新規データを確認", - "kbn.management.createIndexPattern.emptyStateHeader": "Elasticsearch データが見つかりませんでした", - "kbn.management.createIndexPattern.emptyStateLabel.emptyStateDetail": "{needToIndex} {learnHowLink} または {getStartedLink}", - "kbn.management.createIndexPattern.emptyStateLabel.getStartedLink": "サンプルデータで始めましょう。", - "kbn.management.createIndexPattern.emptyStateLabel.learnHowLink": "方法を学習", - "kbn.management.createIndexPattern.emptyStateLabel.needToIndexLabel": "インデックスパターンを作成する前に、Elasticsearch へのデータのインデックスが必要です。", - "kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel": "システムインデックスを含める", - "kbn.management.createIndexPattern.loadClustersFailMsg": "リモートクラスターの読み込みに失敗", - "kbn.management.createIndexPattern.loadIndicesFailMsg": "インデックスの読み込みに失敗", - "kbn.management.createIndexPattern.loadingState.checkingLabel": "Elasticsearch データを確認中", - "kbn.management.createIndexPattern.step.indexPattern.allowLabel": "インデックスパターンでワイルドカードとして {asterisk} を使用できます。", - "kbn.management.createIndexPattern.step.indexPattern.disallowLabel": "スペースや {characterList} は使用できません。", - "kbn.management.createIndexPattern.step.indexPatternLabel": "インデックスパターン", - "kbn.management.createIndexPattern.step.indexPatternPlaceholder": "index-name-*", - "kbn.management.createIndexPattern.step.invalidCharactersErrorMessage": "{indexPatternName} にはスペースや {characterList} は使えません。", - "kbn.management.createIndexPattern.step.loadingHeader": "一致するインデックスを検索中…", - "kbn.management.createIndexPattern.step.loadingLabel": "お待ちください…", - "kbn.management.createIndexPattern.step.nextStepButton": "次のステップ", - "kbn.management.createIndexPattern.step.pagingLabel": "ページごとの行数: {perPage}", - "kbn.management.createIndexPattern.step.status.matchAnyLabel.matchAnyDetail": "インデックスパターンは下の{strongIndices} の いずれかに一致します。", - "kbn.management.createIndexPattern.step.status.noSystemIndicesLabel": "パターンに一致する Elasticsearch インデックスがありません。", - "kbn.management.createIndexPattern.step.status.noSystemIndicesWithPromptLabel": "パターンに一致する Elasticsearch インデックスがありません。一致するシステムインデックスを表示するには、右上のスイッチを切り替えます。", - "kbn.management.createIndexPattern.step.status.notMatchLabel.allIndicesLabel": "{indicesLength, plural, one {# インデックス} other {# インデックス}}", - "kbn.management.createIndexPattern.step.status.notMatchLabel.notMatchDetail": "入力されたインデックスパターンがどのインデックスにも一致しません。下の {indicesLength, plural, one {} other {}}{strongIndices} と一致させることができます。", - "kbn.management.createIndexPattern.step.status.partialMatchLabel.partialMatchDetail": "インデックスパターンがどのインデックスとも一致ませんが、似た {matchedIndicesLength, plural, one {} other {}}{strongIndices} があります。", - "kbn.management.createIndexPattern.step.status.partialMatchLabel.strongIndicesLabel": "{matchedIndicesLength, plural, one {# インデックス} other {# インデックス}}", - "kbn.management.createIndexPattern.step.status.successLabel.strongIndicesLabel": "{indicesLength, plural, one {# インデックス} other {# インデックス}}", - "kbn.management.createIndexPattern.step.status.successLabel.strongSuccessLabel": "成功!", - "kbn.management.createIndexPattern.step.status.successLabel.successDetail": "{strongSuccess} インデックスパターンが {strongIndices} と一致しています。", - "kbn.management.createIndexPattern.step.warningHeader": "既に {query} という名前のインデックスパターンがあります。", - "kbn.management.createIndexPattern.stepHeader": "ステップ 1/2:インデックスパターンの定義", - "kbn.management.createIndexPattern.stepTime.backButton": "戻る", - "kbn.management.createIndexPattern.stepTime.createPatternButton": "インデックスパターンを作成", - "kbn.management.createIndexPattern.stepTime.creatingLabel": "インデックスパターンを作成中…", - "kbn.management.createIndexPattern.stepTime.error": "エラー", - "kbn.management.createIndexPattern.stepTime.field.loadingDropDown": "読み込み中…", - "kbn.management.createIndexPattern.stepTime.field.noTimeFieldsLabel": "このインデックスパターンに一致するインデックスには時間フィールドがありません。", - "kbn.management.createIndexPattern.stepTime.fieldHeader": "時間フィルターのフィールド名", - "kbn.management.createIndexPattern.stepTime.fieldLabel": "時間フィルターはこのフィールドを使って時間でフィールドを絞ります。", - "kbn.management.createIndexPattern.stepTime.fieldWarningLabel": "時間フィールドを使わないこともできますが、その場合データを時間範囲で絞ることができません。", - "kbn.management.createIndexPattern.stepTime.noTimeFieldOptionLabel": "時間フィルターを使用しない", - "kbn.management.createIndexPattern.stepTime.noTimeFieldsLabel": "このインデックスパターンに一致するインデックスには時間フィールドがありません。", - "kbn.management.createIndexPattern.stepTime.options.hideButton": "高度なオプションを非表示", - "kbn.management.createIndexPattern.stepTime.options.patternHeader": "カスタムインデックスパターン ID", - "kbn.management.createIndexPattern.stepTime.options.patternLabel": "Kibana はそれぞれのインデックスパターンに固有の識別子を割り当てます。固有 ID を使用しない場合は、カスタム ID を入力してください。", - "kbn.management.createIndexPattern.stepTime.options.patternPlaceholder": "custom-index-pattern-id", - "kbn.management.createIndexPattern.stepTime.options.showButton": "高度なオプションを表示", - "kbn.management.createIndexPattern.stepTime.patterAlreadyExists": "カスタムインデックスパターン ID が既に存在します。", - "kbn.management.createIndexPattern.stepTime.refreshButton": "更新", - "kbn.management.createIndexPattern.stepTimeHeader": "ステップ 2/2:設定の変更", - "kbn.management.createIndexPattern.stepTimeLabel": "{indexPattern} を {indexPatternName} に定義しました。次に、作成前に他の設定を行うことができます。", - "kbn.management.createIndexPatternHeader": "{indexPatternName} の作成", - "kbn.management.createIndexPatternLabel": "Kibana は、可視化などを目的に Elasticsearch インデックスからデータを取得するために、インデックスパターンを使用します。", - "kbn.management.editIndexPattern.deleteButton": "削除", - "kbn.management.editIndexPattern.deleteHeader": "インデックスパターンを削除しますか?", - "kbn.management.editIndexPattern.detailsAria": "インデックスパターンの詳細", - "kbn.management.editIndexPattern.fields.allLangsDropDown": "すべての言語", - "kbn.management.editIndexPattern.fields.allTypesDropDown": "すべてのフィールドタイプ", - "kbn.management.editIndexPattern.fields.filterAria": "フィルター", - "kbn.management.editIndexPattern.fields.filterPlaceholder": "フィルター", - "kbn.management.editIndexPattern.fields.table.additionalInfoAriaLabel": "追加フィールド情報", - "kbn.management.editIndexPattern.fields.table.aggregatableDescription": "これらのフィールドはビジュアライゼーションの集約に使用できます", - "kbn.management.editIndexPattern.fields.table.aggregatableLabel": "集約可能", - "kbn.management.editIndexPattern.fields.table.editDescription": "編集", - "kbn.management.editIndexPattern.fields.table.editLabel": "編集", - "kbn.management.editIndexPattern.fields.table.excludedDescription": "取得の際に _source から除外されるフィールドです", - "kbn.management.editIndexPattern.fields.table.excludedLabel": "除外", - "kbn.management.editIndexPattern.fields.table.formatHeader": "フォーマット", - "kbn.management.editIndexPattern.fields.table.isAggregatableAria": "は集約可能です", - "kbn.management.editIndexPattern.fields.table.isExcludedAria": "は除外されています", - "kbn.management.editIndexPattern.fields.table.isSearchableAria": "は検索可能です", - "kbn.management.editIndexPattern.fields.table.multiTypeAria": "複数タイプのフィールド", - "kbn.management.editIndexPattern.fields.table.multiTypeTooltip": "フィールドのタイプがインデックスごとに変わります。多くの分析機能には使用できません。", - "kbn.management.editIndexPattern.fields.table.nameHeader": "名前", - "kbn.management.editIndexPattern.fields.table.primaryTimeAriaLabel": "プライマリ時間フィールド", - "kbn.management.editIndexPattern.fields.table.primaryTimeTooltip": "このフィールドはイベントの発生時刻を表します。", - "kbn.management.editIndexPattern.fields.table.searchableDescription": "これらのフィールドはフィルターバーで使用できます", - "kbn.management.editIndexPattern.fields.table.searchableHeader": "検索可能", - "kbn.management.editIndexPattern.fields.table.typeHeader": "タイプ", - "kbn.management.editIndexPattern.mappingConflictHeader": "マッピングの矛盾", - "kbn.management.editIndexPattern.mappingConflictLabel": "{conflictFieldsLength, plural, one {フィールドが} other {# フィールドが}}このパターンと一致するインデックスの間で異なるタイプ (文字列、整数など) に定義されています。これらの矛盾したフィールドは Kibana の一部で使用できますが、Kibana がタイプを把握しなければならない機能には使用できません。この問題を修正するにはデータのレンダリングが必要です。", - "kbn.management.editIndexPattern.refreshAria": "フィールドリストを再度読み込みます", - "kbn.management.editIndexPattern.refreshButton": "更新", - "kbn.management.editIndexPattern.refreshHeader": "フィールドリストを更新しますか?", - "kbn.management.editIndexPattern.refreshLabel": "この操作は各フィールドの使用頻度をリセットします。", - "kbn.management.editIndexPattern.refreshTooltip": "フィールドリストを更新", - "kbn.management.editIndexPattern.removeAria": "インデックスパターンを削除", - "kbn.management.editIndexPattern.removeTooltip": "インデックスパターンを削除います", - "kbn.management.editIndexPattern.scripted.addFieldButton": "スクリプトフィールドを追加", - "kbn.management.editIndexPattern.scripted.deleteField.cancelButton": "キャンセル", - "kbn.management.editIndexPattern.scripted.deleteField.deleteButton": "削除", - "kbn.management.editIndexPattern.scripted.deleteFieldLabel": "スクリプトフィールド「{fieldName}」を削除しますか?", - "kbn.management.editIndexPattern.scripted.deprecationLangHeader": "廃止された言語が使用されています", - "kbn.management.editIndexPattern.scripted.deprecationLangLabel.deprecationLangDetail": "次の廃止された言語が使用されています: {deprecatedLangsInUse}これらの言語は、Kibana と Elasticsearch の次のメジャーなバージョンでサポートされなくなります。問題を避けるため、スクリプトフィールドを {link} に変換してください。", - "kbn.management.editIndexPattern.scripted.deprecationLangLabel.painlessDescription": "パターン", - "kbn.management.editIndexPattern.scripted.newFieldPlaceholder": "新規スクリプトフィールド", - "kbn.management.editIndexPattern.scripted.noFieldLabel": "「{indexPatternTitle}」インデックスパターンには「{fieldName}」というスクリプトフィールドがありません", - "kbn.management.editIndexPattern.scripted.table.deleteDescription": "このフィールドを削除します", - "kbn.management.editIndexPattern.scripted.table.deleteHeader": "削除", - "kbn.management.editIndexPattern.scripted.table.editDescription": "このフィールドを編集します", - "kbn.management.editIndexPattern.scripted.table.editHeader": "編集", - "kbn.management.editIndexPattern.scripted.table.formatDescription": "フィールドに使用されているフォーマットです", - "kbn.management.editIndexPattern.scripted.table.formatHeader": "フォーマット", - "kbn.management.editIndexPattern.scripted.table.langDescription": "フィールドに使用されている言語です", - "kbn.management.editIndexPattern.scripted.table.langHeader": "言語", - "kbn.management.editIndexPattern.scripted.table.nameDescription": "フィールドの名前です", - "kbn.management.editIndexPattern.scripted.table.nameHeader": "名前", - "kbn.management.editIndexPattern.scripted.table.scriptDescription": "フィールドのスクリプトです", - "kbn.management.editIndexPattern.scripted.table.scriptHeader": "スクリプト", - "kbn.management.editIndexPattern.scriptedHeader": "スクリプトフィールド", - "kbn.management.editIndexPattern.scriptedLabel": "ビジュアライゼーションにスクリプトフィールドを使用し、ドキュメントに表示させることができます。但し、スクリプトフィールドは検索できません。", - "kbn.management.editIndexPattern.setDefaultAria": "デフォルトのインデックスに設定", - "kbn.management.editIndexPattern.setDefaultTooltip": "デフォルトのインデックスに設定します", - "kbn.management.editIndexPattern.source.addButtonLabel": "追加", - "kbn.management.editIndexPattern.source.deleteFilter.cancelButtonLabel": "キャンセル", - "kbn.management.editIndexPattern.source.deleteFilter.deleteButtonLabel": "削除", - "kbn.management.editIndexPattern.source.deleteSourceFilterLabel": "ソースフィルター「{value}」を削除しますか?", - "kbn.management.editIndexPattern.source.noteLabel": "下の表で、マルチフィールドが一致として誤って表示されます。これらのフィルターは、オリジナルのソースドキュメントの\\フィールドのみに適用されるため、一致するマルチフィールドはフィルタリングされません。", - "kbn.management.editIndexPattern.source.table.cancelAria": "キャンセル", - "kbn.management.editIndexPattern.source.table.deleteAria": "削除", - "kbn.management.editIndexPattern.source.table.editAria": "編集", - "kbn.management.editIndexPattern.source.table.filterDescription": "フィルター名", - "kbn.management.editIndexPattern.source.table.filterHeader": "フィルター", - "kbn.management.editIndexPattern.source.table.matchesDescription": "フィールドに使用されている言語です", - "kbn.management.editIndexPattern.source.table.matchesHeader": "一致", - "kbn.management.editIndexPattern.source.table.notMatchedLabel": "ソースフィルターが既知のフィールドと一致しません。", - "kbn.management.editIndexPattern.source.table.saveAria": "保存", - "kbn.management.editIndexPattern.sourceHeader": "ソースフィルター", - "kbn.management.editIndexPattern.sourceLabel": "ソースフィルターは、ドキュメントソースの取得時に 1 つまたは複数のフィールドを除外するのに使用される場合もあります。これはディスカバリアプリでのドキュメントの表示中、またはダッシュボードアプリの保存された検索の結果を表示する表で起こります。それぞれの行は 1 つのドキュメントのソースで作成されており、ドキュメントに大きなフィールドや重要ではないフィールドが含まれている場合、このレベルでフィルターで除外すると良いかもしれません。", - "kbn.management.editIndexPattern.sourcePlaceholder": "ソースフィルター、ワイルドカード使用可 (例: 「user」と入力して「user」で始まるフィールドをフィルタリング)", - "kbn.management.editIndexPattern.tabs.fieldsHeader": "フィールド", - "kbn.management.editIndexPattern.tabs.scriptedHeader": "スクリプトフィールド", - "kbn.management.editIndexPattern.tabs.sourceHeader": "ソースフィルター", - "kbn.management.editIndexPattern.timeFilterHeader": "時間フィルターフィールド名: {timeFieldName}", - "kbn.management.editIndexPattern.timeFilterLabel.mappingAPILink": "マッピング API", - "kbn.management.editIndexPattern.timeFilterLabel.timeFilterDetail": "このページは {indexPatternTitle} インデックス内のすべてのフィールドと、Elasticsearch に記録された各フィールドのコアタイプを一覧表示します。フィールドタイプを変更するには Elasticsearch を使用します", - "kbn.management.editIndexPatternLiveRegionAriaLabel": "インデックスパターン", - "kbn.management.indexPattern.goToPatternButtonLabel": "既存のパターンに移動", - "kbn.management.indexPattern.sectionsHeader": "インデックスパターン", - "kbn.management.indexPattern.titleExistsLabel": "「{title}」というタイトルのインデックスパターンが既に存在します。", - "kbn.management.indexPatternList.createButton.betaLabel": "ベータ", - "kbn.management.indexPatternPrompt.exampleOne": "チャートを作成したりコンテンツを素早くクエリできるように log-west-001 という名前の単一のデータソースをインデックスします。", - "kbn.management.indexPatternPrompt.exampleOneTitle": "単一のデータソース", - "kbn.management.indexPatternPrompt.examplesTitle": "インデックスパターンの例", - "kbn.management.indexPatternPrompt.exampleThree": "比較目的に履歴の動向を集約できるよう、これらのログのアーカイブされた月々のロールアップメトリックスを指定通りに別々のインデックスパターンにグループ分けします。", - "kbn.management.indexPatternPrompt.exampleThreeTitle": "カスタムグルーピング", - "kbn.management.indexPatternPrompt.exampleTwo": "すべての西海岸のサーバーログに対してクエリを実行できるように、頭に「log-west」の付いたすべての受信データソースをグループ化します。", - "kbn.management.indexPatternPrompt.exampleTwoTitle": "複数データソース", - "kbn.management.indexPatternPrompt.subtitle": "インデックスパターンは、Kibana で共有フィールドにクエリを実行できるよう、種類の異なるデータソースをバケットにまとめることができます。", - "kbn.management.indexPatternPrompt.title": "インデックスパターンについて", - "kbn.management.indexPatterns.badge.readOnly.text": "読み込み専用", - "kbn.management.indexPatterns.badge.readOnly.tooltip": "インデックスパターンを保存できません", - "kbn.management.indexPatterns.createBreadcrumb": "インデックスパターンを作成", - "kbn.management.indexPatterns.createFieldBreadcrumb": "フィールドを作成", - "kbn.management.indexPatterns.listBreadcrumb": "インデックスパターン", - "kbn.management.indexPatternTable.createBtn": "インデックスパターンの作成", - "kbn.management.indexPatternTable.title": "インデックスパターン", + "indexPatternManagement.createIndexPattern.betaLabel": "ベータ", + "indexPatternManagement.createIndexPattern.emptyState.checkDataButton": "新規データを確認", + "indexPatternManagement.createIndexPattern.emptyStateHeader": "Elasticsearch データが見つかりませんでした", + "indexPatternManagement.createIndexPattern.emptyStateLabel.emptyStateDetail": "{needToIndex} {learnHowLink} または {getStartedLink}", + "indexPatternManagement.createIndexPattern.emptyStateLabel.getStartedLink": "サンプルデータで始めましょう。", + "indexPatternManagement.createIndexPattern.emptyStateLabel.learnHowLink": "方法を学習", + "indexPatternManagement.createIndexPattern.emptyStateLabel.needToIndexLabel": "インデックスパターンを作成する前に、Elasticsearch へのデータのインデックスが必要です。", + "indexPatternManagement.createIndexPattern.includeSystemIndicesToggleSwitchLabel": "システムインデックスを含める", + "indexPatternManagement.createIndexPattern.loadClustersFailMsg": "リモートクラスターの読み込みに失敗", + "indexPatternManagement.createIndexPattern.loadIndicesFailMsg": "インデックスの読み込みに失敗", + "indexPatternManagement.createIndexPattern.loadingState.checkingLabel": "Elasticsearch データを確認中", + "indexPatternManagement.createIndexPattern.step.indexPattern.allowLabel": "インデックスパターンでワイルドカードとして {asterisk} を使用できます。", + "indexPatternManagement.createIndexPattern.step.indexPattern.disallowLabel": "スペースや {characterList} は使用できません。", + "indexPatternManagement.createIndexPattern.step.indexPatternLabel": "インデックスパターン", + "indexPatternManagement.createIndexPattern.step.indexPatternPlaceholder": "index-name-*", + "indexPatternManagement.createIndexPattern.step.invalidCharactersErrorMessage": "{indexPatternName} にはスペースや {characterList} は使えません。", + "indexPatternManagement.createIndexPattern.step.loadingHeader": "一致するインデックスを検索中…", + "indexPatternManagement.createIndexPattern.step.loadingLabel": "お待ちください…", + "indexPatternManagement.createIndexPattern.step.nextStepButton": "次のステップ", + "indexPatternManagement.createIndexPattern.step.pagingLabel": "ページごとの行数: {perPage}", + "indexPatternManagement.createIndexPattern.step.status.matchAnyLabel.matchAnyDetail": "インデックスパターンは下の{strongIndices} の いずれかに一致します。", + "indexPatternManagement.createIndexPattern.step.status.noSystemIndicesLabel": "パターンに一致する Elasticsearch インデックスがありません。", + "indexPatternManagement.createIndexPattern.step.status.noSystemIndicesWithPromptLabel": "パターンに一致する Elasticsearch インデックスがありません。一致するシステムインデックスを表示するには、右上のスイッチを切り替えます。", + "indexPatternManagement.createIndexPattern.step.status.notMatchLabel.allIndicesLabel": "{indicesLength, plural, one {# インデックス} other {# インデックス}}", + "indexPatternManagement.createIndexPattern.step.status.notMatchLabel.notMatchDetail": "入力されたインデックスパターンがどのインデックスにも一致しません。下の {indicesLength, plural, one {} other {}}{strongIndices} と一致させることができます。", + "indexPatternManagement.createIndexPattern.step.status.partialMatchLabel.partialMatchDetail": "インデックスパターンがどのインデックスとも一致ませんが、似た {matchedIndicesLength, plural, one {} other {}}{strongIndices} があります。", + "indexPatternManagement.createIndexPattern.step.status.partialMatchLabel.strongIndicesLabel": "{matchedIndicesLength, plural, one {# インデックス} other {# インデックス}}", + "indexPatternManagement.createIndexPattern.step.status.successLabel.strongIndicesLabel": "{indicesLength, plural, one {# インデックス} other {# インデックス}}", + "indexPatternManagement.createIndexPattern.step.status.successLabel.strongSuccessLabel": "成功!", + "indexPatternManagement.createIndexPattern.step.status.successLabel.successDetail": "{strongSuccess} インデックスパターンが {strongIndices} と一致しています。", + "indexPatternManagement.createIndexPattern.step.warningHeader": "既に {query} という名前のインデックスパターンがあります。", + "indexPatternManagement.createIndexPattern.stepHeader": "ステップ 1/2:インデックスパターンの定義", + "indexPatternManagement.createIndexPattern.stepTime.backButton": "戻る", + "indexPatternManagement.createIndexPattern.stepTime.createPatternButton": "インデックスパターンを作成", + "indexPatternManagement.createIndexPattern.stepTime.creatingLabel": "インデックスパターンを作成中…", + "indexPatternManagement.createIndexPattern.stepTime.error": "エラー", + "indexPatternManagement.createIndexPattern.stepTime.field.loadingDropDown": "読み込み中…", + "indexPatternManagement.createIndexPattern.stepTime.field.noTimeFieldsLabel": "このインデックスパターンに一致するインデックスには時間フィールドがありません。", + "indexPatternManagement.createIndexPattern.stepTime.fieldHeader": "時間フィルターのフィールド名", + "indexPatternManagement.createIndexPattern.stepTime.fieldLabel": "時間フィルターはこのフィールドを使って時間でフィールドを絞ります。", + "indexPatternManagement.createIndexPattern.stepTime.fieldWarningLabel": "時間フィールドを使わないこともできますが、その場合データを時間範囲で絞ることができません。", + "indexPatternManagement.createIndexPattern.stepTime.noTimeFieldOptionLabel": "時間フィルターを使用しない", + "indexPatternManagement.createIndexPattern.stepTime.noTimeFieldsLabel": "このインデックスパターンに一致するインデックスには時間フィールドがありません。", + "indexPatternManagement.createIndexPattern.stepTime.options.hideButton": "高度なオプションを非表示", + "indexPatternManagement.createIndexPattern.stepTime.options.patternHeader": "カスタムインデックスパターン ID", + "indexPatternManagement.createIndexPattern.stepTime.options.patternLabel": "Kibana はそれぞれのインデックスパターンに固有の識別子を割り当てます。固有 ID を使用しない場合は、カスタム ID を入力してください。", + "indexPatternManagement.createIndexPattern.stepTime.options.patternPlaceholder": "custom-index-pattern-id", + "indexPatternManagement.createIndexPattern.stepTime.options.showButton": "高度なオプションを表示", + "indexPatternManagement.createIndexPattern.stepTime.patterAlreadyExists": "カスタムインデックスパターン ID が既に存在します。", + "indexPatternManagement.createIndexPattern.stepTime.refreshButton": "更新", + "indexPatternManagement.createIndexPattern.stepTimeHeader": "ステップ 2/2:設定の変更", + "indexPatternManagement.createIndexPattern.stepTimeLabel": "{indexPattern} を {indexPatternName} に定義しました。次に、作成前に他の設定を行うことができます。", + "indexPatternManagement.createIndexPatternHeader": "{indexPatternName} の作成", + "indexPatternManagement.createIndexPatternLabel": "Kibana は、可視化などを目的に Elasticsearch インデックスからデータを取得するために、インデックスパターンを使用します。", + "indexPatternManagement.editIndexPattern.deleteButton": "削除", + "indexPatternManagement.editIndexPattern.deleteHeader": "インデックスパターンを削除しますか?", + "indexPatternManagement.editIndexPattern.detailsAria": "インデックスパターンの詳細", + "indexPatternManagement.editIndexPattern.fields.allLangsDropDown": "すべての言語", + "indexPatternManagement.editIndexPattern.fields.allTypesDropDown": "すべてのフィールドタイプ", + "indexPatternManagement.editIndexPattern.fields.filterAria": "フィルター", + "indexPatternManagement.editIndexPattern.fields.filterPlaceholder": "フィルター", + "indexPatternManagement.editIndexPattern.fields.table.additionalInfoAriaLabel": "追加フィールド情報", + "indexPatternManagement.editIndexPattern.fields.table.aggregatableDescription": "これらのフィールドはビジュアライゼーションの集約に使用できます", + "indexPatternManagement.editIndexPattern.fields.table.aggregatableLabel": "集約可能", + "indexPatternManagement.editIndexPattern.fields.table.editDescription": "編集", + "indexPatternManagement.editIndexPattern.fields.table.editLabel": "編集", + "indexPatternManagement.editIndexPattern.fields.table.excludedDescription": "取得の際に _source から除外されるフィールドです", + "indexPatternManagement.editIndexPattern.fields.table.excludedLabel": "除外", + "indexPatternManagement.editIndexPattern.fields.table.formatHeader": "フォーマット", + "indexPatternManagement.editIndexPattern.fields.table.isAggregatableAria": "は集約可能です", + "indexPatternManagement.editIndexPattern.fields.table.isExcludedAria": "は除外されています", + "indexPatternManagement.editIndexPattern.fields.table.isSearchableAria": "は検索可能です", + "indexPatternManagement.editIndexPattern.fields.table.multiTypeAria": "複数タイプのフィールド", + "indexPatternManagement.editIndexPattern.fields.table.multiTypeTooltip": "フィールドのタイプがインデックスごとに変わります。多くの分析機能には使用できません。", + "indexPatternManagement.editIndexPattern.fields.table.nameHeader": "名前", + "indexPatternManagement.editIndexPattern.fields.table.primaryTimeAriaLabel": "プライマリ時間フィールド", + "indexPatternManagement.editIndexPattern.fields.table.primaryTimeTooltip": "このフィールドはイベントの発生時刻を表します。", + "indexPatternManagement.editIndexPattern.fields.table.searchableDescription": "これらのフィールドはフィルターバーで使用できます", + "indexPatternManagement.editIndexPattern.fields.table.searchableHeader": "検索可能", + "indexPatternManagement.editIndexPattern.fields.table.typeHeader": "タイプ", + "indexPatternManagement.editIndexPattern.mappingConflictHeader": "マッピングの矛盾", + "indexPatternManagement.editIndexPattern.mappingConflictLabel": "{conflictFieldsLength, plural, one {フィールドが} other {# フィールドが}}このパターンと一致するインデックスの間で異なるタイプ (文字列、整数など) に定義されています。これらの矛盾したフィールドは Kibana の一部で使用できますが、Kibana がタイプを把握しなければならない機能には使用できません。この問題を修正するにはデータのレンダリングが必要です。", + "indexPatternManagement.editIndexPattern.refreshAria": "フィールドリストを再度読み込みます", + "indexPatternManagement.editIndexPattern.refreshButton": "更新", + "indexPatternManagement.editIndexPattern.refreshHeader": "フィールドリストを更新しますか?", + "indexPatternManagement.editIndexPattern.refreshLabel": "この操作は各フィールドの使用頻度をリセットします。", + "indexPatternManagement.editIndexPattern.refreshTooltip": "フィールドリストを更新", + "indexPatternManagement.editIndexPattern.removeAria": "インデックスパターンを削除", + "indexPatternManagement.editIndexPattern.removeTooltip": "インデックスパターンを削除います", + "indexPatternManagement.editIndexPattern.scripted.addFieldButton": "スクリプトフィールドを追加", + "indexPatternManagement.editIndexPattern.scripted.deleteField.cancelButton": "キャンセル", + "indexPatternManagement.editIndexPattern.scripted.deleteField.deleteButton": "削除", + "indexPatternManagement.editIndexPattern.scripted.deleteFieldLabel": "スクリプトフィールド「{fieldName}」を削除しますか?", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangHeader": "廃止された言語が使用されています", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangLabel.deprecationLangDetail": "次の廃止された言語が使用されています: {deprecatedLangsInUse}これらの言語は、Kibana と Elasticsearch の次のメジャーなバージョンでサポートされなくなります。問題を避けるため、スクリプトフィールドを {link} に変換してください。", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangLabel.painlessDescription": "パターン", + "indexPatternManagement.editIndexPattern.scripted.newFieldPlaceholder": "新規スクリプトフィールド", + "indexPatternManagement.editIndexPattern.scripted.noFieldLabel": "「{indexPatternTitle}」インデックスパターンには「{fieldName}」というスクリプトフィールドがありません", + "indexPatternManagement.editIndexPattern.scripted.table.deleteDescription": "このフィールドを削除します", + "indexPatternManagement.editIndexPattern.scripted.table.deleteHeader": "削除", + "indexPatternManagement.editIndexPattern.scripted.table.editDescription": "このフィールドを編集します", + "indexPatternManagement.editIndexPattern.scripted.table.editHeader": "編集", + "indexPatternManagement.editIndexPattern.scripted.table.formatDescription": "フィールドに使用されているフォーマットです", + "indexPatternManagement.editIndexPattern.scripted.table.formatHeader": "フォーマット", + "indexPatternManagement.editIndexPattern.scripted.table.langDescription": "フィールドに使用されている言語です", + "indexPatternManagement.editIndexPattern.scripted.table.langHeader": "言語", + "indexPatternManagement.editIndexPattern.scripted.table.nameDescription": "フィールドの名前です", + "indexPatternManagement.editIndexPattern.scripted.table.nameHeader": "名前", + "indexPatternManagement.editIndexPattern.scripted.table.scriptDescription": "フィールドのスクリプトです", + "indexPatternManagement.editIndexPattern.scripted.table.scriptHeader": "スクリプト", + "indexPatternManagement.editIndexPattern.scriptedHeader": "スクリプトフィールド", + "indexPatternManagement.editIndexPattern.scriptedLabel": "ビジュアライゼーションにスクリプトフィールドを使用し、ドキュメントに表示させることができます。但し、スクリプトフィールドは検索できません。", + "indexPatternManagement.editIndexPattern.setDefaultAria": "デフォルトのインデックスに設定", + "indexPatternManagement.editIndexPattern.setDefaultTooltip": "デフォルトのインデックスに設定します", + "indexPatternManagement.editIndexPattern.source.addButtonLabel": "追加", + "indexPatternManagement.editIndexPattern.source.deleteFilter.cancelButtonLabel": "キャンセル", + "indexPatternManagement.editIndexPattern.source.deleteFilter.deleteButtonLabel": "削除", + "indexPatternManagement.editIndexPattern.source.deleteSourceFilterLabel": "ソースフィルター「{value}」を削除しますか?", + "indexPatternManagement.editIndexPattern.source.noteLabel": "下の表で、マルチフィールドが一致として誤って表示されます。これらのフィルターは、オリジナルのソースドキュメントの\\フィールドのみに適用されるため、一致するマルチフィールドはフィルタリングされません。", + "indexPatternManagement.editIndexPattern.source.table.cancelAria": "キャンセル", + "indexPatternManagement.editIndexPattern.source.table.deleteAria": "削除", + "indexPatternManagement.editIndexPattern.source.table.editAria": "編集", + "indexPatternManagement.editIndexPattern.source.table.filterDescription": "フィルター名", + "indexPatternManagement.editIndexPattern.source.table.filterHeader": "フィルター", + "indexPatternManagement.editIndexPattern.source.table.matchesDescription": "フィールドに使用されている言語です", + "indexPatternManagement.editIndexPattern.source.table.matchesHeader": "一致", + "indexPatternManagement.editIndexPattern.source.table.notMatchedLabel": "ソースフィルターが既知のフィールドと一致しません。", + "indexPatternManagement.editIndexPattern.source.table.saveAria": "保存", + "indexPatternManagement.editIndexPattern.sourceHeader": "ソースフィルター", + "indexPatternManagement.editIndexPattern.sourceLabel": "ソースフィルターは、ドキュメントソースの取得時に 1 つまたは複数のフィールドを除外するのに使用される場合もあります。これはディスカバリアプリでのドキュメントの表示中、またはダッシュボードアプリの保存された検索の結果を表示する表で起こります。それぞれの行は 1 つのドキュメントのソースで作成されており、ドキュメントに大きなフィールドや重要ではないフィールドが含まれている場合、このレベルでフィルターで除外すると良いかもしれません。", + "indexPatternManagement.editIndexPattern.sourcePlaceholder": "ソースフィルター、ワイルドカード使用可 (例: 「user」と入力して「user」で始まるフィールドをフィルタリング)", + "indexPatternManagement.editIndexPattern.tabs.fieldsHeader": "フィールド", + "indexPatternManagement.editIndexPattern.tabs.scriptedHeader": "スクリプトフィールド", + "indexPatternManagement.editIndexPattern.tabs.sourceHeader": "ソースフィルター", + "indexPatternManagement.editIndexPattern.timeFilterHeader": "時間フィルターフィールド名: {timeFieldName}", + "indexPatternManagement.editIndexPattern.timeFilterLabel.mappingAPILink": "マッピング API", + "indexPatternManagement.editIndexPattern.timeFilterLabel.timeFilterDetail": "このページは {indexPatternTitle} インデックス内のすべてのフィールドと、Elasticsearch に記録された各フィールドのコアタイプを一覧表示します。フィールドタイプを変更するには Elasticsearch を使用します", + "indexPatternManagement.editIndexPatternLiveRegionAriaLabel": "インデックスパターン", + "indexPatternManagement.indexPattern.goToPatternButtonLabel": "既存のパターンに移動", + "indexPatternManagement.indexPattern.sectionsHeader": "インデックスパターン", + "indexPatternManagement.indexPattern.titleExistsLabel": "「{title}」というタイトルのインデックスパターンが既に存在します。", + "indexPatternManagement.indexPatternList.createButton.betaLabel": "ベータ", + "indexPatternManagement.indexPatternPrompt.exampleOne": "チャートを作成したりコンテンツを素早くクエリできるように log-west-001 という名前の単一のデータソースをインデックスします。", + "indexPatternManagement.indexPatternPrompt.exampleOneTitle": "単一のデータソース", + "indexPatternManagement.indexPatternPrompt.examplesTitle": "インデックスパターンの例", + "indexPatternManagement.indexPatternPrompt.exampleThree": "比較目的に履歴の動向を集約できるよう、これらのログのアーカイブされた月々のロールアップメトリックスを指定通りに別々のインデックスパターンにグループ分けします。", + "indexPatternManagement.indexPatternPrompt.exampleThreeTitle": "カスタムグルーピング", + "indexPatternManagement.indexPatternPrompt.exampleTwo": "すべての西海岸のサーバーログに対してクエリを実行できるように、頭に「log-west」の付いたすべての受信データソースをグループ化します。", + "indexPatternManagement.indexPatternPrompt.exampleTwoTitle": "複数データソース", + "indexPatternManagement.indexPatternPrompt.subtitle": "インデックスパターンは、Kibana で共有フィールドにクエリを実行できるよう、種類の異なるデータソースをバケットにまとめることができます。", + "indexPatternManagement.indexPatternPrompt.title": "インデックスパターンについて", + "indexPatternManagement.indexPatterns.badge.readOnly.text": "読み込み専用", + "indexPatternManagement.indexPatterns.badge.readOnly.tooltip": "インデックスパターンを保存できません", + "indexPatternManagement.indexPatterns.createBreadcrumb": "インデックスパターンを作成", + "indexPatternManagement.indexPatterns.createFieldBreadcrumb": "フィールドを作成", + "indexPatternManagement.indexPatterns.listBreadcrumb": "インデックスパターン", + "indexPatternManagement.indexPatternTable.createBtn": "インデックスパターンの作成", + "indexPatternManagement.indexPatternTable.title": "インデックスパターン", "kbn.management.landing.header": "Kibana {version} 管理", "kbn.management.landing.subhead": "インデックス、インデックスパターン、保存されたオブジェクト、Kibana の設定、その他を管理します。", "kbn.management.landing.text": "すべてのツールの一覧は、左のメニューにあります。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 32c91a6ef2931..b0bfb30f28b4b 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -148,139 +148,139 @@ "common.ui.errorUrlOverflow.howTofixError.removeStuffFromDashboardText": "从您的仪表板中删除一些内容。这回减小 URL 的长度,使 IE 能够处理它。", "common.ui.errorUrlOverflow.howTofixErrorDescription": "通常只有较大的、复杂的仪表板会发生此问题,因此您会有一些选项:", "common.ui.errorUrlOverflow.howTofixErrorTitle": "那么,我如何解决此问题?", - "common.ui.fieldEditor.actions.cancelButton": "取消", - "common.ui.fieldEditor.actions.createButton": "创建字段", - "common.ui.fieldEditor.actions.deleteButton": "删除", - "common.ui.fieldEditor.actions.saveButton": "保存字段", - "common.ui.fieldEditor.color.addColorButton": "添加颜色", - "common.ui.fieldEditor.color.backgroundLabel": "背景色", - "common.ui.fieldEditor.color.deleteAria": "删除", - "common.ui.fieldEditor.color.deleteTitle": "删除颜色格式", - "common.ui.fieldEditor.color.exampleLabel": "示例", - "common.ui.fieldEditor.color.patternLabel": "模式(正则表达式)", - "common.ui.fieldEditor.color.rangeLabel": "范围(最小值:最大值)", - "common.ui.fieldEditor.color.textColorLabel": "文本颜色", - "common.ui.fieldEditor.createHeader": "创建脚本字段", - "common.ui.fieldEditor.date.documentationLabel": "文档", - "common.ui.fieldEditor.date.momentLabel": "Moment.js 格式模式(默认值:{defaultPattern})", - "common.ui.fieldEditor.defaultErrorMessage": "尝试使用此格式配置时发生错误:{message}", - "common.ui.fieldEditor.defaultFormatDropDown": "- 默认值 -", - "common.ui.fieldEditor.defaultFormatHeader": "格式(默认值:{defaultFormat})", - "common.ui.fieldEditor.deleteField.cancelButton": "取消", - "common.ui.fieldEditor.deleteField.deleteButton": "删除", - "common.ui.fieldEditor.deleteField.deletedHeader": "已删除 “{fieldName}”", - "common.ui.fieldEditor.deleteField.savedHeader": "已保存 “{fieldName}”", - "common.ui.fieldEditor.deleteFieldHeader": "删除字段 “{fieldName}”", - "common.ui.fieldEditor.deleteFieldLabel": "您无法恢复已删除字段。{separator}确定要执行此操作?", - "common.ui.fieldEditor.disabledCallOutHeader": "脚本已禁用", - "common.ui.fieldEditor.disabledCallOutLabel": "所有内联脚本在 Elasticsearch 中已禁用。必须至少为一种语言启用内联脚本,才能在 Kibana 中使用脚本字段。", - "common.ui.fieldEditor.duration.decimalPlacesLabel": "小数位数", - "common.ui.fieldEditor.duration.inputFormatLabel": "输入格式", - "common.ui.fieldEditor.duration.outputFormatLabel": "输出格式", - "common.ui.fieldEditor.durationErrorMessage": "小数位数必须介于 0 和 20 之间", - "common.ui.fieldEditor.editHeader": "编辑“{fieldName}", - "common.ui.fieldEditor.fieldTypeConflict": "字段类型冲突", - "common.ui.fieldEditor.formatHeader": "格式", - "common.ui.fieldEditor.formatLabel": "设置格式允许您控制特定值的显示方式。其还会导致值完全更改, 并阻止 Discover 中的突出显示起作用。", - "common.ui.fieldEditor.indexNameLabel": "索引名称", - "common.ui.fieldEditor.labelTemplate.example.idLabel": "用户 #{value}", - "common.ui.fieldEditor.labelTemplate.example.output.idLabel": "用户", - "common.ui.fieldEditor.labelTemplate.example.output.pathLabel": "查看资产", - "common.ui.fieldEditor.labelTemplate.example.pathLabel": "查看资产", - "common.ui.fieldEditor.labelTemplate.examplesHeader": "示例", - "common.ui.fieldEditor.labelTemplate.inputHeader": "输入", - "common.ui.fieldEditor.labelTemplate.labelHeader": "标签模板", - "common.ui.fieldEditor.labelTemplate.outputHeader": "输出", - "common.ui.fieldEditor.labelTemplate.urlHeader": "URL 模板", - "common.ui.fieldEditor.labelTemplate.urlLabel": "格式化 URL", - "common.ui.fieldEditor.labelTemplate.valueLabel": "字段值", - "common.ui.fieldEditor.labelTemplateHeader": "标签模板", - "common.ui.fieldEditor.labelTemplateLabel": "如果此字段中的 URL 很长,为 URL 的文本版提供备选模板可能会很有用。该文本将会显示,而非显示该 url,但仍会链接到该 URL。该格式是使用双大括号表示法 {doubleCurlyBraces} 来注入值的字符串。可以访问以下值:", - "common.ui.fieldEditor.languageLabel": "语言", - "common.ui.fieldEditor.mappingConflictLabel.mappingConflictDetail": "{mappingConflict} 您已有名称为 “{fieldName}” 的字段。使用相同的名称命名您的脚本字段意味着您将无法同时查找两个字段。", - "common.ui.fieldEditor.mappingConflictLabel.mappingConflictLabel": "映射冲突:", - "common.ui.fieldEditor.multiTypeLabelDesc": "此字段的类型在不同的索引中会有所不同。其不可用于许多分析功能。每个类型的索引如下所示:", - "common.ui.fieldEditor.nameErrorMessage": "“名称”必填", - "common.ui.fieldEditor.nameLabel": "名称", - "common.ui.fieldEditor.namePlaceholder": "新建脚本字段", - "common.ui.fieldEditor.number.documentationLabel": "文档", - "common.ui.fieldEditor.number.numeralLabel": "Numeral.js 格式模式(默认值:{defaultPattern})", - "common.ui.fieldEditor.popularityLabel": "常用度", - "common.ui.fieldEditor.samples.inputHeader": "输入", - "common.ui.fieldEditor.samples.outputHeader": "输出", - "common.ui.fieldEditor.samplesHeader": "样例", - "common.ui.fieldEditor.script.accessWithLabel": "使用 {code} 访问字段。", - "common.ui.fieldEditor.script.getHelpLabel": "获取该语法的帮助,预览脚本的结果。", - "common.ui.fieldEditor.scriptInvalidErrorMessage": "脚本无效。查看脚本预览以了解详情", - "common.ui.fieldEditor.scriptLabel": "脚本", - "common.ui.fieldEditor.scriptRequiredErrorMessage": "“脚本”必填", - "common.ui.fieldEditor.staticLookup.addEntryButton": "添加条目", - "common.ui.fieldEditor.staticLookup.deleteAria": "删除", - "common.ui.fieldEditor.staticLookup.deleteTitle": "删除条目", - "common.ui.fieldEditor.staticLookup.keyLabel": "键", - "common.ui.fieldEditor.staticLookup.leaveBlankPlaceholder": "留空可使值保持原样", - "common.ui.fieldEditor.staticLookup.unknownKeyLabel": "未知键的值", - "common.ui.fieldEditor.staticLookup.valueLabel": "值", - "common.ui.fieldEditor.string.transformLabel": "转换", - "common.ui.fieldEditor.syntax.default.formatLabel": "doc['some_field'].value", - "common.ui.fieldEditor.syntax.defaultLabel.defaultDetail": "默认情况下,Kibana 脚本字段使用 {painless}(一种简单且安全的脚本语言,专用于 Elasticsearch)通过以下格式访问文档中的值:", - "common.ui.fieldEditor.syntax.defaultLabel.painlessLink": "Painless", - "common.ui.fieldEditor.syntax.kibanaLabel": "Kibana 当前对您编写的 Painless 脚本强加一个特殊限制。它们不能包含命名函数。", - "common.ui.fieldEditor.syntax.lucene.commonLabel.commonDetail": "来自较旧的 Kibana 版本?您了解并喜爱的 {lucene} 仍可用。Lucene 表达式很像 JavaScript,但仅限于基本的算术、位和比较运算。", - "common.ui.fieldEditor.syntax.lucene.commonLabel.luceneLink": "Lucene 表达式", - "common.ui.fieldEditor.syntax.lucene.limits.fieldsLabel": "存储字段不可用", - "common.ui.fieldEditor.syntax.lucene.limits.sparseLabel": "如果字段为稀疏字段(仅某些文档包含值),则缺失该字段的文档将具有 0 值", - "common.ui.fieldEditor.syntax.lucene.limits.typesLabel": "仅数值、布尔值、日期和 geo_point 字段可以访问", - "common.ui.fieldEditor.syntax.lucene.limitsLabel": "使用 Lucene 表达式时有一些限制:", - "common.ui.fieldEditor.syntax.lucene.operations.arithmeticLabel": "算术运算符:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.bitwiseLabel": "位运算符:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.booleanLabel": "布尔运算符(包括三元运算符):{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.comparisonLabel": "比较运算符:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.distanceLabel": "距离函数:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.mathLabel": "常用数学函数:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.miscellaneousLabel": "其他函数:{operators}", - "common.ui.fieldEditor.syntax.lucene.operations.trigLabel": "三角库函数:{operators}", - "common.ui.fieldEditor.syntax.lucene.operationsLabel": "以下是可用于 lucene 表达式的所有运算:", - "common.ui.fieldEditor.syntax.painlessLabel.javaAPIsLink": "原生 Java API", - "common.ui.fieldEditor.syntax.painlessLabel.painlessDetail": "Painless 功能强大但却易于使用。通过它,可访问很多 {javaAPIs}。研读其 {syntax},您将很快上手!", - "common.ui.fieldEditor.syntax.painlessLabel.syntaxLink": "语法", - "common.ui.fieldEditor.syntaxHeader": "语法", - "common.ui.fieldEditor.testScript.errorMessage": "您的脚本中有错误", - "common.ui.fieldEditor.testScript.fieldsLabel": "其他字段", - "common.ui.fieldEditor.testScript.fieldsPlaceholder": "选择......", - "common.ui.fieldEditor.testScript.instructions": "运行您的脚本以预览前 10 个结果。还可以选择其他字段包括在您的结果中,以获取更多上下文,或添加查询以在特定文档上进行筛选。", - "common.ui.fieldEditor.testScript.resultsLabel": "前 10 个结果", - "common.ui.fieldEditor.testScript.resultsTitle": "预览结果", - "common.ui.fieldEditor.testScript.submitButtonLabel": "运行脚本", - "common.ui.fieldEditor.truncate.lengthLabel": "字段长度", - "common.ui.fieldEditor.typeLabel": "类型", - "common.ui.fieldEditor.url.heightLabel": "高", - "common.ui.fieldEditor.url.labelTemplateHelpText": "标签模板帮助", - "common.ui.fieldEditor.url.labelTemplateLabel": "标签模板", - "common.ui.fieldEditor.url.offLabel": "关闭", - "common.ui.fieldEditor.url.onLabel": "开启", - "common.ui.fieldEditor.url.openTabLabel": "在新选项卡中打开", - "common.ui.fieldEditor.url.template.helpLinkText": "URL 模板帮助", - "common.ui.fieldEditor.url.typeLabel": "类型", - "common.ui.fieldEditor.url.urlTemplateLabel": "URL 模板", - "common.ui.fieldEditor.url.widthLabel": "宽", - "common.ui.fieldEditor.urlTemplate.examplesHeader": "示例", - "common.ui.fieldEditor.urlTemplate.inputHeader": "输入", - "common.ui.fieldEditor.urlTemplate.outputHeader": "输出", - "common.ui.fieldEditor.urlTemplate.rawValueLabel": "非转义值", - "common.ui.fieldEditor.urlTemplate.templateHeader": "模板", - "common.ui.fieldEditor.urlTemplate.valueLabel": "URI 转义值", - "common.ui.fieldEditor.urlTemplateHeader": "Url 模板", - "common.ui.fieldEditor.urlTemplateLabel.fieldDetail": "如果字段仅包含 URL 的一部分,则 {strongUrlTemplate} 可用于将该值格式化为完整的 URL。该格式是使用双大括号表示法 {doubleCurlyBraces} 来注入值的字符串。可以访问以下值:", - "common.ui.fieldEditor.urlTemplateLabel.strongUrlTemplateLabel": "Url 模板", - "common.ui.fieldEditor.warningCallOut.descriptionLabel": "脚本字段可用于显示并聚合计算值。他们本身会很慢,如果操作不当,会导致 Kibana 不可用。此处没有安全网。如果拼写错误,任何地方都会引发意外异常!", - "common.ui.fieldEditor.warningCallOutHeader": "谨慎操作", - "common.ui.fieldEditor.warningCallOutLabel.callOutDetail": "请先熟悉{scripFields}以及{scriptsInAggregation},然后再使用脚本字段。", - "common.ui.fieldEditor.warningCallOutLabel.scripFieldsLink": "脚本字段", - "common.ui.fieldEditor.warningCallOutLabel.scriptsInAggregationLink": "聚合中的脚本", - "common.ui.fieldEditor.warningHeader": "弃用警告:", - "common.ui.fieldEditor.warningLabel.painlessLinkLabel": "Painless", - "common.ui.fieldEditor.warningLabel.warningDetail": "{language} 已弃用,Kibana 和 Elasticsearch 下一主要版本将移除对其的支持。建议将 {painlessLink} 用于新的脚本字段。", + "indexPatternManagement.actions.cancelButton": "取消", + "indexPatternManagement.actions.createButton": "创建字段", + "indexPatternManagement.actions.deleteButton": "删除", + "indexPatternManagement.actions.saveButton": "保存字段", + "indexPatternManagement.color.addColorButton": "添加颜色", + "indexPatternManagement.color.backgroundLabel": "背景色", + "indexPatternManagement.color.deleteAria": "删除", + "indexPatternManagement.color.deleteTitle": "删除颜色格式", + "indexPatternManagement.color.exampleLabel": "示例", + "indexPatternManagement.color.patternLabel": "模式(正则表达式)", + "indexPatternManagement.color.rangeLabel": "范围(最小值:最大值)", + "indexPatternManagement.color.textColorLabel": "文本颜色", + "indexPatternManagement.createHeader": "创建脚本字段", + "indexPatternManagement.date.documentationLabel": "文档", + "indexPatternManagement.date.momentLabel": "Moment.js 格式模式(默认值:{defaultPattern})", + "indexPatternManagement.defaultErrorMessage": "尝试使用此格式配置时发生错误:{message}", + "indexPatternManagement.defaultFormatDropDown": "- 默认值 -", + "indexPatternManagement.defaultFormatHeader": "格式(默认值:{defaultFormat})", + "indexPatternManagement.deleteField.cancelButton": "取消", + "indexPatternManagement.deleteField.deleteButton": "删除", + "indexPatternManagement.deleteField.deletedHeader": "已删除 “{fieldName}”", + "indexPatternManagement.deleteField.savedHeader": "已保存 “{fieldName}”", + "indexPatternManagement.deleteFieldHeader": "删除字段 “{fieldName}”", + "indexPatternManagement.deleteFieldLabel": "您无法恢复已删除字段。{separator}确定要执行此操作?", + "indexPatternManagement.disabledCallOutHeader": "脚本已禁用", + "indexPatternManagement.disabledCallOutLabel": "所有内联脚本在 Elasticsearch 中已禁用。必须至少为一种语言启用内联脚本,才能在 Kibana 中使用脚本字段。", + "indexPatternManagement.duration.decimalPlacesLabel": "小数位数", + "indexPatternManagement.duration.inputFormatLabel": "输入格式", + "indexPatternManagement.duration.outputFormatLabel": "输出格式", + "indexPatternManagement.durationErrorMessage": "小数位数必须介于 0 和 20 之间", + "indexPatternManagement.editHeader": "编辑“{fieldName}", + "indexPatternManagement.fieldTypeConflict": "字段类型冲突", + "indexPatternManagement.formatHeader": "格式", + "indexPatternManagement.formatLabel": "设置格式允许您控制特定值的显示方式。其还会导致值完全更改, 并阻止 Discover 中的突出显示起作用。", + "indexPatternManagement.indexNameLabel": "索引名称", + "indexPatternManagement.labelTemplate.example.idLabel": "用户 #{value}", + "indexPatternManagement.labelTemplate.example.output.idLabel": "用户", + "indexPatternManagement.labelTemplate.example.output.pathLabel": "查看资产", + "indexPatternManagement.labelTemplate.example.pathLabel": "查看资产", + "indexPatternManagement.labelTemplate.examplesHeader": "示例", + "indexPatternManagement.labelTemplate.inputHeader": "输入", + "indexPatternManagement.labelTemplate.labelHeader": "标签模板", + "indexPatternManagement.labelTemplate.outputHeader": "输出", + "indexPatternManagement.labelTemplate.urlHeader": "URL 模板", + "indexPatternManagement.labelTemplate.urlLabel": "格式化 URL", + "indexPatternManagement.labelTemplate.valueLabel": "字段值", + "indexPatternManagement.labelTemplateHeader": "标签模板", + "indexPatternManagement.labelTemplateLabel": "如果此字段中的 URL 很长,为 URL 的文本版提供备选模板可能会很有用。该文本将会显示,而非显示该 url,但仍会链接到该 URL。该格式是使用双大括号表示法 {doubleCurlyBraces} 来注入值的字符串。可以访问以下值:", + "indexPatternManagement.languageLabel": "语言", + "indexPatternManagement.mappingConflictLabel.mappingConflictDetail": "{mappingConflict} 您已有名称为 “{fieldName}” 的字段。使用相同的名称命名您的脚本字段意味着您将无法同时查找两个字段。", + "indexPatternManagement.mappingConflictLabel.mappingConflictLabel": "映射冲突:", + "indexPatternManagement.multiTypeLabelDesc": "此字段的类型在不同的索引中会有所不同。其不可用于许多分析功能。每个类型的索引如下所示:", + "indexPatternManagement.nameErrorMessage": "“名称”必填", + "indexPatternManagement.nameLabel": "名称", + "indexPatternManagement.namePlaceholder": "新建脚本字段", + "indexPatternManagement.number.documentationLabel": "文档", + "indexPatternManagement.number.numeralLabel": "Numeral.js 格式模式(默认值:{defaultPattern})", + "indexPatternManagement.popularityLabel": "常用度", + "indexPatternManagement.samples.inputHeader": "输入", + "indexPatternManagement.samples.outputHeader": "输出", + "indexPatternManagement.samplesHeader": "样例", + "indexPatternManagement.script.accessWithLabel": "使用 {code} 访问字段。", + "indexPatternManagement.script.getHelpLabel": "获取该语法的帮助,预览脚本的结果。", + "indexPatternManagement.scriptInvalidErrorMessage": "脚本无效。查看脚本预览以了解详情", + "indexPatternManagement.scriptLabel": "脚本", + "indexPatternManagement.scriptRequiredErrorMessage": "“脚本”必填", + "indexPatternManagement.staticLookup.addEntryButton": "添加条目", + "indexPatternManagement.staticLookup.deleteAria": "删除", + "indexPatternManagement.staticLookup.deleteTitle": "删除条目", + "indexPatternManagement.staticLookup.keyLabel": "键", + "indexPatternManagement.staticLookup.leaveBlankPlaceholder": "留空可使值保持原样", + "indexPatternManagement.staticLookup.unknownKeyLabel": "未知键的值", + "indexPatternManagement.staticLookup.valueLabel": "值", + "indexPatternManagement.string.transformLabel": "转换", + "indexPatternManagement.syntax.default.formatLabel": "doc['some_field'].value", + "indexPatternManagement.syntax.defaultLabel.defaultDetail": "默认情况下,Kibana 脚本字段使用 {painless}(一种简单且安全的脚本语言,专用于 Elasticsearch)通过以下格式访问文档中的值:", + "indexPatternManagement.syntax.defaultLabel.painlessLink": "Painless", + "indexPatternManagement.syntax.kibanaLabel": "Kibana 当前对您编写的 Painless 脚本强加一个特殊限制。它们不能包含命名函数。", + "indexPatternManagement.syntax.lucene.commonLabel.commonDetail": "来自较旧的 Kibana 版本?您了解并喜爱的 {lucene} 仍可用。Lucene 表达式很像 JavaScript,但仅限于基本的算术、位和比较运算。", + "indexPatternManagement.syntax.lucene.commonLabel.luceneLink": "Lucene 表达式", + "indexPatternManagement.syntax.lucene.limits.fieldsLabel": "存储字段不可用", + "indexPatternManagement.syntax.lucene.limits.sparseLabel": "如果字段为稀疏字段(仅某些文档包含值),则缺失该字段的文档将具有 0 值", + "indexPatternManagement.syntax.lucene.limits.typesLabel": "仅数值、布尔值、日期和 geo_point 字段可以访问", + "indexPatternManagement.syntax.lucene.limitsLabel": "使用 Lucene 表达式时有一些限制:", + "indexPatternManagement.syntax.lucene.operations.arithmeticLabel": "算术运算符:{operators}", + "indexPatternManagement.syntax.lucene.operations.bitwiseLabel": "位运算符:{operators}", + "indexPatternManagement.syntax.lucene.operations.booleanLabel": "布尔运算符(包括三元运算符):{operators}", + "indexPatternManagement.syntax.lucene.operations.comparisonLabel": "比较运算符:{operators}", + "indexPatternManagement.syntax.lucene.operations.distanceLabel": "距离函数:{operators}", + "indexPatternManagement.syntax.lucene.operations.mathLabel": "常用数学函数:{operators}", + "indexPatternManagement.syntax.lucene.operations.miscellaneousLabel": "其他函数:{operators}", + "indexPatternManagement.syntax.lucene.operations.trigLabel": "三角库函数:{operators}", + "indexPatternManagement.syntax.lucene.operationsLabel": "以下是可用于 lucene 表达式的所有运算:", + "indexPatternManagement.syntax.painlessLabel.javaAPIsLink": "原生 Java API", + "indexPatternManagement.syntax.painlessLabel.painlessDetail": "Painless 功能强大但却易于使用。通过它,可访问很多 {javaAPIs}。研读其 {syntax},您将很快上手!", + "indexPatternManagement.syntax.painlessLabel.syntaxLink": "语法", + "indexPatternManagement.syntaxHeader": "语法", + "indexPatternManagement.testScript.errorMessage": "您的脚本中有错误", + "indexPatternManagement.testScript.fieldsLabel": "其他字段", + "indexPatternManagement.testScript.fieldsPlaceholder": "选择......", + "indexPatternManagement.testScript.instructions": "运行您的脚本以预览前 10 个结果。还可以选择其他字段包括在您的结果中,以获取更多上下文,或添加查询以在特定文档上进行筛选。", + "indexPatternManagement.testScript.resultsLabel": "前 10 个结果", + "indexPatternManagement.testScript.resultsTitle": "预览结果", + "indexPatternManagement.testScript.submitButtonLabel": "运行脚本", + "indexPatternManagement.truncate.lengthLabel": "字段长度", + "indexPatternManagement.typeLabel": "类型", + "indexPatternManagement.url.heightLabel": "高", + "indexPatternManagement.url.labelTemplateHelpText": "标签模板帮助", + "indexPatternManagement.url.labelTemplateLabel": "标签模板", + "indexPatternManagement.url.offLabel": "关闭", + "indexPatternManagement.url.onLabel": "开启", + "indexPatternManagement.url.openTabLabel": "在新选项卡中打开", + "indexPatternManagement.url.template.helpLinkText": "URL 模板帮助", + "indexPatternManagement.url.typeLabel": "类型", + "indexPatternManagement.url.urlTemplateLabel": "URL 模板", + "indexPatternManagement.url.widthLabel": "宽", + "indexPatternManagement.urlTemplate.examplesHeader": "示例", + "indexPatternManagement.urlTemplate.inputHeader": "输入", + "indexPatternManagement.urlTemplate.outputHeader": "输出", + "indexPatternManagement.urlTemplate.rawValueLabel": "非转义值", + "indexPatternManagement.urlTemplate.templateHeader": "模板", + "indexPatternManagement.urlTemplate.valueLabel": "URI 转义值", + "indexPatternManagement.urlTemplateHeader": "Url 模板", + "indexPatternManagement.urlTemplateLabel.fieldDetail": "如果字段仅包含 URL 的一部分,则 {strongUrlTemplate} 可用于将该值格式化为完整的 URL。该格式是使用双大括号表示法 {doubleCurlyBraces} 来注入值的字符串。可以访问以下值:", + "indexPatternManagement.urlTemplateLabel.strongUrlTemplateLabel": "Url 模板", + "indexPatternManagement.warningCallOut.descriptionLabel": "脚本字段可用于显示并聚合计算值。他们本身会很慢,如果操作不当,会导致 Kibana 不可用。此处没有安全网。如果拼写错误,任何地方都会引发意外异常!", + "indexPatternManagement.warningCallOutHeader": "谨慎操作", + "indexPatternManagement.warningCallOutLabel.callOutDetail": "请先熟悉{scripFields}以及{scriptsInAggregation},然后再使用脚本字段。", + "indexPatternManagement.warningCallOutLabel.scripFieldsLink": "脚本字段", + "indexPatternManagement.warningCallOutLabel.scriptsInAggregationLink": "聚合中的脚本", + "indexPatternManagement.warningHeader": "弃用警告:", + "indexPatternManagement.warningLabel.painlessLinkLabel": "Painless", + "indexPatternManagement.warningLabel.warningDetail": "{language} 已弃用,Kibana 和 Elasticsearch 下一主要版本将移除对其的支持。建议将 {painlessLink} 用于新的脚本字段。", "common.ui.flotCharts.aprLabel": "四月", "common.ui.flotCharts.augLabel": "八月", "common.ui.flotCharts.decLabel": "十二月", @@ -301,7 +301,7 @@ "common.ui.flotCharts.thuLabel": "周四", "common.ui.flotCharts.tueLabel": "周二", "common.ui.flotCharts.wedLabel": "周三", - "common.ui.scriptingLanguages.errorFetchingToastDescription": "从 Elasticsearch 获取可用的脚本语言时出错", + "indexPatternManagement.scriptingLanguages.errorFetchingToastDescription": "从 Elasticsearch 获取可用的脚本语言时出错", "common.ui.stackManagement.breadcrumb": "管理", "common.ui.stateManagement.unableToParseUrlErrorMessage": "无法解析 URL", "common.ui.stateManagement.unableToRestoreUrlErrorMessage": "无法完整还原 URL,确保使用共享功能。", @@ -2122,164 +2122,164 @@ "kbn.embeddable.inspectorRequestDataTitle": "数据", "kbn.embeddable.inspectorRequestDescription": "此请求将查询 Elasticsearch 以获取搜索的数据。", "kbn.embeddable.search.displayName": "搜索", - "kbn.management.createIndexPattern.betaLabel": "公测版", - "kbn.management.createIndexPattern.emptyState.checkDataButton": "检查新数据", - "kbn.management.createIndexPattern.emptyStateHeader": "找不到任何 Elasticsearch 数据", - "kbn.management.createIndexPattern.emptyStateLabel.emptyStateDetail": "{needToIndex}{learnHowLink}或{getStartedLink}", - "kbn.management.createIndexPattern.emptyStateLabel.getStartedLink": "开始使用一些样例数据集。", - "kbn.management.createIndexPattern.emptyStateLabel.learnHowLink": "了解操作方法", - "kbn.management.createIndexPattern.emptyStateLabel.needToIndexLabel": "您需要在 Elasticsearch 中索引一些数据后,才能创建索引模式。", - "kbn.management.createIndexPattern.includeSystemIndicesToggleSwitchLabel": "包括系统索引", - "kbn.management.createIndexPattern.loadClustersFailMsg": "无法加载远程集群", - "kbn.management.createIndexPattern.loadIndicesFailMsg": "无法加载索引", - "kbn.management.createIndexPattern.loadingState.checkingLabel": "正在检查 Elasticsearch 数据", - "kbn.management.createIndexPattern.step.indexPattern.allowLabel": "可以在索引模式中将 {asterisk} 用作通配符。", - "kbn.management.createIndexPattern.step.indexPattern.disallowLabel": "不能使用空格或字符 {characterList}。", - "kbn.management.createIndexPattern.step.indexPatternLabel": "索引模式", - "kbn.management.createIndexPattern.step.indexPatternPlaceholder": "index-name-*", - "kbn.management.createIndexPattern.step.invalidCharactersErrorMessage": "“{indexPatternName} 不能包含空格或字符:{characterList}", - "kbn.management.createIndexPattern.step.loadingHeader": "正在寻找匹配的索引......", - "kbn.management.createIndexPattern.step.loadingLabel": "请稍候......", - "kbn.management.createIndexPattern.step.nextStepButton": "下一步", - "kbn.management.createIndexPattern.step.pagingLabel": "每页行数:{perPage}", - "kbn.management.createIndexPattern.step.status.matchAnyLabel.matchAnyDetail": "您的索引模式可以匹配以下 {strongIndices}中的任意一个。", - "kbn.management.createIndexPattern.step.status.noSystemIndicesLabel": "没有 Elasticsearch 索引匹配您的模式。", - "kbn.management.createIndexPattern.step.status.noSystemIndicesWithPromptLabel": "没有 Elasticsearch 索引匹配您的模式。要查看匹配的系统索引,请切换右上角的开关。", - "kbn.management.createIndexPattern.step.status.notMatchLabel.allIndicesLabel": "{indicesLength, plural, one {# 个索引} other {# 个索引}}", - "kbn.management.createIndexPattern.step.status.notMatchLabel.notMatchDetail": "输入的索引模式不匹配任何索引。可以匹配您的以下{indicesLength, plural, one {} other {任何}} {strongIndices}。", - "kbn.management.createIndexPattern.step.status.partialMatchLabel.partialMatchDetail": "您的索引模式不匹配任何索引,但您有 {strongIndices}{matchedIndicesLength, plural, one {看起来} other {看起来}}类似。", - "kbn.management.createIndexPattern.step.status.partialMatchLabel.strongIndicesLabel": "{matchedIndicesLength, plural, one {# 个索引} other {# 个索引}}", - "kbn.management.createIndexPattern.step.status.successLabel.strongIndicesLabel": "{indicesLength, plural, one {# 个索引} other {# 个索引}}", - "kbn.management.createIndexPattern.step.status.successLabel.strongSuccessLabel": "成功!", - "kbn.management.createIndexPattern.step.status.successLabel.successDetail": "{strongSuccess}您的索引模式匹配 {strongIndices}。", - "kbn.management.createIndexPattern.step.warningHeader": "已有索引模式称作“{query}”", - "kbn.management.createIndexPattern.stepHeader": "第 1 步(共 2 步):定义索引模式", - "kbn.management.createIndexPattern.stepTime.backButton": "上一步", - "kbn.management.createIndexPattern.stepTime.createPatternButton": "创建索引模式", - "kbn.management.createIndexPattern.stepTime.creatingLabel": "正在创建索引模式……", - "kbn.management.createIndexPattern.stepTime.error": "错误", - "kbn.management.createIndexPattern.stepTime.field.loadingDropDown": "正在加载……", - "kbn.management.createIndexPattern.stepTime.field.noTimeFieldsLabel": "匹配此索引模式的索引不包含任何时间字段。", - "kbn.management.createIndexPattern.stepTime.fieldHeader": "时间筛选字段名称", - "kbn.management.createIndexPattern.stepTime.fieldLabel": "时间筛选将使用此字段按时间筛选您的数据。", - "kbn.management.createIndexPattern.stepTime.fieldWarningLabel": "您可以选择不使用时间字段,但将无法通过时间范围缩小您的数据范围。", - "kbn.management.createIndexPattern.stepTime.noTimeFieldOptionLabel": "我不想使用时间筛选", - "kbn.management.createIndexPattern.stepTime.noTimeFieldsLabel": "匹配此索引模式的索引不包含任何时间字段。", - "kbn.management.createIndexPattern.stepTime.options.hideButton": "隐藏高级选项", - "kbn.management.createIndexPattern.stepTime.options.patternHeader": "定制索引模式 ID", - "kbn.management.createIndexPattern.stepTime.options.patternLabel": "Kibana 将为每个索引模式提供唯一的标识符。如果不想使用此唯一 ID,请输入定制 ID。", - "kbn.management.createIndexPattern.stepTime.options.patternPlaceholder": "custom-index-pattern-id", - "kbn.management.createIndexPattern.stepTime.options.showButton": "显示高级选项", - "kbn.management.createIndexPattern.stepTime.patterAlreadyExists": "自定义索引模式 ID 已存在。", - "kbn.management.createIndexPattern.stepTime.refreshButton": "刷新", - "kbn.management.createIndexPattern.stepTimeHeader": "第 2 步(共 2 步):配置设置", - "kbn.management.createIndexPattern.stepTimeLabel": "您已将 “{indexPattern}” 定义为 “{indexPatternName}”。现在,在我们创建之前,您可以指定一些设置。", - "kbn.management.createIndexPatternHeader": "创建 {indexPatternName}", - "kbn.management.createIndexPatternLabel": "Kibana 使用索引模式从 Elasticsearch 索引中检索数据,以实现诸如可视化等功能。", - "kbn.management.editIndexPattern.deleteButton": "删除", - "kbn.management.editIndexPattern.deleteHeader": "删除索引模式?", - "kbn.management.editIndexPattern.detailsAria": "索引模式详细信息", - "kbn.management.editIndexPattern.fields.allLangsDropDown": "所有语言", - "kbn.management.editIndexPattern.fields.allTypesDropDown": "所有字段类型", - "kbn.management.editIndexPattern.fields.filterAria": "筛选", - "kbn.management.editIndexPattern.fields.filterPlaceholder": "筛选", - "kbn.management.editIndexPattern.fields.table.additionalInfoAriaLabel": "其他字段信息", - "kbn.management.editIndexPattern.fields.table.aggregatableDescription": "这些字段可用在可视化聚合中", - "kbn.management.editIndexPattern.fields.table.aggregatableLabel": "可聚合", - "kbn.management.editIndexPattern.fields.table.editDescription": "编辑", - "kbn.management.editIndexPattern.fields.table.editLabel": "编辑", - "kbn.management.editIndexPattern.fields.table.excludedDescription": "提取 _source 时从其中排除的字段", - "kbn.management.editIndexPattern.fields.table.excludedLabel": "已排除", - "kbn.management.editIndexPattern.fields.table.formatHeader": "格式", - "kbn.management.editIndexPattern.fields.table.isAggregatableAria": "可聚合", - "kbn.management.editIndexPattern.fields.table.isExcludedAria": "已排除", - "kbn.management.editIndexPattern.fields.table.isSearchableAria": "可搜索", - "kbn.management.editIndexPattern.fields.table.multiTypeAria": "多类型字段", - "kbn.management.editIndexPattern.fields.table.multiTypeTooltip": "此字段的类型在不同的索引中会有所不同。其不可用于许多分析功能。", - "kbn.management.editIndexPattern.fields.table.nameHeader": "名称", - "kbn.management.editIndexPattern.fields.table.primaryTimeAriaLabel": "主要时间字段", - "kbn.management.editIndexPattern.fields.table.primaryTimeTooltip": "此字段表示事件发生的时间。", - "kbn.management.editIndexPattern.fields.table.searchableDescription": "这些字段可用于筛选栏", - "kbn.management.editIndexPattern.fields.table.searchableHeader": "可搜索", - "kbn.management.editIndexPattern.fields.table.typeHeader": "类型", - "kbn.management.editIndexPattern.mappingConflictHeader": "映射冲突", - "kbn.management.editIndexPattern.mappingConflictLabel": "匹配此模式的各个索引中{conflictFieldsLength, plural, one {一个字段已} other {# 个字段已}}定义为若干类型(字符串、整数等)。您仍能够在 Kibana 的各个部分中使用这些冲突类型,但它们将无法用于需要 Kibana 知道其类型的函数。要解决此问题,需要重新索引您的数据。", - "kbn.management.editIndexPattern.refreshAria": "重新加载字段列表", - "kbn.management.editIndexPattern.refreshButton": "刷新", - "kbn.management.editIndexPattern.refreshHeader": "刷新字段列表?", - "kbn.management.editIndexPattern.refreshLabel": "此操作重置每个字段的常用度计数器。", - "kbn.management.editIndexPattern.refreshTooltip": "重新刷新字段列表", - "kbn.management.editIndexPattern.removeAria": "删除索引模式", - "kbn.management.editIndexPattern.removeTooltip": "删除索引模式", - "kbn.management.editIndexPattern.scripted.addFieldButton": "添加脚本字段", - "kbn.management.editIndexPattern.scripted.deleteField.cancelButton": "取消", - "kbn.management.editIndexPattern.scripted.deleteField.deleteButton": "删除", - "kbn.management.editIndexPattern.scripted.deleteFieldLabel": "删除脚本字段 “{fieldName}”?", - "kbn.management.editIndexPattern.scripted.deprecationLangHeader": "在用的弃用语言", - "kbn.management.editIndexPattern.scripted.deprecationLangLabel.deprecationLangDetail": "以下已弃用语言正被使用:{deprecatedLangsInUse}。Kibana 和 Elasticsearch 下一主要版本将移除对这些语言的支持。将您的脚本字段转换成 {link} 以避免问题。", - "kbn.management.editIndexPattern.scripted.deprecationLangLabel.painlessDescription": "Painless", - "kbn.management.editIndexPattern.scripted.newFieldPlaceholder": "新建脚本字段", - "kbn.management.editIndexPattern.scripted.noFieldLabel": "“{indexPatternTitle}” 索引模式没有称作 “{fieldName}” 的脚本字段", - "kbn.management.editIndexPattern.scripted.table.deleteDescription": "删除此字段", - "kbn.management.editIndexPattern.scripted.table.deleteHeader": "删除", - "kbn.management.editIndexPattern.scripted.table.editDescription": "编辑此字段", - "kbn.management.editIndexPattern.scripted.table.editHeader": "编辑", - "kbn.management.editIndexPattern.scripted.table.formatDescription": "用于该字段的格式", - "kbn.management.editIndexPattern.scripted.table.formatHeader": "格式", - "kbn.management.editIndexPattern.scripted.table.langDescription": "用于该字段的语言", - "kbn.management.editIndexPattern.scripted.table.langHeader": "语言", - "kbn.management.editIndexPattern.scripted.table.nameDescription": "字段的名称", - "kbn.management.editIndexPattern.scripted.table.nameHeader": "名称", - "kbn.management.editIndexPattern.scripted.table.scriptDescription": "字段的脚本", - "kbn.management.editIndexPattern.scripted.table.scriptHeader": "脚本", - "kbn.management.editIndexPattern.scriptedHeader": "脚本字段", - "kbn.management.editIndexPattern.scriptedLabel": "可以在可视化中使用脚本字段,并在您的文档中显示它们。但是,您不能搜索脚本字段。", - "kbn.management.editIndexPattern.setDefaultAria": "设置为默认索引", - "kbn.management.editIndexPattern.setDefaultTooltip": "设置为默认索引", - "kbn.management.editIndexPattern.source.addButtonLabel": "添加", - "kbn.management.editIndexPattern.source.deleteFilter.cancelButtonLabel": "取消", - "kbn.management.editIndexPattern.source.deleteFilter.deleteButtonLabel": "删除", - "kbn.management.editIndexPattern.source.deleteSourceFilterLabel": "删除源筛选 “{value}”?", - "kbn.management.editIndexPattern.source.noteLabel": "请注意,多字段将错误地显示为下表中的匹配。这些筛选仅应用于原始源文档中的字段,因此实际未筛选匹配的多字段。", - "kbn.management.editIndexPattern.source.table.cancelAria": "取消", - "kbn.management.editIndexPattern.source.table.deleteAria": "删除", - "kbn.management.editIndexPattern.source.table.editAria": "编辑", - "kbn.management.editIndexPattern.source.table.filterDescription": "筛选名称", - "kbn.management.editIndexPattern.source.table.filterHeader": "筛选", - "kbn.management.editIndexPattern.source.table.matchesDescription": "用于该字段的语言", - "kbn.management.editIndexPattern.source.table.matchesHeader": "匹配", - "kbn.management.editIndexPattern.source.table.notMatchedLabel": "源筛选不匹配任何已知字段。", - "kbn.management.editIndexPattern.source.table.saveAria": "保存", - "kbn.management.editIndexPattern.sourceHeader": "源筛选", - "kbn.management.editIndexPattern.sourceLabel": "提取文档源时,源筛选可用于排除一个或多个字段。在 Discover 应用中查看文档时会发生此问题,表在 Dashboard 应用中显示已保存搜索的结果时也会发生此问题。每行使用单个文档的源进行生成,如果您具有含有较大或不重要字段的文档,则通过在此较低层级筛除这些字段会更好。", - "kbn.management.editIndexPattern.sourcePlaceholder": "源筛选,接受通配符(例如“user*”用于筛选以“user”开头的字段)", - "kbn.management.editIndexPattern.tabs.fieldsHeader": "字段", - "kbn.management.editIndexPattern.tabs.scriptedHeader": "脚本字段", - "kbn.management.editIndexPattern.tabs.sourceHeader": "源筛选", - "kbn.management.editIndexPattern.timeFilterHeader": "时间筛选字段名称:{timeFieldName}", - "kbn.management.editIndexPattern.timeFilterLabel.mappingAPILink": "映射 API", - "kbn.management.editIndexPattern.timeFilterLabel.timeFilterDetail": "此页根据 Elasticsearch 的记录列出“{indexPatternTitle}”索引中的每个字段以及字段的关联核心类型。要更改字段类型,请使用 Elasticsearch", - "kbn.management.editIndexPatternLiveRegionAriaLabel": "索引模式", - "kbn.management.indexPattern.goToPatternButtonLabel": "前往现有模式", - "kbn.management.indexPattern.sectionsHeader": "索引模式", - "kbn.management.indexPattern.titleExistsLabel": "具有标题 “{title}” 的索引模式已存在。", - "kbn.management.indexPatternList.createButton.betaLabel": "公测版", - "kbn.management.indexPatternPrompt.exampleOne": "索引单个称作 log-west-001 的数据源,以便可以快速地构建图表或查询其内容。", - "kbn.management.indexPatternPrompt.exampleOneTitle": "单数据源", - "kbn.management.indexPatternPrompt.examplesTitle": "索引模式示例", - "kbn.management.indexPatternPrompt.exampleThree": "具体而言,将这些日志每月存档的汇总/打包指标分组成不同的索引模式,从而可以聚合历史趋势以进行比较。", - "kbn.management.indexPatternPrompt.exampleThreeTitle": "定制分组", - "kbn.management.indexPatternPrompt.exampleTwo": "分组以 log-west* 开头的所有传入数据源,以便可以查询所有所有西海岸服务器日志。", - "kbn.management.indexPatternPrompt.exampleTwoTitle": "多数据源", - "kbn.management.indexPatternPrompt.subtitle": "索引模式允许您将异类的数据源一起装入存储桶,从而可以在 Kibana 中查询它们共享的字段。", - "kbn.management.indexPatternPrompt.title": "关于索引模式", - "kbn.management.indexPatterns.badge.readOnly.text": "只读", - "kbn.management.indexPatterns.badge.readOnly.tooltip": "无法保存索引模式", - "kbn.management.indexPatterns.createBreadcrumb": "创建索引模式", - "kbn.management.indexPatterns.createFieldBreadcrumb": "创建字段", - "kbn.management.indexPatterns.listBreadcrumb": "索引模式", - "kbn.management.indexPatternTable.createBtn": "创建索引模式", - "kbn.management.indexPatternTable.title": "索引模式", + "indexPatternManagement.createIndexPattern.betaLabel": "公测版", + "indexPatternManagement.createIndexPattern.emptyState.checkDataButton": "检查新数据", + "indexPatternManagement.createIndexPattern.emptyStateHeader": "找不到任何 Elasticsearch 数据", + "indexPatternManagement.createIndexPattern.emptyStateLabel.emptyStateDetail": "{needToIndex}{learnHowLink}或{getStartedLink}", + "indexPatternManagement.createIndexPattern.emptyStateLabel.getStartedLink": "开始使用一些样例数据集。", + "indexPatternManagement.createIndexPattern.emptyStateLabel.learnHowLink": "了解操作方法", + "indexPatternManagement.createIndexPattern.emptyStateLabel.needToIndexLabel": "您需要在 Elasticsearch 中索引一些数据后,才能创建索引模式。", + "indexPatternManagement.createIndexPattern.includeSystemIndicesToggleSwitchLabel": "包括系统索引", + "indexPatternManagement.createIndexPattern.loadClustersFailMsg": "无法加载远程集群", + "indexPatternManagement.createIndexPattern.loadIndicesFailMsg": "无法加载索引", + "indexPatternManagement.createIndexPattern.loadingState.checkingLabel": "正在检查 Elasticsearch 数据", + "indexPatternManagement.createIndexPattern.step.indexPattern.allowLabel": "可以在索引模式中将 {asterisk} 用作通配符。", + "indexPatternManagement.createIndexPattern.step.indexPattern.disallowLabel": "不能使用空格或字符 {characterList}。", + "indexPatternManagement.createIndexPattern.step.indexPatternLabel": "索引模式", + "indexPatternManagement.createIndexPattern.step.indexPatternPlaceholder": "index-name-*", + "indexPatternManagement.createIndexPattern.step.invalidCharactersErrorMessage": "“{indexPatternName} 不能包含空格或字符:{characterList}", + "indexPatternManagement.createIndexPattern.step.loadingHeader": "正在寻找匹配的索引......", + "indexPatternManagement.createIndexPattern.step.loadingLabel": "请稍候......", + "indexPatternManagement.createIndexPattern.step.nextStepButton": "下一步", + "indexPatternManagement.createIndexPattern.step.pagingLabel": "每页行数:{perPage}", + "indexPatternManagement.createIndexPattern.step.status.matchAnyLabel.matchAnyDetail": "您的索引模式可以匹配以下 {strongIndices}中的任意一个。", + "indexPatternManagement.createIndexPattern.step.status.noSystemIndicesLabel": "没有 Elasticsearch 索引匹配您的模式。", + "indexPatternManagement.createIndexPattern.step.status.noSystemIndicesWithPromptLabel": "没有 Elasticsearch 索引匹配您的模式。要查看匹配的系统索引,请切换右上角的开关。", + "indexPatternManagement.createIndexPattern.step.status.notMatchLabel.allIndicesLabel": "{indicesLength, plural, one {# 个索引} other {# 个索引}}", + "indexPatternManagement.createIndexPattern.step.status.notMatchLabel.notMatchDetail": "输入的索引模式不匹配任何索引。可以匹配您的以下{indicesLength, plural, one {} other {任何}} {strongIndices}。", + "indexPatternManagement.createIndexPattern.step.status.partialMatchLabel.partialMatchDetail": "您的索引模式不匹配任何索引,但您有 {strongIndices}{matchedIndicesLength, plural, one {看起来} other {看起来}}类似。", + "indexPatternManagement.createIndexPattern.step.status.partialMatchLabel.strongIndicesLabel": "{matchedIndicesLength, plural, one {# 个索引} other {# 个索引}}", + "indexPatternManagement.createIndexPattern.step.status.successLabel.strongIndicesLabel": "{indicesLength, plural, one {# 个索引} other {# 个索引}}", + "indexPatternManagement.createIndexPattern.step.status.successLabel.strongSuccessLabel": "成功!", + "indexPatternManagement.createIndexPattern.step.status.successLabel.successDetail": "{strongSuccess}您的索引模式匹配 {strongIndices}。", + "indexPatternManagement.createIndexPattern.step.warningHeader": "已有索引模式称作“{query}”", + "indexPatternManagement.createIndexPattern.stepHeader": "第 1 步(共 2 步):定义索引模式", + "indexPatternManagement.createIndexPattern.stepTime.backButton": "上一步", + "indexPatternManagement.createIndexPattern.stepTime.createPatternButton": "创建索引模式", + "indexPatternManagement.createIndexPattern.stepTime.creatingLabel": "正在创建索引模式……", + "indexPatternManagement.createIndexPattern.stepTime.error": "错误", + "indexPatternManagement.createIndexPattern.stepTime.field.loadingDropDown": "正在加载……", + "indexPatternManagement.createIndexPattern.stepTime.field.noTimeFieldsLabel": "匹配此索引模式的索引不包含任何时间字段。", + "indexPatternManagement.createIndexPattern.stepTime.fieldHeader": "时间筛选字段名称", + "indexPatternManagement.createIndexPattern.stepTime.fieldLabel": "时间筛选将使用此字段按时间筛选您的数据。", + "indexPatternManagement.createIndexPattern.stepTime.fieldWarningLabel": "您可以选择不使用时间字段,但将无法通过时间范围缩小您的数据范围。", + "indexPatternManagement.createIndexPattern.stepTime.noTimeFieldOptionLabel": "我不想使用时间筛选", + "indexPatternManagement.createIndexPattern.stepTime.noTimeFieldsLabel": "匹配此索引模式的索引不包含任何时间字段。", + "indexPatternManagement.createIndexPattern.stepTime.options.hideButton": "隐藏高级选项", + "indexPatternManagement.createIndexPattern.stepTime.options.patternHeader": "定制索引模式 ID", + "indexPatternManagement.createIndexPattern.stepTime.options.patternLabel": "Kibana 将为每个索引模式提供唯一的标识符。如果不想使用此唯一 ID,请输入定制 ID。", + "indexPatternManagement.createIndexPattern.stepTime.options.patternPlaceholder": "custom-index-pattern-id", + "indexPatternManagement.createIndexPattern.stepTime.options.showButton": "显示高级选项", + "indexPatternManagement.createIndexPattern.stepTime.patterAlreadyExists": "自定义索引模式 ID 已存在。", + "indexPatternManagement.createIndexPattern.stepTime.refreshButton": "刷新", + "indexPatternManagement.createIndexPattern.stepTimeHeader": "第 2 步(共 2 步):配置设置", + "indexPatternManagement.createIndexPattern.stepTimeLabel": "您已将 “{indexPattern}” 定义为 “{indexPatternName}”。现在,在我们创建之前,您可以指定一些设置。", + "indexPatternManagement.createIndexPatternHeader": "创建 {indexPatternName}", + "indexPatternManagement.createIndexPatternLabel": "Kibana 使用索引模式从 Elasticsearch 索引中检索数据,以实现诸如可视化等功能。", + "indexPatternManagement.editIndexPattern.deleteButton": "删除", + "indexPatternManagement.editIndexPattern.deleteHeader": "删除索引模式?", + "indexPatternManagement.editIndexPattern.detailsAria": "索引模式详细信息", + "indexPatternManagement.editIndexPattern.fields.allLangsDropDown": "所有语言", + "indexPatternManagement.editIndexPattern.fields.allTypesDropDown": "所有字段类型", + "indexPatternManagement.editIndexPattern.fields.filterAria": "筛选", + "indexPatternManagement.editIndexPattern.fields.filterPlaceholder": "筛选", + "indexPatternManagement.editIndexPattern.fields.table.additionalInfoAriaLabel": "其他字段信息", + "indexPatternManagement.editIndexPattern.fields.table.aggregatableDescription": "这些字段可用在可视化聚合中", + "indexPatternManagement.editIndexPattern.fields.table.aggregatableLabel": "可聚合", + "indexPatternManagement.editIndexPattern.fields.table.editDescription": "编辑", + "indexPatternManagement.editIndexPattern.fields.table.editLabel": "编辑", + "indexPatternManagement.editIndexPattern.fields.table.excludedDescription": "提取 _source 时从其中排除的字段", + "indexPatternManagement.editIndexPattern.fields.table.excludedLabel": "已排除", + "indexPatternManagement.editIndexPattern.fields.table.formatHeader": "格式", + "indexPatternManagement.editIndexPattern.fields.table.isAggregatableAria": "可聚合", + "indexPatternManagement.editIndexPattern.fields.table.isExcludedAria": "已排除", + "indexPatternManagement.editIndexPattern.fields.table.isSearchableAria": "可搜索", + "indexPatternManagement.editIndexPattern.fields.table.multiTypeAria": "多类型字段", + "indexPatternManagement.editIndexPattern.fields.table.multiTypeTooltip": "此字段的类型在不同的索引中会有所不同。其不可用于许多分析功能。", + "indexPatternManagement.editIndexPattern.fields.table.nameHeader": "名称", + "indexPatternManagement.editIndexPattern.fields.table.primaryTimeAriaLabel": "主要时间字段", + "indexPatternManagement.editIndexPattern.fields.table.primaryTimeTooltip": "此字段表示事件发生的时间。", + "indexPatternManagement.editIndexPattern.fields.table.searchableDescription": "这些字段可用于筛选栏", + "indexPatternManagement.editIndexPattern.fields.table.searchableHeader": "可搜索", + "indexPatternManagement.editIndexPattern.fields.table.typeHeader": "类型", + "indexPatternManagement.editIndexPattern.mappingConflictHeader": "映射冲突", + "indexPatternManagement.editIndexPattern.mappingConflictLabel": "匹配此模式的各个索引中{conflictFieldsLength, plural, one {一个字段已} other {# 个字段已}}定义为若干类型(字符串、整数等)。您仍能够在 Kibana 的各个部分中使用这些冲突类型,但它们将无法用于需要 Kibana 知道其类型的函数。要解决此问题,需要重新索引您的数据。", + "indexPatternManagement.editIndexPattern.refreshAria": "重新加载字段列表", + "indexPatternManagement.editIndexPattern.refreshButton": "刷新", + "indexPatternManagement.editIndexPattern.refreshHeader": "刷新字段列表?", + "indexPatternManagement.editIndexPattern.refreshLabel": "此操作重置每个字段的常用度计数器。", + "indexPatternManagement.editIndexPattern.refreshTooltip": "重新刷新字段列表", + "indexPatternManagement.editIndexPattern.removeAria": "删除索引模式", + "indexPatternManagement.editIndexPattern.removeTooltip": "删除索引模式", + "indexPatternManagement.editIndexPattern.scripted.addFieldButton": "添加脚本字段", + "indexPatternManagement.editIndexPattern.scripted.deleteField.cancelButton": "取消", + "indexPatternManagement.editIndexPattern.scripted.deleteField.deleteButton": "删除", + "indexPatternManagement.editIndexPattern.scripted.deleteFieldLabel": "删除脚本字段 “{fieldName}”?", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangHeader": "在用的弃用语言", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangLabel.deprecationLangDetail": "以下已弃用语言正被使用:{deprecatedLangsInUse}。Kibana 和 Elasticsearch 下一主要版本将移除对这些语言的支持。将您的脚本字段转换成 {link} 以避免问题。", + "indexPatternManagement.editIndexPattern.scripted.deprecationLangLabel.painlessDescription": "Painless", + "indexPatternManagement.editIndexPattern.scripted.newFieldPlaceholder": "新建脚本字段", + "indexPatternManagement.editIndexPattern.scripted.noFieldLabel": "“{indexPatternTitle}” 索引模式没有称作 “{fieldName}” 的脚本字段", + "indexPatternManagement.editIndexPattern.scripted.table.deleteDescription": "删除此字段", + "indexPatternManagement.editIndexPattern.scripted.table.deleteHeader": "删除", + "indexPatternManagement.editIndexPattern.scripted.table.editDescription": "编辑此字段", + "indexPatternManagement.editIndexPattern.scripted.table.editHeader": "编辑", + "indexPatternManagement.editIndexPattern.scripted.table.formatDescription": "用于该字段的格式", + "indexPatternManagement.editIndexPattern.scripted.table.formatHeader": "格式", + "indexPatternManagement.editIndexPattern.scripted.table.langDescription": "用于该字段的语言", + "indexPatternManagement.editIndexPattern.scripted.table.langHeader": "语言", + "indexPatternManagement.editIndexPattern.scripted.table.nameDescription": "字段的名称", + "indexPatternManagement.editIndexPattern.scripted.table.nameHeader": "名称", + "indexPatternManagement.editIndexPattern.scripted.table.scriptDescription": "字段的脚本", + "indexPatternManagement.editIndexPattern.scripted.table.scriptHeader": "脚本", + "indexPatternManagement.editIndexPattern.scriptedHeader": "脚本字段", + "indexPatternManagement.editIndexPattern.scriptedLabel": "可以在可视化中使用脚本字段,并在您的文档中显示它们。但是,您不能搜索脚本字段。", + "indexPatternManagement.editIndexPattern.setDefaultAria": "设置为默认索引", + "indexPatternManagement.editIndexPattern.setDefaultTooltip": "设置为默认索引", + "indexPatternManagement.editIndexPattern.source.addButtonLabel": "添加", + "indexPatternManagement.editIndexPattern.source.deleteFilter.cancelButtonLabel": "取消", + "indexPatternManagement.editIndexPattern.source.deleteFilter.deleteButtonLabel": "删除", + "indexPatternManagement.editIndexPattern.source.deleteSourceFilterLabel": "删除源筛选 “{value}”?", + "indexPatternManagement.editIndexPattern.source.noteLabel": "请注意,多字段将错误地显示为下表中的匹配。这些筛选仅应用于原始源文档中的字段,因此实际未筛选匹配的多字段。", + "indexPatternManagement.editIndexPattern.source.table.cancelAria": "取消", + "indexPatternManagement.editIndexPattern.source.table.deleteAria": "删除", + "indexPatternManagement.editIndexPattern.source.table.editAria": "编辑", + "indexPatternManagement.editIndexPattern.source.table.filterDescription": "筛选名称", + "indexPatternManagement.editIndexPattern.source.table.filterHeader": "筛选", + "indexPatternManagement.editIndexPattern.source.table.matchesDescription": "用于该字段的语言", + "indexPatternManagement.editIndexPattern.source.table.matchesHeader": "匹配", + "indexPatternManagement.editIndexPattern.source.table.notMatchedLabel": "源筛选不匹配任何已知字段。", + "indexPatternManagement.editIndexPattern.source.table.saveAria": "保存", + "indexPatternManagement.editIndexPattern.sourceHeader": "源筛选", + "indexPatternManagement.editIndexPattern.sourceLabel": "提取文档源时,源筛选可用于排除一个或多个字段。在 Discover 应用中查看文档时会发生此问题,表在 Dashboard 应用中显示已保存搜索的结果时也会发生此问题。每行使用单个文档的源进行生成,如果您具有含有较大或不重要字段的文档,则通过在此较低层级筛除这些字段会更好。", + "indexPatternManagement.editIndexPattern.sourcePlaceholder": "源筛选,接受通配符(例如“user*”用于筛选以“user”开头的字段)", + "indexPatternManagement.editIndexPattern.tabs.fieldsHeader": "字段", + "indexPatternManagement.editIndexPattern.tabs.scriptedHeader": "脚本字段", + "indexPatternManagement.editIndexPattern.tabs.sourceHeader": "源筛选", + "indexPatternManagement.editIndexPattern.timeFilterHeader": "时间筛选字段名称:{timeFieldName}", + "indexPatternManagement.editIndexPattern.timeFilterLabel.mappingAPILink": "映射 API", + "indexPatternManagement.editIndexPattern.timeFilterLabel.timeFilterDetail": "此页根据 Elasticsearch 的记录列出“{indexPatternTitle}”索引中的每个字段以及字段的关联核心类型。要更改字段类型,请使用 Elasticsearch", + "indexPatternManagement.editIndexPatternLiveRegionAriaLabel": "索引模式", + "indexPatternManagement.indexPattern.goToPatternButtonLabel": "前往现有模式", + "indexPatternManagement.indexPattern.sectionsHeader": "索引模式", + "indexPatternManagement.indexPattern.titleExistsLabel": "具有标题 “{title}” 的索引模式已存在。", + "indexPatternManagement.indexPatternList.createButton.betaLabel": "公测版", + "indexPatternManagement.indexPatternPrompt.exampleOne": "索引单个称作 log-west-001 的数据源,以便可以快速地构建图表或查询其内容。", + "indexPatternManagement.indexPatternPrompt.exampleOneTitle": "单数据源", + "indexPatternManagement.indexPatternPrompt.examplesTitle": "索引模式示例", + "indexPatternManagement.indexPatternPrompt.exampleThree": "具体而言,将这些日志每月存档的汇总/打包指标分组成不同的索引模式,从而可以聚合历史趋势以进行比较。", + "indexPatternManagement.indexPatternPrompt.exampleThreeTitle": "定制分组", + "indexPatternManagement.indexPatternPrompt.exampleTwo": "分组以 log-west* 开头的所有传入数据源,以便可以查询所有所有西海岸服务器日志。", + "indexPatternManagement.indexPatternPrompt.exampleTwoTitle": "多数据源", + "indexPatternManagement.indexPatternPrompt.subtitle": "索引模式允许您将异类的数据源一起装入存储桶,从而可以在 Kibana 中查询它们共享的字段。", + "indexPatternManagement.indexPatternPrompt.title": "关于索引模式", + "indexPatternManagement.indexPatterns.badge.readOnly.text": "只读", + "indexPatternManagement.indexPatterns.badge.readOnly.tooltip": "无法保存索引模式", + "indexPatternManagement.indexPatterns.createBreadcrumb": "创建索引模式", + "indexPatternManagement.indexPatterns.createFieldBreadcrumb": "创建字段", + "indexPatternManagement.indexPatterns.listBreadcrumb": "索引模式", + "indexPatternManagement.indexPatternTable.createBtn": "创建索引模式", + "indexPatternManagement.indexPatternTable.title": "索引模式", "kbn.management.landing.header": "Kibana {version} 管理", "kbn.management.landing.subhead": "管理您的索引、索引模式、已保存对象、Kibana 设置等等。", "kbn.management.landing.text": "应用的完整列表位于左侧菜单中。", From f0f3ca5701a648f00249c68c71f2798820d2f9a2 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sun, 3 May 2020 22:51:08 -0500 Subject: [PATCH 04/45] comment cleanup, fix functional tests --- .../kibana/public/management/index.js | 1 - src/plugins/advanced_settings/public/plugin.ts | 2 +- .../step_index_pattern/step_index_pattern.tsx | 4 ++-- .../step_time_field/step_time_field.tsx | 1 - .../create_index_pattern_wizard.tsx | 4 ++-- .../create_edit_field/create_edit_field.tsx | 2 -- .../edit_index_pattern/edit_index_pattern.tsx | 15 ++------------- .../components/table/table.tsx | 1 - .../scripted_fields_table.tsx | 6 +----- .../field_format_editor/editors/index.ts | 1 - .../components/scripting_help/help_flyout.tsx | 1 - .../management_app/mount_management_section.tsx | 7 ------- test/functional/page_objects/settings_page.ts | 2 +- .../public/components/no_index_pattern_callout.js | 2 +- 14 files changed, 10 insertions(+), 39 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/management/index.js b/src/legacy/core_plugins/kibana/public/management/index.js index 8593cf601080f..fa5e485d11580 100644 --- a/src/legacy/core_plugins/kibana/public/management/index.js +++ b/src/legacy/core_plugins/kibana/public/management/index.js @@ -21,7 +21,6 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { FormattedMessage } from '@kbn/i18n/react'; -// import './sections'; import uiRoutes from 'ui/routes'; import { I18nContext } from 'ui/i18n'; import { uiModules } from 'ui/modules'; diff --git a/src/plugins/advanced_settings/public/plugin.ts b/src/plugins/advanced_settings/public/plugin.ts index aeb6087217df4..04eeff1e1f3ce 100644 --- a/src/plugins/advanced_settings/public/plugin.ts +++ b/src/plugins/advanced_settings/public/plugin.ts @@ -40,7 +40,7 @@ export class AdvancedSettingsPlugin this.managementApp = kibanaSection.registerApp({ id: 'settings', title, - order: 100000, + order: 20, async mount(params) { const { mountManagementSection } = await import( './management_app/mount_management_section' diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx index b3396cf55d0f3..5c8fa92d355a3 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx @@ -26,7 +26,7 @@ import { DataPublicPluginStart, IndexPatternAttributes, } from '../../../../../../../plugins/data/public'; -import { SavedObjectsClient, IUiSettingsClient } from '../../../../../../../core/public'; +import { SavedObjectsClientContract, IUiSettingsClient } from '../../../../../../../core/public'; import { MAX_SEARCH_SIZE } from '../../constants'; import { getIndices, @@ -46,7 +46,7 @@ interface StepIndexPatternProps { allIndices: MatchedIndex[]; isIncludingSystemIndices: boolean; esService: DataPublicPluginStart['search']['__LEGACY']['esClient']; - savedObjectsClient: SavedObjectsClient; + savedObjectsClient: SavedObjectsClientContract; indexPatternCreationType: IndexPatternCreationConfig; goToNextStep: (query: string) => void; initialQuery?: string; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx index 5ec862b01082c..d22b503937290 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.tsx @@ -252,7 +252,6 @@ export class StepTimeField extends Component {error} - Promise; indexPatterns: IndexPatternTableItem[]; config: IUiSettingsClient; services: { @@ -95,17 +94,7 @@ const confirmModalOptionsDelete = { }; export const EditIndexPattern = withRouter( - ({ - indexPattern, - // getIndexPattern, - indexPatterns, - config, - services, - history, - location, - }: EditIndexPatternProps) => { - // console.log('EditIndexPattern render', match.params.id); - // todo - load async + ({ indexPattern, indexPatterns, config, services, history, location }: EditIndexPatternProps) => { const [fields, setFields] = useState(indexPattern.getNonScriptedFields()); const [conflictedFields, setConflictedFields] = useState( indexPattern.fields.filter(field => field.type === 'conflict') @@ -157,7 +146,7 @@ export const EditIndexPattern = withRouter( } Promise.resolve(indexPattern.destroy()).then(function() { - history.push('/management/kibana/indexPatterns'); + history.push(''); }); } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx index a6d218c1e655f..e1359eafe1c67 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.tsx @@ -23,7 +23,6 @@ import { EuiIcon, EuiInMemoryTable, EuiIconTip, EuiBasicTableColumn } from '@ela import { i18n } from '@kbn/i18n'; -// import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; import { IIndexPattern } from '../../../../../../../data/public'; import { IndexedFieldItem } from '../../types'; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index d16a55f1c1407..b8bd22f4a9f72 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -150,11 +150,7 @@ export class ScriptedFieldsTable extends Component< }/create-field/`} /> - + diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts index 78bb67d4e969a..645a62ba06c61 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts @@ -28,4 +28,3 @@ export { StaticLookupFormatEditor } from './static_lookup'; export { StringFormatEditor } from './string'; export { TruncateFormatEditor } from './truncate'; export { UrlFormatEditor } from './url'; -// export { DefaultFormatEditor } from './default'; hoping I don't need this diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx index b22028df30de2..126d25f620bcc 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx @@ -25,7 +25,6 @@ import { EuiFlyout, EuiFlyoutBody, EuiTabbedContent } from '@elastic/eui'; import { ScriptingSyntax } from './scripting_syntax'; import { TestScript } from './test_script'; -// import { IndexPattern } from '../../../../../../../../../../plugins/data/public'; import { ExecuteScript } from '../../types'; import { IndexPattern, DataPublicPluginStart } from '../../../../../../data/public'; diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 859a7a616bfef..7f98b09e8859e 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -53,8 +53,6 @@ const readOnlyBadge = { export async function mountManagementSection( getStartServices: StartServicesAccessor, params: ManagementAppMountParams - // indexPatternCreationOptions: IndexPatternCreationOption[], - // getIndexPatternTags: (pattern: IIndexPattern, isDefault: boolean) => IndexPatternTag[] ) { params.setBreadcrumbs(crumb); const [ @@ -128,10 +126,6 @@ export async function mountManagementSection( diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 81d22838d1e8b..05d74bc0452fc 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -52,7 +52,7 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider async clickKibanaIndexPatterns() { log.debug('clickKibanaIndexPatterns link'); - await testSubjects.click('index_patterns'); + await testSubjects.click('indexPatterns'); await PageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js index 2314988c0996d..64ce6a89ec7b1 100644 --- a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js +++ b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js @@ -24,7 +24,7 @@ export function NoIndexPatternCallout() { id="xpack.maps.noIndexPattern.doThisPrefixDescription" defaultMessage="You'll need to " /> - + Date: Mon, 4 May 2020 10:54:41 -0500 Subject: [PATCH 05/45] fix create index pattern functional test --- test/functional/page_objects/settings_page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 05d74bc0452fc..485124de55b39 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -348,7 +348,7 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider await retry.try(async () => { const currentUrl = await browser.getCurrentUrl(); log.info('currentUrl', currentUrl); - if (!currentUrl.match(/index_patterns\/.+\?/)) { + if (!currentUrl.match(/indexPatterns\/.+\?/)) { throw new Error('Index pattern not created'); } else { log.debug('Index pattern created: ' + currentUrl); From a8685e99675cf4214215ee6fffa23fae1683853f Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Mon, 4 May 2020 22:02:42 -0500 Subject: [PATCH 06/45] fix import references --- .../step_index_pattern/step_index_pattern.test.tsx | 8 ++++---- .../step_time_field/step_time_field.test.tsx | 4 ++-- .../create_index_pattern_wizard.test.tsx | 10 +++++----- .../lib/extract_time_fields.ts | 2 +- .../edit_index_pattern/index_header/index_header.tsx | 2 +- .../components/table/table.test.tsx | 2 +- .../indexed_fields_table/indexed_fields_table.test.tsx | 2 +- .../components/table/table.test.tsx | 2 +- .../components/table/table.test.tsx | 2 +- .../source_filters_table/components/table/table.tsx | 3 +-- .../source_filters_table/source_filters_table.test.tsx | 2 +- .../field_format_editor/editors/color/color.test.tsx | 2 +- .../editors/date_nanos/date_nanos.test.tsx | 2 +- .../editors/percent/percent.test.tsx | 2 +- .../editors/static_lookup/static_lookup.test.tsx | 4 ++-- .../scripting_call_outs/warning_call_out.test.tsx | 2 +- .../components/scripting_help/help_flyout.test.tsx | 9 ++++----- 17 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx index 40471b95d774c..68afd64ae848c 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.test.tsx @@ -21,10 +21,10 @@ import React from 'react'; import { StepIndexPattern } from '../step_index_pattern'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; import { Header } from './components/header'; -import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public'; -import { coreMock } from '../../../../../../../../../../core/public/mocks'; -import { dataPluginMock } from '../../../../../../../../../../plugins/data/public/mocks'; -import { SavedObjectsFindResponsePublic } from '../../../../../../../../../../core/public'; +import { IndexPatternCreationConfig } from '../../../../../../../plugins/index_pattern_management/public'; +import { coreMock } from '../../../../../../../core/public/mocks'; +import { dataPluginMock } from '../../../../../../../plugins/data/public/mocks'; +import { SavedObjectsFindResponsePublic } from 'src/core/public'; jest.mock('../../lib/ensure_minimum_time', () => ({ ensureMinimumTime: async (promises: Array>) => diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx index b23b1e3ad9051..d02798d3508a0 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx @@ -19,8 +19,8 @@ import React from 'react'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; -import { IndexPatternCreationConfig } from '../../../../../../../../../../plugins/index_pattern_management/public'; -import { IFieldType } from '../../../../../../../../../../plugins/data/public'; +import { IndexPatternCreationConfig } from '../../../../../../../plugins/index_pattern_management/public'; +import { IFieldType } from '../../../../../../../plugins/data/public'; import { StepTimeField } from '../step_time_field'; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 77b0f058cd388..2240b963cfba6 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -21,11 +21,11 @@ import React from 'react'; import { shallow } from 'enzyme'; import { CreateIndexPatternWizard } from './create_index_pattern_wizard'; -import { coreMock } from '../../../../../../../../core/public/mocks'; -import { dataPluginMock } from '../../../../../../../../plugins/data/public/mocks'; -import { IndexPatternCreationConfig } from '../../../../../../../../plugins/index_pattern_management/public'; -import { IndexPattern } from '../../../../../../../../plugins/data/public'; -import { SavedObjectsClient } from '../../../../../../../../core/public'; +import { coreMock } from '../../../../../core/public/mocks'; +import { dataPluginMock } from '../../../../../plugins/data/public/mocks'; +import { IndexPatternCreationConfig } from '../../../../../plugins/index_pattern_management/public'; +import { IndexPattern } from '../../../../../plugins/data/public'; +import { SavedObjectsClient } from '../../../../../core/public'; jest.mock('./components/step_index_pattern', () => ({ StepIndexPattern: 'StepIndexPattern' })); jest.mock('./components/step_time_field', () => ({ StepTimeField: 'StepTimeField' })); diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts index 0ccdf5735d1b8..809c9f77b2832 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/lib/extract_time_fields.ts @@ -18,7 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { IFieldType } from '../../../../../../../../../plugins/data/public'; +import { IFieldType } from '../../../../../../plugins/data/public'; export function extractTimeFields(fields: IFieldType[]) { const dateFields = fields.filter(field => field.type === 'date'); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx index a9b26c8af7be4..b38ce7e192e47 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx @@ -27,7 +27,7 @@ import { EuiTitle, EuiButtonIcon, } from '@elastic/eui'; -import { IIndexPattern } from '../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from 'src/plugins/data/public'; interface IndexHeaderProps { indexPattern: IIndexPattern; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx index d0479a9a9e032..526185715bf9e 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/components/table/table.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from 'src/plugins/data/public'; import { IndexedFieldItem } from '../../types'; import { Table } from './table'; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx index f8b78a92e098e..2f3360880479c 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { IndexPatternField, IIndexPattern } from '../../../../../../../../../plugins/data/public'; +import { IndexPatternField, IIndexPattern } from 'src/plugins/data/public'; import { IndexedFieldsTable } from './indexed_fields_table'; jest.mock('@elastic/eui', () => ({ diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx index 13b3875f58687..26044f910159a 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx @@ -22,7 +22,7 @@ import { shallow } from 'enzyme'; import { Table } from '../table'; import { ScriptedFieldItem } from '../../types'; -import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from 'src/plugins/data/public'; const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as IIndexPattern); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx index 4705ecd2d1685..421b5b67c2288 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx @@ -22,7 +22,7 @@ import { shallow, ShallowWrapper } from 'enzyme'; import { Table, TableProps, TableState } from './table'; import { EuiTableFieldDataColumnType, keyCodes } from '@elastic/eui'; -import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from 'src/plugins/data/public'; import { SourceFiltersTableFilter } from '../../types'; const indexPattern = {} as IIndexPattern; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx index 0b337a7712e52..04998d9f7dafe 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx @@ -30,10 +30,9 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { IIndexPattern } from 'src/plugins/data/public'; import { SourceFiltersTableFilter } from '../../types'; -import { IIndexPattern } from '../../../../../../../../../../../plugins/data/public'; - const filterHeader = i18n.translate( 'indexPatternManagement.editIndexPattern.source.table.filterHeader', { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx index 1b68dd13566d3..fa048af7c7a70 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/source_filters_table.test.tsx @@ -21,7 +21,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { SourceFiltersTable } from './source_filters_table'; -import { IIndexPattern } from '../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from 'src/plugins/data/public'; jest.mock('@elastic/eui', () => ({ EuiButton: 'eui-button', diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx index 549831e9c3fb2..9d0795bb3c975 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/color/color.test.tsx @@ -22,7 +22,7 @@ import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; import { FieldFormat } from 'src/plugins/data/public'; import { ColorFormatEditor } from './color'; -import { fieldFormats } from '../../../../../../../../plugins/data/public'; +import { fieldFormats } from '../../../../../../../../data/public'; const fieldType = 'string'; const format = { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx index e6b15c741af4e..d410aa205195f 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/date_nanos.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { FieldFormat } from '../../../../../../../../plugins/data/public'; +import { FieldFormat } from '../../../../../../../../data/public'; import { DateNanosFormatEditor } from './date_nanos'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx index ddeb79538cda1..9d17b639c0df7 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/percent.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { FieldFormat } from '../../../../../../../../plugins/data/public'; +import { FieldFormat } from '../../../../../../../../data/public'; import { PercentFormatEditor } from './percent'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx index 2e2b1c3ae2357..bd73fe4fc40a5 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/static_lookup/static_lookup.test.tsx @@ -18,9 +18,9 @@ */ import React from 'react'; -import { shallowWithI18nProvider } from '../../../../../../../../test_utils/public/enzyme_helpers'; +import { shallowWithI18nProvider } from '../../../../../../../../../test_utils/public/enzyme_helpers'; import { StaticLookupFormatEditorFormatParams } from './static_lookup'; -import { FieldFormat } from '../../../../../../../../plugins/data/public'; +import { FieldFormat } from '../../../../../../../../data/public'; import { StaticLookupFormatEditor } from './static_lookup'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx index 8568c2c79816b..d659ac83d7b79 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/warning_call_out.test.tsx @@ -22,7 +22,7 @@ import { shallow } from 'enzyme'; import { ScriptingWarningCallOut } from './warning_call_out'; // eslint-disable-next-line -import { docLinksServiceMock } from '../../../../../../core/public/doc_links/doc_links_service.mock'; +import { docLinksServiceMock } from '../../../../../../../core/public/doc_links/doc_links_service.mock'; describe('ScriptingWarningCallOut', () => { const docLinksScriptedFields = docLinksServiceMock.createStartContract().links.scriptedFields; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx index 4106eb7b283ee..d24e88b8a4380 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx @@ -21,11 +21,11 @@ import React from 'react'; import { shallow } from 'enzyme'; import { HttpStart } from 'src/core/public'; // eslint-disable-next-line -import { docLinksServiceMock } from '../../../../../../core/public/doc_links/doc_links_service.mock'; +import { docLinksServiceMock } from '../../../../../../../core/public/doc_links/doc_links_service.mock'; import { ScriptingHelpFlyout } from './help_flyout'; -import { IndexPattern } from '../../../../../../plugins/data/public'; +import { IndexPattern } from '../../../../../../data/public'; import { ExecuteScript } from '../../types'; @@ -47,8 +47,7 @@ describe('ScriptingHelpFlyout', () => { lang="painless" executeScript={((() => {}) as unknown) as ExecuteScript} onClose={() => {}} - getHttpStart={() => (({} as unknown) as HttpStart)} - // docLinksScriptedFields={docLinksScriptedFields} + http={({} as unknown) as HttpStart} docLinksScriptedFields={{} as typeof docLinksScriptedFields} /> ); @@ -64,7 +63,7 @@ describe('ScriptingHelpFlyout', () => { lang="painless" executeScript={((() => {}) as unknown) as ExecuteScript} onClose={() => {}} - getHttpStart={() => (({} as unknown) as HttpStart)} + http={({} as unknown) as HttpStart} docLinksScriptedFields={{} as typeof docLinksScriptedFields} /> ); From 5ba8c3f91925ddd23dede7b85664ef38b5717e2c Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Tue, 5 May 2020 21:23:14 -0500 Subject: [PATCH 07/45] fix tests, minor cleanups --- .../header/__snapshots__/header.test.tsx.snap | 2 +- .../status_message.test.tsx.snap | 2 +- .../lib/get_indices.test.ts | 4 +- .../lib/get_indices.ts | 4 +- .../create_edit_field/create_edit_field.tsx | 6 +- .../create_edit_field_container.tsx | 4 +- .../lib/get_field_format.test.ts | 2 +- .../lib/get_field_format.ts | 2 +- .../scripted_field_table.test.tsx.snap | 20 +- .../scripted_field_table.test.tsx | 21 +- .../__snapshots__/field_editor.test.tsx.snap | 233 +++++++++++++++++- .../bytes/__snapshots__/bytes.test.tsx.snap | 2 +- .../date/__snapshots__/date.test.tsx.snap | 2 +- .../__snapshots__/date_nanos.test.tsx.snap | 2 +- .../number/__snapshots__/number.test.tsx.snap | 2 +- .../__snapshots__/percent.test.tsx.snap | 2 +- .../label_template_flyout.test.tsx.snap | 4 +- .../url_template_flyout.test.tsx.snap | 4 +- .../warning_call_out.test.tsx.snap | 4 +- .../__snapshots__/help_flyout.test.tsx.snap | 4 +- .../components/scripting_help/help_flyout.tsx | 6 +- .../field_editor/field_editor.test.tsx | 42 ++-- .../components/field_editor/field_editor.tsx | 14 +- .../mount_management_section.tsx | 4 +- .../public/scripting_languages/index.ts | 1 - 25 files changed, 318 insertions(+), 75 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap index 4afc04b0de753..212cd4fd284a6 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap @@ -13,7 +13,7 @@ exports[`Header should render a different name, prompt, and beta tag if provided } } /> - + diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap index 4bc1cc3b38bfe..4a063f1430d1c 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap @@ -12,7 +12,7 @@ exports[`StatusMessage should render with exact matches 1`] = ` type="check" /> - +   @@ -111,7 +111,7 @@ export const CreateEditField = withRouter( indexPattern={indexPattern} field={field} helpers={{ - UiSettings: services.UiSettings, + uiSettings: services.uiSettings, http: services.http, fieldFormatEditors, redirectAway, diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx index 25595a5d5c9ae..1c9081859fc06 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx @@ -37,7 +37,7 @@ export interface CreateEditFieldContainerProps fieldFormatEditors: any; getConfig: IUiSettingsClient; services: { - UiSettings: IUiSettingsClient; + uiSettings: IUiSettingsClient; notifications: NotificationsStart; docTitle: ChromeDocTitle; http: HttpStart; @@ -63,7 +63,7 @@ const CreateEditFieldCont: React.FC = ({ ...props fieldName={props.match.params.fieldName} fieldFormatEditors={props.fieldFormatEditors} services={{ - UiSettings: props.services.UiSettings, + uiSettings: props.services.uiSettings, http: props.services.http, docLinksScriptedFields: props.services.docLinksScriptedFields, SearchBar: props.services.SearchBar, diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts index fc7477c074ac2..2786df641fdb2 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import { IIndexPattern } from '../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../data/public'; import { getFieldFormat } from './get_field_format'; const indexPattern = ({ diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts index 1d6f267430f07..861017d99962e 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/lib/get_field_format.ts @@ -18,7 +18,7 @@ */ import { get } from 'lodash'; -import { IIndexPattern } from '../../../../../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../data/public'; export function getFieldFormat(indexPattern?: IIndexPattern, fieldName?: string): string { return indexPattern && fieldName diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap index 332f5665fd433..68f41342d7283 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap @@ -3,7 +3,7 @@ exports[`ScriptedFieldsTable should filter based on the lang filter 1`] = `
      { test('should render normally', async () => { const component = shallow( - + ); // Allow the componentWillMount code to execute @@ -88,7 +92,11 @@ describe('ScriptedFieldsTable', () => { test('should filter based on the query bar', async () => { const component = shallow( - + ); // Allow the componentWillMount code to execute @@ -112,6 +120,7 @@ describe('ScriptedFieldsTable', () => { { name: 'Bad', lang: 'somethingElse', script: 'z++' }, ], })} + painlessDocLink={'painlessDoc'} helpers={helpers} /> ); @@ -133,6 +142,7 @@ describe('ScriptedFieldsTable', () => { indexPattern={getIndexPatternMock({ getScriptedFields: () => [], })} + painlessDocLink={'painlessDoc'} helpers={helpers} /> ); @@ -147,7 +157,11 @@ describe('ScriptedFieldsTable', () => { test('should show a delete modal', async () => { const component = shallow( - + ); await component.update(); // Fire `componentWillMount()` @@ -167,6 +181,7 @@ describe('ScriptedFieldsTable', () => { removeScriptedField, }} helpers={helpers} + painlessDocLink={'painlessDoc'} /> ); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap index be5a76b873887..01afdae464283 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -32,6 +32,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` isVisible={true} /> - +   - +   - +   - +   - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap index 4ce76126d6736..a4d780c59ca74 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date/__snapshots__/date.test.tsx.snap @@ -19,7 +19,7 @@ exports[`DateFormatEditor should render normally 1`] = ` id="indexPatternManagement.date.documentationLabel" values={Object {}} /> - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap index a2e6ea6b84a85..8c6397ea3adeb 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/date_nanos/__snapshots__/date_nanos.test.tsx.snap @@ -19,7 +19,7 @@ exports[`DateFormatEditor should render normally 1`] = ` id="indexPatternManagement.date.documentationLabel" values={Object {}} /> - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap index 52acd4c53c9d2..42c2323e56979 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/number/__snapshots__/number.test.tsx.snap @@ -19,7 +19,7 @@ exports[`NumberFormatEditor should render normally 1`] = ` id="indexPatternManagement.number.documentationLabel" values={Object {}} /> - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap index 984a98d6a8cff..ac512402b4d41 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/percent/__snapshots__/percent.test.tsx.snap @@ -19,7 +19,7 @@ exports[`PercentFormatEditor should render normally 1`] = ` id="indexPatternManagement.number.documentationLabel" values={Object {}} /> - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap index da3675b0b6dde..958284b00cdc7 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap @@ -38,7 +38,7 @@ exports[`LabelTemplateFlyout should render normally 1`] = ` value - — + —  url - — + —  value - — + —  rawValue - — + —  - +   @@ -40,7 +40,7 @@ exports[`ScriptingWarningCallOut should render normally 1`] = ` id="indexPatternManagement.warningCallOutLabel.scriptsInAggregationLink" values={Object {}} /> - +   diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap index 282e8e311d984..3516179aaa405 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap @@ -36,7 +36,7 @@ exports[`ScriptingHelpFlyout should render normally 1`] = ` Object { "content": , @@ -87,7 +87,7 @@ exports[`ScriptingHelpFlyout should render nothing if not visible 1`] = ` Object { "content": , diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx index 126d25f620bcc..b74d56e1c2878 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.tsx @@ -38,7 +38,7 @@ interface ScriptingHelpFlyoutProps { onClose: () => void; http: HttpStart; docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; - UiSettings: IUiSettingsClient; + uiSettings: IUiSettingsClient; SearchBar: DataPublicPluginStart['ui']['SearchBar']; } @@ -52,7 +52,7 @@ export const ScriptingHelpFlyout: React.FC = ({ executeScript, http, docLinksScriptedFields, - UiSettings, + uiSettings, SearchBar, }) => { const tabs = [ @@ -74,7 +74,7 @@ export const ScriptingHelpFlyout: React.FC = ({ script={script} executeScript={executeScript} http={http} - uiSettings={UiSettings} + uiSettings={uiSettings} SearchBar={SearchBar} /> ), diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx index 2a321879c2895..85fe015225230 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx @@ -19,7 +19,6 @@ import React from 'react'; -// import { npStart } from 'ui/new_platform'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; import { Field, @@ -27,14 +26,17 @@ import { IndexPatternFieldList, FieldFormatInstanceType, } from 'src/plugins/data/public'; -import { HttpStart } from '../../../../core/public'; + +import { coreMock } from '../../../../../core/public/mocks'; + // eslint-disable-next-line -import { docLinksServiceMock } from '../../../../core/public/doc_links/doc_links_service.mock'; +import { docLinksServiceMock } from '../../../../../core/public/doc_links/doc_links_service.mock'; jest.mock('brace/mode/groovy', () => ({})); jest.mock('ui/new_platform'); -import { FieldEditor } from './field_editor'; +import { FieldEdiorProps, FieldEditor } from './field_editor'; +import { dataPluginMock } from '../../../../data/public/mocks'; jest.mock('@elastic/eui', () => ({ EuiBasicTable: 'eui-basic-table', @@ -60,7 +62,7 @@ jest.mock('@elastic/eui', () => ({ euiPaletteColorBlind: () => ['red'], })); -jest.mock('ui/scripting_languages', () => ({ +jest.mock('../../scripting_languages', () => ({ getEnabledScriptingLanguages: () => ['painless', 'testlang'], getSupportedScriptingLanguages: () => ['painless'], getDeprecatedScriptingLanguages: () => ['testlang'], @@ -100,27 +102,35 @@ const field = { format: new Format(), }; -const helpers = { - Field: () => {}, - getConfig: () => {}, - getHttpStart: () => (({} as unknown) as HttpStart), - fieldFormatEditors: [], - redirectAway: () => {}, - docLinksScriptedFields: docLinksServiceMock.createStartContract().links.scriptedFields, -}; - describe('FieldEditor', () => { + const dataStartServices = dataPluginMock.createStartContract(); + const coreStartServices = coreMock.createStart(); + let indexPattern: IndexPattern; + const helpers: FieldEdiorProps['helpers'] = ({ + Field: () => {}, + getConfig: () => {}, + fieldFormatEditors: [], + redirectAway: () => {}, + docLinksScriptedFields: docLinksServiceMock.createStartContract().links.scriptedFields, + fieldFormats: dataStartServices.fieldFormats, + toasts: coreStartServices.notifications.toasts, + http: coreStartServices.http, + uiSettings: coreStartServices.uiSettings, + SearchBar: dataStartServices.ui.SearchBar, + } as unknown) as FieldEdiorProps['helpers']; + beforeEach(() => { indexPattern = ({ fields: fields as IndexPatternFieldList, } as unknown) as IndexPattern; - npStart.plugins.data.fieldFormats.getDefaultType = jest.fn( + helpers.fieldFormats.getDefaultType = jest.fn( () => (({} as unknown) as FieldFormatInstanceType) ); - npStart.plugins.data.fieldFormats.getByFieldType = jest.fn(fieldType => { + + helpers.fieldFormats.getByFieldType = jest.fn(fieldType => { if (fieldType === 'number') { return [({} as unknown) as FieldFormatInstanceType]; } else { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx index a74caaa426499..44ea7f63d1233 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx @@ -141,7 +141,7 @@ export interface FieldEdiorProps { docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; fieldFormats: DataPublicPluginStart['fieldFormats']; toasts: NotificationsStart['toasts']; - UiSettings: IUiSettingsClient; + uiSettings: IUiSettingsClient; SearchBar: DataPublicPluginStart['ui']['SearchBar']; }; } @@ -220,14 +220,15 @@ export class FieldEditor extends PureComponent { - const { UiSettings } = this.props.helpers; + const { uiSettings } = this.props.helpers; const { field } = this.state; const DefaultFieldFormat = this.props.helpers.fieldFormats.getDefaultType( type ) as FieldFormatInstanceType; field.type = type; - field.format = new DefaultFieldFormat(null, UiSettings.get); + + field.format = new DefaultFieldFormat(null, key => uiSettings.get(key)); this.setState({ fieldTypeFormats: getFieldTypeFormatsList( @@ -253,12 +254,13 @@ export class FieldEditor extends PureComponent { const { field, fieldTypeFormats } = this.state; + const { uiSettings, fieldFormats } = this.props.helpers; - const FieldFormat = this.props.helpers.fieldFormats.getType( + const FieldFormat = fieldFormats.getType( formatId || (fieldTypeFormats[0] as InitialFieldTypeFormat).defaultFieldFormat.id ) as FieldFormatInstanceType; - field.format = new FieldFormat(params, this.props.helpers.UiSettings.get); + field.format = new FieldFormat(params, key => uiSettings.get(key)); this.setState({ fieldFormatId: FieldFormat.id, @@ -759,7 +761,7 @@ export class FieldEditor extends PureComponent diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 7f98b09e8859e..e12aa0fd34c10 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -81,6 +81,8 @@ export async function mountManagementSection( const title = pattern.get('title'); const isDefault = defaultIndex === id; + // TODO: we should not use the runtime contract of the plugin in which we work + // list.getIndexPatternTags should be passed as dependencies const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( pattern, isDefault @@ -146,9 +148,9 @@ export async function mountManagementSection( services={{ http, notifications, + uiSettings, docTitle: chrome.docTitle, docLinksScriptedFields: docLinks.links.scriptedFields, - UiSettings: uiSettings, toasts: notifications.toasts, fieldFormats: data.fieldFormats, SearchBar: data.ui.SearchBar, diff --git a/src/plugins/index_pattern_management/public/scripting_languages/index.ts b/src/plugins/index_pattern_management/public/scripting_languages/index.ts index eb793f7fc91f7..b4883a8276e41 100644 --- a/src/plugins/index_pattern_management/public/scripting_languages/index.ts +++ b/src/plugins/index_pattern_management/public/scripting_languages/index.ts @@ -19,7 +19,6 @@ import { i18n } from '@kbn/i18n'; import { HttpStart, NotificationsStart } from 'src/core/public'; -// import { toastNotifications } from '../notify'; export function getSupportedScriptingLanguages(): string[] { return ['painless']; From bc96e160d4474130fea641c9a9487bb5a156748b Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Tue, 5 May 2020 22:13:08 -0500 Subject: [PATCH 08/45] fix url --- .../public/application/components/fetch_error/fetch_error.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/discover/public/application/components/fetch_error/fetch_error.tsx b/src/plugins/discover/public/application/components/fetch_error/fetch_error.tsx index e16089500d3e5..fff0628d651b1 100644 --- a/src/plugins/discover/public/application/components/fetch_error/fetch_error.tsx +++ b/src/plugins/discover/public/application/components/fetch_error/fetch_error.tsx @@ -41,7 +41,7 @@ const DiscoverFetchError = ({ fetchError }: Props) => { const { chrome } = getServices(); const mangagementUrlObj = chrome.navLinks.get('kibana:stack_management'); const managementUrl = mangagementUrlObj ? mangagementUrlObj.url : ''; - const url = `${managementUrl}/kibana/index_patterns`; + const url = `${managementUrl}/kibana/indexPatterns`; body = (

      From ad28f0edd95b9cff6b5d164335677ad400225ee5 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 May 2020 12:25:29 +0300 Subject: [PATCH 09/45] fix test: management scripted fields should not allow saving of invalid scripts --- .../create_edit_field/create_edit_field.tsx | 5 +++-- .../create_edit_field/create_edit_field_container.tsx | 2 ++ .../public/components/field_editor/field_editor.test.tsx | 1 + .../public/components/field_editor/field_editor.tsx | 1 + .../public/management_app/mount_management_section.tsx | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx index 872ab0e4aee6f..08ec2bccfbeb4 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx @@ -36,13 +36,13 @@ interface CreateEditFieldProps extends RouteComponentProps { fieldFormatEditors: any; services: { uiSettings: IUiSettingsClient; - dataStart: DataPublicPluginStart; docTitle: ChromeDocTitle; http: HttpStart; docLinksScriptedFields: DocLinksStart['links']['scriptedFields']; SearchBar: DataPublicPluginStart['ui']['SearchBar']; toasts: NotificationsStart['toasts']; fieldFormats: DataPublicPluginStart['fieldFormats']; + indexPatterns: DataPublicPluginStart['indexPatterns']; }; } @@ -65,7 +65,7 @@ export const CreateEditField = withRouter( const field = mode === 'edit' && fieldName ? indexPattern.fields.getByName(fieldName) - : services.dataStart.indexPatterns.createField( + : services.indexPatterns.createField( indexPattern, { scripted: true, @@ -120,6 +120,7 @@ export const CreateEditField = withRouter( SearchBar: services.SearchBar, toasts: services.toasts, fieldFormats: services.fieldFormats, + indexPatterns: services.indexPatterns, }} /> diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx index 1c9081859fc06..c338bf096480f 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx @@ -45,6 +45,7 @@ export interface CreateEditFieldContainerProps SearchBar: DataPublicPluginStart['ui']['SearchBar']; toasts: NotificationsStart['toasts']; fieldFormats: DataPublicPluginStart['fieldFormats']; + indexPatterns: DataPublicPluginStart['indexPatterns']; }; } @@ -70,6 +71,7 @@ const CreateEditFieldCont: React.FC = ({ ...props toasts: props.services.toasts, fieldFormats: props.services.fieldFormats, docTitle: props.services.docTitle, + indexPatterns: props.services.indexPatterns, }} /> ); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx index 282ac4412429d..06efa7edbb0b6 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx @@ -119,6 +119,7 @@ describe('FieldEditor', () => { http: coreStartServices.http, uiSettings: coreStartServices.uiSettings, SearchBar: dataStartServices.ui.SearchBar, + indexPatterns: dataStartServices.indexPatterns, } as unknown) as FieldEdiorProps['helpers']; beforeEach(() => { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx index cf43a820d284f..e648f508419db 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx @@ -143,6 +143,7 @@ export interface FieldEdiorProps { toasts: NotificationsStart['toasts']; uiSettings: IUiSettingsClient; SearchBar: DataPublicPluginStart['ui']['SearchBar']; + indexPatterns: DataPublicPluginStart['indexPatterns']; }; } diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index e12aa0fd34c10..188ef0b743259 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -154,6 +154,7 @@ export async function mountManagementSection( toasts: notifications.toasts, fieldFormats: data.fieldFormats, SearchBar: data.ui.SearchBar, + indexPatterns: data.indexPatterns, }} /> From 5d8acd5856df618f032c0acdc4eb4bf63311d96d Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 May 2020 14:23:38 +0300 Subject: [PATCH 10/45] fix JEST, fix types --- .../create_index_pattern_wizard.test.tsx.snap | 39 +++++++++++------- .../create_index_pattern_wizard.test.tsx | 40 +++++++++++++------ .../create_index_pattern_wizard.tsx | 2 +- .../field_format_editor.test.tsx | 1 + .../mount_management_section.tsx | 5 +-- 5 files changed, 55 insertions(+), 32 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap index 1545ab8cb9b1c..cbd99966d41ee 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap @@ -1,7 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateIndexPatternWizard defaults to the loading state 1`] = ` - +

      - + `; exports[`CreateIndexPatternWizard renders index pattern step when there are indices 1`] = ` - +
      - + `; exports[`CreateIndexPatternWizard renders the empty state when there are no indices 1`] = ` - +
      - + `; exports[`CreateIndexPatternWizard renders time field step when step is set to 2 1`] = ` - +
      - + `; exports[`CreateIndexPatternWizard renders when there are no indices but there are remote clusters 1`] = ` - +
      - + `; exports[`CreateIndexPatternWizard shows system indices even if there are no other indices if the include system indices is toggled 1`] = ` - +
      - + `; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 2240b963cfba6..1790ff08f2804 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -20,12 +20,15 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { CreateIndexPatternWizard } from './create_index_pattern_wizard'; +import { + CreateIndexPatternWizard, + CreateIndexPatternWizardProps, +} from './create_index_pattern_wizard'; import { coreMock } from '../../../../../core/public/mocks'; import { dataPluginMock } from '../../../../../plugins/data/public/mocks'; -import { IndexPatternCreationConfig } from '../../../../../plugins/index_pattern_management/public'; import { IndexPattern } from '../../../../../plugins/data/public'; import { SavedObjectsClient } from '../../../../../core/public'; +import { IndexPatternCreationConfig } from '../../service/creation'; jest.mock('./components/step_index_pattern', () => ({ StepIndexPattern: 'StepIndexPattern' })); jest.mock('./components/step_time_field', () => ({ StepTimeField: 'StepTimeField' })); @@ -43,26 +46,36 @@ jest.mock('ui/chrome', () => ({ const { savedObjects, overlays, uiSettings } = coreMock.createStart(); const { indexPatterns, search } = dataPluginMock.createStartContract(); + const mockIndexPatternCreationType = new IndexPatternCreationConfig({ type: 'default', name: 'name', }); -const initialQuery = ''; -const services = { +const services = ({ + indexPatternCreation: { + getType: jest.fn(() => mockIndexPatternCreationType), + }, es: search.__LEGACY.esClient, indexPatterns, savedObjectsClient: savedObjects.client as SavedObjectsClient, uiSettings, changeUrl: jest.fn(), openConfirm: overlays.openConfirm, - indexPatternCreationType: mockIndexPatternCreationType, +} as unknown) as CreateIndexPatternWizardProps['services']; + +const routeComponentPropsMock = { + history: { + push: jest.fn(), + } as any, + location: {} as any, + match: {} as any, }; describe('CreateIndexPatternWizard', () => { test(`defaults to the loading state`, () => { const component = shallow( - + ); expect(component).toMatchSnapshot(); @@ -70,7 +83,7 @@ describe('CreateIndexPatternWizard', () => { test('renders the empty state when there are no indices', async () => { const component = shallow( - + ); component.setState({ @@ -85,7 +98,7 @@ describe('CreateIndexPatternWizard', () => { test('renders when there are no indices but there are remote clusters', async () => { const component = shallow( - + ); component.setState({ @@ -100,7 +113,7 @@ describe('CreateIndexPatternWizard', () => { test('shows system indices even if there are no other indices if the include system indices is toggled', async () => { const component = shallow( - + ); component.setState({ @@ -115,7 +128,7 @@ describe('CreateIndexPatternWizard', () => { test('renders index pattern step when there are indices', async () => { const component = shallow( - + ); component.setState({ @@ -129,7 +142,7 @@ describe('CreateIndexPatternWizard', () => { test('renders time field step when step is set to 2', async () => { const component = shallow( - + ); component.setState({ @@ -158,7 +171,7 @@ describe('CreateIndexPatternWizard', () => { }; const component = shallow( - + ); component.setState({ indexPattern: 'foo' }); @@ -166,6 +179,7 @@ describe('CreateIndexPatternWizard', () => { expect(services.uiSettings.get).toBeCalled(); expect(create).toBeCalled(); expect(clear).toBeCalledWith('id'); - expect(services.changeUrl).toBeCalledWith(`/management/kibana/indexPatterns/patterns/id`); + // todo: + expect(routeComponentPropsMock.history.push).toBeCalledWith(`/patterns/id`); }); }); diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx index 9002819618aee..9ae72ceb1dcc3 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx @@ -37,7 +37,7 @@ import { ensureMinimumTime, getIndices } from './lib'; import { IndexPatternCreationConfig, IndexPatternManagementStart } from '../..'; import { MatchedIndex } from './types'; -interface CreateIndexPatternWizardProps extends RouteComponentProps { +export interface CreateIndexPatternWizardProps extends RouteComponentProps { services: { indexPatternCreation: IndexPatternManagementStart['creation']; es: DataPublicPluginStart['search']['__LEGACY']['esClient']; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx index f6e631c8b7ac0..c94d2e2f861dc 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/field_format_editor.test.tsx @@ -37,6 +37,7 @@ const formatEditors = { ip: TestEditor, number: TestEditor, }, + getById: jest.fn(() => TestEditor), }; describe('FieldFormatEditor', () => { diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 188ef0b743259..fa2045ad96e09 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -81,10 +81,9 @@ export async function mountManagementSection( const title = pattern.get('title'); const isDefault = defaultIndex === id; - // TODO: we should not use the runtime contract of the plugin in which we work - // list.getIndexPatternTags should be passed as dependencies const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( - pattern, + // todo: temporary cast SimpleSavedObject -> IIndexPattern + (pattern as unknown) as IIndexPattern, isDefault ); From f33576b9a36ccef0543bf13e8a0c770cfe99efe6 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 6 May 2020 13:43:36 +0300 Subject: [PATCH 11/45] fixed X-Pack Chrome Functional tests / Group 2 --- .../feature_controls/index_patterns_security.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts index 6a129d6687792..ab2afce802916 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_security.ts @@ -186,12 +186,14 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.missingOrFail('index_patterns'); }); - it(`does not allow navigation to Index Patterns; redirects to Kibana home`, async () => { + it(`does not allow navigation to Index Patterns; redirects to management home`, async () => { await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/indexPatterns', { ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') }); + await testSubjects.existOrFail('managementHome', { + timeout: config.get('timeouts.waitFor'), + }); }); }); }); From 5f82b2576139bcef740a1f43cd60b21cc4e94486 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 6 May 2020 16:03:58 +0300 Subject: [PATCH 12/45] Fixed types --- .../status_message.test.tsx.snap | 6 ++-- .../advanced_options.test.tsx.snap | 3 +- .../__snapshots__/call_outs.test.tsx.snap | 3 +- .../header/__snapshots__/header.test.tsx.snap | 3 +- .../header/__snapshots__/header.test.tsx.snap | 8 +++-- .../__snapshots__/field_editor.test.tsx.snap | 27 +++++++++----- .../label_template_flyout.test.tsx.snap | 4 ++- .../url_template_flyout.test.tsx.snap | 4 ++- .../disabled_call_out.test.tsx.snap | 3 +- .../warning_call_out.test.tsx.snap | 4 ++- .../__snapshots__/help_flyout.test.tsx.snap | 36 +++++++++++++++++++ .../scripting_help/help_flyout.test.tsx | 10 ++++++ .../index_pattern_management/public/mocks.ts | 20 +++++++++-- 13 files changed, 109 insertions(+), 22 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap index 4a063f1430d1c..9a45e1289387c 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap @@ -54,7 +54,8 @@ exports[`StatusMessage should render with no partial matches 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap index 75ed855123524..3c037e906f52a 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap @@ -15,7 +15,8 @@ exports[`CallOuts should render normally 1`] = ` >

      diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap index 1f380d68a5af5..0599517f69552 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap @@ -16,14 +16,18 @@ exports[`Header should render normally 1`] = `

      diff --git a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap index 01afdae464283..d14fea4794ed9 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -169,7 +169,8 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` @@ -464,7 +465,8 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` @@ -733,7 +735,8 @@ exports[`FieldEditor should show conflict field warning 1`] = ` />   @@ -1084,7 +1088,8 @@ exports[`FieldEditor should show deprecated lang warning 1`] = `   @@ -1472,7 +1478,8 @@ exports[`FieldEditor should show multiple type field warning with a table contai />   @@ -1613,7 +1621,8 @@ exports[`FieldEditor should show multiple type field warning with a table contai diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap index 69b192a81d097..dbb694770fe72 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap @@ -17,7 +17,9 @@ exports[`LabelTemplateFlyout should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap index c9b5c84939bc6..8eaf82385098a 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap @@ -51,7 +51,9 @@ exports[`ScriptingWarningCallOut should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap index ef7ff3876693b..5100c382c225f 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/__snapshots__/help_flyout.test.tsx.snap @@ -30,10 +30,28 @@ exports[`ScriptingHelpFlyout should render normally 1`] = ` }, Object { "content": , "data-test-subj": "testTab", "id": "test", @@ -76,10 +94,28 @@ exports[`ScriptingHelpFlyout should render nothing if not visible 1`] = ` }, Object { "content": , "data-test-subj": "testTab", "id": "test", diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx index d24e88b8a4380..fa2d97be60000 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/help_flyout.test.tsx @@ -29,12 +29,18 @@ import { IndexPattern } from '../../../../../../data/public'; import { ExecuteScript } from '../../types'; +import { coreMock } from '../../../../../../../core/public/mocks'; +import { dataPluginMock } from '../../../../../../../plugins/data/public/mocks'; + jest.mock('./test_script', () => ({ TestScript: () => { return `

    mockTestScript
    `; }, })); +const { uiSettings } = coreMock.createStart(); +const { ui } = dataPluginMock.createStartContract(); + const indexPatternMock = {} as IndexPattern; describe('ScriptingHelpFlyout', () => { @@ -49,6 +55,8 @@ describe('ScriptingHelpFlyout', () => { onClose={() => {}} http={({} as unknown) as HttpStart} docLinksScriptedFields={{} as typeof docLinksScriptedFields} + uiSettings={uiSettings} + SearchBar={ui.SearchBar} /> ); @@ -65,6 +73,8 @@ describe('ScriptingHelpFlyout', () => { onClose={() => {}} http={({} as unknown) as HttpStart} docLinksScriptedFields={{} as typeof docLinksScriptedFields} + uiSettings={uiSettings} + SearchBar={ui.SearchBar} /> ); diff --git a/src/plugins/index_pattern_management/public/mocks.ts b/src/plugins/index_pattern_management/public/mocks.ts index bc97f46c302e3..b83d7699200f6 100644 --- a/src/plugins/index_pattern_management/public/mocks.ts +++ b/src/plugins/index_pattern_management/public/mocks.ts @@ -19,6 +19,9 @@ import { PluginInitializerContext } from 'src/core/public'; import { coreMock } from '../../../core/public/mocks'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { managementPluginMock } from '../../../plugins/management/public/mocks'; +import { dataPluginMock } from '../../../plugins/data/public/mocks'; import { IndexPatternManagementSetup, IndexPatternManagementStart, @@ -32,6 +35,10 @@ const createSetupContract = (): IndexPatternManagementSetup => ({ list: { addListConfig: jest.fn(), } as any, + fieldFormatEditors: { + getAll: jest.fn(), + getById: jest.fn(), + } as any, }); const createStartContract = (): IndexPatternManagementStart => ({ @@ -44,13 +51,22 @@ const createStartContract = (): IndexPatternManagementStart => ({ getFieldInfo: jest.fn(), areScriptedFieldsEnabled: jest.fn(), } as any, + fieldFormatEditors: { + getAll: jest.fn(), + getById: jest.fn(), + } as any, }); const createInstance = async () => { const plugin = new IndexPatternManagementPlugin({} as PluginInitializerContext); - const setup = plugin.setup(coreMock.createSetup()); - const doStart = () => plugin.start(coreMock.createStart(), {}); + const setup = plugin.setup(coreMock.createSetup(), { + management: managementPluginMock.createSetupContract(), + }); + const doStart = () => + plugin.start(coreMock.createStart(), { + data: dataPluginMock.createStartContract(), + }); return { plugin, From 6119a092177b6d49e1a9b2273bd2888a5d246805 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 6 May 2020 16:07:34 +0300 Subject: [PATCH 13/45] Fixed another one test from X-Pack Chrome Functional tests / Group 2 --- .../feature_controls/index_patterns_spaces.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts index 3976eaf37bd70..69f315cff5c3f 100644 --- a/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts +++ b/x-pack/test/functional/apps/index_patterns/feature_controls/index_patterns_spaces.ts @@ -69,13 +69,15 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { await esArchiver.unload('empty_kibana'); }); - it(`redirects to Kibana home`, async () => { + it(`redirects to management home`, async () => { await PageObjects.common.navigateToActualUrl('kibana', 'management/kibana/indexPatterns', { basePath: `/s/custom_space`, ensureCurrentUrl: false, shouldLoginIfPrompted: false, }); - await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') }); + await testSubjects.existOrFail('managementHome', { + timeout: config.get('timeouts.waitFor'), + }); }); }); }); From 1d3fc796cc6d1d7ef630232741f3f995e91e7a60 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 May 2020 16:18:13 +0300 Subject: [PATCH 14/45] fix snapshots --- .../status_message.test.tsx.snap | 6 ++--- .../advanced_options.test.tsx.snap | 3 +-- .../__snapshots__/call_outs.test.tsx.snap | 3 +-- .../header/__snapshots__/header.test.tsx.snap | 3 +-- .../header/__snapshots__/header.test.tsx.snap | 8 ++---- .../__snapshots__/field_editor.test.tsx.snap | 27 +++++++------------ .../label_template_flyout.test.tsx.snap | 4 +-- .../url_template_flyout.test.tsx.snap | 4 +-- .../disabled_call_out.test.tsx.snap | 3 +-- .../warning_call_out.test.tsx.snap | 4 +-- 10 files changed, 20 insertions(+), 45 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap index 9a45e1289387c..4a063f1430d1c 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/status_message/__snapshots__/status_message.test.tsx.snap @@ -54,8 +54,7 @@ exports[`StatusMessage should render with no partial matches 1`] = ` > diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap index 3c037e906f52a..75ed855123524 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/call_outs/__snapshots__/call_outs.test.tsx.snap @@ -15,8 +15,7 @@ exports[`CallOuts should render normally 1`] = ` >

    diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap index 0599517f69552..1f380d68a5af5 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap @@ -16,18 +16,14 @@ exports[`Header should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap index d14fea4794ed9..01afdae464283 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -169,8 +169,7 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` @@ -465,8 +464,7 @@ exports[`FieldEditor should render edit scripted field correctly 1`] = ` @@ -735,8 +733,7 @@ exports[`FieldEditor should show conflict field warning 1`] = ` />   @@ -1088,8 +1084,7 @@ exports[`FieldEditor should show deprecated lang warning 1`] = `   @@ -1478,8 +1472,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai />   @@ -1621,8 +1613,7 @@ exports[`FieldEditor should show multiple type field warning with a table contai diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap index dbb694770fe72..69b192a81d097 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/__snapshots__/label_template_flyout.test.tsx.snap @@ -17,9 +17,7 @@ exports[`LabelTemplateFlyout should render normally 1`] = `

    diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap index 8eaf82385098a..c9b5c84939bc6 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_call_outs/__snapshots__/warning_call_out.test.tsx.snap @@ -51,9 +51,7 @@ exports[`ScriptingWarningCallOut should render normally 1`] = `

    From cea23ea8cf38e6c9740ed88941d7a5050b7bb205 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 6 May 2020 19:02:03 +0300 Subject: [PATCH 15/45] move getting indexPatterns to the comonents --- .../edit_index_pattern/edit_index_pattern.tsx | 13 +++- .../edit_index_pattern_container.tsx | 5 +- .../index_pattern_table.tsx | 35 +++++++-- .../public/components/utils.ts | 73 +++++++++++++++++++ .../mount_management_section.tsx | 54 ++------------ 5 files changed, 119 insertions(+), 61 deletions(-) create mode 100644 src/plugins/index_pattern_management/public/components/utils.ts diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx index 6da0705f384ed..5d994306ecd07 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -38,21 +38,23 @@ import { NotificationsStart, OverlayStart, IUiSettingsClient, + SavedObjectsClientContract, } from 'src/core/public'; import { IndexPattern, IndexPatternField } from '../../../../../plugins/data/public'; import { IndexPatternManagementStart } from '../..'; import { Tabs } from './tabs'; import { IndexHeader } from './index_header'; import { IndexPatternTableItem } from '../types'; +import { getIndexPatterns } from '../utils'; export interface EditIndexPatternProps extends RouteComponentProps { indexPattern: IndexPattern; - indexPatterns: IndexPatternTableItem[]; config: IUiSettingsClient; services: { notifications: NotificationsStart; docTitle: ChromeDocTitle; overlays: OverlayStart; + savedObjectsClient: SavedObjectsClientContract; indexPatternManagement: IndexPatternManagementStart; }; } @@ -94,7 +96,7 @@ const confirmModalOptionsDelete = { }; export const EditIndexPattern = withRouter( - ({ indexPattern, indexPatterns, config, services, history, location }: EditIndexPatternProps) => { + ({ indexPattern, config, services, history, location }: EditIndexPatternProps) => { const [fields, setFields] = useState(indexPattern.getNonScriptedFields()); const [conflictedFields, setConflictedFields] = useState( indexPattern.fields.filter(field => field.type === 'conflict') @@ -133,8 +135,13 @@ export const EditIndexPattern = withRouter( }; const removePattern = () => { - function doRemove() { + async function doRemove() { if (indexPattern.id === defaultIndex) { + const indexPatterns: IndexPatternTableItem[] = await getIndexPatterns( + services.savedObjectsClient, + config.get('defaultIndex'), + services.indexPatternManagement + ); config.remove('defaultIndex'); const otherPatterns = filter(indexPatterns, pattern => { return pattern.id !== indexPattern.id; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx index 9b4e18778848a..62f5d3de1dd3a 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -24,21 +24,21 @@ import { NotificationsStart, OverlayStart, IUiSettingsClient, + SavedObjectsClientContract, } from 'src/core/public'; import { IndexPattern } from '../../../../../plugins/data/public'; import { IndexPatternManagementStart } from '../..'; -import { IndexPatternTableItem } from '../types'; import { EditIndexPattern } from '../edit_index_pattern'; export interface EditIndexPatternContainerProps extends RouteComponentProps<{ id: string }> { getIndexPattern: (id: string) => Promise; - indexPatterns: IndexPatternTableItem[]; config: IUiSettingsClient; services: { notifications: NotificationsStart; docTitle: ChromeDocTitle; overlays: OverlayStart; + savedObjectsClient: SavedObjectsClientContract; indexPatternManagement: IndexPatternManagementStart; }; } @@ -56,7 +56,6 @@ const EditIndexPatternCont: React.FC = ({ ...pro indexPattern={indexPattern} services={props.services} config={props.config} - indexPatterns={props.indexPatterns} /> ); } else { diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index f9ea61f87f67a..be40586ee0cab 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -32,10 +32,12 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; +import { SavedObjectsClientContract, IUiSettingsClient } from 'src/core/public'; import { CreateButton } from '../create_button'; import { CreateIndexPatternPrompt } from '../create_index_pattern_prompt'; import { IndexPatternTableItem, IndexPatternCreationOption } from '../types'; import { IndexPatternManagementStart } from '../../plugin'; +import { getIndexPatterns } from '../utils'; const columns = [ { @@ -92,26 +94,45 @@ const ariaRegion = i18n.translate('indexPatternManagement.editIndexPatternLiveRe }); interface Props extends RouteComponentProps { - indexPatterns: IndexPatternTableItem[]; getIndexPatternCreationOptions: IndexPatternManagementStart['creation']['getIndexPatternCreationOptions']; canSave: boolean; + services: { + savedObjectsClient: SavedObjectsClientContract; + uiSettings: IUiSettingsClient; + indexPatternManagement: IndexPatternManagementStart; + }; } export const IndexPatternTable = ({ - indexPatterns, getIndexPatternCreationOptions, canSave, history, + services, }: Props) => { - const [showFlyout, setShowFlyout] = useState(indexPatterns.length === 0); + const [showFlyout, setShowFlyout] = useState(true); + const [indexPatterns, setIndexPatterns] = useState([]); const [creationOptions, setCreationOptions] = useState([]); useEffect(() => { - // setCreationOptions(await getIndexPatternCreationOptions(history.push)); - getIndexPatternCreationOptions(history.push).then(options => { + (async function() { + const options = await getIndexPatternCreationOptions(history.push); + const gettedIndexPatterns: IndexPatternTableItem[] = await getIndexPatterns( + services.savedObjectsClient, + services.uiSettings.get('defaultIndex'), + services.indexPatternManagement + ); setCreationOptions(options); - }); - }, [getIndexPatternCreationOptions, history.push]); + setIndexPatterns(gettedIndexPatterns); + setShowFlyout(gettedIndexPatterns.length === 0); + })(); + }, [ + getIndexPatternCreationOptions, + history.push, + indexPatterns.length, + services.indexPatternManagement, + services.savedObjectsClient, + services.uiSettings, + ]); const createButton = canSave ? ( diff --git a/src/plugins/index_pattern_management/public/components/utils.ts b/src/plugins/index_pattern_management/public/components/utils.ts new file mode 100644 index 0000000000000..fbd398df4e7a6 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/utils.ts @@ -0,0 +1,73 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { IIndexPattern } from 'src/plugins/data/public'; +import { SavedObjectsClientContract } from 'src/core/public'; +import { IndexPatternManagementStart } from '../plugin'; + +export async function getIndexPatterns( + savedObjectsClient: SavedObjectsClientContract, + defaultIndex: string, + indexPatternManagementStart: IndexPatternManagementStart +) { + return ( + savedObjectsClient + .find({ + type: 'index-pattern', + fields: ['title', 'type'], + perPage: 10000, + }) + .then(response => + response.savedObjects + .map(pattern => { + const id = pattern.id; + const title = pattern.get('title'); + const isDefault = defaultIndex === id; + + const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( + // todo: temporary cast SimpleSavedObject -> IIndexPattern + (pattern as unknown) as IIndexPattern, + isDefault + ); + + return { + id, + title, + url: '', + // url: kbnUrl.eval('#/management/kibana/indexPatterns/create{{id}}', { id }), + // active: $scope.editingId === id, + default: isDefault, + tags, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${isDefault ? '0' : '1'}${title}`, + }; + }) + .sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + }) + ) || [] + ); +} diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index fa2045ad96e09..a96f22bd540cb 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -60,58 +60,12 @@ export async function mountManagementSection( { data }, indexPatternManagementStart, ] = await getStartServices(); - const defaultIndex = uiSettings.get('defaultIndex'); const canSave = application.capabilities.indexPatterns.save as boolean; if (!canSave) { chrome.setBadge(readOnlyBadge); } - const indexPatterns = - (await savedObjects.client - .find({ - type: 'index-pattern', - fields: ['title', 'type'], - perPage: 10000, - }) - .then(response => - response.savedObjects - .map(pattern => { - const id = pattern.id; - const title = pattern.get('title'); - const isDefault = defaultIndex === id; - - const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( - // todo: temporary cast SimpleSavedObject -> IIndexPattern - (pattern as unknown) as IIndexPattern, - isDefault - ); - - return { - id, - title, - url: '', - // url: kbnUrl.eval('#/management/kibana/indexPatterns/create{{id}}', { id }), - // active: $scope.editingId === id, - default: isDefault, - tags, - // the prepending of 0 at the default pattern takes care of prioritization - // so the sorting will but the default index on top - // or on bottom of a the table - sort: `${isDefault ? '0' : '1'}${title}`, - }; - }) - .sort((a, b) => { - if (a.sort < b.sort) { - return -1; - } else if (a.sort > b.sort) { - return 1; - } else { - return 0; - } - }) - )) || []; - // todo - need new path to create index pattern // todo navigate to items // todo path w/o slash @@ -161,25 +115,29 @@ export async function mountManagementSection( From 71b9ac1382c1543cb4cc9f82f9a8f21ea5c79c03 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 May 2020 19:41:41 +0300 Subject: [PATCH 16/45] fix ts issue --- .../public/management_app/mount_management_section.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index a96f22bd540cb..42b971d15c739 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -24,7 +24,6 @@ import { HashRouter, Switch, Route } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n/react'; import { StartServicesAccessor } from 'src/core/public'; -import { IIndexPattern } from 'src/plugins/data/public'; import { ManagementAppMountParams } from '../../../management/public'; import { From c55b87789bf30995e1becaf97dbe17429cd07a3c Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Wed, 6 May 2020 23:47:28 +0300 Subject: [PATCH 17/45] fix JEST --- .../components/__snapshots__/add_data.test.js.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap index fd4c373125168..011382e94eded 100644 --- a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap +++ b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap @@ -277,7 +277,7 @@ exports[`apmUiEnabled 1`] = ` /> Date: Thu, 7 May 2020 12:37:58 +0300 Subject: [PATCH 18/45] cleanup --- .../create_index_pattern_wizard.test.tsx | 1 - .../field_format_editor/editors/index.ts | 1 + .../components/field_format_editor/index.ts | 1 + .../public/management_app/index.tsx | 2 + .../index_pattern_management/public/mocks.ts | 1 - .../index_pattern_management/public/plugin.ts | 20 ++--- .../public/service/creation/manager.ts | 87 +++++++++---------- .../field_format_editors.ts | 14 +-- .../index_pattern_management_service.ts | 29 ++++--- .../public/service/list/config.ts | 14 +-- .../public/service/list/manager.ts | 76 ++++++++-------- 11 files changed, 123 insertions(+), 123 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 1790ff08f2804..85fa40043c00d 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -179,7 +179,6 @@ describe('CreateIndexPatternWizard', () => { expect(services.uiSettings.get).toBeCalled(); expect(create).toBeCalled(); expect(clear).toBeCalledWith('id'); - // todo: expect(routeComponentPropsMock.history.push).toBeCalledWith(`/patterns/id`); }); }); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts index 645a62ba06c61..6961cbf8d831c 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/index.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +export { DefaultFormatEditor } from './default'; export { BytesFormatEditor } from './bytes'; export { ColorFormatEditor } from './color'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts index ccfc98b2d5882..83b36274f40e2 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/index.ts @@ -18,3 +18,4 @@ */ export { FieldFormatEditor } from './field_format_editor'; +export * from './editors'; diff --git a/src/plugins/index_pattern_management/public/management_app/index.tsx b/src/plugins/index_pattern_management/public/management_app/index.tsx index 9880b336e76e5..9883d28dcede9 100644 --- a/src/plugins/index_pattern_management/public/management_app/index.tsx +++ b/src/plugins/index_pattern_management/public/management_app/index.tsx @@ -16,3 +16,5 @@ * specific language governing permissions and limitations * under the License. */ + +export { mountManagementSection } from './mount_management_section'; diff --git a/src/plugins/index_pattern_management/public/mocks.ts b/src/plugins/index_pattern_management/public/mocks.ts index b83d7699200f6..1b629ab50bd61 100644 --- a/src/plugins/index_pattern_management/public/mocks.ts +++ b/src/plugins/index_pattern_management/public/mocks.ts @@ -19,7 +19,6 @@ import { PluginInitializerContext } from 'src/core/public'; import { coreMock } from '../../../core/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { managementPluginMock } from '../../../plugins/management/public/mocks'; import { dataPluginMock } from '../../../plugins/data/public/mocks'; import { diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index 5232b178e18f7..37711d5d600f4 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -31,7 +31,6 @@ export interface IndexPatternManagementSetupDependencies { management: ManagementSetup; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface IndexPatternManagementStartDependencies { data: DataPublicPluginStart; } @@ -40,7 +39,7 @@ export type IndexPatternManagementSetup = IndexPatternManagementServiceSetup; export type IndexPatternManagementStart = IndexPatternManagementServiceStart; -const title = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', { +const sectionsHeader = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', { defaultMessage: 'Index Patterns', }); @@ -52,7 +51,7 @@ export class IndexPatternManagementPlugin IndexPatternManagementSetupDependencies, IndexPatternManagementStartDependencies > { - private readonly indexPattern = new IndexPatternManagementService(); + private readonly indexPatternManagementService = new IndexPatternManagementService(); private managementApp?: ManagementApp; constructor(initializerContext: PluginInitializerContext) {} @@ -62,35 +61,34 @@ export class IndexPatternManagementPlugin { management }: IndexPatternManagementSetupDependencies ) { const kibanaSection = management.sections.getSection('kibana'); + if (!kibanaSection) { throw new Error('`kibana` management section not found.'); } this.managementApp = kibanaSection.registerApp({ id: 'indexPatterns', - title, + title: sectionsHeader, order: 0, mount: async params => { - const { mountManagementSection } = await import( - './management_app/mount_management_section' - ); + const { mountManagementSection } = await import('./management_app'); return mountManagementSection(core.getStartServices, params); - // return mountManagementSection(core.getStartServices, params, component.start); }, }); - return this.indexPattern.setup({ httpClient: core.http }); + return this.indexPatternManagementService.setup({ httpClient: core.http }); } public start(core: CoreStart, plugins: IndexPatternManagementStartDependencies) { if (!core.application.capabilities.management.kibana.index_patterns) { this.managementApp!.disable(); } - return this.indexPattern.start(); + + return this.indexPatternManagementService.start(); } public stop() { - this.indexPattern.stop(); + this.indexPatternManagementService.stop(); } } diff --git a/src/plugins/index_pattern_management/public/service/creation/manager.ts b/src/plugins/index_pattern_management/public/service/creation/manager.ts index 297c97e45a5b2..c97d7a084dca3 100644 --- a/src/plugins/index_pattern_management/public/service/creation/manager.ts +++ b/src/plugins/index_pattern_management/public/service/creation/manager.ts @@ -21,57 +21,56 @@ import { HttpSetup } from '../../../../../core/public'; import { IndexPatternCreationConfig, UrlHandler, IndexPatternCreationOption } from './config'; export class IndexPatternCreationManager { - private configs: IndexPatternCreationConfig[]; + private configs: IndexPatternCreationConfig[] = []; - constructor() { - this.configs = []; + setup(httpClient: HttpSetup) { + return { + addCreationConfig: (Config: typeof IndexPatternCreationConfig) => { + const config = new Config({ httpClient }); + + if (this.configs.findIndex(c => c.key === config.key) !== -1) { + throw new Error(`${config.key} exists in IndexPatternCreationManager.`); + } + + this.configs.push(config); + }, + }; } - public addCreationConfig = (httpClient: HttpSetup) => ( - Config: typeof IndexPatternCreationConfig - ) => { - const config = new Config({ httpClient }); - if (this.configs.findIndex(c => c.key === config.key) !== -1) { - throw new Error(`${config.key} exists in IndexPatternCreationManager.`); - } - this.configs.push(config); - }; + start() { + const getType = (key: string | undefined): IndexPatternCreationConfig => { + if (key) { + const index = this.configs.findIndex(config => config.key === key); + const config = this.configs[index]; - public getType(key: string | undefined): IndexPatternCreationConfig { - if (key) { - const index = this.configs.findIndex(config => config.key === key); - const config = this.configs[index]; - if (config) { - return config; + if (config) { + return config; + } else { + throw new Error(`Index pattern creation type not found: ${key}`); + } } else { - throw new Error(`Index pattern creation type not found: ${key}`); + return getType('default'); } - } else { - return this.getType('default'); - } - } + }; - public async getIndexPatternCreationOptions(urlHandler: UrlHandler) { - const options: IndexPatternCreationOption[] = []; - await Promise.all( - this.configs.map(async config => { - const option = config.getIndexPatternCreationOption - ? await config.getIndexPatternCreationOption(urlHandler) - : null; - if (option) { - options.push(option); - } - }) - ); - return options; - } + return { + getType, + getIndexPatternCreationOptions: async (urlHandler: UrlHandler) => { + const options: IndexPatternCreationOption[] = []; - setup = (httpClient: HttpSetup) => ({ - addCreationConfig: this.addCreationConfig(httpClient).bind(this), - }); + await Promise.all( + this.configs.map(async config => { + const option = config.getIndexPatternCreationOption + ? await config.getIndexPatternCreationOption(urlHandler) + : null; + if (option) { + options.push(option); + } + }) + ); - start = () => ({ - getType: this.getType.bind(this), - getIndexPatternCreationOptions: this.getIndexPatternCreationOptions.bind(this), - }); + return options; + }, + }; + } } diff --git a/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts b/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts index 018ed5533117a..f85238c5d9622 100644 --- a/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts +++ b/src/plugins/index_pattern_management/public/service/field_format_editors/field_format_editors.ts @@ -17,18 +17,18 @@ * under the License. */ -// todo better path -import { DefaultFormatEditor } from '../../components/field_editor/components/field_format_editor/editors/default'; +import { DefaultFormatEditor } from '../../components/field_editor/components/field_format_editor'; export class FieldFormatEditors { private editors: Array = []; - private register(editor: typeof DefaultFormatEditor) { - this.editors.push(editor); - } - public setup() { + public setup(defaultFieldEditors: FieldFormatEditors['editors'] = []) { + this.editors = defaultFieldEditors; + return { - register: this.register.bind(this), + register: (editor: typeof DefaultFormatEditor) => { + this.editors.push(editor); + }, }; } diff --git a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts index 8b354a59a6d5a..d4cc9c95e76a7 100644 --- a/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts +++ b/src/plugins/index_pattern_management/public/service/index_pattern_management_service.ts @@ -34,7 +34,7 @@ import { StringFormatEditor, TruncateFormatEditor, UrlFormatEditor, -} from '../components/field_editor/components/field_format_editor/editors'; +} from '../components/field_editor/components/field_format_editor'; interface SetupDependencies { httpClient: HttpSetup; @@ -63,18 +63,21 @@ export class IndexPatternManagementService { const indexPatternListConfigSetup = this.indexPatternListConfig.setup(); indexPatternListConfigSetup.addListConfig(IndexPatternListConfig); - const fieldFormatEditorsSetup = this.fieldFormatEditors.setup(); - fieldFormatEditorsSetup.register(BytesFormatEditor); - fieldFormatEditorsSetup.register(ColorFormatEditor); - fieldFormatEditorsSetup.register(DateFormatEditor); - fieldFormatEditorsSetup.register(DateNanosFormatEditor); - fieldFormatEditorsSetup.register(DurationFormatEditor); - fieldFormatEditorsSetup.register(NumberFormatEditor); - fieldFormatEditorsSetup.register(PercentFormatEditor); - fieldFormatEditorsSetup.register(StaticLookupFormatEditor); - fieldFormatEditorsSetup.register(StringFormatEditor); - fieldFormatEditorsSetup.register(TruncateFormatEditor); - fieldFormatEditorsSetup.register(UrlFormatEditor); + const defaultFieldFormatEditors = [ + BytesFormatEditor, + ColorFormatEditor, + DateFormatEditor, + DateNanosFormatEditor, + DurationFormatEditor, + NumberFormatEditor, + PercentFormatEditor, + StaticLookupFormatEditor, + StringFormatEditor, + TruncateFormatEditor, + UrlFormatEditor, + ]; + + const fieldFormatEditorsSetup = this.fieldFormatEditors.setup(defaultFieldFormatEditors); return { creation: creationManagerSetup, diff --git a/src/plugins/index_pattern_management/public/service/list/config.ts b/src/plugins/index_pattern_management/public/service/list/config.ts index 87c246e8913e5..1529c2fa18790 100644 --- a/src/plugins/index_pattern_management/public/service/list/config.ts +++ b/src/plugins/index_pattern_management/public/service/list/config.ts @@ -25,6 +25,13 @@ export interface IndexPatternTag { name: string; } +const defaultIndexPatternListName = i18n.translate( + 'indexPatternManagement.editIndexPattern.list.defaultIndexPatternListName', + { + defaultMessage: 'Default', + } +); + export class IndexPatternListConfig { public readonly key = 'default'; @@ -33,12 +40,7 @@ export class IndexPatternListConfig { ? [ { key: 'default', - name: i18n.translate( - 'indexPatternManagement.editIndexPattern.list.defaultIndexPatternListName', - { - defaultMessage: 'Default', - } - ), + name: defaultIndexPatternListName, }, ] : []; diff --git a/src/plugins/index_pattern_management/public/service/list/manager.ts b/src/plugins/index_pattern_management/public/service/list/manager.ts index 3a2910a222cd7..ae4c06f410db5 100644 --- a/src/plugins/index_pattern_management/public/service/list/manager.ts +++ b/src/plugins/index_pattern_management/public/service/list/manager.ts @@ -21,47 +21,43 @@ import { IIndexPattern, IFieldType } from 'src/plugins/data/public'; import { IndexPatternListConfig, IndexPatternTag } from './config'; export class IndexPatternListManager { - private configs: IndexPatternListConfig[]; - - constructor() { - this.configs = []; - } - - private addListConfig(Config: typeof IndexPatternListConfig) { - const config = new Config(); - if (this.configs.findIndex(c => c.key === config.key) !== -1) { - throw new Error(`${config.key} exists in IndexPatternListManager.`); - } - this.configs.push(config); - } - - private getIndexPatternTags(indexPattern: IIndexPattern, isDefault: boolean) { - return this.configs.reduce((tags: IndexPatternTag[], config) => { - return config.getIndexPatternTags - ? tags.concat(config.getIndexPatternTags(indexPattern, isDefault)) - : tags; - }, []); + private configs: IndexPatternListConfig[] = []; + + setup() { + return { + addListConfig: (Config: typeof IndexPatternListConfig) => { + const config = new Config(); + + if (this.configs.findIndex(c => c.key === config.key) !== -1) { + throw new Error(`${config.key} exists in IndexPatternListManager.`); + } + this.configs.push(config); + }, + }; } - private getFieldInfo(indexPattern: IIndexPattern, field: IFieldType): string[] { - return this.configs.reduce((info: string[], config) => { - return config.getFieldInfo ? info.concat(config.getFieldInfo(indexPattern, field)) : info; - }, []); + start() { + return { + getIndexPatternTags: (indexPattern: IIndexPattern, isDefault: boolean) => + this.configs.reduce( + (tags: IndexPatternTag[], config) => + config.getIndexPatternTags + ? tags.concat(config.getIndexPatternTags(indexPattern, isDefault)) + : tags, + [] + ), + + getFieldInfo: (indexPattern: IIndexPattern, field: IFieldType): string[] => + this.configs.reduce( + (info: string[], config) => + config.getFieldInfo ? info.concat(config.getFieldInfo(indexPattern, field)) : info, + [] + ), + + areScriptedFieldsEnabled: (indexPattern: IIndexPattern): boolean => + this.configs.every(config => + config.areScriptedFieldsEnabled ? config.areScriptedFieldsEnabled(indexPattern) : true + ), + }; } - - private areScriptedFieldsEnabled(indexPattern: IIndexPattern): boolean { - return this.configs.every(config => { - return config.areScriptedFieldsEnabled ? config.areScriptedFieldsEnabled(indexPattern) : true; - }); - } - - setup = () => ({ - addListConfig: this.addListConfig.bind(this), - }); - - start = () => ({ - getIndexPatternTags: this.getIndexPatternTags.bind(this), - getFieldInfo: this.getFieldInfo.bind(this), - areScriptedFieldsEnabled: this.areScriptedFieldsEnabled.bind(this), - }); } From 3100fab9dd809a1c936541cceb9a44cfc6c66896 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Thu, 7 May 2020 13:30:05 +0300 Subject: [PATCH 19/45] add INDEX_PATTERN_MANAGEMENT_SECTION_PATH constant --- ...c.index_pattern_management_section_path.md | 11 +++++++ .../kibana-plugin-plugins-data-public.md | 1 + src/plugins/data/common/constants.ts | 2 ++ src/plugins/data/public/index.ts | 1 + .../index_patterns/index_pattern.ts | 10 ++++-- src/plugins/data/public/public.api.md | 33 +++++++++++-------- .../server/saved_objects/index_patterns.ts | 5 ++- .../__snapshots__/add_data.test.js.snap | 24 +++++++++++--- .../public/application/components/add_data.js | 3 +- .../public/components/breadcrumbs.js | 7 ++-- .../scripted_fields_table.tsx | 7 ++-- .../index_pattern_table.tsx | 8 +++-- .../mount_management_section.tsx | 4 ++- 13 files changed, 86 insertions(+), 30 deletions(-) create mode 100644 docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md new file mode 100644 index 0000000000000..1e801de4b41fc --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH](./kibana-plugin-plugins-data-public.index_pattern_management_section_path.md) + +## INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH variable + +Signature: + +```typescript +INDEX_PATTERN_MANAGEMENT_SECTION_PATH = "#/management/kibana/indexPatterns" +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md index 8b58957b9044a..f9fdfe0b80a4b 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md @@ -105,6 +105,7 @@ | [FilterBar](./kibana-plugin-plugins-data-public.filterbar.md) | | | [getIndexPatternFieldListCreator](./kibana-plugin-plugins-data-public.getindexpatternfieldlistcreator.md) | | | [getKbnTypeNames](./kibana-plugin-plugins-data-public.getkbntypenames.md) | Get the esTypes known by all kbnFieldTypes {Array} | +| [INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH](./kibana-plugin-plugins-data-public.index_pattern_management_section_path.md) | | | [indexPatterns](./kibana-plugin-plugins-data-public.indexpatterns.md) | | | [QueryStringInput](./kibana-plugin-plugins-data-public.querystringinput.md) | | | [search](./kibana-plugin-plugins-data-public.search.md) | | diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index 00786a0c72cf1..4274ec7e530cc 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -18,3 +18,5 @@ */ export const DEFAULT_QUERY_LANGUAGE = 'kuery'; + +export const INDEX_PATTERN_MANAGEMENT_SECTION_PATH = '#/management/kibana/indexPatterns'; diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index d4433f3825fea..f9424ec38ecb5 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -269,6 +269,7 @@ export { ES_FIELD_TYPES, KBN_FIELD_TYPES, IndexPatternAttributes, + INDEX_PATTERN_MANAGEMENT_SECTION_PATH, } from '../common'; /* diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts index b9f175fc2fb8e..dc9cbfe498157 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts @@ -28,7 +28,13 @@ import { MappingObject, } from '../../../../kibana_utils/public'; -import { ES_FIELD_TYPES, KBN_FIELD_TYPES, IIndexPattern, IFieldType } from '../../../common'; +import { + ES_FIELD_TYPES, + KBN_FIELD_TYPES, + INDEX_PATTERN_MANAGEMENT_SECTION_PATH, + IIndexPattern, + IFieldType, +} from '../../../common'; import { findByTitle, getRoutes } from '../utils'; import { IndexPatternMissingIndices } from '../lib'; @@ -169,7 +175,7 @@ export class IndexPattern implements IIndexPattern { private updateFromElasticSearch(response: any, forceFieldRefresh: boolean = false) { if (!response.found) { - throw new SavedObjectNotFound(type, this.id, '#/management/kibana/indexPatterns'); + throw new SavedObjectNotFound(type, this.id, INDEX_PATTERN_MANAGEMENT_SECTION_PATH); } _.forOwn(this.mapping, (fieldMapping: FieldMappingSpec, name: string | undefined) => { diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index cb1e1d2bd0efe..2a75bdf326924 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -829,6 +829,11 @@ export interface IKibanaSearchResponse { // @public (undocumented) export type IMetricAggType = MetricAggType; +// Warning: (ae-missing-release-tag) "INDEX_PATTERN_MANAGEMENT_SECTION_PATH" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const INDEX_PATTERN_MANAGEMENT_SECTION_PATH = "#/management/kibana/indexPatterns"; + // Warning: (ae-missing-release-tag) "IndexPattern" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -1819,20 +1824,20 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "getRoutes" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:238:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:379:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:381:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:392:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:397:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:33:33 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:37:1 - (ae-forgotten-export) The symbol "QueryStateChange" needs to be exported by the entry point index.d.ts // src/plugins/data/public/types.ts:52:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/server/saved_objects/index_patterns.ts b/src/plugins/data/server/saved_objects/index_patterns.ts index a212d7f88e4eb..c8d2a253b61bc 100644 --- a/src/plugins/data/server/saved_objects/index_patterns.ts +++ b/src/plugins/data/server/saved_objects/index_patterns.ts @@ -18,6 +18,7 @@ */ import { SavedObjectsType } from 'kibana/server'; +import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../common'; import { indexPatternSavedObjectTypeMigrations } from './index_pattern_migrations'; export const indexPatternSavedObjectType: SavedObjectsType = { @@ -36,7 +37,9 @@ export const indexPatternSavedObjectType: SavedObjectsType = { }, getInAppUrl(obj) { return { - path: `/app/kibana#/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`, + path: `/app/kibana${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}/patterns/${encodeURIComponent( + obj.id + )}`, uiCapabilitiesPath: 'management.kibana.index_patterns', }; }, diff --git a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap index 011382e94eded..058b7480a9482 100644 --- a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap +++ b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap @@ -277,7 +277,11 @@ exports[`apmUiEnabled 1`] = ` /> {

    diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index be40586ee0cab..cd96072d95c65 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -32,7 +32,8 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { SavedObjectsClientContract, IUiSettingsClient } from 'src/core/public'; +import { SavedObjectsClientContract, IUiSettingsClient } from '../../../../../core/public'; +import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../data/public'; import { CreateButton } from '../create_button'; import { CreateIndexPatternPrompt } from '../create_index_pattern_prompt'; import { IndexPatternTableItem, IndexPatternCreationOption } from '../types'; @@ -53,7 +54,10 @@ const columns = [ }>; } ) => ( - + {name} {index.tags && index.tags.map(({ key: tagKey, name: tagName }) => ( diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 42b971d15c739..a029ce45e3b4b 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -54,12 +54,13 @@ export async function mountManagementSection( params: ManagementAppMountParams ) { params.setBreadcrumbs(crumb); + const [ { chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks }, { data }, indexPatternManagementStart, ] = await getStartServices(); - const canSave = application.capabilities.indexPatterns.save as boolean; + const canSave = Boolean(application.capabilities.indexPatterns.save); if (!canSave) { chrome.setBadge(readOnlyBadge); @@ -144,6 +145,7 @@ export async function mountManagementSection( , params.element ); + return () => { ReactDOM.unmountComponentAtNode(params.element); }; From fd771019b4075131c924aac4b725cf7515d815e8 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Thu, 7 May 2020 15:55:24 +0300 Subject: [PATCH 20/45] Added breadcrumbs to each route --- .../{breadcrumbs.js => breadcrumbs.ts} | 18 +++++++----------- .../create_index_pattern_wizard.test.tsx | 1 + .../create_index_pattern_wizard.tsx | 7 ++++++- .../create_edit_field_container.tsx | 14 +++++++++++++- .../edit_index_pattern_container.tsx | 8 +++++++- .../index_pattern_table.tsx | 5 +++++ .../mount_management_section.tsx | 11 ++++------- 7 files changed, 43 insertions(+), 21 deletions(-) rename src/plugins/index_pattern_management/public/components/{breadcrumbs.js => breadcrumbs.ts} (79%) diff --git a/src/plugins/index_pattern_management/public/components/breadcrumbs.js b/src/plugins/index_pattern_management/public/components/breadcrumbs.ts similarity index 79% rename from src/plugins/index_pattern_management/public/components/breadcrumbs.js rename to src/plugins/index_pattern_management/public/components/breadcrumbs.ts index fb3b06bdff0e0..c1473e50e6ad1 100644 --- a/src/plugins/index_pattern_management/public/components/breadcrumbs.js +++ b/src/plugins/index_pattern_management/public/components/breadcrumbs.ts @@ -18,7 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../data/public'; +import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH, IndexPattern } from '../../../data/public'; export function getListBreadcrumbs() { return [ @@ -26,7 +26,7 @@ export function getListBreadcrumbs() { text: i18n.translate('indexPatternManagement.indexPatterns.listBreadcrumb', { defaultMessage: 'Index patterns', }), - href: `${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}/patterns`, + href: `${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}/`, }, ]; } @@ -43,9 +43,7 @@ export function getCreateBreadcrumbs() { ]; } -export function getEditBreadcrumbs($route) { - const { indexPattern } = $route.current.locals; - +export function getEditBreadcrumbs(indexPattern: IndexPattern) { return [ ...getListBreadcrumbs(), { @@ -55,20 +53,18 @@ export function getEditBreadcrumbs($route) { ]; } -export function getEditFieldBreadcrumbs($route) { - const { fieldName } = $route.current.params; - +export function getEditFieldBreadcrumbs(indexPattern: IndexPattern, fieldName: string) { return [ - ...getEditBreadcrumbs($route), + ...getEditBreadcrumbs(indexPattern), { text: fieldName, }, ]; } -export function getCreateFieldBreadcrumbs($route) { +export function getCreateFieldBreadcrumbs(indexPattern: IndexPattern) { return [ - ...getEditBreadcrumbs($route), + ...getEditBreadcrumbs(indexPattern), { text: i18n.translate('indexPatternManagement.indexPatterns.createFieldBreadcrumb', { defaultMessage: 'Create field', diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 85fa40043c00d..0c0d5af6c0d73 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -62,6 +62,7 @@ const services = ({ uiSettings, changeUrl: jest.fn(), openConfirm: overlays.openConfirm, + setBreadcrumbs: jest.fn(), } as unknown) as CreateIndexPatternWizardProps['services']; const routeComponentPropsMock = { diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx index 9ae72ceb1dcc3..dfcf121898132 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx @@ -26,12 +26,14 @@ import { withRouter, RouteComponentProps } from 'react-router-dom'; import { SavedObjectsClientContract, IUiSettingsClient, OverlayStart } from 'src/core/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; +import { ManagementAppMountParams } from '../../../../management/public'; import { StepIndexPattern } from './components/step_index_pattern'; import { StepTimeField } from './components/step_time_field'; import { Header } from './components/header'; import { LoadingState } from './components/loading_state'; import { EmptyState } from './components/empty_state'; +import { getCreateBreadcrumbs } from '../breadcrumbs'; import { MAX_SEARCH_SIZE } from './constants'; import { ensureMinimumTime, getIndices } from './lib'; import { IndexPatternCreationConfig, IndexPatternManagementStart } from '../..'; @@ -45,6 +47,7 @@ export interface CreateIndexPatternWizardProps extends RouteComponentProps { savedObjectsClient: SavedObjectsClientContract; uiSettings: IUiSettingsClient; openConfirm: OverlayStart['openConfirm']; + setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; }; } @@ -66,10 +69,12 @@ export class CreateIndexPatternWizard extends Component< constructor(props: CreateIndexPatternWizardProps) { super(props); const { - services: { indexPatternCreation }, + services: { indexPatternCreation, setBreadcrumbs }, location, } = props; + setBreadcrumbs(getCreateBreadcrumbs()); + const type = new URLSearchParams(location.search).get('type') || undefined; this.state = { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx index c338bf096480f..20591f5c2b202 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx @@ -29,6 +29,8 @@ import { } from 'src/core/public'; import { IndexPattern, DataPublicPluginStart } from '../../../../../../plugins/data/public'; +import { ManagementAppMountParams } from '../../../../../management/public'; +import { getEditFieldBreadcrumbs, getCreateFieldBreadcrumbs } from '../../breadcrumbs'; import { CreateEditField } from './create_edit_field'; export interface CreateEditFieldContainerProps @@ -46,6 +48,7 @@ export interface CreateEditFieldContainerProps toasts: NotificationsStart['toasts']; fieldFormats: DataPublicPluginStart['fieldFormats']; indexPatterns: DataPublicPluginStart['indexPatterns']; + setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; }; } @@ -53,7 +56,16 @@ const CreateEditFieldCont: React.FC = ({ ...props const [indexPattern, setIndexPattern] = useState(); useEffect(() => { - props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => setIndexPattern(ip)); + props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => { + setIndexPattern(ip); + if (ip) { + props.services.setBreadcrumbs( + props.match.params.fieldName + ? getEditFieldBreadcrumbs(ip, props.match.params.fieldName) + : getCreateFieldBreadcrumbs(ip) + ); + } + }); }, [props.match.params.id, props.getIndexPattern, props]); if (indexPattern) { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx index 62f5d3de1dd3a..bf5047054d32e 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -27,7 +27,9 @@ import { SavedObjectsClientContract, } from 'src/core/public'; import { IndexPattern } from '../../../../../plugins/data/public'; +import { ManagementAppMountParams } from '../../../../management/public'; import { IndexPatternManagementStart } from '../..'; +import { getEditBreadcrumbs } from '../breadcrumbs'; import { EditIndexPattern } from '../edit_index_pattern'; @@ -39,6 +41,7 @@ export interface EditIndexPatternContainerProps extends RouteComponentProps<{ id docTitle: ChromeDocTitle; overlays: OverlayStart; savedObjectsClient: SavedObjectsClientContract; + setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; indexPatternManagement: IndexPatternManagementStart; }; } @@ -47,7 +50,10 @@ const EditIndexPatternCont: React.FC = ({ ...pro const [indexPattern, setIndexPattern] = useState(); useEffect(() => { - props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => setIndexPattern(ip)); + props.getIndexPattern(props.match.params.id).then((ip: IndexPattern) => { + setIndexPattern(ip); + props.services.setBreadcrumbs(getEditBreadcrumbs(ip)); + }); }, [props.match.params.id, props.getIndexPattern, props]); if (indexPattern) { diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index cd96072d95c65..010f957d9e34b 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -34,11 +34,13 @@ import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { SavedObjectsClientContract, IUiSettingsClient } from '../../../../../core/public'; import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../data/public'; +import { ManagementAppMountParams } from '../../../../management/public'; import { CreateButton } from '../create_button'; import { CreateIndexPatternPrompt } from '../create_index_pattern_prompt'; import { IndexPatternTableItem, IndexPatternCreationOption } from '../types'; import { IndexPatternManagementStart } from '../../plugin'; import { getIndexPatterns } from '../utils'; +import { getListBreadcrumbs } from '../breadcrumbs'; const columns = [ { @@ -103,6 +105,7 @@ interface Props extends RouteComponentProps { services: { savedObjectsClient: SavedObjectsClientContract; uiSettings: IUiSettingsClient; + setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; indexPatternManagement: IndexPatternManagementStart; }; } @@ -117,6 +120,8 @@ export const IndexPatternTable = ({ const [indexPatterns, setIndexPatterns] = useState([]); const [creationOptions, setCreationOptions] = useState([]); + services.setBreadcrumbs(getListBreadcrumbs()); + useEffect(() => { (async function() { const options = await getIndexPatternCreationOptions(history.push); diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index a029ce45e3b4b..bc32a663ee982 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -34,11 +34,6 @@ import { } from '../components'; import { IndexPatternManagementStartDependencies, IndexPatternManagementStart } from '../plugin'; -const appTitle = i18n.translate('indexPatternManagement.indexPattern.sectionsHeader', { - defaultMessage: 'Index Patterns', -}); -const crumb = [{ text: appTitle }]; - const readOnlyBadge = { text: i18n.translate('indexPatternManagement.indexPatterns.badge.readOnly.text', { defaultMessage: 'Read only', @@ -53,8 +48,6 @@ export async function mountManagementSection( getStartServices: StartServicesAccessor, params: ManagementAppMountParams ) { - params.setBreadcrumbs(crumb); - const [ { chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks }, { data }, @@ -88,6 +81,7 @@ export async function mountManagementSection( savedObjectsClient: savedObjects.client, uiSettings, openConfirm: overlays.openConfirm, + setBreadcrumbs: params.setBreadcrumbs, }} /> @@ -108,6 +102,7 @@ export async function mountManagementSection( fieldFormats: data.fieldFormats, SearchBar: data.ui.SearchBar, indexPatterns: data.indexPatterns, + setBreadcrumbs: params.setBreadcrumbs, }} /> @@ -121,6 +116,7 @@ export async function mountManagementSection( docTitle: chrome.docTitle, overlays, savedObjectsClient: savedObjects.client, + setBreadcrumbs: params.setBreadcrumbs, indexPatternManagement: indexPatternManagementStart as IndexPatternManagementStart, }} /> @@ -136,6 +132,7 @@ export async function mountManagementSection( services={{ savedObjectsClient: savedObjects.client, uiSettings, + setBreadcrumbs: params.setBreadcrumbs, indexPatternManagement: indexPatternManagementStart as IndexPatternManagementStart, }} /> From 9392f6c8b2e5385643d75b8cfb714d14cb868d8d Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Thu, 7 May 2020 16:14:23 +0300 Subject: [PATCH 21/45] replace href's to index pattern management section --- .../maps/public/components/no_index_pattern_callout.js | 5 ++++- .../file_based/components/results_links/results_links.tsx | 6 ++++-- .../embeddables/index_patterns_missing_prompt.tsx | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js index 64ce6a89ec7b1..d3f3c6f86e48d 100644 --- a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js +++ b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js @@ -9,6 +9,7 @@ import React from 'react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; +import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../../src/plugins/data/public'; export function NoIndexPatternCallout() { const http = getHttp(); @@ -24,7 +25,9 @@ export function NoIndexPatternCallout() { id="xpack.maps.noIndexPattern.doThisPrefixDescription" defaultMessage="You'll need to " /> - + = ({ /> } description="" - href={`${basePath.get()}/app/kibana#/management/kibana/indexPatterns/${ - createIndexPattern ? `patterns/${indexPatternId}` : '' + href={`${basePath.get()}/app/kibana${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}${ + createIndexPattern ? `/patterns/${indexPatternId}` : '' }`} /> diff --git a/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx index 2e0d11a1c83c2..98b900c0d89b2 100644 --- a/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx +++ b/x-pack/plugins/siem/public/components/embeddables/index_patterns_missing_prompt.tsx @@ -8,6 +8,8 @@ import { EuiButton, EuiCode, EuiEmptyPrompt } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import React from 'react'; +import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../../../src/plugins/data/public'; + import { useKibana, useBasePath } from '../../lib/kibana'; import * as i18n from './translations'; @@ -61,7 +63,7 @@ export const IndexPatternsMissingPromptComponent = () => { } actions={ Date: Thu, 7 May 2020 17:09:06 +0300 Subject: [PATCH 22/45] rename helpers to services --- .../create_edit_field/create_edit_field.tsx | 2 +- .../field_editor/field_editor.test.tsx | 18 ++++---- .../components/field_editor/field_editor.tsx | 42 +++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx index 08ec2bccfbeb4..fb5c27774f506 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field.tsx @@ -111,7 +111,7 @@ export const CreateEditField = withRouter( { let indexPattern: IndexPattern; - const helpers: FieldEdiorProps['helpers'] = ({ + const services: FieldEdiorProps['services'] = ({ Field: () => {}, getConfig: () => {}, fieldFormatEditors: [], @@ -120,18 +120,18 @@ describe('FieldEditor', () => { uiSettings: coreStartServices.uiSettings, SearchBar: dataStartServices.ui.SearchBar, indexPatterns: dataStartServices.indexPatterns, - } as unknown) as FieldEdiorProps['helpers']; + } as unknown) as FieldEdiorProps['services']; beforeEach(() => { indexPattern = ({ fields: fields as IIndexPatternFieldList, } as unknown) as IndexPattern; - helpers.fieldFormats.getDefaultType = jest.fn( + services.fieldFormats.getDefaultType = jest.fn( () => (({} as unknown) as FieldFormatInstanceType) ); - helpers.fieldFormats.getByFieldType = jest.fn(fieldType => { + services.fieldFormats.getByFieldType = jest.fn(fieldType => { if (fieldType === 'number') { return [({} as unknown) as FieldFormatInstanceType]; } else { @@ -145,7 +145,7 @@ describe('FieldEditor', () => { ); @@ -172,7 +172,7 @@ describe('FieldEditor', () => { ); @@ -200,7 +200,7 @@ describe('FieldEditor', () => { ); @@ -215,7 +215,7 @@ describe('FieldEditor', () => { ); @@ -238,7 +238,7 @@ describe('FieldEditor', () => { ); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx index e648f508419db..635772fbbfe5c 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx @@ -134,7 +134,7 @@ export interface FieldEditorState { export interface FieldEdiorProps { indexPattern: IndexPattern; field: IndexPatternField; - helpers: { + services: { http: HttpStart; fieldFormatEditors: IndexPatternManagementStart['fieldFormatEditors']; redirectAway: () => void; @@ -178,7 +178,7 @@ export class FieldEditor extends PureComponent { - const { uiSettings } = this.props.helpers; + const { uiSettings } = this.props.services; const { field } = this.state; - const DefaultFieldFormat = this.props.helpers.fieldFormats.getDefaultType( + const DefaultFieldFormat = this.props.services.fieldFormats.getDefaultType( type ) as FieldFormatInstanceType; @@ -235,7 +235,7 @@ export class FieldEditor extends PureComponent { const { field, fieldTypeFormats } = this.state; - const { uiSettings, fieldFormats } = this.props.helpers; + const { uiSettings, fieldFormats } = this.props.services; const FieldFormat = fieldFormats.getType( formatId || (fieldTypeFormats[0] as InitialFieldTypeFormat).defaultFieldFormat.id @@ -369,7 +369,7 @@ export class FieldEditor extends PureComponent @@ -750,7 +750,7 @@ export class FieldEditor extends PureComponent ); }; deleteField = () => { - const { redirectAway } = this.props.helpers; + const { redirectAway } = this.props.services; const { indexPattern } = this.props; const { field } = this.state; const remove = indexPattern.removeScriptedField(field); @@ -781,7 +781,7 @@ export class FieldEditor extends PureComponent f.name === field.name); if (index > -1) { @@ -836,7 +836,7 @@ export class FieldEditor extends PureComponent Date: Thu, 7 May 2020 17:18:41 +0300 Subject: [PATCH 23/45] fix issue in add_data --- .../__snapshots__/add_data.test.js.snap | 24 ++++--------------- .../public/application/components/add_data.js | 2 +- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap index 058b7480a9482..07f1161c44694 100644 --- a/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap +++ b/src/plugins/home/public/application/components/__snapshots__/add_data.test.js.snap @@ -277,11 +277,7 @@ exports[`apmUiEnabled 1`] = ` /> { Date: Thu, 7 May 2020 17:34:48 +0300 Subject: [PATCH 24/45] moved scss --- src/legacy/ui/public/_index.scss | 3 --- src/plugins/index_pattern_management/public/index.scss | 1 + src/plugins/index_pattern_management/public/plugin.ts | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/plugins/index_pattern_management/public/index.scss diff --git a/src/legacy/ui/public/_index.scss b/src/legacy/ui/public/_index.scss index 3a3c7a4388b09..ec300ff1f9af2 100644 --- a/src/legacy/ui/public/_index.scss +++ b/src/legacy/ui/public/_index.scss @@ -12,7 +12,4 @@ @import './directives/index'; @import './error_url_overflow/index'; @import './exit_full_screen/index'; -// todo -@import '../../../plugins/index_pattern_management/public/components/field_editor/index'; @import './style_compile/index'; -@import '../../../plugins/management/public/components/index'; diff --git a/src/plugins/index_pattern_management/public/index.scss b/src/plugins/index_pattern_management/public/index.scss new file mode 100644 index 0000000000000..7a14062472495 --- /dev/null +++ b/src/plugins/index_pattern_management/public/index.scss @@ -0,0 +1 @@ +@import './components/field_editor/index' \ No newline at end of file diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index 37711d5d600f4..d840e0039868e 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -16,6 +16,8 @@ * specific language governing permissions and limitations * under the License. */ +import './index.scss'; + import { i18n } from '@kbn/i18n'; import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; From b710fdeb279365c04a11d6623bbcd4cdadcc47a4 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Fri, 8 May 2020 12:37:05 +0300 Subject: [PATCH 25/45] Added test for utils and fixed problem with flyout --- .../__snapshots__/utils.test.ts.snap | 22 ++++++++ .../index_pattern_table.tsx | 2 +- .../public/components/utils.test.ts | 51 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap create mode 100644 src/plugins/index_pattern_management/public/components/utils.test.ts diff --git a/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap b/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap new file mode 100644 index 0000000000000..5e58ed602d150 --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap @@ -0,0 +1,22 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getting index patterns 1`] = ` +Array [ + Object { + "default": true, + "id": "test", + "sort": "0test name", + "tags": undefined, + "title": "test name", + "url": "", + }, + Object { + "default": false, + "id": "test1", + "sort": "1test name 1", + "tags": undefined, + "title": "test name 1", + "url": "", + }, +] +`; diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index 010f957d9e34b..4f7a7613ef927 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -116,7 +116,7 @@ export const IndexPatternTable = ({ history, services, }: Props) => { - const [showFlyout, setShowFlyout] = useState(true); + const [showFlyout, setShowFlyout] = useState(false); const [indexPatterns, setIndexPatterns] = useState([]); const [creationOptions, setCreationOptions] = useState([]); diff --git a/src/plugins/index_pattern_management/public/components/utils.test.ts b/src/plugins/index_pattern_management/public/components/utils.test.ts new file mode 100644 index 0000000000000..2d6224c9fc36b --- /dev/null +++ b/src/plugins/index_pattern_management/public/components/utils.test.ts @@ -0,0 +1,51 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { getIndexPatterns } from './utils'; +import { coreMock } from '../../../../core/public/mocks'; +import { mockManagementPlugin } from '../mocks'; + +const { savedObjects } = coreMock.createStart(); +const mockManagementPluginStart = mockManagementPlugin.createStartContract(); + +(savedObjects.client.find as jest.Mock).mockResolvedValue({ + savedObjects: [ + { + id: 'test', + get: () => { + return 'test name'; + }, + }, + { + id: 'test1', + get: () => { + return 'test name 1'; + }, + }, + ], +}); + +test('getting index patterns', async () => { + const indexPatterns = await getIndexPatterns( + savedObjects.client, + 'test', + mockManagementPluginStart + ); + expect(indexPatterns).toMatchSnapshot(); +}); From 0c6126e1f0588742574a65891dc21a3decc0438b Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Fri, 8 May 2020 14:03:42 +0300 Subject: [PATCH 26/45] added time field styles --- .../components/time_field/{time_field.css => _time_field.scss} | 3 ++- .../step_time_field/components/time_field/time_field.tsx | 3 --- src/plugins/index_pattern_management/public/index.scss | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) rename src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/{time_field.css => _time_field.scss} (84%) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/_time_field.scss similarity index 84% rename from src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/_time_field.scss index d0a2652d7e045..5bd60e8b76afc 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.css +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/_time_field.scss @@ -1,6 +1,7 @@ /** * 1. Bring the line-height down or else this link expands its container when it becomes visible. */ - .timeFieldRefreshButton { + +.timeFieldRefreshButton { line-height: 1 !important; /* 1 */ } diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx index 529847975b04d..1215d5ca7e15f 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx @@ -19,9 +19,6 @@ import React from 'react'; -// todo -// import './time_field.css'; - import { EuiForm, EuiFormRow, diff --git a/src/plugins/index_pattern_management/public/index.scss b/src/plugins/index_pattern_management/public/index.scss index 7a14062472495..2c7999392fe38 100644 --- a/src/plugins/index_pattern_management/public/index.scss +++ b/src/plugins/index_pattern_management/public/index.scss @@ -1 +1,2 @@ -@import './components/field_editor/index' \ No newline at end of file +@import './components/field_editor/index'; +@import './components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field'; \ No newline at end of file From 6467fbbe8569689a60edd48158d65f76a042e818 Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Fri, 8 May 2020 15:45:40 +0300 Subject: [PATCH 27/45] fix png references --- .../editors/url => assets}/icons/LICENSE.txt | 0 .../editors/url => assets}/icons/cv.png | Bin .../editors/url => assets}/icons/de.png | Bin .../editors/url => assets}/icons/go.png | Bin .../editors/url => assets}/icons/ne.png | Bin .../editors/url => assets}/icons/ni.png | Bin .../editors/url => assets}/icons/stop.png | Bin .../editors/url => assets}/icons/us.png | Bin .../step_time_field/step_time_field.test.tsx | 3 -- .../create_index_pattern_wizard.test.tsx | 3 -- .../create_edit_field_container.tsx | 1 - .../edit_index_pattern_container.tsx | 1 - .../scripted_fields_table.tsx | 1 - .../editors/bytes/bytes.test.tsx | 1 - .../editors/color/color.test.tsx | 3 -- .../editors/date/date.test.tsx | 1 - .../editors/date_nanos/date_nanos.test.tsx | 1 - .../editors/default/default.test.tsx | 3 -- .../editors/default/default.tsx | 1 - .../editors/duration/duration.test.tsx | 2 -- .../editors/number/number.test.tsx | 1 - .../editors/percent/percent.test.tsx | 1 - .../static_lookup/static_lookup.test.tsx | 2 -- .../editors/string/string.test.tsx | 1 - .../editors/truncate/truncate.test.tsx | 3 -- .../editors/url/icons/index.js | 29 ------------------ .../editors/url/url.test.tsx | 8 ----- .../field_format_editor/editors/url/url.tsx | 5 ++- .../mount_management_section.tsx | 6 ---- 29 files changed, 2 insertions(+), 75 deletions(-) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/LICENSE.txt (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/cv.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/de.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/go.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/ne.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/ni.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/stop.png (100%) rename src/plugins/index_pattern_management/public/{components/field_editor/components/field_format_editor/editors/url => assets}/icons/us.png (100%) delete mode 100644 src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/index.js diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt b/src/plugins/index_pattern_management/public/assets/icons/LICENSE.txt similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/LICENSE.txt rename to src/plugins/index_pattern_management/public/assets/icons/LICENSE.txt diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/cv.png b/src/plugins/index_pattern_management/public/assets/icons/cv.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/cv.png rename to src/plugins/index_pattern_management/public/assets/icons/cv.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/de.png b/src/plugins/index_pattern_management/public/assets/icons/de.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/de.png rename to src/plugins/index_pattern_management/public/assets/icons/de.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/go.png b/src/plugins/index_pattern_management/public/assets/icons/go.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/go.png rename to src/plugins/index_pattern_management/public/assets/icons/go.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ne.png b/src/plugins/index_pattern_management/public/assets/icons/ne.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ne.png rename to src/plugins/index_pattern_management/public/assets/icons/ne.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ni.png b/src/plugins/index_pattern_management/public/assets/icons/ni.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/ni.png rename to src/plugins/index_pattern_management/public/assets/icons/ni.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/stop.png b/src/plugins/index_pattern_management/public/assets/icons/stop.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/stop.png rename to src/plugins/index_pattern_management/public/assets/icons/stop.png diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/us.png b/src/plugins/index_pattern_management/public/assets/icons/us.png similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/url/icons/us.png rename to src/plugins/index_pattern_management/public/assets/icons/us.png diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx index d02798d3508a0..939b0d006b4aa 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/step_time_field.test.tsx @@ -32,9 +32,6 @@ jest.mock('./../../lib', () => ({ extractTimeFields: require.requireActual('./../../lib').extractTimeFields, ensureMinimumTime: async (fields: IFieldType) => Promise.resolve(fields), })); -jest.mock('ui/chrome', () => ({ - addBasePath: () => {}, -})); const mockIndexPatternCreationType = new IndexPatternCreationConfig({ type: 'default', diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 0c0d5af6c0d73..07e8ce3d19f81 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -40,9 +40,6 @@ jest.mock('./lib/get_indices', () => ({ return [{ name: 'kibana' }]; }, })); -jest.mock('ui/chrome', () => ({ - addBasePath: () => {}, -})); const { savedObjects, overlays, uiSettings } = coreMock.createStart(); const { indexPatterns, search } = dataPluginMock.createStartContract(); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx index 20591f5c2b202..70851b712d756 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/create_edit_field/create_edit_field_container.tsx @@ -92,5 +92,4 @@ const CreateEditFieldCont: React.FC = ({ ...props } }; -// todo rename export const CreateEditFieldContainer = withRouter(CreateEditFieldCont); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx index bf5047054d32e..7681facda19bf 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -69,5 +69,4 @@ const EditIndexPatternCont: React.FC = ({ ...pro } }; -// todo rename export const EditIndexPatternContainer = withRouter(EditIndexPatternCont); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index aa1e454d111c8..cf29fcce744d5 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -143,7 +143,6 @@ export class ScriptedFieldsTable extends Component< const items = this.getFilteredItems(); - // todo url return ( <>
    { it('should render normally', async () => { const component = shallow( { it('should render string type normally (regex field)', async () => { const component = shallowWithI18nProvider( { it('should render other type normally (range field)', async () => { const component = shallowWithI18nProvider( { it('should render multiple colors', async () => { const component = shallowWithI18nProvider( { it('should render normally', async () => { const component = shallow( { it('should render normally', async () => { const component = shallow( { it('should render nothing', async () => { const component = shallow( { it('should call prop onChange()', async () => { const component = shallow( { shallow( { formatParams: { type?: string } & P; onChange: (newParams: Record) => void; onError: FieldFormatEditorProps['onError']; - basePath: string; } export interface FormatEditorState { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx index 3ab69d12d8c0e..b181d6fa4466d 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/editors/duration/duration.test.tsx @@ -71,7 +71,6 @@ describe('DurationFormatEditor', () => { it('should render human readable output normally', async () => { const component = shallow( { }; const component = shallow( { it('should render normally', async () => { const component = shallow( { it('should render normally', async () => { const component = shallow( { it('should render normally', async () => { const component = shallowWithI18nProvider( { it('should render multiple lookup entries and unknown key value', async () => { const component = shallowWithI18nProvider( { it('should render normally', async () => { const component = shallow( { it('should render normally', async () => { const component = shallow( { it('should fire error, when input is invalid', async () => { const component = shallow( { it('should fire change, when input changed and is valid', async () => { const component = shallow( ({ - getBasePath: () => 'http://localhost/', -})); - describe('UrlFormatEditor', () => { it('should have a formatId', () => { expect(UrlFormatEditor.formatId).toEqual('url'); @@ -58,7 +54,6 @@ describe('UrlFormatEditor', () => { it('should render normally', async () => { const component = shallow( { it('should render url template help', async () => { const component = shallow( { it('should render label template help', async () => { const component = shallow( { it('should render width and height fields if image', async () => { const component = shallow( ) { super(props); - this.iconPattern = `${props.basePath}/bundles/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/icons/{{value}}.png`; + this.iconPattern = `/plugins/indexPatternManagement/assets/icons/{{value}}.png`; + this.state = { ...this.state, sampleInputsByType: { diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index bc32a663ee982..551e94c2032ca 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -59,13 +59,7 @@ export async function mountManagementSection( chrome.setBadge(readOnlyBadge); } - // todo - need new path to create index pattern - // todo navigate to items // todo path w/o slash - // - // indexPattern, indexPatterns - - // data.indexPatterns.get() ReactDOM.render( From 28b91dfc093f2fdd1a4b19b9f7fb21a452e1e3e5 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Fri, 8 May 2020 17:46:26 +0300 Subject: [PATCH 28/45] Fixed docTitle behavior --- .../create_index_pattern_wizard.test.tsx.snap | 6 + .../header/__snapshots__/header.test.tsx.snap | 30 +---- .../components/header/header.test.tsx | 3 + .../components/header/header.tsx | 122 ++++++++++-------- .../create_index_pattern_wizard.test.tsx | 3 +- .../create_index_pattern_wizard.tsx | 10 +- .../index_pattern_table.tsx | 20 ++- .../mount_management_section.tsx | 2 + 8 files changed, 103 insertions(+), 93 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap index cbd99966d41ee..e230769f635ac 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap @@ -6,6 +6,7 @@ exports[`CreateIndexPatternWizard defaults to the loading state 1`] = ` >

    - + Create test index pattern

    - + Create test index pattern

    - + Create test index pattern

    { indexPatternName={indexPatternName} isIncludingSystemIndices={true} onChangeIncludingSystemIndices={() => {}} + changeTitle={() => {}} /> ); @@ -41,6 +42,7 @@ describe('Header', () => { indexPatternName={indexPatternName} isIncludingSystemIndices={false} onChangeIncludingSystemIndices={() => {}} + changeTitle={() => {}} /> ); @@ -55,6 +57,7 @@ describe('Header', () => { prompt={
    Test prompt
    } indexPatternName={indexPatternName} isBeta={true} + changeTitle={() => {}} /> ); diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx index 858dbc3463f6d..1be33e3edc3bc 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/header.tsx @@ -40,6 +40,7 @@ export const Header = ({ isIncludingSystemIndices, onChangeIncludingSystemIndices, isBeta = false, + changeTitle, }: { prompt?: React.ReactNode; indexPatternName: string; @@ -47,64 +48,71 @@ export const Header = ({ isIncludingSystemIndices: boolean; onChangeIncludingSystemIndices: () => void; isBeta?: boolean; -}) => ( -
    - -

    - - {isBeta ? ( - - {' '} - - - ) : null} -

    -
    - - - -

    - - void; +}) => { + const createIndexPatternHeader = i18n.translate( + 'indexPatternManagement.createIndexPatternHeader', + { + defaultMessage: 'Create {indexPatternName}', + values: { indexPatternName }, + } + ); + + changeTitle(createIndexPatternHeader); + + return ( +

    + +

    + {createIndexPatternHeader} + {isBeta ? ( + + {' '} + - -

    - - - {showSystemIndices ? ( +
    + ) : null} +

    +
    + - - } - id="checkboxShowSystemIndices" - checked={isIncludingSystemIndices} - onChange={onChangeIncludingSystemIndices} - /> + +

    + + + +

    +
    + {showSystemIndices ? ( + + + } + id="checkboxShowSystemIndices" + checked={isIncludingSystemIndices} + onChange={onChangeIncludingSystemIndices} + /> + + ) : null} +
    + {prompt ? ( + + + {prompt} + ) : null} - - {prompt ? ( - - - {prompt} - - ) : null} - -
    -); + +
    + ); +}; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx index 07e8ce3d19f81..6f74dc93dfb9b 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.test.tsx @@ -41,7 +41,7 @@ jest.mock('./lib/get_indices', () => ({ }, })); -const { savedObjects, overlays, uiSettings } = coreMock.createStart(); +const { savedObjects, overlays, uiSettings, chrome } = coreMock.createStart(); const { indexPatterns, search } = dataPluginMock.createStartContract(); const mockIndexPatternCreationType = new IndexPatternCreationConfig({ @@ -60,6 +60,7 @@ const services = ({ changeUrl: jest.fn(), openConfirm: overlays.openConfirm, setBreadcrumbs: jest.fn(), + docTitle: chrome.docTitle, } as unknown) as CreateIndexPatternWizardProps['services']; const routeComponentPropsMock = { diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx index dfcf121898132..751009fd027c9 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/create_index_pattern_wizard.tsx @@ -24,7 +24,12 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { SavedObjectsClientContract, IUiSettingsClient, OverlayStart } from 'src/core/public'; +import { + SavedObjectsClientContract, + IUiSettingsClient, + OverlayStart, + ChromeDocTitle, +} from 'src/core/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; import { ManagementAppMountParams } from '../../../../management/public'; import { StepIndexPattern } from './components/step_index_pattern'; @@ -48,6 +53,7 @@ export interface CreateIndexPatternWizardProps extends RouteComponentProps { uiSettings: IUiSettingsClient; openConfirm: OverlayStart['openConfirm']; setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; + docTitle: ChromeDocTitle; }; } @@ -223,6 +229,7 @@ export class CreateIndexPatternWizard extends Component< renderHeader() { const { isIncludingSystemIndices } = this.state; + const { services } = this.props; return (
    ); } diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx index 4f7a7613ef927..8fe09804d39ac 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/index_pattern_table.tsx @@ -32,7 +32,11 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { SavedObjectsClientContract, IUiSettingsClient } from '../../../../../core/public'; +import { + SavedObjectsClientContract, + IUiSettingsClient, + ChromeDocTitle, +} from '../../../../../core/public'; import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../data/public'; import { ManagementAppMountParams } from '../../../../management/public'; import { CreateButton } from '../create_button'; @@ -99,6 +103,10 @@ const ariaRegion = i18n.translate('indexPatternManagement.editIndexPatternLiveRe defaultMessage: 'Index patterns', }); +const title = i18n.translate('indexPatternManagement.indexPatternTable.title', { + defaultMessage: 'Index patterns', +}); + interface Props extends RouteComponentProps { getIndexPatternCreationOptions: IndexPatternManagementStart['creation']['getIndexPatternCreationOptions']; canSave: boolean; @@ -107,6 +115,7 @@ interface Props extends RouteComponentProps { uiSettings: IUiSettingsClient; setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; indexPatternManagement: IndexPatternManagementStart; + docTitle: ChromeDocTitle; }; } @@ -143,6 +152,8 @@ export const IndexPatternTable = ({ services.uiSettings, ]); + services.docTitle.change(title); + const createButton = canSave ? ( -

    - -

    +

    {title}

    diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 551e94c2032ca..902b4b26ab9a2 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -74,6 +74,7 @@ export async function mountManagementSection( indexPatterns: data.indexPatterns, savedObjectsClient: savedObjects.client, uiSettings, + docTitle: chrome.docTitle, openConfirm: overlays.openConfirm, setBreadcrumbs: params.setBreadcrumbs, }} @@ -126,6 +127,7 @@ export async function mountManagementSection( services={{ savedObjectsClient: savedObjects.client, uiSettings, + docTitle: chrome.docTitle, setBreadcrumbs: params.setBreadcrumbs, indexPatternManagement: indexPatternManagementStart as IndexPatternManagementStart, }} From 575e06fcc814d42d08db9e45d04ee91ec4bc915e Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Mon, 11 May 2020 16:20:32 -0500 Subject: [PATCH 29/45] add field format editors to migration doc --- src/core/MIGRATION.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/MIGRATION.md b/src/core/MIGRATION.md index 02d46b1583b59..65bd9fe0e41be 100644 --- a/src/core/MIGRATION.md +++ b/src/core/MIGRATION.md @@ -1240,6 +1240,7 @@ import { npStart: { plugins } } from 'ui/new_platform'; | `ui/filter_manager` | `plugins.data.filter` | -- | | `ui/index_patterns` | `plugins.data.indexPatterns` | | `import 'ui/management'` | `plugins.management.sections` | | +| `import 'ui/registry/field_format_editors'` | `plugins.index_pattern_management.fieldFormatEditors` | | | `ui/registry/field_formats` | `plugins.data.fieldFormats` | | | `ui/registry/feature_catalogue` | `plugins.home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. | | `ui/registry/vis_types` | `plugins.visualizations` | -- | From 551534ad6eb0eeaafa6ace085ade83c097ec09fa Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Mon, 11 May 2020 16:27:23 -0500 Subject: [PATCH 30/45] fix plugin name --- src/core/MIGRATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/MIGRATION.md b/src/core/MIGRATION.md index 65bd9fe0e41be..ce2d652257e1f 100644 --- a/src/core/MIGRATION.md +++ b/src/core/MIGRATION.md @@ -1240,7 +1240,7 @@ import { npStart: { plugins } } from 'ui/new_platform'; | `ui/filter_manager` | `plugins.data.filter` | -- | | `ui/index_patterns` | `plugins.data.indexPatterns` | | `import 'ui/management'` | `plugins.management.sections` | | -| `import 'ui/registry/field_format_editors'` | `plugins.index_pattern_management.fieldFormatEditors` | | +| `import 'ui/registry/field_format_editors'` | `plugins.indexPatternManagement.fieldFormatEditors` | | | `ui/registry/field_formats` | `plugins.data.fieldFormats` | | | `ui/registry/feature_catalogue` | `plugins.home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. | | `ui/registry/vis_types` | `plugins.visualizations` | -- | From a017d736e4c6ea8be0fcf7cb78da259b456d7c25 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Tue, 12 May 2020 14:31:59 -0500 Subject: [PATCH 31/45] remove comments --- .../public/management_app/mount_management_section.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 902b4b26ab9a2..fb43b679e3be1 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -59,8 +59,6 @@ export async function mountManagementSection( chrome.setBadge(readOnlyBadge); } - // todo path w/o slash - ReactDOM.render( @@ -103,7 +101,6 @@ export async function mountManagementSection( Date: Tue, 12 May 2020 15:35:35 -0500 Subject: [PATCH 32/45] remove comments --- .../index_pattern_management/public/components/types.ts | 2 -- .../index_pattern_management/public/components/utils.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/types.ts b/src/plugins/index_pattern_management/public/components/types.ts index 7a002bfe040a7..2a820dd5f2c7a 100644 --- a/src/plugins/index_pattern_management/public/components/types.ts +++ b/src/plugins/index_pattern_management/public/components/types.ts @@ -26,8 +26,6 @@ export interface IndexPatternCreationOption { export interface IndexPatternTableItem { id: string; title: string; - url: string; - // active: boolean; default: boolean; tag?: string[]; sort: string; diff --git a/src/plugins/index_pattern_management/public/components/utils.ts b/src/plugins/index_pattern_management/public/components/utils.ts index fbd398df4e7a6..0b7fd29d8e7e7 100644 --- a/src/plugins/index_pattern_management/public/components/utils.ts +++ b/src/plugins/index_pattern_management/public/components/utils.ts @@ -48,9 +48,6 @@ export async function getIndexPatterns( return { id, title, - url: '', - // url: kbnUrl.eval('#/management/kibana/indexPatterns/create{{id}}', { id }), - // active: $scope.editingId === id, default: isDefault, tags, // the prepending of 0 at the default pattern takes care of prioritization From 8cd6c8892722e4c33f549e7259a7828e408a16d4 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Tue, 12 May 2020 17:38:41 -0500 Subject: [PATCH 33/45] =?UTF-8?q?update=20sn=C3=A4psh=C3=B6t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/components/__snapshots__/utils.test.ts.snap | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap b/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap index 5e58ed602d150..224a5c992d58b 100644 --- a/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap +++ b/src/plugins/index_pattern_management/public/components/__snapshots__/utils.test.ts.snap @@ -8,7 +8,6 @@ Array [ "sort": "0test name", "tags": undefined, "title": "test name", - "url": "", }, Object { "default": false, @@ -16,7 +15,6 @@ Array [ "sort": "1test name 1", "tags": undefined, "title": "test name 1", - "url": "", }, ] `; From d59ec70cbf36ba02ed063faec37ca2b89013912b Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 13 May 2020 14:37:35 +0300 Subject: [PATCH 34/45] Using history push instead of href --- .../components/header/header.tsx | 16 +++++++++++----- .../scripted_fields_table.tsx | 7 +------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx index d23a973eb5fad..c608409f5c2cd 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx @@ -18,15 +18,16 @@ */ import React from 'react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiText, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -interface HeaderProps { - addScriptedFieldUrl: string; +interface HeaderProps extends RouteComponentProps { + indexPatternId: string; } -export const Header = ({ addScriptedFieldUrl }: HeaderProps) => ( +export const Header = withRouter(({ indexPatternId, history }: HeaderProps) => ( @@ -49,7 +50,12 @@ export const Header = ({ addScriptedFieldUrl }: HeaderProps) => ( - + { + history.push(`patterns/${indexPatternId}/create-field/`); + }} + > ( -); +)); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index cf29fcce744d5..dc691f97647a3 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -145,12 +145,7 @@ export class ScriptedFieldsTable extends Component< return ( <> -
    +
    From 3a2576e3a6241c40a4c0e1153bda562317978972 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 13 May 2020 16:07:03 +0300 Subject: [PATCH 35/45] Fixed tests and types --- .../create_index_pattern_wizard.test.tsx.snap | 2 +- .../create_index_pattern_wizard.test.tsx | 3 +- .../scripted_field_table.test.tsx.snap | 10 ++--- .../header/__snapshots__/header.test.tsx.snap | 43 ++----------------- .../components/header/header.test.tsx | 2 +- .../scripted_fields_table.tsx | 5 +-- .../public/components/utils.ts | 3 +- .../mount_management_section.tsx | 1 + .../public/service/list/config.ts | 6 ++- .../public/service/list/manager.ts | 6 ++- 10 files changed, 25 insertions(+), 56 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap index a3c26e42d529e..9a390f84ef5dc 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/__snapshots__/create_index_pattern_wizard.test.tsx.snap @@ -119,7 +119,7 @@ exports[`CreateIndexPatternWizard renders the empty state when there are no indi />

    ({ }, })); -const { savedObjects, overlays, uiSettings, chrome } = coreMock.createStart(); +const { savedObjects, overlays, uiSettings, chrome, http } = coreMock.createStart(); const { indexPatterns, search } = dataPluginMock.createStartContract(); const mockIndexPatternCreationType = new IndexPatternCreationConfig({ @@ -61,6 +61,7 @@ const services = ({ openConfirm: overlays.openConfirm, setBreadcrumbs: jest.fn(), docTitle: chrome.docTitle, + prependBasePath: http.basePath.prepend, } as unknown) as CreateIndexPatternWizardProps['services']; const routeComponentPropsMock = { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap index 68f41342d7283..c0ecc441e9018 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/__snapshots__/scripted_field_table.test.tsx.snap @@ -3,7 +3,7 @@ exports[`ScriptedFieldsTable should filter based on the lang filter 1`] = `
    - - -

    - -

    -
    - -

    - -

    -
    -
    - - - - - - + + + `; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx index 19479de8f2aa4..370f47553b1eb 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx @@ -24,7 +24,7 @@ import { Header } from './header'; describe('Header', () => { test('should render normally', () => { - const component = shallow(
    ); + const component = shallow(
    ); expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx index dc691f97647a3..32520eadaf199 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx @@ -27,10 +27,7 @@ import { import { Table, Header, CallOuts, DeleteScritpedFieldConfirmationModal } from './components'; import { ScriptedFieldItem } from './types'; -import { - IIndexPattern, - INDEX_PATTERN_MANAGEMENT_SECTION_PATH, -} from '../../../../../../plugins/data/public'; +import { IIndexPattern } from '../../../../../../plugins/data/public'; interface ScriptedFieldsTableProps { indexPattern: IIndexPattern; diff --git a/src/plugins/index_pattern_management/public/components/utils.ts b/src/plugins/index_pattern_management/public/components/utils.ts index 0b7fd29d8e7e7..11da73aafb7b1 100644 --- a/src/plugins/index_pattern_management/public/components/utils.ts +++ b/src/plugins/index_pattern_management/public/components/utils.ts @@ -40,8 +40,7 @@ export async function getIndexPatterns( const isDefault = defaultIndex === id; const tags = (indexPatternManagementStart as IndexPatternManagementStart).list.getIndexPatternTags( - // todo: temporary cast SimpleSavedObject -> IIndexPattern - (pattern as unknown) as IIndexPattern, + pattern, isDefault ); diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index fb43b679e3be1..1206899fb1069 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -75,6 +75,7 @@ export async function mountManagementSection( docTitle: chrome.docTitle, openConfirm: overlays.openConfirm, setBreadcrumbs: params.setBreadcrumbs, + prependBasePath: http.basePath.prepend, }} /> diff --git a/src/plugins/index_pattern_management/public/service/list/config.ts b/src/plugins/index_pattern_management/public/service/list/config.ts index 1529c2fa18790..d90c548ac350a 100644 --- a/src/plugins/index_pattern_management/public/service/list/config.ts +++ b/src/plugins/index_pattern_management/public/service/list/config.ts @@ -19,6 +19,7 @@ import { i18n } from '@kbn/i18n'; import { IIndexPattern, IFieldType } from 'src/plugins/data/public'; +import { SimpleSavedObject } from 'src/core/public'; export interface IndexPatternTag { key: string; @@ -35,7 +36,10 @@ const defaultIndexPatternListName = i18n.translate( export class IndexPatternListConfig { public readonly key = 'default'; - public getIndexPatternTags(indexPattern: IIndexPattern, isDefault: boolean): IndexPatternTag[] { + public getIndexPatternTags( + indexPattern: IIndexPattern | SimpleSavedObject, + isDefault: boolean + ): IndexPatternTag[] { return isDefault ? [ { diff --git a/src/plugins/index_pattern_management/public/service/list/manager.ts b/src/plugins/index_pattern_management/public/service/list/manager.ts index ae4c06f410db5..6e8b430ffdc26 100644 --- a/src/plugins/index_pattern_management/public/service/list/manager.ts +++ b/src/plugins/index_pattern_management/public/service/list/manager.ts @@ -18,6 +18,7 @@ */ import { IIndexPattern, IFieldType } from 'src/plugins/data/public'; +import { SimpleSavedObject } from 'src/core/public'; import { IndexPatternListConfig, IndexPatternTag } from './config'; export class IndexPatternListManager { @@ -38,7 +39,10 @@ export class IndexPatternListManager { start() { return { - getIndexPatternTags: (indexPattern: IIndexPattern, isDefault: boolean) => + getIndexPatternTags: ( + indexPattern: IIndexPattern | SimpleSavedObject, + isDefault: boolean + ) => this.configs.reduce( (tags: IndexPatternTag[], config) => config.getIndexPatternTags From 4ce871e2b711854778612d7bfb8f525c1fb67171 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Wed, 13 May 2020 16:49:41 +0300 Subject: [PATCH 36/45] fixed url --- .../scripted_fields_table/components/header/header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx index c608409f5c2cd..dc48f61d1aa65 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.tsx @@ -53,7 +53,7 @@ export const Header = withRouter(({ indexPatternId, history }: HeaderProps) => ( { - history.push(`patterns/${indexPatternId}/create-field/`); + history.push(`${indexPatternId}/create-field/`); }} > Date: Wed, 13 May 2020 13:18:18 -0500 Subject: [PATCH 37/45] fix i18n content --- x-pack/plugins/translations/translations/ja-JP.json | 3 --- x-pack/plugins/translations/translations/zh-CN.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index a93ae4bd73633..ec9d8bd320716 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2111,9 +2111,6 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "デフォルトの WMS プロパティ", "kbn.advancedSettings.visualizeEnableLabsText": "ユーザーが実験的なビジュアライゼーションを作成、表示、編集できるようになります。無効の場合、\n ユーザーは本番準備が整ったビジュアライゼーションのみを利用できます。", "kbn.advancedSettings.visualizeEnableLabsTitle": "実験的なビジュアライゼーションを有効にする", - "kbn.dashboardTitle": "ダッシュボード", - "kbn.devToolsTitle": "開発ツール", - "kbn.discoverTitle": "ディスカバリ", "indexPatternManagement.createIndexPattern.betaLabel": "ベータ", "indexPatternManagement.createIndexPattern.emptyState.checkDataButton": "新規データを確認", "indexPatternManagement.createIndexPattern.emptyStateHeader": "Elasticsearch データが見つかりませんでした", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 649fa4d76adf0..fad07d2419111 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2112,9 +2112,6 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "默认 WMS 属性", "kbn.advancedSettings.visualizeEnableLabsText": "允许用户创建、查看和编辑实验性可视化。如果禁用,\n 仅被视为生产就绪的可视化可供用户使用。", "kbn.advancedSettings.visualizeEnableLabsTitle": "启用实验性可视化", - "kbn.dashboardTitle": "仪表板", - "kbn.devToolsTitle": "开发工具", - "kbn.discoverTitle": "Discover", "indexPatternManagement.createIndexPattern.betaLabel": "公测版", "indexPatternManagement.createIndexPattern.emptyState.checkDataButton": "检查新数据", "indexPatternManagement.createIndexPattern.emptyStateHeader": "找不到任何 Elasticsearch 数据", From b235793e0af972ec3d7228d8e3ad4971737692ab Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Thu, 14 May 2020 12:50:03 +0300 Subject: [PATCH 38/45] removed constant INDEX_PATTERN_MANAGEMENT_SECTION_PATH and fixed styles --- ...c.index_pattern_management_section_path.md | 11 ------- .../kibana-plugin-plugins-data-public.md | 1 - src/legacy/ui/public/_index.scss | 1 - src/plugins/data/common/constants.ts | 2 -- src/plugins/data/public/index.ts | 1 - .../index_patterns/index_pattern.ts | 10 ++---- src/plugins/data/public/public.api.md | 33 ++++++++----------- .../server/saved_objects/index_patterns.ts | 5 +-- .../public/application/components/add_data.js | 3 +- .../public/components/breadcrumbs.ts | 7 ++-- .../components/time_field/time_field.tsx | 2 ++ .../index_pattern_table.tsx | 6 +--- .../public/index.scss | 3 +- .../components/no_index_pattern_callout.js | 5 +-- .../results_links/results_links.tsx | 4 +-- 15 files changed, 27 insertions(+), 67 deletions(-) delete mode 100644 docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md deleted file mode 100644 index 1e801de4b41fc..0000000000000 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.index_pattern_management_section_path.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH](./kibana-plugin-plugins-data-public.index_pattern_management_section_path.md) - -## INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH variable - -Signature: - -```typescript -INDEX_PATTERN_MANAGEMENT_SECTION_PATH = "#/management/kibana/indexPatterns" -``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md index 55a0e1d4a4631..02cc34baf7c45 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md @@ -106,7 +106,6 @@ | [FilterBar](./kibana-plugin-plugins-data-public.filterbar.md) | | | [getIndexPatternFieldListCreator](./kibana-plugin-plugins-data-public.getindexpatternfieldlistcreator.md) | | | [getKbnTypeNames](./kibana-plugin-plugins-data-public.getkbntypenames.md) | Get the esTypes known by all kbnFieldTypes {Array} | -| [INDEX\_PATTERN\_MANAGEMENT\_SECTION\_PATH](./kibana-plugin-plugins-data-public.index_pattern_management_section_path.md) | | | [indexPatterns](./kibana-plugin-plugins-data-public.indexpatterns.md) | | | [injectSearchSourceReferences](./kibana-plugin-plugins-data-public.injectsearchsourcereferences.md) | | | [parseSearchSourceJSON](./kibana-plugin-plugins-data-public.parsesearchsourcejson.md) | | diff --git a/src/legacy/ui/public/_index.scss b/src/legacy/ui/public/_index.scss index c14ddd400303a..d258ef190a100 100644 --- a/src/legacy/ui/public/_index.scss +++ b/src/legacy/ui/public/_index.scss @@ -11,4 +11,3 @@ @import './accessibility/index'; @import './directives/index'; @import './error_url_overflow/index'; -@import './exit_full_screen/index'; diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index 4274ec7e530cc..00786a0c72cf1 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -18,5 +18,3 @@ */ export const DEFAULT_QUERY_LANGUAGE = 'kuery'; - -export const INDEX_PATTERN_MANAGEMENT_SECTION_PATH = '#/management/kibana/indexPatterns'; diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index e287f3ff14027..4a5b3fd5714db 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -266,7 +266,6 @@ export { ES_FIELD_TYPES, KBN_FIELD_TYPES, IndexPatternAttributes, - INDEX_PATTERN_MANAGEMENT_SECTION_PATH, } from '../common'; /* diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts index 95bbf31e183fc..c6df736f58c79 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts @@ -28,13 +28,7 @@ import { MappingObject, } from '../../../../kibana_utils/public'; -import { - ES_FIELD_TYPES, - KBN_FIELD_TYPES, - INDEX_PATTERN_MANAGEMENT_SECTION_PATH, - IIndexPattern, - IFieldType, -} from '../../../common'; +import { ES_FIELD_TYPES, KBN_FIELD_TYPES, IIndexPattern, IFieldType } from '../../../common'; import { findByTitle } from '../utils'; import { IndexPatternMissingIndices } from '../lib'; @@ -175,7 +169,7 @@ export class IndexPattern implements IIndexPattern { private updateFromElasticSearch(response: any, forceFieldRefresh: boolean = false) { if (!response.found) { - throw new SavedObjectNotFound(type, this.id, INDEX_PATTERN_MANAGEMENT_SECTION_PATH); + throw new SavedObjectNotFound(type, this.id, '#/management/kibana/indexPatterns'); } _.forOwn(this.mapping, (fieldMapping: FieldMappingSpec, name: string | undefined) => { diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index 1d40bd9ebeccf..e157d2ac6a522 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -836,11 +836,6 @@ export interface IKibanaSearchResponse { // @public (undocumented) export type IMetricAggType = MetricAggType; -// Warning: (ae-missing-release-tag) "INDEX_PATTERN_MANAGEMENT_SECTION_PATH" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const INDEX_PATTERN_MANAGEMENT_SECTION_PATH = "#/management/kibana/indexPatterns"; - // Warning: (ae-missing-release-tag) "IndexPattern" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -1833,20 +1828,20 @@ export type TSearchStrategyProvider = (context: ISearc // src/plugins/data/public/index.ts:237:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:237:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:237:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:378:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:381:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:392:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:397:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:377:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:379:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:380:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:33:33 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:37:1 - (ae-forgotten-export) The symbol "QueryStateChange" needs to be exported by the entry point index.d.ts // src/plugins/data/public/types.ts:52:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts diff --git a/src/plugins/data/server/saved_objects/index_patterns.ts b/src/plugins/data/server/saved_objects/index_patterns.ts index c8d2a253b61bc..a212d7f88e4eb 100644 --- a/src/plugins/data/server/saved_objects/index_patterns.ts +++ b/src/plugins/data/server/saved_objects/index_patterns.ts @@ -18,7 +18,6 @@ */ import { SavedObjectsType } from 'kibana/server'; -import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../common'; import { indexPatternSavedObjectTypeMigrations } from './index_pattern_migrations'; export const indexPatternSavedObjectType: SavedObjectsType = { @@ -37,9 +36,7 @@ export const indexPatternSavedObjectType: SavedObjectsType = { }, getInAppUrl(obj) { return { - path: `/app/kibana${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}/patterns/${encodeURIComponent( - obj.id - )}`, + path: `/app/kibana#/management/kibana/indexPatterns/patterns/${encodeURIComponent(obj.id)}`, uiCapabilitiesPath: 'management.kibana.index_patterns', }; }, diff --git a/src/plugins/home/public/application/components/add_data.js b/src/plugins/home/public/application/components/add_data.js index 65eab6a45ea14..8094bae51f1a8 100644 --- a/src/plugins/home/public/application/components/add_data.js +++ b/src/plugins/home/public/application/components/add_data.js @@ -22,7 +22,6 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; import { getServices } from '../kibana_services'; -import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../data/public'; import { EuiButton, @@ -297,7 +296,7 @@ const AddDataUi = ({ apmUiEnabled, isNewKibanaInstance, intl, mlEnabled }) => { ; } ) => ( - + {name} {index.tags && index.tags.map(({ key: tagKey, name: tagName }) => ( diff --git a/src/plugins/index_pattern_management/public/index.scss b/src/plugins/index_pattern_management/public/index.scss index 2c7999392fe38..bbf5b6036550c 100644 --- a/src/plugins/index_pattern_management/public/index.scss +++ b/src/plugins/index_pattern_management/public/index.scss @@ -1,2 +1 @@ -@import './components/field_editor/index'; -@import './components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field'; \ No newline at end of file +@import './components/field_editor/index'; \ No newline at end of file diff --git a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js index 2d9cf4ef6d28d..89cd884a6dd32 100644 --- a/x-pack/plugins/maps/public/components/no_index_pattern_callout.js +++ b/x-pack/plugins/maps/public/components/no_index_pattern_callout.js @@ -9,7 +9,6 @@ import React from 'react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { INDEX_PATTERN_MANAGEMENT_SECTION_PATH } from '../../../../../src/plugins/data/public'; export function NoIndexPatternCallout() { const http = getHttp(); @@ -25,9 +24,7 @@ export function NoIndexPatternCallout() { id="xpack.maps.noIndexPattern.doThisPrefixDescription" defaultMessage="You'll need to " /> - + = ({ /> } description="" - href={`${basePath.get()}/app/kibana${INDEX_PATTERN_MANAGEMENT_SECTION_PATH}${ + href={`${basePath.get()}/app/kibana#/management/kibana/indexPatterns${ createIndexPattern ? `/patterns/${indexPatternId}` : '' }`} /> From 1884f0d81e0dda009c57eb9c2fbaec19a0a1975e Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Thu, 14 May 2020 15:18:38 +0300 Subject: [PATCH 39/45] Fixed types --- .../index_pattern_management/public/components/breadcrumbs.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/index_pattern_management/public/components/breadcrumbs.ts b/src/plugins/index_pattern_management/public/components/breadcrumbs.ts index ea84c87c7bafd..6ffb929150b82 100644 --- a/src/plugins/index_pattern_management/public/components/breadcrumbs.ts +++ b/src/plugins/index_pattern_management/public/components/breadcrumbs.ts @@ -18,6 +18,7 @@ */ import { i18n } from '@kbn/i18n'; +import { IndexPattern } from '../../../data/public'; export function getListBreadcrumbs() { return [ From 00dc56ad23697fd5d74d805e9febfd4804f313bf Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Thu, 14 May 2020 18:13:14 +0300 Subject: [PATCH 40/45] Back styles into index --- .../step_time_field/components/time_field/time_field.tsx | 2 -- src/plugins/index_pattern_management/public/index.scss | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx index b4ed37118966b..1215d5ca7e15f 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx @@ -17,8 +17,6 @@ * under the License. */ -import './time_field.scss'; - import React from 'react'; import { diff --git a/src/plugins/index_pattern_management/public/index.scss b/src/plugins/index_pattern_management/public/index.scss index bbf5b6036550c..2c7999392fe38 100644 --- a/src/plugins/index_pattern_management/public/index.scss +++ b/src/plugins/index_pattern_management/public/index.scss @@ -1 +1,2 @@ -@import './components/field_editor/index'; \ No newline at end of file +@import './components/field_editor/index'; +@import './components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field'; \ No newline at end of file From f1f66801e67ea4ee957e2beb705b09a24e6bc804 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 15 May 2020 21:07:51 -0500 Subject: [PATCH 41/45] fix scss --- .../components/time_field/{_time_field.scss => time_field.scss} | 0 .../step_time_field/components/time_field/time_field.tsx | 2 ++ .../public/components/field_editor/_index.scss | 2 -- .../components/field_format_editor/samples/_index.scss | 1 - .../field_format_editor/samples/{_samples.scss => samples.scss} | 0 .../components/field_format_editor/samples/samples.tsx | 2 ++ .../scripting_help/{_test_script.scss => test_script.scss} | 0 .../field_editor/components/scripting_help/test_script.tsx | 2 ++ src/plugins/index_pattern_management/public/index.scss | 2 -- src/plugins/index_pattern_management/public/plugin.ts | 1 - 10 files changed, 6 insertions(+), 6 deletions(-) rename src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/{_time_field.scss => time_field.scss} (100%) delete mode 100644 src/plugins/index_pattern_management/public/components/field_editor/_index.scss delete mode 100644 src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss rename src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/{_samples.scss => samples.scss} (100%) rename src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/{_test_script.scss => test_script.scss} (100%) delete mode 100644 src/plugins/index_pattern_management/public/index.scss diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/_time_field.scss b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.scss similarity index 100% rename from src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/_time_field.scss rename to src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.scss diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx index 1215d5ca7e15f..b4ed37118966b 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field.tsx @@ -17,6 +17,8 @@ * under the License. */ +import './time_field.scss'; + import React from 'react'; import { diff --git a/src/plugins/index_pattern_management/public/components/field_editor/_index.scss b/src/plugins/index_pattern_management/public/components/field_editor/_index.scss deleted file mode 100644 index 39f69c013d428..0000000000000 --- a/src/plugins/index_pattern_management/public/components/field_editor/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import './components/field_format_editor/samples/index'; -@import './components/scripting_help/test_script'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss deleted file mode 100644 index 7a50cd118bfb2..0000000000000 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './samples'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_samples.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.scss similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/_samples.scss rename to src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.scss diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx index 8fba45e9250d8..f2814664c185d 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/field_format_editor/samples/samples.tsx @@ -17,6 +17,8 @@ * under the License. */ +import './samples.scss'; + import React, { PureComponent } from 'react'; import { EuiBasicTable, EuiFormRow } from '@elastic/eui'; diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/_test_script.scss b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.scss similarity index 100% rename from src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/_test_script.scss rename to src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.scss diff --git a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx index 9ec9dcde2e7b1..0e324a67bac36 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx +++ b/src/plugins/index_pattern_management/public/components/field_editor/components/scripting_help/test_script.tsx @@ -17,6 +17,8 @@ * under the License. */ +import './test_script.scss'; + import React, { Component, Fragment } from 'react'; import { HttpStart, IUiSettingsClient } from 'src/core/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; diff --git a/src/plugins/index_pattern_management/public/index.scss b/src/plugins/index_pattern_management/public/index.scss deleted file mode 100644 index 2c7999392fe38..0000000000000 --- a/src/plugins/index_pattern_management/public/index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import './components/field_editor/index'; -@import './components/create_index_pattern_wizard/components/step_time_field/components/time_field/time_field'; \ No newline at end of file diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index d840e0039868e..6248ff0c41b66 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import './index.scss'; import { i18n } from '@kbn/i18n'; import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public'; From e78faf7b81ce81a209d10547aa6e5b6e18159468 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Fri, 15 May 2020 23:08:41 -0500 Subject: [PATCH 42/45] add url forwarding from old url setup --- .../index_pattern_management/kibana.json | 2 +- .../index_pattern_management/public/plugin.ts | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/plugins/index_pattern_management/kibana.json b/src/plugins/index_pattern_management/kibana.json index 35df77476ade6..364edbb030dc9 100644 --- a/src/plugins/index_pattern_management/kibana.json +++ b/src/plugins/index_pattern_management/kibana.json @@ -3,5 +3,5 @@ "version": "kibana", "server": false, "ui": true, - "requiredPlugins": ["management", "data"] + "requiredPlugins": ["management", "data", "kibanaLegacy"] } diff --git a/src/plugins/index_pattern_management/public/plugin.ts b/src/plugins/index_pattern_management/public/plugin.ts index d4e1477a07937..aa28422956a38 100644 --- a/src/plugins/index_pattern_management/public/plugin.ts +++ b/src/plugins/index_pattern_management/public/plugin.ts @@ -20,6 +20,7 @@ import { i18n } from '@kbn/i18n'; import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; +import { KibanaLegacySetup } from '../../kibana_legacy/public'; import { IndexPatternManagementService, IndexPatternManagementServiceSetup, @@ -30,6 +31,7 @@ import { ManagementSetup, ManagementApp, ManagementSectionId } from '../../manag export interface IndexPatternManagementSetupDependencies { management: ManagementSetup; + kibanaLegacy: KibanaLegacySetup; } export interface IndexPatternManagementStartDependencies { @@ -44,6 +46,8 @@ const sectionsHeader = i18n.translate('indexPatternManagement.indexPattern.secti defaultMessage: 'Index Patterns', }); +const IPM_APP_ID = 'indexPatterns'; + export class IndexPatternManagementPlugin implements Plugin< @@ -59,7 +63,7 @@ export class IndexPatternManagementPlugin public setup( core: CoreSetup, - { management }: IndexPatternManagementSetupDependencies + { management, kibanaLegacy }: IndexPatternManagementSetupDependencies ) { const kibanaSection = management.sections.getSection(ManagementSectionId.Kibana); @@ -67,8 +71,17 @@ export class IndexPatternManagementPlugin throw new Error('`kibana` management section not found.'); } + const newAppPath = `kibana#/management/kibana/${IPM_APP_ID}`; + const legacyPatternsPath = 'management/kibana/index_patterns'; + + kibanaLegacy.forwardApp('management/kibana/index_pattern', newAppPath, path => '/create'); + kibanaLegacy.forwardApp(legacyPatternsPath, newAppPath, path => { + const pathInApp = path.substr(legacyPatternsPath.length + 1); + return pathInApp && `/patterns${pathInApp}`; + }); + this.managementApp = kibanaSection.registerApp({ - id: 'indexPatterns', + id: IPM_APP_ID, title: sectionsHeader, order: 0, mount: async params => { From c95900617980356577131f9b5ecb2955e1adf94a Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sat, 16 May 2020 10:56:11 -0500 Subject: [PATCH 43/45] typescript fix --- src/plugins/index_pattern_management/public/mocks.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/index_pattern_management/public/mocks.ts b/src/plugins/index_pattern_management/public/mocks.ts index 1b629ab50bd61..6a2a63d776c67 100644 --- a/src/plugins/index_pattern_management/public/mocks.ts +++ b/src/plugins/index_pattern_management/public/mocks.ts @@ -19,8 +19,9 @@ import { PluginInitializerContext } from 'src/core/public'; import { coreMock } from '../../../core/public/mocks'; -import { managementPluginMock } from '../../../plugins/management/public/mocks'; -import { dataPluginMock } from '../../../plugins/data/public/mocks'; +import { managementPluginMock } from '../../management/public/mocks'; +import { kibanaLegacyPluginMock } from '../../kibana_legacy/public/mocks'; +import { dataPluginMock } from '../../data/public/mocks'; import { IndexPatternManagementSetup, IndexPatternManagementStart, @@ -61,6 +62,7 @@ const createInstance = async () => { const setup = plugin.setup(coreMock.createSetup(), { management: managementPluginMock.createSetupContract(), + kibanaLegacy: kibanaLegacyPluginMock.createSetupContract(), }); const doStart = () => plugin.start(coreMock.createStart(), { From 497638ce2719ddc0915b7a3be8f732d6148b5e47 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sat, 16 May 2020 22:10:40 -0500 Subject: [PATCH 44/45] rename function, impoved snapshots --- .../edit_index_pattern/edit_index_pattern.tsx | 6 +- .../edit_index_pattern_container.tsx | 2 +- .../index_header/index_header.tsx | 8 +- .../header/__snapshots__/header.test.tsx.snap | 48 ++- .../components/header/header.test.tsx | 12 +- .../__snapshots__/field_editor.test.tsx.snap | 336 ++---------------- .../field_editor/field_editor.test.tsx | 10 +- 7 files changed, 86 insertions(+), 336 deletions(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx index 5d994306ecd07..826de7e7083e3 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -47,7 +47,7 @@ import { IndexHeader } from './index_header'; import { IndexPatternTableItem } from '../types'; import { getIndexPatterns } from '../utils'; -export interface EditIndexPatternProps extends RouteComponentProps { +interface EditIndexPatternProps extends RouteComponentProps { indexPattern: IndexPattern; config: IUiSettingsClient; services: { @@ -134,7 +134,7 @@ export const EditIndexPattern = withRouter( }); }; - const removePattern = () => { + const removePatternClick = () => { async function doRemove() { if (indexPattern.id === defaultIndex) { const indexPatterns: IndexPatternTableItem[] = await getIndexPatterns( @@ -198,7 +198,7 @@ export const EditIndexPattern = withRouter( indexPattern={indexPattern} setDefault={setDefaultPattern} refreshFields={refreshFields} - deleteIndexPattern={removePattern} + deleteIndexPatternClick={removePatternClick} defaultIndex={defaultIndex} /> diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx index 7681facda19bf..635cc16f363ee 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -33,7 +33,7 @@ import { getEditBreadcrumbs } from '../breadcrumbs'; import { EditIndexPattern } from '../edit_index_pattern'; -export interface EditIndexPatternContainerProps extends RouteComponentProps<{ id: string }> { +interface EditIndexPatternContainerProps extends RouteComponentProps<{ id: string }> { getIndexPattern: (id: string) => Promise; config: IUiSettingsClient; services: { diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx index b38ce7e192e47..4cf43d63d5839 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/index_header/index_header.tsx @@ -34,7 +34,7 @@ interface IndexHeaderProps { defaultIndex?: string; setDefault?: () => void; refreshFields?: () => void; - deleteIndexPattern?: () => void; + deleteIndexPatternClick?: () => void; } const setDefaultAriaLabel = i18n.translate( @@ -72,7 +72,7 @@ export function IndexHeader({ indexPattern, setDefault, refreshFields, - deleteIndexPattern, + deleteIndexPatternClick, }: IndexHeaderProps) { return ( @@ -120,12 +120,12 @@ export function IndexHeader({ )} - {deleteIndexPattern && ( + {deleteIndexPatternClick && ( - - +
    +
    +

    + + Scripted fields + +

    +
    +

    + + You can use scripted fields in visualizations and display them in your documents. However, you cannot search scripted fields. + +

    +
    +
    +
    + +
    +
    `; diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx index 370f47553b1eb..11fdae39aee3c 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/components/header/header.test.tsx @@ -18,13 +18,21 @@ */ import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from 'enzyme'; +import { RouteComponentProps } from 'react-router-dom'; import { Header } from './header'; describe('Header', () => { test('should render normally', () => { - const component = shallow(
    ); + const component = render( + + ); expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap index 01afdae464283..a7ed4e1c9cafd 100644 --- a/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/field_editor/__snapshots__/field_editor.test.tsx.snap @@ -19,57 +19,14 @@ exports[`FieldEditor should render create new scripted field correctly 1`] = ` isVisible={false} /> , "painlessLink": ({})); -jest.mock('ui/new_platform'); import { FieldEdiorProps, FieldEditor } from './field_editor'; import { dataPluginMock } from '../../../../data/public/mocks'; @@ -113,11 +109,11 @@ describe('FieldEditor', () => { getConfig: () => {}, fieldFormatEditors: [], redirectAway: () => {}, - docLinksScriptedFields: docLinksServiceMock.createStartContract().links.scriptedFields, + docLinksScriptedFields: {}, fieldFormats: dataStartServices.fieldFormats, toasts: coreStartServices.notifications.toasts, - http: coreStartServices.http, - uiSettings: coreStartServices.uiSettings, + http: {}, + uiSettings: {}, SearchBar: dataStartServices.ui.SearchBar, indexPatterns: dataStartServices.indexPatterns, } as unknown) as FieldEdiorProps['services']; From 7edfc270cfeae73a793f8d54a923db7df82e3908 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Mon, 18 May 2020 19:43:00 -0500 Subject: [PATCH 45/45] pass link to painless docs --- .../components/edit_index_pattern/edit_index_pattern.tsx | 2 ++ .../edit_index_pattern/edit_index_pattern_container.tsx | 1 + .../public/components/edit_index_pattern/tabs/tabs.tsx | 4 +++- .../public/management_app/mount_management_section.tsx | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx index 826de7e7083e3..f1c020cc409e0 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx @@ -56,6 +56,7 @@ interface EditIndexPatternProps extends RouteComponentProps { overlays: OverlayStart; savedObjectsClient: SavedObjectsClientContract; indexPatternManagement: IndexPatternManagementStart; + painlessDocLink: string; }; } @@ -246,6 +247,7 @@ export const EditIndexPattern = withRouter( config={config} services={{ indexPatternManagement: services.indexPatternManagement, + painlessDocLink: services.painlessDocLink, }} history={history} location={location} diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx index 635cc16f363ee..2f02765cd0596 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern_container.tsx @@ -43,6 +43,7 @@ interface EditIndexPatternContainerProps extends RouteComponentProps<{ id: strin savedObjectsClient: SavedObjectsClientContract; setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; indexPatternManagement: IndexPatternManagementStart; + painlessDocLink: string; }; } diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx index f8901d751c01a..5cf7fd9b2af06 100644 --- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx +++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx @@ -47,6 +47,7 @@ interface TabsProps extends Pick { fields: IndexPatternField[]; services: { indexPatternManagement: IndexPatternManagementStart; + painlessDocLink: string; }; } @@ -195,7 +196,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location }, }} onRemoveField={refreshFilters} - painlessDocLink={'todo'} + painlessDocLink={services.painlessDocLink} /> ); @@ -226,6 +227,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location refreshFilters, scriptedFieldLanguageFilter, services.indexPatternManagement.list.getFieldInfo, + services.painlessDocLink, ] ); diff --git a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx index 1206899fb1069..b6b58d8f006c8 100644 --- a/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/index_pattern_management/public/management_app/mount_management_section.tsx @@ -111,6 +111,7 @@ export async function mountManagementSection( savedObjectsClient: savedObjects.client, setBreadcrumbs: params.setBreadcrumbs, indexPatternManagement: indexPatternManagementStart as IndexPatternManagementStart, + painlessDocLink: docLinks.links.scriptedFields.painless, }} />