From f55e6da0d13a357b48942da1d0e811a78f66881b Mon Sep 17 00:00:00 2001 From: Pete Harverson Date: Fri, 9 Aug 2019 12:02:35 +0100 Subject: [PATCH] [ML] Delete old AngularJS data visualizer and refactor folders (#42962) * [ML] Delete old AngularJS data visualizer - Resolve merge conflicts * [ML] Fix imports * [ML] Updating translation files --- x-pack/legacy/plugins/ml/public/app.js | 2 - .../components/field_data_card/_index.scss | 1 - .../content_types/card_boolean.html | 56 -- .../content_types/card_date.html | 30 - .../content_types/card_document_count.html | 17 - .../content_types/card_geo_point.html | 36 - .../content_types/card_ip.html | 33 - .../content_types/card_keyword.html | 32 - .../content_types/card_number.html | 80 -- .../content_types/card_other.html | 44 -- .../content_types/card_text.html | 44 -- .../display_value_directive.js | 21 - .../document_count_chart_directive.js | 190 ----- .../field_data_card/field_data_card.html | 24 - .../field_data_card_directive.js | 114 --- .../components/field_data_card/index.js | 16 - .../metric_distribution_chart_directive.js | 301 -------- .../field_data_card/top_values.html | 37 - .../field_data_card/top_values_directive.js | 23 - .../__tests__/datavisualizer_controller.js | 49 -- .../datavisualizer/_datavisualizer.scss | 142 ---- .../ml/public/datavisualizer/_index.scss | 3 +- .../breadcrumbs.ts | 0 .../public/datavisualizer/datavisualizer.html | 259 ------- .../datavisualizer_controller.js | 686 ------------------ .../{selector => }/datavisualizer_selector.js | 25 +- .../datavisualizer_sidebar.html | 59 -- .../{selector => }/directive.js | 6 +- .../file_based}/_file_datavisualizer.scss | 0 .../file_based}/_index.scss | 0 .../file_based}/breadcrumbs.js | 2 +- .../file_based}/components/_index.scss | 0 .../components/about_panel/_about_panel.scss | 0 .../components/about_panel/_index.scss | 0 .../components/about_panel/about_panel.js | 0 .../components/about_panel/index.js | 0 .../components/about_panel/welcome_content.js | 0 .../analysis_summary/_analysis_summary.scss | 0 .../components/analysis_summary/_index.scss | 0 .../analysis_summary/analysis_summary.js | 0 .../components/analysis_summary/index.js | 0 .../components/bottom_bar/bottom_bar.js | 0 .../components/bottom_bar/index.js | 0 .../__snapshots__/overrides.test.js.snap | 0 .../components/edit_flyout/_edit_flyout.scss | 0 .../components/edit_flyout/_index.scss | 0 .../components/edit_flyout/edit_flyout.js | 0 .../components/edit_flyout/index.js | 0 .../components/edit_flyout/options/index.js | 0 .../edit_flyout/options/option_lists.js | 0 .../components/edit_flyout/options/options.js | 0 .../components/edit_flyout/overrides.js | 0 .../components/edit_flyout/overrides.test.js | 0 .../edit_flyout/overrides_validation.js | 0 .../_experimental_badge.scss | 0 .../components/experimental_badge/_index.scss | 0 .../experimental_badge/experimental_badge.js | 0 .../components/experimental_badge/index.js | 0 .../fields_stats/_field_stats_card.scss} | 65 +- .../fields_stats/_fields_stats.scss | 0 .../components/fields_stats/_index.scss | 0 .../fields_stats/field_stats_card.js | 6 +- .../components/fields_stats/fields_stats.js | 4 +- .../fields_stats/get_field_names.js | 0 .../components/fields_stats/index.js | 0 .../file_contents/_file_contents.scss | 0 .../components/file_contents/_index.scss | 0 .../components/file_contents/file_contents.js | 2 +- .../components/file_contents/index.js | 0 .../_file_datavisualizer_view.scss | 6 +- .../file_datavisualizer_view/_index.scss | 0 .../file_datavisualizer_view.js | 4 +- .../file_error_callouts.js | 0 .../file_datavisualizer_view/index.js | 0 .../components/import_errors/errors.js | 0 .../components/import_errors/index.js | 0 .../import_progress/import_progress.js | 0 .../components/import_progress/index.js | 0 .../components/import_settings/advanced.js | 2 +- .../import_settings/import_settings.js | 0 .../components/import_settings/index.js | 0 .../components/import_settings/simple.js | 0 .../import_summary/_import_sumary.scss | 0 .../components/import_summary/_index.scss | 0 .../import_summary/import_summary.js | 0 .../components/import_summary/index.js | 0 .../components/import_view/import_view.js | 4 +- .../import_view/importer/csv_importer.js | 2 +- .../import_view/importer/importer.js | 2 +- .../import_view/importer/importer_factory.js | 0 .../components/import_view/importer/index.js | 0 .../import_view/importer/ndjson_importer.js | 0 .../import_view/importer/sst_importer.js | 0 .../components/import_view/index.js | 0 .../components/results_links/index.js | 0 .../components/results_links/results_links.js | 8 +- .../components/results_view/_index.scss | 0 .../results_view/_results_view.scss | 0 .../components/results_view/index.js | 0 .../components/results_view/results_view.js | 0 .../file_based}/components/utils/index.js | 0 .../file_based}/components/utils/overrides.js | 0 .../file_based}/components/utils/utils.js | 2 +- .../file_based}/file_datavisualizer.js | 2 +- .../file_datavisualizer_directive.js | 10 +- .../file_based}/index.js | 0 .../plugins/ml/public/datavisualizer/index.js | 14 - .../{selector/index.js => index.ts} | 3 +- .../index_based}/_index.scss | 0 .../breadcrumbs.ts} | 10 +- .../index_based}/common/field_vis_config.ts | 2 +- .../index_based}/common/index.ts | 0 .../index_based}/common/request.ts | 2 +- .../actions_panel/actions_panel.tsx | 4 +- .../components/actions_panel/index.ts | 0 .../field_data_card/_field_data_card.scss | 0 .../components/field_data_card/_index.scss | 0 .../content_types/boolean_content.tsx | 2 +- .../content_types/date_content.tsx | 2 +- .../content_types/document_count_content.tsx | 0 .../content_types/geo_point_content.tsx | 2 +- .../field_data_card/content_types/index.ts | 0 .../content_types/ip_content.tsx | 2 +- .../content_types/keyword_content.tsx | 2 +- .../content_types/not_in_docs_content.tsx | 0 .../content_types/number_content.tsx | 6 +- .../content_types/other_content.tsx | 2 +- .../content_types/text_content.tsx | 0 .../document_count_chart.tsx | 2 +- .../document_count_chart/index.ts | 0 .../field_data_card/examples_list/example.tsx | 0 .../examples_list/examples_list.tsx | 0 .../field_data_card/examples_list/index.ts | 0 .../field_data_card/field_data_card.tsx | 4 +- .../components/field_data_card/index.ts | 0 .../loading_indicator/index.ts | 0 .../loading_indicator/loading_indicator.tsx | 0 .../metric_distribution_chart/index.ts | 0 .../metric_distribution_chart.tsx | 4 +- ...metric_distribution_chart_data_builder.tsx | 0 ...tric_distribution_chart_tooltip_header.tsx | 2 +- .../field_data_card/top_values/index.ts | 0 .../field_data_card/top_values/top_values.tsx | 4 +- .../field_types_select/field_types_select.tsx | 2 +- .../components/field_types_select/index.ts | 0 .../components/fields_panel/fields_panel.tsx | 2 +- .../components/fields_panel/index.ts | 0 .../components/search_panel/index.ts | 0 .../components/search_panel/search_panel.tsx | 6 +- .../index_based}/data_loader/data_loader.ts | 6 +- .../index_based}/data_loader/index.ts | 0 .../index_based}/directive.tsx | 6 +- .../index_based}/index.ts | 0 .../index_based}/page.tsx | 16 +- .../index_based}/route.ts | 11 +- .../fields_stats/_field_stats_card.scss | 14 - x-pack/legacy/plugins/ml/public/index.scss | 3 - .../index_or_search_controller.js | 12 - .../translations/translations/ja-JP.json | 57 -- .../translations/translations/zh-CN.json | 57 -- 160 files changed, 94 insertions(+), 2618 deletions(-) delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/_index.scss delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_boolean.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_date.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_document_count.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_geo_point.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_ip.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_keyword.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_number.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_other.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_text.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/display_value_directive.js delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/document_count_chart_directive.js delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card_directive.js delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/index.js delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/metric_distribution_chart_directive.js delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/top_values.html delete mode 100644 x-pack/legacy/plugins/ml/public/components/field_data_card/top_values_directive.js delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/__tests__/datavisualizer_controller.js delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/_datavisualizer.scss rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer}/breadcrumbs.ts (100%) delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/datavisualizer.html delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/datavisualizer_controller.js rename x-pack/legacy/plugins/ml/public/datavisualizer/{selector => }/datavisualizer_selector.js (86%) delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/datavisualizer_sidebar.html rename x-pack/legacy/plugins/ml/public/datavisualizer/{selector => }/directive.js (83%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/_file_datavisualizer.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/breadcrumbs.js (89%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/about_panel/_about_panel.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/about_panel/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/about_panel/about_panel.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/about_panel/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/about_panel/welcome_content.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/analysis_summary/_analysis_summary.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/analysis_summary/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/analysis_summary/analysis_summary.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/analysis_summary/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/bottom_bar/bottom_bar.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/bottom_bar/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/__snapshots__/overrides.test.js.snap (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/_edit_flyout.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/edit_flyout.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/options/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/options/option_lists.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/options/options.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/overrides.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/overrides.test.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/edit_flyout/overrides_validation.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/experimental_badge/_experimental_badge.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/experimental_badge/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/experimental_badge/experimental_badge.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/experimental_badge/index.js (100%) rename x-pack/legacy/plugins/ml/public/{components/field_data_card/_field_data_card.scss => datavisualizer/file_based/components/fields_stats/_field_stats_card.scss} (67%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/_fields_stats.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/field_stats_card.js (96%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/fields_stats.js (94%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/get_field_names.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/fields_stats/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_contents/_file_contents.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_contents/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_contents/file_contents.js (94%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_contents/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_datavisualizer_view/_file_datavisualizer_view.scss (73%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_datavisualizer_view/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_datavisualizer_view/file_datavisualizer_view.js (98%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_datavisualizer_view/file_error_callouts.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/file_datavisualizer_view/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_errors/errors.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_errors/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_progress/import_progress.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_progress/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_settings/advanced.js (98%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_settings/import_settings.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_settings/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_settings/simple.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_summary/_import_sumary.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_summary/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_summary/import_summary.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_summary/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/import_view.js (99%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/csv_importer.js (97%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/importer.js (98%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/importer_factory.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/ndjson_importer.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/importer/sst_importer.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/import_view/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_links/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_links/results_links.js (95%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_view/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_view/_results_view.scss (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_view/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/results_view/results_view.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/utils/index.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/utils/overrides.js (100%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/components/utils/utils.js (98%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/file_datavisualizer.js (90%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/file_datavisualizer_directive.js (78%) rename x-pack/legacy/plugins/ml/public/{file_datavisualizer => datavisualizer/file_based}/index.js (100%) delete mode 100644 x-pack/legacy/plugins/ml/public/datavisualizer/index.js rename x-pack/legacy/plugins/ml/public/datavisualizer/{selector/index.js => index.ts} (84%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/datavisualizer/{breadcrumbs.js => index_based/breadcrumbs.ts} (80%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/common/field_vis_config.ts (88%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/common/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/common/request.ts (81%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/actions_panel/actions_panel.tsx (92%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/actions_panel/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/_field_data_card.scss (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/_index.scss (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/boolean_content.tsx (97%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/date_content.tsx (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/document_count_content.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/geo_point_content.tsx (96%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/ip_content.tsx (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/keyword_content.tsx (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/not_in_docs_content.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/number_content.tsx (96%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/other_content.tsx (96%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/content_types/text_content.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/document_count_chart/document_count_chart.tsx (96%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/document_count_chart/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/examples_list/example.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/examples_list/examples_list.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/examples_list/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/field_data_card.tsx (93%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/loading_indicator/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/loading_indicator/loading_indicator.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/metric_distribution_chart/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/metric_distribution_chart/metric_distribution_chart.tsx (96%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/metric_distribution_chart/metric_distribution_chart_data_builder.tsx (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/metric_distribution_chart/metric_distribution_chart_tooltip_header.tsx (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/top_values/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_data_card/top_values/top_values.tsx (93%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_types_select/field_types_select.tsx (94%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/field_types_select/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/fields_panel/fields_panel.tsx (98%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/fields_panel/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/search_panel/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/components/search_panel/search_panel.tsx (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/data_loader/data_loader.ts (95%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/data_loader/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/directive.tsx (88%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/index.ts (100%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/page.tsx (97%) rename x-pack/legacy/plugins/ml/public/{data_visualizer => datavisualizer/index_based}/route.ts (74%) delete mode 100644 x-pack/legacy/plugins/ml/public/file_datavisualizer/components/fields_stats/_field_stats_card.scss diff --git a/x-pack/legacy/plugins/ml/public/app.js b/x-pack/legacy/plugins/ml/public/app.js index 406439f0becd..ca0427544e83 100644 --- a/x-pack/legacy/plugins/ml/public/app.js +++ b/x-pack/legacy/plugins/ml/public/app.js @@ -23,7 +23,6 @@ import 'plugins/ml/services/calendar_service'; import 'plugins/ml/components/messagebar'; import 'plugins/ml/data_frame'; import 'plugins/ml/data_frame_analytics'; -import 'plugins/ml/data_visualizer'; import 'plugins/ml/datavisualizer'; import 'plugins/ml/explorer'; import 'plugins/ml/timeseriesexplorer'; @@ -34,7 +33,6 @@ import 'plugins/ml/components/confirm_modal'; import 'plugins/ml/components/navigation_menu'; import 'plugins/ml/components/loading_indicator'; import 'plugins/ml/settings'; -import 'plugins/ml/file_datavisualizer'; import 'uiExports/autocompleteProviders'; import uiRoutes from 'ui/routes'; diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/_index.scss b/x-pack/legacy/plugins/ml/public/components/field_data_card/_index.scss deleted file mode 100644 index c39be8d5f17d..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'field_data_card'; \ No newline at end of file diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_boolean.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_boolean.html deleted file mode 100644 index 312d3600436d..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_boolean.html +++ /dev/null @@ -1,56 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
-
-
-
- true -
-
-
-
-
-
{{card.stats.trueCount}}
-
-
-
- false -
-
-
-
-
-
{{card.stats.falseCount}}
-
-
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_date.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_date.html deleted file mode 100644 index 6841252132cf..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_date.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
-
-
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_document_count.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_document_count.html deleted file mode 100644 index ab157a5f2319..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_document_count.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
- -
- -
-
-
- diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_geo_point.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_geo_point.html deleted file mode 100644 index 21005c449ab4..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_geo_point.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
-
-
-
-
- {{ example }} -
-
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_ip.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_ip.html deleted file mode 100644 index a6e8c7b47a9c..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_ip.html +++ /dev/null @@ -1,33 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
- -
- -
-
- -
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_keyword.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_keyword.html deleted file mode 100644 index 750ee2a04c94..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_keyword.html +++ /dev/null @@ -1,32 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
-
- -
-
- -
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_number.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_number.html deleted file mode 100644 index 024ab88b0bef..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_number.html +++ /dev/null @@ -1,80 +0,0 @@ -
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
-
- -
- -
-
- -
- -
- -
-
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_other.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_other.html deleted file mode 100644 index dacbf4091eb4..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_other.html +++ /dev/null @@ -1,44 +0,0 @@ -
-
-
-
- - ({{ 100 * card.stats.count / card.stats.sampleCount | number:1 }}%) -
-
- -
-
-
-
-
- {{ example }} -
-
-
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_text.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_text.html deleted file mode 100644 index 4ac856951087..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/content_types/card_text.html +++ /dev/null @@ -1,44 +0,0 @@ -
-
-
-
- {{ example }} -
-
-
-
-

-

-

-
-
- -
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/display_value_directive.js b/x-pack/legacy/plugins/ml/public/components/field_data_card/display_value_directive.js deleted file mode 100644 index f94e721319c2..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/display_value_directive.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - - - -import 'ngreact'; -import { uiModules } from 'ui/modules'; -const module = uiModules.get('apps/ml', ['react']); - -import { DisplayValue } from '../../components/display_value'; - -module.directive('mlDisplayValue', function (reactDirective) { - return reactDirective( - DisplayValue, - undefined, - { restrict: 'E' } - ); -}); diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/document_count_chart_directive.js b/x-pack/legacy/plugins/ml/public/components/field_data_card/document_count_chart_directive.js deleted file mode 100644 index 1550d8077afd..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/document_count_chart_directive.js +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - - - -/* - * AngularJS directive for rendering a chart showing - * document count on the field data card. - */ - -import _ from 'lodash'; -import { i18n } from '@kbn/i18n'; -import d3 from 'd3'; -import moment from 'moment'; - -import { parseInterval } from 'ui/utils/parse_interval'; -import { numTicksForDateFormat } from '../../util/chart_utils'; -import { calculateTextWidth } from '../../util/string_utils'; -import { MlTimeBuckets } from '../../util/ml_time_buckets'; -import { mlChartTooltipService } from '../../components/chart_tooltip/chart_tooltip_service'; -import { formatHumanReadableDateTime } from '../../util/date_utils'; - -import { uiModules } from 'ui/modules'; -import { timefilter } from 'ui/timefilter'; -const module = uiModules.get('apps/ml'); - -module.directive('mlDocumentCountChart', function () { - function link(scope, element, attrs) { - const svgWidth = attrs.width ? +attrs.width : 400; - const svgHeight = scope.height = attrs.height ? +attrs.height : 400; - - const margin = { top: 0, right: 5, bottom: 20, left: 15 }; - - let chartWidth = svgWidth - (margin.left + margin.right); - const chartHeight = svgHeight - (margin.top + margin.bottom); - - let xScale = null; - let yScale = d3.scale.linear().range([chartHeight, 0]); - let xAxisTickFormat = 'YYYY-MM-DD HH:mm'; - - let barChartGroup; - let barWidth = 5; // Adjusted according to data aggregation interval. - - scope.chartData = []; - - element.on('$destroy', function () { - scope.$destroy(); - }); - - function processChartData() { - // Build the dataset in format used by the d3 chart i.e. array - // of Objects with keys time (epoch ms), date (JavaScript date) and value. - const bucketsData = _.get(scope, ['card', 'stats', 'documentCounts', 'buckets'], {}); - const chartData = []; - _.each(bucketsData, (value, time) => { - chartData.push({ - date: new Date(+time), - time: +time, - value - }); - }); - - scope.chartData = chartData; - } - - function render() { - // Clear any existing elements from the visualization, - // then build the svg elements for the bar chart. - const chartElement = d3.select(element.get(0)).select('.content-wrapper'); - chartElement.selectAll('*').remove(); - - if (scope.chartData === undefined) { - return; - } - - const svg = chartElement.append('svg') - .attr('width', svgWidth) - .attr('height', svgHeight); - - // Set the size of the left margin according to the width - // of the largest y axis tick label. - const maxYVal = d3.max(scope.chartData, (d) => d.value); - yScale = yScale.domain([0, maxYVal]); - - const yAxis = d3.svg.axis().scale(yScale).orient('left').outerTickSize(0); - - // barChartGroup translate doesn't seem to be relative - // to parent svg, so have to add an extra 5px on. - const maxYAxisLabelWidth = calculateTextWidth(maxYVal, true, svg); - margin.left = Math.max(maxYAxisLabelWidth + yAxis.tickPadding() + 5, 25); - chartWidth = Math.max(svgWidth - margin.left - margin.right, 0); - - const bounds = timefilter.getActiveBounds(); - xScale = d3.time.scale() - .domain([new Date(bounds.min.valueOf()), new Date(bounds.max.valueOf())]) - .range([0, chartWidth]); - - if (scope.chartData.length > 0) { - // x axis tick format and bar width determined by data aggregation interval. - const buckets = new MlTimeBuckets(); - const aggInterval = _.get(scope, ['card', 'stats', 'documentCounts', 'interval']); - buckets.setInterval(aggInterval); - buckets.setBounds(bounds); - xAxisTickFormat = buckets.getScaledDateFormat(); - - const intervalMs = parseInterval(aggInterval).asMilliseconds(); - barWidth = xScale(scope.chartData[0].time + intervalMs) - xScale(scope.chartData[0].time); - } - - const xAxis = d3.svg.axis().scale(xScale).orient('bottom') - .outerTickSize(0).ticks(numTicksForDateFormat(chartWidth, xAxisTickFormat)) - .tickFormat((d) => { - return moment(d).format(xAxisTickFormat); - }); - - barChartGroup = svg.append('g') - .attr('class', 'bar-chart') - .attr('transform', `translate(${margin.left}, ${margin.top})`); - - drawBarChartAxes(xAxis, yAxis); - drawBarChartPaths(); - } - - function drawBarChartAxes(xAxis, yAxis) { - const axes = barChartGroup.append('g'); - - axes.append('g') - .attr('class', 'x axis') - .attr('transform', `translate(0, ${chartHeight})`) - .call(xAxis); - - axes.append('g') - .attr('class', 'y axis') - .call(yAxis); - } - - function drawBarChartPaths() { - barChartGroup.selectAll('bar') - .data(scope.chartData) - .enter().append('rect') - .attr('class', 'bar') - .attr('x', (d) => { return xScale(d.time); }) - .attr('width', barWidth) - .attr('y', (d) => { return yScale(d.value); }) - .attr('height', (d) => { return chartHeight - yScale(d.value); }) - .on('mouseover', function (d) { - showChartTooltip(d, this); - }) - .on('mousemove', function (d) { - showChartTooltip(d, this); - }) - .on('mouseout', () => mlChartTooltipService.hide()); - - function showChartTooltip(data, rect) { - const formattedDate = formatHumanReadableDateTime(data.time); - const contents = i18n.translate('xpack.ml.fieldDataCard.documentCountChart.chartTooltip', { - defaultMessage: '{formattedDate}{br}{hr}count: {dataValue}', - values: { - formattedDate, - dataValue: data.value, - br: '
', - hr: '
', - }, - }); - - // Calculate the y offset. - // rectY are mouseY are relative to top of the chart area. - const rectY = d3.select(rect).attr('y'); - const mouseY = +(d3.mouse(rect)[1]); - - mlChartTooltipService.show(contents, rect, { - x: 5, - y: (mouseY - rectY) - }); - } - } - - // Process the data and then render the chart. - processChartData(); - render(); - } - - return { - scope: false, - link: link - }; -}); diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card.html b/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card.html deleted file mode 100644 index 4fbe5e465eed..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card.html +++ /dev/null @@ -1,24 +0,0 @@ -
- - -
- -
- -
-
-
- - -
diff --git a/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card_directive.js b/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card_directive.js deleted file mode 100644 index ff3a7b6238ae..000000000000 --- a/x-pack/legacy/plugins/ml/public/components/field_data_card/field_data_card_directive.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - - - -/* - * AngularJS directive for rendering a card showing data on a field in an index pattern. - */ - -import _ from 'lodash'; -import $ from 'jquery'; -import moment from 'moment'; -import chrome from 'ui/chrome'; - -import template from './field_data_card.html'; -import { ML_JOB_FIELD_TYPES } from 'plugins/ml/../common/constants/field_types'; -import { mlEscape } from 'plugins/ml/util/string_utils'; - -import { uiModules } from 'ui/modules'; -const module = uiModules.get('apps/ml'); - -module.directive('mlFieldDataCard', function (config) { - - function link(scope, element) { - scope.ML_JOB_FIELD_TYPES = ML_JOB_FIELD_TYPES; - scope.mlEscape = mlEscape; - - if (scope.card.type === ML_JOB_FIELD_TYPES.NUMBER) { - if (scope.card.fieldName) { - scope.$watch('card.stats', () => { - const cardinality = _.get(scope, ['card', 'stats', 'cardinality'], 0); - scope.detailsMode = cardinality > 100 ? 'distribution' : 'top'; - }); - - const cardinality = _.get(scope, ['card', 'stats', 'cardinality'], 0); - scope.detailsMode = cardinality > 100 ? 'distribution' : 'top'; - } - // Create a div for the chart tooltip. - $('.ml-field-data-card-tooltip').remove(); - $('body').append('