diff --git a/.eslintignore b/.eslintignore index 66684fbcd52e6..c848fc0797907 100644 --- a/.eslintignore +++ b/.eslintignore @@ -21,7 +21,7 @@ snapshots.js # plugin overrides /src/core/lib/kbn_internal_native_observable /src/plugins/data/common/es_query/kuery/ast/_generated_/** -/src/plugins/vis_type_timelion/common/_generated_/** +/src/plugins/vis_types/timelion/common/_generated_/** /x-pack/plugins/apm/e2e/tmp/* /x-pack/plugins/canvas/canvas_plugin /x-pack/plugins/canvas/shareable_runtime/build diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a2d95405dcb82..fadcc4609e676 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -27,9 +27,9 @@ /src/plugins/kibana_legacy/ @elastic/kibana-vis-editors /src/plugins/vis_default_editor/ @elastic/kibana-vis-editors /src/plugins/vis_types/metric/ @elastic/kibana-vis-editors -/src/plugins/vis_type_table/ @elastic/kibana-vis-editors +/src/plugins/vis_types/table/ @elastic/kibana-vis-editors /src/plugins/vis_types/tagcloud/ @elastic/kibana-vis-editors -/src/plugins/vis_type_timelion/ @elastic/kibana-vis-editors +/src/plugins/vis_types/timelion/ @elastic/kibana-vis-editors /src/plugins/vis_type_timeseries/ @elastic/kibana-vis-editors /src/plugins/vis_types/vega/ @elastic/kibana-vis-editors /src/plugins/vis_types/vislib/ @elastic/kibana-vis-editors diff --git a/.i18nrc.json b/.i18nrc.json index 11d31be8f891c..08783349ec64e 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -56,12 +56,12 @@ "server": "src/legacy/server", "statusPage": "src/legacy/core_plugins/status_page", "telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"], - "timelion": ["src/plugins/vis_type_timelion"], + "timelion": ["src/plugins/vis_types/timelion"], "uiActions": "src/plugins/ui_actions", "visDefaultEditor": "src/plugins/vis_default_editor", "visTypeMarkdown": "src/plugins/vis_type_markdown", "visTypeMetric": "src/plugins/vis_types/metric", - "visTypeTable": "src/plugins/vis_type_table", + "visTypeTable": "src/plugins/vis_types/table", "visTypeTagCloud": "src/plugins/vis_types/tagcloud", "visTypeTimeseries": "src/plugins/vis_type_timeseries", "visTypeVega": "src/plugins/vis_types/vega", diff --git a/api_docs/core.json b/api_docs/core.json index 2e9e92cced3e9..6f429f3ee38e8 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -753,19 +753,19 @@ "references": [ { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/plugin.ts" + "path": "src/plugins/vis_types/table/public/plugin.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/plugin.ts" + "path": "src/plugins/vis_types/table/public/plugin.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/target/types/public/plugin.d.ts" + "path": "src/plugins/vis_types/table/target/types/public/plugin.d.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/target/types/public/plugin.d.ts" + "path": "src/plugins/vis_types/table/target/types/public/plugin.d.ts" } ], "children": [ diff --git a/api_docs/data.json b/api_docs/data.json index d6442b90246a9..e62ddb5e30f12 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -5004,11 +5004,11 @@ }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeVega", @@ -16631,11 +16631,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visualize", @@ -16671,11 +16671,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "dashboard", @@ -18119,11 +18119,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/plugin_services.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/plugin_services.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" }, { "plugin": "indexPatternManagement", @@ -18135,11 +18135,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts" + "path": "src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts" + "path": "src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts" }, { "plugin": "discover", @@ -19008,27 +19008,27 @@ "references": [ { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx" } ], "initialIsOpen": false @@ -21706,15 +21706,15 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeVega", @@ -24261,7 +24261,7 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/plugin.ts" + "path": "src/plugins/vis_types/timelion/public/plugin.ts" }, { "plugin": "visTypeTimeseries", @@ -24479,7 +24479,7 @@ }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/plugin.ts" + "path": "src/plugins/vis_types/table/public/plugin.ts" }, { "plugin": "visTypeTimeseries", @@ -27306,11 +27306,11 @@ }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeVega", @@ -32208,11 +32208,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visualize", @@ -32248,11 +32248,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "dashboard", @@ -38924,11 +38924,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts" }, { "plugin": "visualize", @@ -38964,11 +38964,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_fn.ts" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_fn.ts" }, { "plugin": "dashboard", @@ -39892,27 +39892,27 @@ "references": [ { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx" + "path": "src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx" + "path": "src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx" } ], "initialIsOpen": false diff --git a/api_docs/data_index_patterns.json b/api_docs/data_index_patterns.json index dc87175ac6d1b..cf621b2413975 100644 --- a/api_docs/data_index_patterns.json +++ b/api_docs/data_index_patterns.json @@ -5927,11 +5927,11 @@ }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeTable", - "path": "src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts" + "path": "src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts" }, { "plugin": "visTypeVega", @@ -13270,11 +13270,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/plugin_services.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/helpers/plugin_services.ts" + "path": "src/plugins/vis_types/timelion/public/helpers/plugin_services.ts" }, { "plugin": "indexPatternManagement", @@ -13286,11 +13286,11 @@ }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts" + "path": "src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts" }, { "plugin": "visTypeTimelion", - "path": "src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts" + "path": "src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts" }, { "plugin": "discover", diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 75eac66df04a1..99f241e81384d 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -898,11 +898,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/plugin.ts#:~:text=fieldFormats) | - | -| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | -| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/plugin.ts#:~:text=AsyncPlugin), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/public/plugin.ts#:~:text=AsyncPlugin), [plugin.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/target/types/public/plugin.d.ts#:~:text=AsyncPlugin), [plugin.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_table/target/types/public/plugin.d.ts#:~:text=AsyncPlugin) | - | +| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/plugin.ts#:~:text=fieldFormats) | - | +| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | +| | [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern), [table_vis_controller.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/legacy/table_vis_controller.test.ts#:~:text=IndexPattern) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/plugin.ts#:~:text=AsyncPlugin), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/public/plugin.ts#:~:text=AsyncPlugin), [plugin.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/target/types/public/plugin.d.ts#:~:text=AsyncPlugin), [plugin.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/table/target/types/public/plugin.d.ts#:~:text=AsyncPlugin) | - | @@ -910,15 +910,15 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/plugin.ts#:~:text=indexPatterns) | - | -| | [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams) | 8.1 | -| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery) | 8.1 | -| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | -| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | -| | [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams) | 8.1 | -| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | -| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | +| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/plugin.ts#:~:text=indexPatterns) | - | +| | [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams) | 8.1 | +| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=esQuery) | 8.1 | +| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | +| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | +| | [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_renderer.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams), [timelion_vis_component.tsx](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx#:~:text=RangeFilterParams) | 8.1 | +| | [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [plugin_services.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract), [timelion_expression_input_helpers.test.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts#:~:text=IndexPatternsContract) | - | +| | [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter), [timelion_vis_fn.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts#:~:text=Filter) | 8.1 | diff --git a/api_docs/vis_type_table.json b/api_docs/vis_type_table.json index bb75ded4e7b63..3b649cd9b0d09 100644 --- a/api_docs/vis_type_table.json +++ b/api_docs/vis_type_table.json @@ -27,7 +27,7 @@ "tags": [], "label": "TableVisParams", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false, "children": [ { @@ -40,7 +40,7 @@ "signature": [ "number | \"\"" ], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -50,7 +50,7 @@ "tags": [], "label": "showPartialRows", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -60,7 +60,7 @@ "tags": [], "label": "showMetricsAtAllLevels", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -70,7 +70,7 @@ "tags": [], "label": "showToolbar", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -80,7 +80,7 @@ "tags": [], "label": "showTotal", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -99,7 +99,7 @@ "text": "AggTypes" } ], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -109,7 +109,7 @@ "tags": [], "label": "percentageCol", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false }, { @@ -122,7 +122,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false } ], @@ -137,7 +137,7 @@ "tags": [], "label": "AggTypes", "description": [], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false, "initialIsOpen": false } @@ -153,7 +153,7 @@ "signature": [ "\"table\"" ], - "path": "src/plugins/vis_type_table/common/types.ts", + "path": "src/plugins/vis_types/table/common/types.ts", "deprecated": false, "initialIsOpen": false } diff --git a/api_docs/vis_type_timelion.json b/api_docs/vis_type_timelion.json index b8ee00ea01a07..decb94234c64d 100644 --- a/api_docs/vis_type_timelion.json +++ b/api_docs/vis_type_timelion.json @@ -14,7 +14,7 @@ "tags": [], "label": "_LEGACY_", "description": [], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "children": [ { @@ -24,7 +24,7 @@ "tags": [], "label": "DEFAULT_TIME_FORMAT", "description": [], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false }, { @@ -37,7 +37,7 @@ "signature": [ "(from: number, to: number, size: number, interval: string, min: string) => string" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [ @@ -48,7 +48,7 @@ "tags": [], "label": "from", "description": [], - "path": "src/plugins/vis_type_timelion/common/lib/calculate_interval.ts", + "path": "src/plugins/vis_types/timelion/common/lib/calculate_interval.ts", "deprecated": false }, { @@ -58,7 +58,7 @@ "tags": [], "label": "to", "description": [], - "path": "src/plugins/vis_type_timelion/common/lib/calculate_interval.ts", + "path": "src/plugins/vis_types/timelion/common/lib/calculate_interval.ts", "deprecated": false }, { @@ -68,7 +68,7 @@ "tags": [], "label": "size", "description": [], - "path": "src/plugins/vis_type_timelion/common/lib/calculate_interval.ts", + "path": "src/plugins/vis_types/timelion/common/lib/calculate_interval.ts", "deprecated": false }, { @@ -78,7 +78,7 @@ "tags": [], "label": "interval", "description": [], - "path": "src/plugins/vis_type_timelion/common/lib/calculate_interval.ts", + "path": "src/plugins/vis_types/timelion/common/lib/calculate_interval.ts", "deprecated": false }, { @@ -88,7 +88,7 @@ "tags": [], "label": "min", "description": [], - "path": "src/plugins/vis_type_timelion/common/lib/calculate_interval.ts", + "path": "src/plugins/vis_types/timelion/common/lib/calculate_interval.ts", "deprecated": false } ] @@ -105,7 +105,7 @@ "ParsedExpression", ">" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [ @@ -116,7 +116,7 @@ "tags": [], "label": "input", "description": [], - "path": "src/plugins/vis_type_timelion/common/parser_async.ts", + "path": "src/plugins/vis_types/timelion/common/parser_async.ts", "deprecated": false } ] @@ -137,7 +137,7 @@ "LegacyAxis", "): string; }" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [] @@ -160,7 +160,7 @@ }, ") => string" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [ @@ -180,7 +180,7 @@ "text": "IUiSettingsClient" } ], - "path": "src/plugins/vis_type_timelion/public/helpers/get_timezone.ts", + "path": "src/plugins/vis_types/timelion/public/helpers/get_timezone.ts", "deprecated": false } ] @@ -203,7 +203,7 @@ }, ") => (esInterval: any) => any" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [ @@ -223,7 +223,7 @@ "text": "IUiSettingsClient" } ], - "path": "src/plugins/vis_type_timelion/public/helpers/xaxis_formatter.ts", + "path": "src/plugins/vis_types/timelion/public/helpers/xaxis_formatter.ts", "deprecated": false } ] @@ -240,7 +240,7 @@ "IAxis", ") => number[]" ], - "path": "src/plugins/vis_type_timelion/public/index.ts", + "path": "src/plugins/vis_types/timelion/public/index.ts", "deprecated": false, "returnComment": [], "children": [] @@ -256,7 +256,7 @@ "tags": [], "label": "VisTypeTimelionPluginStart", "description": [], - "path": "src/plugins/vis_type_timelion/public/plugin.ts", + "path": "src/plugins/vis_types/timelion/public/plugin.ts", "deprecated": false, "children": [ { @@ -275,7 +275,7 @@ "TimelionFunctionArgsSuggestion", "[]; }" ], - "path": "src/plugins/vis_type_timelion/public/plugin.ts", + "path": "src/plugins/vis_types/timelion/public/plugin.ts", "deprecated": false, "returnComment": [], "children": [] @@ -291,7 +291,7 @@ "tags": [], "label": "VisTypeTimelionPluginSetup", "description": [], - "path": "src/plugins/vis_type_timelion/public/plugin.ts", + "path": "src/plugins/vis_types/timelion/public/plugin.ts", "deprecated": false, "children": [ { @@ -301,7 +301,7 @@ "tags": [], "label": "isUiEnabled", "description": [], - "path": "src/plugins/vis_type_timelion/public/plugin.ts", + "path": "src/plugins/vis_types/timelion/public/plugin.ts", "deprecated": false } ], @@ -322,7 +322,7 @@ "description": [ "\nDescribes public Timelion plugin contract returned at the `setup` stage." ], - "path": "src/plugins/vis_type_timelion/server/plugin.ts", + "path": "src/plugins/vis_types/timelion/server/plugin.ts", "deprecated": false, "children": [ { @@ -332,7 +332,7 @@ "tags": [], "label": "uiEnabled", "description": [], - "path": "src/plugins/vis_type_timelion/server/plugin.ts", + "path": "src/plugins/vis_types/timelion/server/plugin.ts", "deprecated": false } ], diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 84e6668830edc..55c53129ba499 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -285,7 +285,7 @@ The plugin exposes the static DefaultEditorController class to consume. |WARNING: Missing README. -|{kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable] +|{kib-repo}blob/{branch}/src/plugins/vis_types/table/README.md[visTypeTable] |Contains the data table visualization, that allows presenting data in a simple table format. @@ -293,7 +293,7 @@ The plugin exposes the static DefaultEditorController class to consume. |WARNING: Missing README. -|{kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion] +|{kib-repo}blob/{branch}/src/plugins/vis_types/timelion/README.md[visTypeTimelion] |Contains the timelion visualization and the timelion backend. @@ -391,7 +391,7 @@ security and spaces filtering as well as performing audit logging. |{kib-repo}blob/{branch}/x-pack/plugins/enterprise_search/README.md[enterpriseSearch] -|This plugin provides beta Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. +|This plugin provides Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. |{kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog] diff --git a/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts b/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts index 288bfad02d7f4..8b941e9e4f71f 100644 --- a/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts +++ b/packages/kbn-dev-utils/src/vscode_config/managed_config_keys.ts @@ -8,7 +8,7 @@ export interface ManagedConfigKey { key: string; - value: Record; + value: string | Record; } /** @@ -37,4 +37,9 @@ export const MANAGED_CONFIG_KEYS: ManagedConfigKey[] = [ ['**/packages/kbn-pm/dist/index.js']: true, }, }, + { + key: 'typescript.tsdk', + // we use a relative path here so that it works with remote vscode connections + value: './node_modules/typescript/lib', + }, ]; diff --git a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts b/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts index dd57449c21da3..3573acd59559f 100644 --- a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts +++ b/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.test.ts @@ -22,6 +22,10 @@ const TEST_KEYS: ManagedConfigKey[] = [ world: [1, 2, 3], }, }, + { + key: 'stringKey', + value: 'foo', + }, ]; const run = (json?: string) => updateVscodeConfig(TEST_KEYS, '', json); @@ -35,7 +39,9 @@ it('updates the passed JSON with the managed settings', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -50,7 +56,9 @@ it('initialized empty or undefined json values', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -63,14 +71,16 @@ it('initialized empty or undefined json values', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); }); -it('replaces conflicting managed keys which do not have object values', () => { - expect(run(`{ "key": false }`)).toMatchInlineSnapshot(` +it('replaces conflicting managed keys which do not have matching value types', () => { + expect(run(`{ "key": false, "stringKey": { "a": "B" } }`)).toMatchInlineSnapshot(` // @managed { "key": { @@ -78,7 +88,9 @@ it('replaces conflicting managed keys which do not have object values', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -122,7 +134,9 @@ it('persists comments in the original file', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -148,7 +162,9 @@ it('overrides old values for managed keys', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -176,7 +192,9 @@ it('does not modify properties with leading `// self managed` comment', () => { // self managed "key": { "world": [5] - } + }, + // self managed + "stringKey": "--" } `); @@ -186,7 +204,9 @@ it('does not modify properties with leading `// self managed` comment', () => { // self managed "key": { "world": [5] - } + }, + // self managed + "stringKey": "--" } `); @@ -210,7 +230,9 @@ it('does not modify child properties with leading `// self managed` comment', () "world": [5], // @managed "hello": true - } + }, + // @managed + "stringKey": "foo" } `); @@ -236,7 +258,9 @@ it('does not modify unknown child properties', () => { "world": [5], // @managed "hello": true - } + }, + // @managed + "stringKey": "foo" } `); @@ -262,7 +286,9 @@ it('removes managed properties which are no longer managed', () => { "world": [5], // @managed "hello": true - } + }, + // @managed + "stringKey": "foo" } `); @@ -286,7 +312,9 @@ it('wipes out child keys which conflict with newly managed child keys', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -308,7 +336,9 @@ it('correctly formats info text when specified', () => { "hello": true, // @managed "world": [1, 2, 3] - } + }, + // @managed + "stringKey": "foo" } `); @@ -321,7 +351,10 @@ it('allows "// self managed" comments conflicting with "// @managed" comments to // @managed // self managed "hello": ["world"] - } + }, + // @managed + // self managed + "stringKey": 12345 } `); @@ -333,7 +366,9 @@ it('allows "// self managed" comments conflicting with "// @managed" comments to "hello": ["world"], // @managed "world": [1, 2, 3] - } + }, + // self managed + "stringKey": 12345 } `); diff --git a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts b/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts index ac1b5515252dd..42a642ef1b6c4 100644 --- a/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts +++ b/packages/kbn-dev-utils/src/vscode_config/update_vscode_config.ts @@ -25,11 +25,20 @@ const isManaged = (node?: t.Node) => (c) => c.type === 'CommentLine' && c.value.trim().toLocaleLowerCase() === '@managed' ); -const isSelfManaged = (node?: t.Node) => - !!node?.leadingComments?.some( +const isSelfManaged = (node?: t.Node) => { + const result = !!node?.leadingComments?.some( (c) => c.type === 'CommentLine' && c.value.trim().toLocaleLowerCase() === 'self managed' ); + // if we find a node which is both managed and self managed remove the managed comment + if (result && node && isManaged(node)) { + node.leadingComments = + node.leadingComments?.filter((c) => c.value.trim() !== '@managed') ?? null; + } + + return result; +}; + const remove = (arr: T[], value: T) => { const index = arr.indexOf(value); if (index > -1) { @@ -37,16 +46,16 @@ const remove = (arr: T[], value: T) => { } }; -const createManagedChildProp = (key: string, value: any) => { +const createManagedProp = (key: string, value: any) => { const childProp = t.objectProperty(t.stringLiteral(key), parseExpression(JSON.stringify(value))); t.addComment(childProp, 'leading', ' @managed', true); return childProp; }; -const createManagedProp = (key: string, value: Record) => { +const createObjectPropOfManagedValues = (key: string, value: Record) => { return t.objectProperty( t.stringLiteral(key), - t.objectExpression(Object.entries(value).map(([k, v]) => createManagedChildProp(k, v))) + t.objectExpression(Object.entries(value).map(([k, v]) => createManagedProp(k, v))) ); }; @@ -57,8 +66,16 @@ const createManagedProp = (key: string, value: Record) => { * @param key the key name to add * @param value managed value which should be set at `key` */ -const addManagedProp = (ast: t.ObjectExpression, key: string, value: Record) => { - ast.properties.push(createManagedProp(key, value)); +const addManagedProp = ( + ast: t.ObjectExpression, + key: string, + value: string | Record +) => { + ast.properties.push( + typeof value === 'string' + ? createManagedProp(key, value) + : createObjectPropOfManagedValues(key, value) + ); }; /** @@ -72,7 +89,7 @@ const addManagedProp = (ast: t.ObjectExpression, key: string, value: Record + value: string | Record ) => { remove(ast.properties, existing); addManagedProp(ast, existing.key.value, value); @@ -98,15 +115,11 @@ const mergeManagedProperties = ( if (!existing) { // add the new managed prop - properties.push(createManagedChildProp(key, value)); + properties.push(createManagedProp(key, value)); continue; } if (isSelfManaged(existing)) { - // strip "// @managed" comment if conflicting with "// self managed" - existing.leadingComments = (existing.leadingComments ?? []).filter( - (c) => c.value.trim() !== '@managed' - ); continue; } @@ -119,7 +132,7 @@ const mergeManagedProperties = ( // take over the unmanaged child prop by deleting the previous prop and replacing it // with a brand new one remove(properties, existing); - properties.push(createManagedChildProp(key, value)); + properties.push(createManagedProp(key, value)); } // iterate through the props to find "// @managed" props which are no longer in @@ -170,20 +183,29 @@ export function updateVscodeConfig(keys: ManagedConfigKey[], infoText: string, j continue; } - if (existingProp && existingProp.value.type === 'ObjectExpression') { - // setting exists and is an object so merge properties of `value` with it - mergeManagedProperties(existingProp.value.properties, value); + if (typeof value === 'object') { + if (existingProp && existingProp.value.type === 'ObjectExpression') { + // setting exists and is an object so merge properties of `value` with it + mergeManagedProperties(existingProp.value.properties, value); + continue; + } + + if (existingProp) { + // setting exists but its value is not an object expression so replace it + replaceManagedProp(ast, existingProp, value); + continue; + } + + // setting isn't in config file so create it + addManagedProp(ast, key, value); continue; } if (existingProp) { - // setting exists but its value is not an object expression so replace it replaceManagedProp(ast, existingProp, value); - continue; + } else { + addManagedProp(ast, key, value); } - - // setting isn't in config file so create it - addManagedProp(ast, key, value); } ast.leadingComments = [ diff --git a/src/dev/build/tasks/package_json/find_used_dependencies.ts b/src/dev/build/tasks/package_json/find_used_dependencies.ts index 8cb8b3c986de7..8072287996368 100644 --- a/src/dev/build/tasks/package_json/find_used_dependencies.ts +++ b/src/dev/build/tasks/package_json/find_used_dependencies.ts @@ -42,7 +42,7 @@ export async function findUsedDependencies(listedPkgDependencies: any, baseDir: // Another way would be to include an index file and import all the functions // using named imports const dynamicRequiredEntries = await globby([ - normalize(Path.resolve(baseDir, 'src/plugins/vis_type_timelion/server/**/*.js')), + normalize(Path.resolve(baseDir, 'src/plugins/vis_types/timelion/server/**/*.js')), ]); // Compose all the needed entries diff --git a/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.scss b/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.scss new file mode 100644 index 0000000000000..ede39feed30b6 --- /dev/null +++ b/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.scss @@ -0,0 +1,7 @@ +// Special handling for images coming from the image field formatter +// See discover_grid.scss for more explanation on those values +.rowFormatter__value img { + vertical-align: middle; + max-height: lineHeightFromBaseline(2) !important; + max-width: ($euiSizeXXL * 12.5) !important; +} diff --git a/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.tsx b/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.tsx index 3b2d6d1c793ae..14cf1839107e7 100644 --- a/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.tsx +++ b/src/plugins/discover/public/application/apps/main/components/doc_table/lib/row_formatter.tsx @@ -11,6 +11,8 @@ import type { IndexPattern } from 'src/plugins/data/common'; import { MAX_DOC_FIELDS_DISPLAYED } from '../../../../../../../common'; import { getServices } from '../../../../../../kibana_services'; +import './row_formatter.scss'; + interface Props { defPairs: Array<[string, unknown]>; } @@ -21,6 +23,7 @@ const TemplateComponent = ({ defPairs }: Props) => {
{pair[0]}:
{' '} diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx index 12b19300ce266..4ab19a6ab05ef 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_field_search.tsx @@ -230,8 +230,8 @@ export function DiscoverFieldSearch({ onChange, value, types }: Props) { return ( ; + fieldCounts?: Record; /** * hits fetched from ES, displayed in the doc table */ - documents: ElasticSearchHit[]; + documents?: ElasticSearchHit[]; } -export function DiscoverSidebar({ +export function DiscoverSidebarComponent({ alwaysShowActionButtons = false, columns, fieldCounts, @@ -109,8 +109,10 @@ export function DiscoverSidebar({ const availableFieldsContainer = useRef(null); useEffect(() => { - const newFields = getIndexPatternFieldList(selectedIndexPattern, fieldCounts); - setFields(newFields); + if (documents) { + const newFields = getIndexPatternFieldList(selectedIndexPattern, fieldCounts); + setFields(newFields); + } }, [selectedIndexPattern, fieldCounts, documents]); const scrollDimensions = useResizeObserver(scrollContainer); @@ -265,7 +267,7 @@ export function DiscoverSidebar({ const filterChanged = useMemo(() => isEqual(fieldFilter, getDefaultFieldFilter()), [fieldFilter]); - if (!selectedIndexPattern || !fields) { + if (!selectedIndexPattern) { return null; } @@ -344,7 +346,7 @@ export function DiscoverSidebar({
{ - if (el && !el.dataset.dynamicScroll) { + if (documents && el && !el.dataset.dynamicScroll) { el.dataset.dynamicScroll = 'true'; setScrollContainer(el); } @@ -352,7 +354,7 @@ export function DiscoverSidebar({ onScroll={throttle(lazyScroll, 100)} className="eui-yScroll" > - {fields.length > 0 && ( + {Array.isArray(fields) && fields.length > 0 && (
{selectedFields && selectedFields.length > 0 && @@ -500,3 +502,5 @@ export function DiscoverSidebar({ ); } + +export const DiscoverSidebar = memo(DiscoverSidebarComponent); diff --git a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx index 7533a54ade405..90a3d33ddbe67 100644 --- a/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx +++ b/src/plugins/discover/public/application/apps/main/components/sidebar/discover_sidebar_responsive.tsx @@ -114,6 +114,7 @@ export interface DiscoverSidebarResponsiveProps { * Mobile: Index pattern selector is visible and a button to trigger a flyout with all elements */ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) { + const { selectedIndexPattern, onEditRuntimeField, useNewFieldsApi, onChangeIndexPattern } = props; const [fieldFilter, setFieldFilter] = useState(getDefaultFieldFilter()); const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); /** @@ -125,7 +126,7 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) fieldCounts.current = calcFieldCounts( {}, props.documents$.getValue().result, - props.selectedIndexPattern + selectedIndexPattern ); } @@ -137,20 +138,20 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) fieldCounts.current = calcFieldCounts( next.result.length && fieldCounts.current ? fieldCounts.current : {}, next.result, - props.selectedIndexPattern! + selectedIndexPattern! ); } setDocumentState({ ...documentState, ...next }); } }); return () => subscription.unsubscribe(); - }, [props.documents$, props.selectedIndexPattern, documentState, setDocumentState]); + }, [props.documents$, selectedIndexPattern, documentState, setDocumentState]); useEffect(() => { // when index pattern changes fieldCounts needs to be cleaned up to prevent displaying // fields of the previous index pattern fieldCounts.current = {}; - }, [props.selectedIndexPattern]); + }, [selectedIndexPattern]); const closeFieldEditor = useRef<() => void | undefined>(); @@ -174,34 +175,44 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) setIsFlyoutVisible(false); }, []); - if (!props.selectedIndexPattern) { - return null; - } - const { indexPatternFieldEditor } = props.services; - const indexPatternFieldEditPermission = indexPatternFieldEditor?.userPermissions.editIndexPattern(); - const canEditIndexPatternField = !!indexPatternFieldEditPermission && props.useNewFieldsApi; - const editField = (fieldName?: string) => { - if (!canEditIndexPatternField || !props.selectedIndexPattern) { - return; - } - const ref = indexPatternFieldEditor.openEditor({ - ctx: { - indexPattern: props.selectedIndexPattern, - }, - fieldName, - onSave: async () => { - props.onEditRuntimeField(); - }, - }); - if (setFieldEditorRef) { - setFieldEditorRef(ref); - } - if (closeFlyout) { - closeFlyout(); - } - }; + const editField = useCallback( + (fieldName?: string) => { + const indexPatternFieldEditPermission = indexPatternFieldEditor?.userPermissions.editIndexPattern(); + const canEditIndexPatternField = !!indexPatternFieldEditPermission && useNewFieldsApi; + if (!canEditIndexPatternField || !selectedIndexPattern) { + return; + } + const ref = indexPatternFieldEditor.openEditor({ + ctx: { + indexPattern: selectedIndexPattern, + }, + fieldName, + onSave: async () => { + onEditRuntimeField(); + }, + }); + if (setFieldEditorRef) { + setFieldEditorRef(ref); + } + if (closeFlyout) { + closeFlyout(); + } + }, + [ + closeFlyout, + indexPatternFieldEditor, + selectedIndexPattern, + setFieldEditorRef, + onEditRuntimeField, + useNewFieldsApi, + ] + ); + + if (!selectedIndexPattern) { + return null; + } return ( <> @@ -209,7 +220,7 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) o.attributes.title)} /> @@ -296,7 +307,7 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps)
, + fieldCounts: Record | undefined, fieldFilterState: FieldFilterState, useNewFieldsApi: boolean ): GroupedFields { diff --git a/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss b/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss index 48b99458377ad..0204433a5ba1c 100644 --- a/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss +++ b/src/plugins/discover/public/application/components/discover_grid/discover_grid.scss @@ -86,6 +86,21 @@ .dscDiscoverGrid__descriptionListDescription { word-break: normal !important; + + // Special handling for images coming from the image field formatter + img { + // Align the images vertically centered with the text + vertical-align: middle; + // Set the maximum height to the line-height. The used function is the same + // function used to calculate the line-height for the EuiDescriptionList Description. + // !important is required to overwrite the max-height on the element from the field formatter + max-height: lineHeightFromBaseline(2) !important; + // An arbitrary amount of width we don't want to go over, to not have very wide images. + // For most width-height-ratios that will never be hit, because we'd usually limit + // it by the way smaller height. But images with very large width and very small height + // might be limited by that. + max-width: ($euiSizeXXL * 12.5) !important; + } } @include euiBreakpoint('xs', 's', 'm') { diff --git a/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx b/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx index f62b8b411e2bf..ecef98915ff65 100644 --- a/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx +++ b/src/plugins/discover/public/application/components/discover_grid/get_render_cell_value.tsx @@ -110,6 +110,9 @@ export const getRenderCellValueFn = ( }); return ( + // If you change the styling of this list (specifically something that will change the line-height) + // make sure to adjust the img overwrites attached to dscDiscoverGrid__descriptionListDescription + // in discover_grid.scss {[...highlightPairs, ...sourcePairs].slice(0, maxDocFieldsDisplayed).map(([key, value]) => ( diff --git a/src/plugins/vis_type_table/tsconfig.json b/src/plugins/vis_type_table/tsconfig.json deleted file mode 100644 index 16f2f809bde38..0000000000000 --- a/src/plugins/vis_type_table/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - "*.ts" - ], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../share/tsconfig.json" }, - { "path": "../usage_collection/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../kibana_utils/tsconfig.json" }, - { "path": "../kibana_legacy/tsconfig.json" }, - { "path": "../kibana_react/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - { "path": "../field_formats/tsconfig.json" } - ] -} diff --git a/src/plugins/vis_type_timelion/tsconfig.json b/src/plugins/vis_type_timelion/tsconfig.json deleted file mode 100644 index efeab8d73db1e..0000000000000 --- a/src/plugins/vis_type_timelion/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - "*.ts" - ], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../kibana_utils/tsconfig.json" }, - { "path": "../kibana_react/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - ] -} diff --git a/src/plugins/vis_type_timeseries/public/application/visualizations/views/timeseries/index.js b/src/plugins/vis_type_timeseries/public/application/visualizations/views/timeseries/index.js index b470352eec56a..35f0118cc8525 100644 --- a/src/plugins/vis_type_timeseries/public/application/visualizations/views/timeseries/index.js +++ b/src/plugins/vis_type_timeseries/public/application/visualizations/views/timeseries/index.js @@ -141,6 +141,7 @@ export const TimeSeries = ({ debugState={window._echDebugStateFlag ?? false} showLegend={legend} showLegendExtra={true} + allowBrushingLastHistogramBucket={true} legendPosition={legendPosition} onBrushEnd={onBrushEndListener} onElementClick={(args) => handleElementClick(args)} diff --git a/src/plugins/vis_types/pie/public/components/visualization_noresults.tsx b/src/plugins/vis_types/pie/public/components/visualization_noresults.tsx new file mode 100644 index 0000000000000..1ae5340c9791a --- /dev/null +++ b/src/plugins/vis_types/pie/public/components/visualization_noresults.tsx @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { EuiEmptyPrompt, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +export const VisualizationNoResults = ({ hasNegativeValues = false }) => { + return ( + + {hasNegativeValues + ? i18n.translate('visTypePie.negativeValuesFound', { + defaultMessage: "Pie/donut charts can't render with negative values.", + }) + : i18n.translate('visTypePie.noResultsFoundTitle', { + defaultMessage: 'No results found', + })} + + } + /> + ); +}; diff --git a/src/plugins/vis_types/pie/public/pie_component.test.tsx b/src/plugins/vis_types/pie/public/pie_component.test.tsx index c70cad285f2ae..846daa1e45710 100644 --- a/src/plugins/vis_types/pie/public/pie_component.test.tsx +++ b/src/plugins/vis_types/pie/public/pie_component.test.tsx @@ -10,6 +10,7 @@ import React from 'react'; import { Settings, TooltipType, SeriesIdentifier } from '@elastic/charts'; import { chartPluginMock } from '../../../charts/public/mocks'; import { dataPluginMock } from '../../../data/public/mocks'; +import type { Datatable } from '../../../expressions/public'; import { shallow, mount } from 'enzyme'; import { findTestSubject } from '@elastic/eui/lib/test'; import { act } from 'react-dom/test-utils'; @@ -120,4 +121,64 @@ describe('PieComponent', function () { ]); expect(wrapperProps.fireEvent).toHaveBeenCalled(); }); + + it('renders the no results component if all the values are zero', () => { + const newVisData = ({ + type: 'datatable', + columns: [ + { + id: 'col-1-1', + name: 'Count', + }, + { + id: 'col-0-2', + name: 'filters', + }, + ], + rows: [ + { + 'col-0-2': 'Carrier : "JetBeats" ', + 'col-1-1': 0, + }, + { + 'col-0-2': 'Carrier : "ES-Air" ', + 'col-1-1': 0, + }, + ], + } as unknown) as Datatable; + const newProps = { ...wrapperProps, visData: newVisData }; + const component = mount(); + expect(findTestSubject(component, 'pieVisualizationError').text()).toEqual('No results found'); + }); + + it('renders the no results component if there are negative values', () => { + const newVisData = ({ + type: 'datatable', + columns: [ + { + id: 'col-1-1', + name: 'Count', + }, + { + id: 'col-0-2', + name: 'filters', + }, + ], + rows: [ + { + 'col-0-2': 'Carrier : "JetBeats" ', + 'col-1-1': -10, + }, + { + 'col-0-2': 'Carrier : "ES-Air" ', + 'col-1-1': -10, + }, + ], + } as unknown) as Datatable; + const newProps = { ...wrapperProps, visData: newVisData }; + const component = mount(); + expect(findTestSubject(component, 'pieVisualizationError').text()).toEqual( + "Pie/donut charts can't render with negative values." + ); + }); }); diff --git a/src/plugins/vis_types/pie/public/pie_component.tsx b/src/plugins/vis_types/pie/public/pie_component.tsx index a5475a76e27cd..c41b47f9aa683 100644 --- a/src/plugins/vis_types/pie/public/pie_component.tsx +++ b/src/plugins/vis_types/pie/public/pie_component.tsx @@ -48,6 +48,7 @@ import { getSplitDimensionAccessor, } from './utils'; import { ChartSplit, SMALL_MULTIPLES_ID } from './components/chart_split'; +import { VisualizationNoResults } from './components/visualization_noresults'; import './chart.scss'; @@ -186,10 +187,8 @@ const PieComponent = (props: PieComponentProps) => { const { visData, visParams, services, syncColors } = props; function getSliceValue(d: Datum, metricColumn: DatatableColumn) { - if (typeof d[metricColumn.id] === 'number' && d[metricColumn.id] !== 0) { - return d[metricColumn.id]; - } - return Number.EPSILON; + const value = d[metricColumn.id]; + return Number.isFinite(value) && value >= 0 ? value : 0; } // formatters @@ -285,82 +284,110 @@ const PieComponent = (props: PieComponentProps) => { ? visData.columns[visParams.dimensions.splitRow[0].accessor] : undefined; + /** + * Checks whether data have all zero values. + * If so, the no data container is loaded. + */ + const isAllZeros = useMemo(() => visData.rows.every((row) => row[metricColumn.id] === 0), [ + visData.rows, + metricColumn, + ]); + + /** + * Checks whether data have negative values. + * If so, the no data container is loaded. + */ + const hasNegative = useMemo( + () => + visData.rows.some((row) => { + const value = row[metricColumn.id]; + return typeof value === 'number' && value < 0; + }), + [visData.rows, metricColumn] + ); + + const canShowPieChart = !isAllZeros && !hasNegative; + return (
-
- - - - + ) : ( +
+ { - handleSliceClick( - args[0][0] as LayerValue[], - bucketColumns, - visData, - splitChartDimension, - splitChartFormatter - ); - }} - legendAction={getLegendActions( - canFilter, - getLegendActionEventData(visData), - handleLegendAction, - visParams, - services.actions, - services.fieldFormats - )} - theme={[ - chartTheme, - { - legend: { - labelOptions: { - maxLines: visParams.truncateLegend ? visParams.maxLegendLines ?? 1 : 0, + /> + + + { + handleSliceClick( + args[0][0] as LayerValue[], + bucketColumns, + visData, + splitChartDimension, + splitChartFormatter + ); + }} + legendAction={getLegendActions( + canFilter, + getLegendActionEventData(visData), + handleLegendAction, + visParams, + services.actions, + services.fieldFormats + )} + theme={[ + chartTheme, + { + legend: { + labelOptions: { + maxLines: visParams.truncateLegend ? visParams.maxLegendLines ?? 1 : 0, + }, }, }, - }, - ]} - baseTheme={chartBaseTheme} - onRenderChange={onRenderChange} - /> - getSliceValue(d, metricColumn)} - percentFormatter={(d: number) => percentFormatter.convert(d / 100)} - valueGetter={ - !visParams.labels.show || - visParams.labels.valuesFormat === ValueFormats.VALUE || - !visParams.labels.values - ? undefined - : 'percent' - } - valueFormatter={(d: number) => - !visParams.labels.show || !visParams.labels.values - ? '' - : metricFieldFormatter.convert(d) - } - layers={layers} - config={config} - topGroove={!visParams.labels.show ? 0 : undefined} - /> - -
+ ]} + baseTheme={chartBaseTheme} + onRenderChange={onRenderChange} + /> + getSliceValue(d, metricColumn)} + percentFormatter={(d: number) => percentFormatter.convert(d / 100)} + valueGetter={ + !visParams.labels.show || + visParams.labels.valuesFormat === ValueFormats.VALUE || + !visParams.labels.values + ? undefined + : 'percent' + } + valueFormatter={(d: number) => + !visParams.labels.show || !visParams.labels.values + ? '' + : metricFieldFormatter.convert(d) + } + layers={layers} + config={config} + topGroove={!visParams.labels.show ? 0 : undefined} + /> +
+
+ )}
); }; diff --git a/src/plugins/vis_type_table/README.md b/src/plugins/vis_types/table/README.md similarity index 100% rename from src/plugins/vis_type_table/README.md rename to src/plugins/vis_types/table/README.md diff --git a/src/plugins/vis_type_table/common/index.ts b/src/plugins/vis_types/table/common/index.ts similarity index 100% rename from src/plugins/vis_type_table/common/index.ts rename to src/plugins/vis_types/table/common/index.ts diff --git a/src/plugins/vis_type_table/common/types.ts b/src/plugins/vis_types/table/common/types.ts similarity index 100% rename from src/plugins/vis_type_table/common/types.ts rename to src/plugins/vis_types/table/common/types.ts diff --git a/src/plugins/vis_type_table/config.ts b/src/plugins/vis_types/table/config.ts similarity index 100% rename from src/plugins/vis_type_table/config.ts rename to src/plugins/vis_types/table/config.ts diff --git a/src/plugins/vis_type_table/jest.config.js b/src/plugins/vis_types/table/jest.config.js similarity index 74% rename from src/plugins/vis_type_table/jest.config.js rename to src/plugins/vis_types/table/jest.config.js index a5a925eada3f1..cc6c194aa7cb4 100644 --- a/src/plugins/vis_type_table/jest.config.js +++ b/src/plugins/vis_types/table/jest.config.js @@ -8,12 +8,12 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/vis_type_table'], + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/table'], testRunner: 'jasmine2', - coverageDirectory: '/target/kibana-coverage/jest/src/plugins/vis_type_table', + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/vis_types/table', coverageReporters: ['text', 'html'], collectCoverageFrom: [ - '/src/plugins/vis_type_table/{common,public,server}/**/*.{js,ts,tsx}', + '/src/plugins/vis_types/table/{common,public,server}/**/*.{js,ts,tsx}', ], }; diff --git a/src/plugins/vis_type_table/kibana.json b/src/plugins/vis_types/table/kibana.json similarity index 100% rename from src/plugins/vis_type_table/kibana.json rename to src/plugins/vis_types/table/kibana.json diff --git a/src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap b/src/plugins/vis_types/table/public/__snapshots__/table_vis_fn.test.ts.snap similarity index 100% rename from src/plugins/vis_type_table/public/__snapshots__/table_vis_fn.test.ts.snap rename to src/plugins/vis_types/table/public/__snapshots__/table_vis_fn.test.ts.snap diff --git a/src/plugins/vis_type_table/public/components/__snapshots__/table_vis_basic.test.tsx.snap b/src/plugins/vis_types/table/public/components/__snapshots__/table_vis_basic.test.tsx.snap similarity index 100% rename from src/plugins/vis_type_table/public/components/__snapshots__/table_vis_basic.test.tsx.snap rename to src/plugins/vis_types/table/public/components/__snapshots__/table_vis_basic.test.tsx.snap diff --git a/src/plugins/vis_type_table/public/components/__snapshots__/table_vis_cell.test.tsx.snap b/src/plugins/vis_types/table/public/components/__snapshots__/table_vis_cell.test.tsx.snap similarity index 100% rename from src/plugins/vis_type_table/public/components/__snapshots__/table_vis_cell.test.tsx.snap rename to src/plugins/vis_types/table/public/components/__snapshots__/table_vis_cell.test.tsx.snap diff --git a/src/plugins/vis_type_table/public/components/index.ts b/src/plugins/vis_types/table/public/components/index.ts similarity index 100% rename from src/plugins/vis_type_table/public/components/index.ts rename to src/plugins/vis_types/table/public/components/index.ts diff --git a/src/plugins/vis_type_table/public/components/table_vis_basic.test.tsx b/src/plugins/vis_types/table/public/components/table_vis_basic.test.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_basic.test.tsx rename to src/plugins/vis_types/table/public/components/table_vis_basic.test.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_basic.tsx b/src/plugins/vis_types/table/public/components/table_vis_basic.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_basic.tsx rename to src/plugins/vis_types/table/public/components/table_vis_basic.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_cell.test.tsx b/src/plugins/vis_types/table/public/components/table_vis_cell.test.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_cell.test.tsx rename to src/plugins/vis_types/table/public/components/table_vis_cell.test.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_cell.tsx b/src/plugins/vis_types/table/public/components/table_vis_cell.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_cell.tsx rename to src/plugins/vis_types/table/public/components/table_vis_cell.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_columns.tsx b/src/plugins/vis_types/table/public/components/table_vis_columns.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_columns.tsx rename to src/plugins/vis_types/table/public/components/table_vis_columns.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_controls.tsx b/src/plugins/vis_types/table/public/components/table_vis_controls.tsx similarity index 96% rename from src/plugins/vis_type_table/public/components/table_vis_controls.tsx rename to src/plugins/vis_types/table/public/components/table_vis_controls.tsx index 01dd693a31ff8..28e4b84796d98 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_controls.tsx +++ b/src/plugins/vis_types/table/public/components/table_vis_controls.tsx @@ -19,13 +19,13 @@ import { i18n } from '@kbn/i18n'; import { DatatableColumn, DatatableRow } from 'src/plugins/expressions'; import { CoreStart } from 'kibana/public'; -import { useKibana } from '../../../kibana_react/public'; -import { exporters } from '../../../data/public'; +import { useKibana } from '../../../../kibana_react/public'; +import { exporters } from '../../../../data/public'; import { CSV_SEPARATOR_SETTING, CSV_QUOTE_VALUES_SETTING, downloadFileAs, -} from '../../../share/public'; +} from '../../../../share/public'; import { getFormatService } from '../services'; interface TableVisControlsProps { diff --git a/src/plugins/vis_type_table/public/components/table_vis_options.tsx b/src/plugins/vis_types/table/public/components/table_vis_options.tsx similarity index 96% rename from src/plugins/vis_type_table/public/components/table_vis_options.tsx rename to src/plugins/vis_types/table/public/components/table_vis_options.tsx index 2906a51e5d05f..8a6b8586fce7d 100644 --- a/src/plugins/vis_type_table/public/components/table_vis_options.tsx +++ b/src/plugins/vis_types/table/public/components/table_vis_options.tsx @@ -13,8 +13,12 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; -import { search } from '../../../data/public'; -import { SwitchOption, SelectOption, NumberInputOption } from '../../../vis_default_editor/public'; +import { search } from '../../../../data/public'; +import { + SwitchOption, + SelectOption, + NumberInputOption, +} from '../../../../vis_default_editor/public'; import { TableVisParams } from '../../common'; import { totalAggregations } from './utils'; diff --git a/src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx b/src/plugins/vis_types/table/public/components/table_vis_options_lazy.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_options_lazy.tsx rename to src/plugins/vis_types/table/public/components/table_vis_options_lazy.tsx diff --git a/src/plugins/vis_type_table/public/components/table_vis_split.tsx b/src/plugins/vis_types/table/public/components/table_vis_split.tsx similarity index 100% rename from src/plugins/vis_type_table/public/components/table_vis_split.tsx rename to src/plugins/vis_types/table/public/components/table_vis_split.tsx diff --git a/src/plugins/vis_type_table/public/components/table_visualization.scss b/src/plugins/vis_types/table/public/components/table_visualization.scss similarity index 100% rename from src/plugins/vis_type_table/public/components/table_visualization.scss rename to src/plugins/vis_types/table/public/components/table_visualization.scss diff --git a/src/plugins/vis_type_table/public/components/table_visualization.test.tsx b/src/plugins/vis_types/table/public/components/table_visualization.test.tsx similarity index 97% rename from src/plugins/vis_type_table/public/components/table_visualization.test.tsx rename to src/plugins/vis_types/table/public/components/table_visualization.test.tsx index 44c315cdbd9e4..0de7e8c15105a 100644 --- a/src/plugins/vis_type_table/public/components/table_visualization.test.tsx +++ b/src/plugins/vis_types/table/public/components/table_visualization.test.tsx @@ -13,7 +13,7 @@ jest.mock('../utils', () => ({ import React from 'react'; import { shallow } from 'enzyme'; import { IInterpreterRenderHandlers } from 'src/plugins/expressions'; -import { coreMock } from '../../../../core/public/mocks'; +import { coreMock } from '../../../../../core/public/mocks'; import { TableVisConfig, TableVisData } from '../types'; import TableVisualizationComponent from './table_visualization'; import { useUiState } from '../utils'; diff --git a/src/plugins/vis_type_table/public/components/table_visualization.tsx b/src/plugins/vis_types/table/public/components/table_visualization.tsx similarity index 96% rename from src/plugins/vis_type_table/public/components/table_visualization.tsx rename to src/plugins/vis_types/table/public/components/table_visualization.tsx index c5a4f42cbb65e..356913146890b 100644 --- a/src/plugins/vis_type_table/public/components/table_visualization.tsx +++ b/src/plugins/vis_types/table/public/components/table_visualization.tsx @@ -13,7 +13,7 @@ import classNames from 'classnames'; import { CoreStart } from 'kibana/public'; import { IInterpreterRenderHandlers } from 'src/plugins/expressions'; import type { PersistedState } from 'src/plugins/visualizations/public'; -import { KibanaContextProvider } from '../../../kibana_react/public'; +import { KibanaContextProvider } from '../../../../kibana_react/public'; import { TableVisConfig, TableVisData } from '../types'; import { TableVisBasic } from './table_vis_basic'; import { TableVisSplit } from './table_vis_split'; diff --git a/src/plugins/vis_type_table/public/components/utils.ts b/src/plugins/vis_types/table/public/components/utils.ts similarity index 100% rename from src/plugins/vis_type_table/public/components/utils.ts rename to src/plugins/vis_types/table/public/components/utils.ts diff --git a/src/plugins/vis_type_table/public/index.ts b/src/plugins/vis_types/table/public/index.ts similarity index 100% rename from src/plugins/vis_type_table/public/index.ts rename to src/plugins/vis_types/table/public/index.ts diff --git a/src/plugins/vis_type_table/public/plugin.ts b/src/plugins/vis_types/table/public/plugin.ts similarity index 81% rename from src/plugins/vis_type_table/public/plugin.ts rename to src/plugins/vis_types/table/public/plugin.ts index 2ae8b68bba701..fa02550f5048d 100644 --- a/src/plugins/vis_type_table/public/plugin.ts +++ b/src/plugins/vis_types/table/public/plugin.ts @@ -7,11 +7,11 @@ */ import { CoreSetup, CoreStart, Plugin } from 'kibana/public'; -import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public'; -import { VisualizationsSetup } from '../../visualizations/public'; -import { UsageCollectionSetup } from '../../usage_collection/public'; +import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public'; +import { VisualizationsSetup } from '../../../visualizations/public'; +import { UsageCollectionSetup } from '../../../usage_collection/public'; -import { DataPublicPluginStart } from '../../data/public'; +import { DataPublicPluginStart } from '../../../data/public'; import { setFormatService } from './services'; import { registerTableVis } from './register_vis'; diff --git a/src/plugins/vis_type_table/public/register_vis.ts b/src/plugins/vis_types/table/public/register_vis.ts similarity index 100% rename from src/plugins/vis_type_table/public/register_vis.ts rename to src/plugins/vis_types/table/public/register_vis.ts diff --git a/src/plugins/vis_type_table/public/services.ts b/src/plugins/vis_types/table/public/services.ts similarity index 79% rename from src/plugins/vis_type_table/public/services.ts rename to src/plugins/vis_types/table/public/services.ts index 3122e65714ac8..d4d83c9e92c67 100644 --- a/src/plugins/vis_type_table/public/services.ts +++ b/src/plugins/vis_types/table/public/services.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { createGetterSetter } from '../../kibana_utils/public'; -import { DataPublicPluginStart } from '../../data/public'; +import { createGetterSetter } from '../../../kibana_utils/public'; +import { DataPublicPluginStart } from '../../../data/public'; export const [getFormatService, setFormatService] = createGetterSetter< DataPublicPluginStart['fieldFormats'] diff --git a/src/plugins/vis_type_table/public/table_vis_fn.test.ts b/src/plugins/vis_types/table/public/table_vis_fn.test.ts similarity index 92% rename from src/plugins/vis_type_table/public/table_vis_fn.test.ts rename to src/plugins/vis_types/table/public/table_vis_fn.test.ts index c6eb8601824ec..8b08bca160478 100644 --- a/src/plugins/vis_type_table/public/table_vis_fn.test.ts +++ b/src/plugins/vis_types/table/public/table_vis_fn.test.ts @@ -9,8 +9,8 @@ import { createTableVisFn } from './table_vis_fn'; import { tableVisResponseHandler } from './utils'; -import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; -import { Datatable } from '../../expressions/common/expression_types/specs'; +import { functionWrapper } from '../../../expressions/common/expression_functions/specs/tests/utils'; +import { Datatable } from '../../../expressions/common/expression_types/specs'; jest.mock('./utils', () => ({ tableVisResponseHandler: jest.fn().mockReturnValue({ diff --git a/src/plugins/vis_type_table/public/table_vis_fn.ts b/src/plugins/vis_types/table/public/table_vis_fn.ts similarity index 97% rename from src/plugins/vis_type_table/public/table_vis_fn.ts rename to src/plugins/vis_types/table/public/table_vis_fn.ts index 9473a9a2663ab..ebddb0b4b7fef 100644 --- a/src/plugins/vis_type_table/public/table_vis_fn.ts +++ b/src/plugins/vis_types/table/public/table_vis_fn.ts @@ -7,8 +7,8 @@ */ import { i18n } from '@kbn/i18n'; -import { ExpressionFunctionDefinition, Datatable, Render } from '../../expressions/public'; -import { prepareLogTable, Dimension } from '../../visualizations/public'; +import { ExpressionFunctionDefinition, Datatable, Render } from '../../../expressions/public'; +import { prepareLogTable, Dimension } from '../../../visualizations/public'; import { TableVisData, TableVisConfig } from './types'; import { VIS_TYPE_TABLE } from '../common'; import { tableVisResponseHandler } from './utils'; diff --git a/src/plugins/vis_type_table/public/table_vis_renderer.tsx b/src/plugins/vis_types/table/public/table_vis_renderer.tsx similarity index 89% rename from src/plugins/vis_type_table/public/table_vis_renderer.tsx rename to src/plugins/vis_types/table/public/table_vis_renderer.tsx index 257755de62d0d..e9f2002b71062 100644 --- a/src/plugins/vis_type_table/public/table_vis_renderer.tsx +++ b/src/plugins/vis_types/table/public/table_vis_renderer.tsx @@ -10,8 +10,8 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { CoreStart } from 'kibana/public'; -import { VisualizationContainer } from '../../visualizations/public'; -import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers'; +import { VisualizationContainer } from '../../../visualizations/public'; +import { ExpressionRenderDefinition } from '../../../expressions/common/expression_renderers'; import { TableVisRenderValue } from './table_vis_fn'; const TableVisualizationComponent = lazy(() => import('./components/table_visualization')); diff --git a/src/plugins/vis_type_table/public/table_vis_type.ts b/src/plugins/vis_types/table/public/table_vis_type.ts similarity index 94% rename from src/plugins/vis_type_table/public/table_vis_type.ts rename to src/plugins/vis_types/table/public/table_vis_type.ts index a49748fe86c96..4664e87cea79b 100644 --- a/src/plugins/vis_type_table/public/table_vis_type.ts +++ b/src/plugins/vis_types/table/public/table_vis_type.ts @@ -8,8 +8,8 @@ import { i18n } from '@kbn/i18n'; -import { AggGroupNames } from '../../data/public'; -import { VIS_EVENT_TO_TRIGGER, VisTypeDefinition } from '../../visualizations/public'; +import { AggGroupNames } from '../../../data/public'; +import { VIS_EVENT_TO_TRIGGER, VisTypeDefinition } from '../../../visualizations/public'; import { TableVisParams, VIS_TYPE_TABLE } from '../common'; import { TableOptions } from './components/table_vis_options_lazy'; import { toExpressionAst } from './to_ast'; diff --git a/src/plugins/vis_type_table/public/to_ast.test.ts b/src/plugins/vis_types/table/public/to_ast.test.ts similarity index 95% rename from src/plugins/vis_type_table/public/to_ast.test.ts rename to src/plugins/vis_types/table/public/to_ast.test.ts index 32b2b5939ed89..e8f987909a534 100644 --- a/src/plugins/vis_type_table/public/to_ast.test.ts +++ b/src/plugins/vis_types/table/public/to_ast.test.ts @@ -9,7 +9,7 @@ import { Vis } from 'src/plugins/visualizations/public'; import { toExpressionAst } from './to_ast'; import { AggTypes, TableVisParams } from '../common'; -import { buildExpressionFunction } from '../../expressions/public'; +import { buildExpressionFunction } from '../../../expressions/public'; const mockSchemas = { metric: [{ accessor: 1, format: { id: 'number' }, params: {}, label: 'Count', aggType: 'count' }], @@ -32,11 +32,11 @@ const mockTableExpression = { toAst: jest.fn(), }; -jest.mock('../../visualizations/public', () => ({ +jest.mock('../../../visualizations/public', () => ({ getVisSchemas: () => mockSchemas, })); -jest.mock('../../expressions/public', () => ({ +jest.mock('../../../expressions/public', () => ({ buildExpression: jest.fn(() => mockTableExpression), buildExpressionFunction: jest.fn(() => mockTableExpressionFunction), })); diff --git a/src/plugins/vis_type_table/public/to_ast.ts b/src/plugins/vis_types/table/public/to_ast.ts similarity index 97% rename from src/plugins/vis_type_table/public/to_ast.ts rename to src/plugins/vis_types/table/public/to_ast.ts index f7fb620db1ca6..8e1c92c8dde4f 100644 --- a/src/plugins/vis_type_table/public/to_ast.ts +++ b/src/plugins/vis_types/table/public/to_ast.ts @@ -9,9 +9,9 @@ import { EsaggsExpressionFunctionDefinition, IndexPatternLoadExpressionFunctionDefinition, -} from '../../data/public'; -import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public'; +} from '../../../data/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../../visualizations/public'; import { TableVisParams } from '../common'; import { TableExpressionFunctionDefinition } from './table_vis_fn'; diff --git a/src/plugins/vis_type_table/public/types.ts b/src/plugins/vis_types/table/public/types.ts similarity index 100% rename from src/plugins/vis_type_table/public/types.ts rename to src/plugins/vis_types/table/public/types.ts diff --git a/src/plugins/vis_type_table/public/utils/add_percentage_column.test.ts b/src/plugins/vis_types/table/public/utils/add_percentage_column.test.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/add_percentage_column.test.ts rename to src/plugins/vis_types/table/public/utils/add_percentage_column.test.ts diff --git a/src/plugins/vis_type_table/public/utils/add_percentage_column.ts b/src/plugins/vis_types/table/public/utils/add_percentage_column.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/add_percentage_column.ts rename to src/plugins/vis_types/table/public/utils/add_percentage_column.ts diff --git a/src/plugins/vis_type_table/public/utils/create_formatted_table.test.ts b/src/plugins/vis_types/table/public/utils/create_formatted_table.test.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/create_formatted_table.test.ts rename to src/plugins/vis_types/table/public/utils/create_formatted_table.test.ts diff --git a/src/plugins/vis_type_table/public/utils/create_formatted_table.ts b/src/plugins/vis_types/table/public/utils/create_formatted_table.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/create_formatted_table.ts rename to src/plugins/vis_types/table/public/utils/create_formatted_table.ts diff --git a/src/plugins/vis_type_table/public/utils/index.ts b/src/plugins/vis_types/table/public/utils/index.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/index.ts rename to src/plugins/vis_types/table/public/utils/index.ts diff --git a/src/plugins/vis_type_table/public/utils/table_vis_response_handler.test.ts b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.test.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/table_vis_response_handler.test.ts rename to src/plugins/vis_types/table/public/utils/table_vis_response_handler.test.ts diff --git a/src/plugins/vis_type_table/public/utils/table_vis_response_handler.ts b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/table_vis_response_handler.ts rename to src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts diff --git a/src/plugins/vis_type_table/public/utils/use/index.ts b/src/plugins/vis_types/table/public/utils/use/index.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/use/index.ts rename to src/plugins/vis_types/table/public/utils/use/index.ts diff --git a/src/plugins/vis_type_table/public/utils/use/use_pagination.test.ts b/src/plugins/vis_types/table/public/utils/use/use_pagination.test.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/use/use_pagination.test.ts rename to src/plugins/vis_types/table/public/utils/use/use_pagination.test.ts diff --git a/src/plugins/vis_type_table/public/utils/use/use_pagination.ts b/src/plugins/vis_types/table/public/utils/use/use_pagination.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/use/use_pagination.ts rename to src/plugins/vis_types/table/public/utils/use/use_pagination.ts diff --git a/src/plugins/vis_type_table/public/utils/use/use_ui_state.test.ts b/src/plugins/vis_types/table/public/utils/use/use_ui_state.test.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/use/use_ui_state.test.ts rename to src/plugins/vis_types/table/public/utils/use/use_ui_state.test.ts diff --git a/src/plugins/vis_type_table/public/utils/use/use_ui_state.ts b/src/plugins/vis_types/table/public/utils/use/use_ui_state.ts similarity index 100% rename from src/plugins/vis_type_table/public/utils/use/use_ui_state.ts rename to src/plugins/vis_types/table/public/utils/use/use_ui_state.ts diff --git a/src/plugins/vis_type_table/server/index.ts b/src/plugins/vis_types/table/server/index.ts similarity index 100% rename from src/plugins/vis_type_table/server/index.ts rename to src/plugins/vis_types/table/server/index.ts diff --git a/src/plugins/vis_type_table/server/usage_collector/get_stats.test.ts b/src/plugins/vis_types/table/server/usage_collector/get_stats.test.ts similarity index 96% rename from src/plugins/vis_type_table/server/usage_collector/get_stats.test.ts rename to src/plugins/vis_types/table/server/usage_collector/get_stats.test.ts index 76f067e3a23d7..4c91def40300e 100644 --- a/src/plugins/vis_type_table/server/usage_collector/get_stats.test.ts +++ b/src/plugins/vis_types/table/server/usage_collector/get_stats.test.ts @@ -7,7 +7,7 @@ */ import { getStats } from './get_stats'; -import type { SavedObjectsClientContract } from '../../../../core/server'; +import type { SavedObjectsClientContract } from '../../../../../core/server'; const mockVisualizations = { saved_objects: [ diff --git a/src/plugins/vis_type_table/server/usage_collector/get_stats.ts b/src/plugins/vis_types/table/server/usage_collector/get_stats.ts similarity index 95% rename from src/plugins/vis_type_table/server/usage_collector/get_stats.ts rename to src/plugins/vis_types/table/server/usage_collector/get_stats.ts index ef948c2d7b70b..ac8d759c94c76 100644 --- a/src/plugins/vis_type_table/server/usage_collector/get_stats.ts +++ b/src/plugins/vis_types/table/server/usage_collector/get_stats.ts @@ -12,8 +12,8 @@ import type { ISavedObjectsRepository, SavedObjectsClientContract, SavedObjectsFindResult, -} from '../../../../core/server'; -import type { SavedVisState } from '../../../visualizations/common'; +} from '../../../../../core/server'; +import type { SavedVisState } from '../../../../visualizations/common'; export interface VisTypeTableUsage { /** diff --git a/src/plugins/vis_type_table/server/usage_collector/index.ts b/src/plugins/vis_types/table/server/usage_collector/index.ts similarity index 100% rename from src/plugins/vis_type_table/server/usage_collector/index.ts rename to src/plugins/vis_types/table/server/usage_collector/index.ts diff --git a/src/plugins/vis_type_table/server/usage_collector/register_usage_collector.test.ts b/src/plugins/vis_types/table/server/usage_collector/register_usage_collector.test.ts similarity index 97% rename from src/plugins/vis_type_table/server/usage_collector/register_usage_collector.test.ts rename to src/plugins/vis_types/table/server/usage_collector/register_usage_collector.test.ts index d32435ac45406..b65c698f219a6 100644 --- a/src/plugins/vis_type_table/server/usage_collector/register_usage_collector.test.ts +++ b/src/plugins/vis_types/table/server/usage_collector/register_usage_collector.test.ts @@ -9,7 +9,7 @@ import { createUsageCollectionSetupMock, createCollectorFetchContextMock, -} from '../../../usage_collection/server/mocks'; +} from '../../../../usage_collection/server/mocks'; import { registerVisTypeTableUsageCollector } from './register_usage_collector'; import { getStats } from './get_stats'; diff --git a/src/plugins/vis_type_table/server/usage_collector/register_usage_collector.ts b/src/plugins/vis_types/table/server/usage_collector/register_usage_collector.ts similarity index 92% rename from src/plugins/vis_type_table/server/usage_collector/register_usage_collector.ts rename to src/plugins/vis_types/table/server/usage_collector/register_usage_collector.ts index 74044c9ae70c0..ed176fc9222bc 100644 --- a/src/plugins/vis_type_table/server/usage_collector/register_usage_collector.ts +++ b/src/plugins/vis_types/table/server/usage_collector/register_usage_collector.ts @@ -7,7 +7,7 @@ */ import { getStats, VisTypeTableUsage } from './get_stats'; -import type { UsageCollectionSetup } from '../../../usage_collection/server'; +import type { UsageCollectionSetup } from '../../../../usage_collection/server'; export function registerVisTypeTableUsageCollector(collectorSet: UsageCollectionSetup) { const collector = collectorSet.makeUsageCollector({ diff --git a/src/plugins/vis_types/table/tsconfig.json b/src/plugins/vis_types/table/tsconfig.json new file mode 100644 index 0000000000000..9325064d571d0 --- /dev/null +++ b/src/plugins/vis_types/table/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../data/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + { "path": "../../share/tsconfig.json" }, + { "path": "../../usage_collection/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../kibana_utils/tsconfig.json" }, + { "path": "../../kibana_legacy/tsconfig.json" }, + { "path": "../../kibana_react/tsconfig.json" }, + { "path": "../../vis_default_editor/tsconfig.json" }, + { "path": "../../field_formats/tsconfig.json" } + ] +} diff --git a/src/plugins/vis_type_timelion/README.md b/src/plugins/vis_types/timelion/README.md similarity index 100% rename from src/plugins/vis_type_timelion/README.md rename to src/plugins/vis_types/timelion/README.md diff --git a/src/plugins/vis_type_timelion/common/_generated_/chain.js b/src/plugins/vis_types/timelion/common/_generated_/chain.js similarity index 100% rename from src/plugins/vis_type_timelion/common/_generated_/chain.js rename to src/plugins/vis_types/timelion/common/_generated_/chain.js diff --git a/src/plugins/vis_type_timelion/common/chain.peg b/src/plugins/vis_types/timelion/common/chain.peg similarity index 100% rename from src/plugins/vis_type_timelion/common/chain.peg rename to src/plugins/vis_types/timelion/common/chain.peg diff --git a/src/plugins/vis_type_timelion/common/constants.ts b/src/plugins/vis_types/timelion/common/constants.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/constants.ts rename to src/plugins/vis_types/timelion/common/constants.ts diff --git a/src/plugins/vis_type_timelion/common/lib/calculate_interval.test.ts b/src/plugins/vis_types/timelion/common/lib/calculate_interval.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/lib/calculate_interval.test.ts rename to src/plugins/vis_types/timelion/common/lib/calculate_interval.test.ts diff --git a/src/plugins/vis_type_timelion/common/lib/calculate_interval.ts b/src/plugins/vis_types/timelion/common/lib/calculate_interval.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/lib/calculate_interval.ts rename to src/plugins/vis_types/timelion/common/lib/calculate_interval.ts diff --git a/src/plugins/vis_type_timelion/common/lib/index.ts b/src/plugins/vis_types/timelion/common/lib/index.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/lib/index.ts rename to src/plugins/vis_types/timelion/common/lib/index.ts diff --git a/src/plugins/vis_type_timelion/common/lib/to_milliseconds.ts b/src/plugins/vis_types/timelion/common/lib/to_milliseconds.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/lib/to_milliseconds.ts rename to src/plugins/vis_types/timelion/common/lib/to_milliseconds.ts diff --git a/src/plugins/vis_type_timelion/common/parser.ts b/src/plugins/vis_types/timelion/common/parser.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/parser.ts rename to src/plugins/vis_types/timelion/common/parser.ts diff --git a/src/plugins/vis_type_timelion/common/parser_async.ts b/src/plugins/vis_types/timelion/common/parser_async.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/parser_async.ts rename to src/plugins/vis_types/timelion/common/parser_async.ts diff --git a/src/plugins/vis_type_timelion/common/types.ts b/src/plugins/vis_types/timelion/common/types.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/types.ts rename to src/plugins/vis_types/timelion/common/types.ts diff --git a/src/plugins/vis_type_timelion/common/vis_data.ts b/src/plugins/vis_types/timelion/common/vis_data.ts similarity index 100% rename from src/plugins/vis_type_timelion/common/vis_data.ts rename to src/plugins/vis_types/timelion/common/vis_data.ts diff --git a/src/plugins/vis_type_timelion/config.ts b/src/plugins/vis_types/timelion/config.ts similarity index 100% rename from src/plugins/vis_type_timelion/config.ts rename to src/plugins/vis_types/timelion/config.ts diff --git a/src/plugins/vis_type_timelion/jest.config.js b/src/plugins/vis_types/timelion/jest.config.js similarity index 72% rename from src/plugins/vis_type_timelion/jest.config.js rename to src/plugins/vis_types/timelion/jest.config.js index 5da416935adb9..a6c7d7b3f230f 100644 --- a/src/plugins/vis_type_timelion/jest.config.js +++ b/src/plugins/vis_types/timelion/jest.config.js @@ -8,11 +8,11 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/vis_type_timelion'], - coverageDirectory: '/target/kibana-coverage/jest/src/plugins/vis_type_timelion', + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/timelion'], + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/vis_types/timelion', coverageReporters: ['text', 'html'], collectCoverageFrom: [ - '/src/plugins/vis_type_timelion/{common,public,server}/**/*.{js,ts,tsx}', + '/src/plugins/vis_types/timelion/{common,public,server}/**/*.{js,ts,tsx}', ], }; diff --git a/src/plugins/vis_type_timelion/kibana.json b/src/plugins/vis_types/timelion/kibana.json similarity index 100% rename from src/plugins/vis_type_timelion/kibana.json rename to src/plugins/vis_types/timelion/kibana.json diff --git a/src/plugins/vis_type_timelion/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_types/timelion/public/__snapshots__/to_ast.test.ts.snap similarity index 100% rename from src/plugins/vis_type_timelion/public/__snapshots__/to_ast.test.ts.snap rename to src/plugins/vis_types/timelion/public/__snapshots__/to_ast.test.ts.snap diff --git a/src/plugins/vis_type_timelion/public/components/index.ts b/src/plugins/vis_types/timelion/public/components/index.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/components/index.ts rename to src/plugins/vis_types/timelion/public/components/index.ts diff --git a/src/plugins/vis_type_timelion/public/components/series/area.tsx b/src/plugins/vis_types/timelion/public/components/series/area.tsx similarity index 100% rename from src/plugins/vis_type_timelion/public/components/series/area.tsx rename to src/plugins/vis_types/timelion/public/components/series/area.tsx diff --git a/src/plugins/vis_type_timelion/public/components/series/bar.tsx b/src/plugins/vis_types/timelion/public/components/series/bar.tsx similarity index 100% rename from src/plugins/vis_type_timelion/public/components/series/bar.tsx rename to src/plugins/vis_types/timelion/public/components/series/bar.tsx diff --git a/src/plugins/vis_type_timelion/public/components/series/index.ts b/src/plugins/vis_types/timelion/public/components/series/index.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/components/series/index.ts rename to src/plugins/vis_types/timelion/public/components/series/index.ts diff --git a/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx b/src/plugins/vis_types/timelion/public/components/timelion_expression_input.tsx similarity index 98% rename from src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx rename to src/plugins/vis_types/timelion/public/components/timelion_expression_input.tsx index 569ddf03c941b..dd949f57bce28 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_expression_input.tsx +++ b/src/plugins/vis_types/timelion/public/components/timelion_expression_input.tsx @@ -11,7 +11,7 @@ import { EuiFormLabel } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { monaco } from '@kbn/monaco'; -import { CodeEditor, useKibana } from '../../../kibana_react/public'; +import { CodeEditor, useKibana } from '../../../../kibana_react/public'; import { suggest, getSuggestion } from './timelion_expression_input_helpers'; import { getArgValueSuggestions } from '../helpers/arg_value_suggestions'; import { ITimelionFunction, TimelionFunctionArgs } from '../../common/types'; diff --git a/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts b/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts rename to src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.test.ts diff --git a/src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts b/src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts rename to src/plugins/vis_types/timelion/public/components/timelion_expression_input_helpers.ts diff --git a/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx b/src/plugins/vis_types/timelion/public/components/timelion_interval.tsx similarity index 96% rename from src/plugins/vis_type_timelion/public/components/timelion_interval.tsx rename to src/plugins/vis_types/timelion/public/components/timelion_interval.tsx index 047de1bdb0708..fc080ff578bee 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx +++ b/src/plugins/vis_types/timelion/public/components/timelion_interval.tsx @@ -10,9 +10,9 @@ import React, { useMemo, useCallback } from 'react'; import { EuiFormRow, EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { search } from '../../../data/public'; +import { search } from '../../../../data/public'; const { isValidEsInterval } = search.aggs; -import { useValidation } from '../../../vis_default_editor/public'; +import { useValidation } from '../../../../vis_default_editor/public'; const intervalOptions = [ { diff --git a/src/plugins/vis_type_timelion/public/components/timelion_vis.scss b/src/plugins/vis_types/timelion/public/components/timelion_vis.scss similarity index 100% rename from src/plugins/vis_type_timelion/public/components/timelion_vis.scss rename to src/plugins/vis_types/timelion/public/components/timelion_vis.scss diff --git a/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx b/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx similarity index 95% rename from src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx rename to src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx index 3cc335392b7c4..9a15159b33a1d 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx +++ b/src/plugins/vis_types/timelion/public/components/timelion_vis_component.tsx @@ -19,8 +19,8 @@ import { } from '@elastic/charts'; import { EuiTitle } from '@elastic/eui'; -import { useKibana } from '../../../kibana_react/public'; -import { useActiveCursor } from '../../../charts/public'; +import { useKibana } from '../../../../kibana_react/public'; +import { useActiveCursor } from '../../../../charts/public'; import { AreaSeriesComponent, BarSeriesComponent } from './series'; @@ -36,9 +36,9 @@ import { colors } from '../helpers/chart_constants'; import { getCharts } from '../helpers/plugin_services'; import type { Sheet } from '../helpers/timelion_request_handler'; -import type { IInterpreterRenderHandlers } from '../../../expressions'; +import type { IInterpreterRenderHandlers } from '../../../../expressions'; import type { TimelionVisDependencies } from '../plugin'; -import type { RangeFilterParams } from '../../../data/public'; +import type { RangeFilterParams } from '../../../../data/public'; import type { Series } from '../helpers/timelion_request_handler'; import './timelion_vis.scss'; diff --git a/src/plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts b/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts similarity index 99% rename from src/plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts rename to src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts index 8685ed3102fa6..b2f60b4092bf7 100644 --- a/src/plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts +++ b/src/plugins/vis_types/timelion/public/helpers/arg_value_suggestions.ts @@ -10,7 +10,7 @@ import { get } from 'lodash'; import { getIndexPatterns } from './plugin_services'; import { TimelionFunctionArgs } from '../../common/types'; import { TimelionExpressionFunction, TimelionExpressionArgument } from '../../common/parser'; -import { indexPatterns as indexPatternsUtils, KBN_FIELD_TYPES } from '../../../data/public'; +import { indexPatterns as indexPatternsUtils, KBN_FIELD_TYPES } from '../../../../data/public'; export function getArgValueSuggestions() { const indexPatterns = getIndexPatterns(); diff --git a/src/plugins/vis_type_timelion/public/helpers/chart_constants.ts b/src/plugins/vis_types/timelion/public/helpers/chart_constants.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/chart_constants.ts rename to src/plugins/vis_types/timelion/public/helpers/chart_constants.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/get_timezone.ts b/src/plugins/vis_types/timelion/public/helpers/get_timezone.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/get_timezone.ts rename to src/plugins/vis_types/timelion/public/helpers/get_timezone.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/panel_utils.ts b/src/plugins/vis_types/timelion/public/helpers/panel_utils.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/panel_utils.ts rename to src/plugins/vis_types/timelion/public/helpers/panel_utils.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts b/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts similarity index 91% rename from src/plugins/vis_type_timelion/public/helpers/plugin_services.ts rename to src/plugins/vis_types/timelion/public/helpers/plugin_services.ts index 58fcf510ff792..0e9014437b325 100644 --- a/src/plugins/vis_type_timelion/public/helpers/plugin_services.ts +++ b/src/plugins/vis_types/timelion/public/helpers/plugin_services.ts @@ -8,7 +8,7 @@ import type { IndexPatternsContract, ISearchStart } from 'src/plugins/data/public'; import type { ChartsPluginStart } from 'src/plugins/charts/public'; -import { createGetterSetter } from '../../../kibana_utils/public'; +import { createGetterSetter } from '../../../../kibana_utils/public'; export const [getIndexPatterns, setIndexPatterns] = createGetterSetter( 'IndexPatterns' diff --git a/src/plugins/vis_type_timelion/public/helpers/tick_formatters.test.ts b/src/plugins/vis_types/timelion/public/helpers/tick_formatters.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/tick_formatters.test.ts rename to src/plugins/vis_types/timelion/public/helpers/tick_formatters.test.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/tick_formatters.ts b/src/plugins/vis_types/timelion/public/helpers/tick_formatters.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/tick_formatters.ts rename to src/plugins/vis_types/timelion/public/helpers/tick_formatters.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/tick_generator.test.ts b/src/plugins/vis_types/timelion/public/helpers/tick_generator.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/tick_generator.test.ts rename to src/plugins/vis_types/timelion/public/helpers/tick_generator.test.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/tick_generator.ts b/src/plugins/vis_types/timelion/public/helpers/tick_generator.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/tick_generator.ts rename to src/plugins/vis_types/timelion/public/helpers/tick_generator.ts diff --git a/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts b/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts similarity index 99% rename from src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts rename to src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts index ffadfde6204de..e44d74cfd72ab 100644 --- a/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts +++ b/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import type { KibanaExecutionContext } from 'kibana/public'; -import { KibanaContext, TimeRange, Filter, esQuery, Query } from '../../../data/public'; +import { KibanaContext, TimeRange, Filter, esQuery, Query } from '../../../../data/public'; import { TimelionVisDependencies } from '../plugin'; import { getTimezone } from './get_timezone'; import { TimelionVisParams } from '../timelion_vis_fn'; diff --git a/src/plugins/vis_type_timelion/public/helpers/xaxis_formatter.ts b/src/plugins/vis_types/timelion/public/helpers/xaxis_formatter.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/helpers/xaxis_formatter.ts rename to src/plugins/vis_types/timelion/public/helpers/xaxis_formatter.ts diff --git a/src/plugins/vis_type_timelion/public/index.ts b/src/plugins/vis_types/timelion/public/index.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/index.ts rename to src/plugins/vis_types/timelion/public/index.ts diff --git a/src/plugins/vis_type_timelion/public/legacy/panel_utils.ts b/src/plugins/vis_types/timelion/public/legacy/panel_utils.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/legacy/panel_utils.ts rename to src/plugins/vis_types/timelion/public/legacy/panel_utils.ts diff --git a/src/plugins/vis_type_timelion/public/legacy/tick_formatters.test.ts b/src/plugins/vis_types/timelion/public/legacy/tick_formatters.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/legacy/tick_formatters.test.ts rename to src/plugins/vis_types/timelion/public/legacy/tick_formatters.test.ts diff --git a/src/plugins/vis_type_timelion/public/legacy/tick_formatters.ts b/src/plugins/vis_types/timelion/public/legacy/tick_formatters.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/legacy/tick_formatters.ts rename to src/plugins/vis_types/timelion/public/legacy/tick_formatters.ts diff --git a/src/plugins/vis_type_timelion/public/legacy/timelion_vis.scss b/src/plugins/vis_types/timelion/public/legacy/timelion_vis.scss similarity index 100% rename from src/plugins/vis_type_timelion/public/legacy/timelion_vis.scss rename to src/plugins/vis_types/timelion/public/legacy/timelion_vis.scss diff --git a/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx b/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx similarity index 98% rename from src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx rename to src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx index ddac86fa73bee..1fdb1b37f1c8b 100644 --- a/src/plugins/vis_type_timelion/public/legacy/timelion_vis_component.tsx +++ b/src/plugins/vis_types/timelion/public/legacy/timelion_vis_component.tsx @@ -13,7 +13,7 @@ import { debounce, compact, get, each, cloneDeep, last, map } from 'lodash'; import { useResizeObserver } from '@elastic/eui'; import { IInterpreterRenderHandlers } from 'src/plugins/expressions'; -import { useKibana } from '../../../kibana_react/public'; +import { useKibana } from '../../../../kibana_react/public'; import { DEFAULT_TIME_FORMAT } from '../../common/lib'; import { @@ -31,7 +31,7 @@ import { tickFormatters } from './tick_formatters'; import { generateTicksProvider } from '../helpers/tick_generator'; import type { TimelionVisDependencies } from '../plugin'; -import type { RangeFilterParams } from '../../../data/common'; +import type { RangeFilterParams } from '../../../../data/common'; import './timelion_vis.scss'; diff --git a/src/plugins/vis_type_timelion/public/plugin.ts b/src/plugins/vis_types/timelion/public/plugin.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/plugin.ts rename to src/plugins/vis_types/timelion/public/plugin.ts diff --git a/src/plugins/vis_type_timelion/public/timelion_options.scss b/src/plugins/vis_types/timelion/public/timelion_options.scss similarity index 100% rename from src/plugins/vis_type_timelion/public/timelion_options.scss rename to src/plugins/vis_types/timelion/public/timelion_options.scss diff --git a/src/plugins/vis_type_timelion/public/timelion_options.tsx b/src/plugins/vis_types/timelion/public/timelion_options.tsx similarity index 96% rename from src/plugins/vis_type_timelion/public/timelion_options.tsx rename to src/plugins/vis_types/timelion/public/timelion_options.tsx index ed22efb38be1c..7879eb88e0bd2 100644 --- a/src/plugins/vis_type_timelion/public/timelion_options.tsx +++ b/src/plugins/vis_types/timelion/public/timelion_options.tsx @@ -10,7 +10,7 @@ import React, { useCallback } from 'react'; import { EuiPanel } from '@elastic/eui'; import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; -import { KibanaContextProvider } from '../../kibana_react/public'; +import { KibanaContextProvider } from '../../../kibana_react/public'; import { TimelionVisParams } from './timelion_vis_fn'; import { TimelionInterval, TimelionExpressionInput } from './components'; diff --git a/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts b/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts similarity index 96% rename from src/plugins/vis_type_timelion/public/timelion_vis_fn.ts rename to src/plugins/vis_types/timelion/public/timelion_vis_fn.ts index 2f775728667b6..dd3dfd5cd60a0 100644 --- a/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts +++ b/src/plugins/vis_types/timelion/public/timelion_vis_fn.ts @@ -15,7 +15,7 @@ import { } from './helpers/timelion_request_handler'; import { TIMELION_VIS_NAME } from './timelion_vis_type'; import { TimelionVisDependencies } from './plugin'; -import { KibanaContext, Filter, Query, TimeRange } from '../../data/public'; +import { KibanaContext, Filter, Query, TimeRange } from '../../../data/public'; type Input = KibanaContext | null; type Output = Promise>; diff --git a/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx b/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx similarity index 92% rename from src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx rename to src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx index b14055a4d6b63..c74c0f2ee6c2d 100644 --- a/src/plugins/vis_type_timelion/public/timelion_vis_renderer.tsx +++ b/src/plugins/vis_types/timelion/public/timelion_vis_renderer.tsx @@ -10,12 +10,12 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { ExpressionRenderDefinition } from 'src/plugins/expressions'; -import { KibanaContextProvider } from '../../kibana_react/public'; -import { VisualizationContainer } from '../../visualizations/public'; +import { KibanaContextProvider } from '../../../kibana_react/public'; +import { VisualizationContainer } from '../../../visualizations/public'; import { TimelionVisDependencies } from './plugin'; import { TimelionRenderValue } from './timelion_vis_fn'; import { UI_SETTINGS } from '../common/constants'; -import { RangeFilterParams } from '../../data/public'; +import { RangeFilterParams } from '../../../data/public'; const TimelionVisComponent = lazy(() => import('./components/timelion_vis_component')); const TimelionVisLegacyComponent = lazy(() => import('./legacy/timelion_vis_component')); diff --git a/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx b/src/plugins/vis_types/timelion/public/timelion_vis_type.tsx similarity index 93% rename from src/plugins/vis_type_timelion/public/timelion_vis_type.tsx rename to src/plugins/vis_types/timelion/public/timelion_vis_type.tsx index d607a26485afe..3462ae8df5cd5 100644 --- a/src/plugins/vis_type_timelion/public/timelion_vis_type.tsx +++ b/src/plugins/vis_types/timelion/public/timelion_vis_type.tsx @@ -9,7 +9,7 @@ import React, { lazy } from 'react'; import { i18n } from '@kbn/i18n'; -import { DefaultEditorSize } from '../../vis_default_editor/public'; +import { DefaultEditorSize } from '../../../vis_default_editor/public'; import { TimelionOptionsProps } from './timelion_options'; import { TimelionVisDependencies } from './plugin'; import { toExpressionAst } from './to_ast'; @@ -17,7 +17,7 @@ import { getIndexPatterns } from './helpers/plugin_services'; import { parseTimelionExpressionAsync } from '../common/parser_async'; -import { VIS_EVENT_TO_TRIGGER, VisParams } from '../../visualizations/public'; +import { VIS_EVENT_TO_TRIGGER, VisParams } from '../../../visualizations/public'; const TimelionOptions = lazy(() => import('./timelion_options')); diff --git a/src/plugins/vis_type_timelion/public/to_ast.test.ts b/src/plugins/vis_types/timelion/public/to_ast.test.ts similarity index 100% rename from src/plugins/vis_type_timelion/public/to_ast.test.ts rename to src/plugins/vis_types/timelion/public/to_ast.test.ts diff --git a/src/plugins/vis_type_timelion/public/to_ast.ts b/src/plugins/vis_types/timelion/public/to_ast.ts similarity index 91% rename from src/plugins/vis_type_timelion/public/to_ast.ts rename to src/plugins/vis_types/timelion/public/to_ast.ts index c743d9ce78f32..cf0a24a0e3d3e 100644 --- a/src/plugins/vis_type_timelion/public/to_ast.ts +++ b/src/plugins/vis_types/timelion/public/to_ast.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { Vis } from '../../visualizations/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { Vis } from '../../../visualizations/public'; import { TimelionExpressionFunctionDefinition, TimelionVisParams } from './timelion_vis_fn'; export const toExpressionAst = (vis: Vis) => { diff --git a/src/plugins/vis_type_timelion/server/fit_functions/average.js b/src/plugins/vis_types/timelion/server/fit_functions/average.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/average.js rename to src/plugins/vis_types/timelion/server/fit_functions/average.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/average.test.js b/src/plugins/vis_types/timelion/server/fit_functions/average.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/average.test.js rename to src/plugins/vis_types/timelion/server/fit_functions/average.test.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/carry.js b/src/plugins/vis_types/timelion/server/fit_functions/carry.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/carry.js rename to src/plugins/vis_types/timelion/server/fit_functions/carry.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/carry.test.js b/src/plugins/vis_types/timelion/server/fit_functions/carry.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/carry.test.js rename to src/plugins/vis_types/timelion/server/fit_functions/carry.test.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/nearest.js b/src/plugins/vis_types/timelion/server/fit_functions/nearest.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/nearest.js rename to src/plugins/vis_types/timelion/server/fit_functions/nearest.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/none.js b/src/plugins/vis_types/timelion/server/fit_functions/none.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/none.js rename to src/plugins/vis_types/timelion/server/fit_functions/none.js diff --git a/src/plugins/vis_type_timelion/server/fit_functions/scale.js b/src/plugins/vis_types/timelion/server/fit_functions/scale.js similarity index 100% rename from src/plugins/vis_type_timelion/server/fit_functions/scale.js rename to src/plugins/vis_types/timelion/server/fit_functions/scale.js diff --git a/src/plugins/vis_type_timelion/server/handlers/chain_runner.js b/src/plugins/vis_types/timelion/server/handlers/chain_runner.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/chain_runner.js rename to src/plugins/vis_types/timelion/server/handlers/chain_runner.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/arg_type.js b/src/plugins/vis_types/timelion/server/handlers/lib/arg_type.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/arg_type.js rename to src/plugins/vis_types/timelion/server/handlers/lib/arg_type.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/index_arguments.js b/src/plugins/vis_types/timelion/server/handlers/lib/index_arguments.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/index_arguments.js rename to src/plugins/vis_types/timelion/server/handlers/lib/index_arguments.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/parse_sheet.js b/src/plugins/vis_types/timelion/server/handlers/lib/parse_sheet.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/parse_sheet.js rename to src/plugins/vis_types/timelion/server/handlers/lib/parse_sheet.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/parse_sheet.test.js b/src/plugins/vis_types/timelion/server/handlers/lib/parse_sheet.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/parse_sheet.test.js rename to src/plugins/vis_types/timelion/server/handlers/lib/parse_sheet.test.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/preprocess_chain.js b/src/plugins/vis_types/timelion/server/handlers/lib/preprocess_chain.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/preprocess_chain.js rename to src/plugins/vis_types/timelion/server/handlers/lib/preprocess_chain.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/reposition_arguments.js b/src/plugins/vis_types/timelion/server/handlers/lib/reposition_arguments.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/reposition_arguments.js rename to src/plugins/vis_types/timelion/server/handlers/lib/reposition_arguments.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/tl_config.js b/src/plugins/vis_types/timelion/server/handlers/lib/tl_config.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/tl_config.js rename to src/plugins/vis_types/timelion/server/handlers/lib/tl_config.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/validate_arg.js b/src/plugins/vis_types/timelion/server/handlers/lib/validate_arg.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/validate_arg.js rename to src/plugins/vis_types/timelion/server/handlers/lib/validate_arg.js diff --git a/src/plugins/vis_type_timelion/server/handlers/lib/validate_time.js b/src/plugins/vis_types/timelion/server/handlers/lib/validate_time.js similarity index 100% rename from src/plugins/vis_type_timelion/server/handlers/lib/validate_time.js rename to src/plugins/vis_types/timelion/server/handlers/lib/validate_time.js diff --git a/src/plugins/vis_type_timelion/server/index.ts b/src/plugins/vis_types/timelion/server/index.ts similarity index 95% rename from src/plugins/vis_type_timelion/server/index.ts rename to src/plugins/vis_types/timelion/server/index.ts index 5c5cf8b481f94..396ef8b61c7bc 100644 --- a/src/plugins/vis_type_timelion/server/index.ts +++ b/src/plugins/vis_types/timelion/server/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { PluginConfigDescriptor, PluginInitializerContext } from '../../../../src/core/server'; +import { PluginConfigDescriptor, PluginInitializerContext } from '../../../../../src/core/server'; import { configSchema, ConfigSchema } from '../config'; import { TimelionPlugin } from './plugin'; diff --git a/src/plugins/vis_type_timelion/server/lib/alter.js b/src/plugins/vis_types/timelion/server/lib/alter.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/alter.js rename to src/plugins/vis_types/timelion/server/lib/alter.js diff --git a/src/plugins/vis_type_timelion/server/lib/as_sorted.js b/src/plugins/vis_types/timelion/server/lib/as_sorted.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/as_sorted.js rename to src/plugins/vis_types/timelion/server/lib/as_sorted.js diff --git a/src/plugins/vis_type_timelion/server/lib/build_target.js b/src/plugins/vis_types/timelion/server/lib/build_target.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/build_target.js rename to src/plugins/vis_types/timelion/server/lib/build_target.js diff --git a/src/plugins/vis_type_timelion/server/lib/classes/chainable.js b/src/plugins/vis_types/timelion/server/lib/classes/chainable.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/classes/chainable.js rename to src/plugins/vis_types/timelion/server/lib/classes/chainable.js diff --git a/src/plugins/vis_type_timelion/server/lib/classes/datasource.js b/src/plugins/vis_types/timelion/server/lib/classes/datasource.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/classes/datasource.js rename to src/plugins/vis_types/timelion/server/lib/classes/datasource.js diff --git a/src/plugins/vis_type_timelion/server/lib/classes/timelion_function.d.ts b/src/plugins/vis_types/timelion/server/lib/classes/timelion_function.d.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/classes/timelion_function.d.ts rename to src/plugins/vis_types/timelion/server/lib/classes/timelion_function.d.ts diff --git a/src/plugins/vis_type_timelion/server/lib/classes/timelion_function.js b/src/plugins/vis_types/timelion/server/lib/classes/timelion_function.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/classes/timelion_function.js rename to src/plugins/vis_types/timelion/server/lib/classes/timelion_function.js diff --git a/src/plugins/vis_type_timelion/server/lib/config_manager.ts b/src/plugins/vis_types/timelion/server/lib/config_manager.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/config_manager.ts rename to src/plugins/vis_types/timelion/server/lib/config_manager.ts diff --git a/src/plugins/vis_type_timelion/server/lib/functions_md.js b/src/plugins/vis_types/timelion/server/lib/functions_md.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/functions_md.js rename to src/plugins/vis_types/timelion/server/lib/functions_md.js diff --git a/src/plugins/vis_type_timelion/server/lib/get_namespaced_settings.js b/src/plugins/vis_types/timelion/server/lib/get_namespaced_settings.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/get_namespaced_settings.js rename to src/plugins/vis_types/timelion/server/lib/get_namespaced_settings.js diff --git a/src/plugins/vis_type_timelion/server/lib/load_functions.d.ts b/src/plugins/vis_types/timelion/server/lib/load_functions.d.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/load_functions.d.ts rename to src/plugins/vis_types/timelion/server/lib/load_functions.d.ts diff --git a/src/plugins/vis_type_timelion/server/lib/load_functions.js b/src/plugins/vis_types/timelion/server/lib/load_functions.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/load_functions.js rename to src/plugins/vis_types/timelion/server/lib/load_functions.js diff --git a/src/plugins/vis_type_timelion/server/lib/load_functions.test.js b/src/plugins/vis_types/timelion/server/lib/load_functions.test.js similarity index 92% rename from src/plugins/vis_type_timelion/server/lib/load_functions.test.js rename to src/plugins/vis_types/timelion/server/lib/load_functions.test.js index 0f63c92cc05a8..1508670523733 100644 --- a/src/plugins/vis_type_timelion/server/lib/load_functions.test.js +++ b/src/plugins/vis_types/timelion/server/lib/load_functions.test.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -const fn = require(`src/plugins/vis_type_timelion/server/lib/load_functions`); +const fn = require(`src/plugins/vis_types/timelion/server/lib/load_functions`); const expect = require('chai').expect; diff --git a/src/plugins/vis_type_timelion/server/lib/offset_time.js b/src/plugins/vis_types/timelion/server/lib/offset_time.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/offset_time.js rename to src/plugins/vis_types/timelion/server/lib/offset_time.js diff --git a/src/plugins/vis_type_timelion/server/lib/offset_time.test.js b/src/plugins/vis_types/timelion/server/lib/offset_time.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/offset_time.test.js rename to src/plugins/vis_types/timelion/server/lib/offset_time.test.js diff --git a/src/plugins/vis_type_timelion/server/lib/process_function_definition.js b/src/plugins/vis_types/timelion/server/lib/process_function_definition.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/process_function_definition.js rename to src/plugins/vis_types/timelion/server/lib/process_function_definition.js diff --git a/src/plugins/vis_type_timelion/server/lib/reduce.js b/src/plugins/vis_types/timelion/server/lib/reduce.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/reduce.js rename to src/plugins/vis_types/timelion/server/lib/reduce.js diff --git a/src/plugins/vis_type_timelion/server/lib/split_interval.js b/src/plugins/vis_types/timelion/server/lib/split_interval.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/split_interval.js rename to src/plugins/vis_types/timelion/server/lib/split_interval.js diff --git a/src/plugins/vis_type_timelion/server/lib/unzip_pairs.js b/src/plugins/vis_types/timelion/server/lib/unzip_pairs.js similarity index 100% rename from src/plugins/vis_type_timelion/server/lib/unzip_pairs.js rename to src/plugins/vis_types/timelion/server/lib/unzip_pairs.js diff --git a/src/plugins/vis_type_timelion/server/plugin.ts b/src/plugins/vis_types/timelion/server/plugin.ts similarity index 94% rename from src/plugins/vis_type_timelion/server/plugin.ts rename to src/plugins/vis_types/timelion/server/plugin.ts index 5bbb5dd1819c4..b44aad5575b19 100644 --- a/src/plugins/vis_type_timelion/server/plugin.ts +++ b/src/plugins/vis_types/timelion/server/plugin.ts @@ -9,8 +9,11 @@ import { i18n } from '@kbn/i18n'; import { TypeOf } from '@kbn/config-schema'; -import type { PluginStart, DataRequestHandlerContext } from '../../../../src/plugins/data/server'; -import { CoreSetup, PluginInitializerContext, Plugin } from '../../../../src/core/server'; +import type { + PluginStart, + DataRequestHandlerContext, +} from '../../../../../src/plugins/data/server'; +import { CoreSetup, PluginInitializerContext, Plugin } from '../../../../../src/core/server'; import { configSchema } from '../config'; import loadFunctions from './lib/load_functions'; import { functionsRoute } from './routes/functions'; diff --git a/src/plugins/vis_type_timelion/server/routes/functions.ts b/src/plugins/vis_types/timelion/server/routes/functions.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/routes/functions.ts rename to src/plugins/vis_types/timelion/server/routes/functions.ts diff --git a/src/plugins/vis_type_timelion/server/routes/run.ts b/src/plugins/vis_types/timelion/server/routes/run.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/routes/run.ts rename to src/plugins/vis_types/timelion/server/routes/run.ts diff --git a/src/plugins/vis_type_timelion/server/routes/validate_es.ts b/src/plugins/vis_types/timelion/server/routes/validate_es.ts similarity index 96% rename from src/plugins/vis_type_timelion/server/routes/validate_es.ts rename to src/plugins/vis_types/timelion/server/routes/validate_es.ts index 70eacc5ce8518..1e894e09c6e1b 100644 --- a/src/plugins/vis_type_timelion/server/routes/validate_es.ts +++ b/src/plugins/vis_types/timelion/server/routes/validate_es.ts @@ -8,7 +8,7 @@ import _ from 'lodash'; import { IRouter } from 'kibana/server'; -import type { DataRequestHandlerContext } from '../../../data/server'; +import type { DataRequestHandlerContext } from '../../../../data/server'; export function validateEsRoute(router: IRouter) { router.get( diff --git a/src/plugins/vis_type_timelion/server/series_functions/abs.js b/src/plugins/vis_types/timelion/server/series_functions/abs.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/abs.js rename to src/plugins/vis_types/timelion/server/series_functions/abs.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/abs.test.js b/src/plugins/vis_types/timelion/server/series_functions/abs.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/abs.test.js rename to src/plugins/vis_types/timelion/server/series_functions/abs.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/aggregate.test.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/aggregate.test.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/avg.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/avg.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/avg.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/avg.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/cardinality.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/cardinality.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/cardinality.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/cardinality.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/first.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/first.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/first.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/first.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/index.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/index.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/index.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/index.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/last.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/last.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/last.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/last.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/max.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/max.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/max.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/max.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/min.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/min.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/min.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/min.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/aggregate/sum.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/sum.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/aggregate/sum.js rename to src/plugins/vis_types/timelion/server/series_functions/aggregate/sum.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/bars.js b/src/plugins/vis_types/timelion/server/series_functions/bars.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/bars.js rename to src/plugins/vis_types/timelion/server/series_functions/bars.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/bars.test.js b/src/plugins/vis_types/timelion/server/series_functions/bars.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/bars.test.js rename to src/plugins/vis_types/timelion/server/series_functions/bars.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/color.js b/src/plugins/vis_types/timelion/server/series_functions/color.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/color.js rename to src/plugins/vis_types/timelion/server/series_functions/color.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/color.test.js b/src/plugins/vis_types/timelion/server/series_functions/color.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/color.test.js rename to src/plugins/vis_types/timelion/server/series_functions/color.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/condition.js b/src/plugins/vis_types/timelion/server/series_functions/condition.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/condition.js rename to src/plugins/vis_types/timelion/server/series_functions/condition.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/condition.test.js b/src/plugins/vis_types/timelion/server/series_functions/condition.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/condition.test.js rename to src/plugins/vis_types/timelion/server/series_functions/condition.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/cusum.js b/src/plugins/vis_types/timelion/server/series_functions/cusum.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/cusum.js rename to src/plugins/vis_types/timelion/server/series_functions/cusum.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/cusum.test.js b/src/plugins/vis_types/timelion/server/series_functions/cusum.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/cusum.test.js rename to src/plugins/vis_types/timelion/server/series_functions/cusum.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/derivative.js b/src/plugins/vis_types/timelion/server/series_functions/derivative.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/derivative.js rename to src/plugins/vis_types/timelion/server/series_functions/derivative.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/derivative.test.js b/src/plugins/vis_types/timelion/server/series_functions/derivative.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/derivative.test.js rename to src/plugins/vis_types/timelion/server/series_functions/derivative.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/divide.js b/src/plugins/vis_types/timelion/server/series_functions/divide.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/divide.js rename to src/plugins/vis_types/timelion/server/series_functions/divide.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/divide.test.js b/src/plugins/vis_types/timelion/server/series_functions/divide.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/divide.test.js rename to src/plugins/vis_types/timelion/server/series_functions/divide.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js b/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js similarity index 99% rename from src/plugins/vis_type_timelion/server/series_functions/es/es.test.js rename to src/plugins/vis_types/timelion/server/series_functions/es/es.test.js index c2940c6d7731a..f55ee31f39799 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js @@ -17,7 +17,7 @@ import esResponse from '../fixtures/es_response'; import _ from 'lodash'; import sinon from 'sinon'; import invoke from '../helpers/invoke_series_fn.js'; -import { UI_SETTINGS } from '../../../../data/server'; +import { UI_SETTINGS } from '../../../../../data/server'; describe('es', () => { let tlConfig; diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/index.js b/src/plugins/vis_types/timelion/server/series_functions/es/index.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/es/index.js rename to src/plugins/vis_types/timelion/server/series_functions/es/index.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/agg_body.js b/src/plugins/vis_types/timelion/server/series_functions/es/lib/agg_body.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/es/lib/agg_body.js rename to src/plugins/vis_types/timelion/server/series_functions/es/lib/agg_body.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/agg_response_to_series_list.js b/src/plugins/vis_types/timelion/server/series_functions/es/lib/agg_response_to_series_list.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/es/lib/agg_response_to_series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/es/lib/agg_response_to_series_list.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js b/src/plugins/vis_types/timelion/server/series_functions/es/lib/build_request.js similarity index 97% rename from src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js rename to src/plugins/vis_types/timelion/server/series_functions/es/lib/build_request.js index 7d55a772c7fc1..20e3f71801854 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js +++ b/src/plugins/vis_types/timelion/server/series_functions/es/lib/build_request.js @@ -10,7 +10,7 @@ import _ from 'lodash'; import moment from 'moment'; import { buildAggBody } from './agg_body'; import createDateAgg from './create_date_agg'; -import { UI_SETTINGS } from '../../../../../data/server'; +import { UI_SETTINGS } from '../../../../../../data/server'; export default function buildRequest(config, tlConfig, scriptFields, runtimeFields, timeout) { const bool = { must: [] }; diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js b/src/plugins/vis_types/timelion/server/series_functions/es/lib/create_date_agg.js similarity index 97% rename from src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js rename to src/plugins/vis_types/timelion/server/series_functions/es/lib/create_date_agg.js index bd6cf8a4b7c5e..e12ad035a2b61 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/lib/create_date_agg.js +++ b/src/plugins/vis_types/timelion/server/series_functions/es/lib/create_date_agg.js @@ -7,7 +7,7 @@ */ import { buildAggBody } from './agg_body'; -import { search, METRIC_TYPES } from '../../../../../data/server'; +import { search, METRIC_TYPES } from '../../../../../../data/server'; const { dateHistogramInterval } = search.aggs; diff --git a/src/plugins/vis_type_timelion/server/series_functions/first.js b/src/plugins/vis_types/timelion/server/series_functions/first.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/first.js rename to src/plugins/vis_types/timelion/server/series_functions/first.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/first.test.js b/src/plugins/vis_types/timelion/server/series_functions/first.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/first.test.js rename to src/plugins/vis_types/timelion/server/series_functions/first.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/fit.js b/src/plugins/vis_types/timelion/server/series_functions/fit.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/fit.js rename to src/plugins/vis_types/timelion/server/series_functions/fit.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/fit.test.js b/src/plugins/vis_types/timelion/server/series_functions/fit.test.js similarity index 98% rename from src/plugins/vis_type_timelion/server/series_functions/fit.test.js rename to src/plugins/vis_types/timelion/server/series_functions/fit.test.js index 7e853d4d74e49..b755a3f80e338 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/fit.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/fit.test.js @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -const fn = require(`src/plugins/vis_type_timelion/server/series_functions/fit`); +const fn = require(`src/plugins/vis_types/timelion/server/series_functions/fit`); import moment from 'moment'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; diff --git a/src/plugins/vis_type_timelion/server/series_functions/fixtures/bucket_list.js b/src/plugins/vis_types/timelion/server/series_functions/fixtures/bucket_list.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/fixtures/bucket_list.js rename to src/plugins/vis_types/timelion/server/series_functions/fixtures/bucket_list.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/fixtures/es_response.js b/src/plugins/vis_types/timelion/server/series_functions/fixtures/es_response.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/fixtures/es_response.js rename to src/plugins/vis_types/timelion/server/series_functions/fixtures/es_response.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/fixtures/series_list.js b/src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/fixtures/series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/fixtures/tl_config.js b/src/plugins/vis_types/timelion/server/series_functions/fixtures/tl_config.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/fixtures/tl_config.js rename to src/plugins/vis_types/timelion/server/series_functions/fixtures/tl_config.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/graphite.js b/src/plugins/vis_types/timelion/server/series_functions/graphite.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/graphite.js rename to src/plugins/vis_types/timelion/server/series_functions/graphite.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/graphite.test.js b/src/plugins/vis_types/timelion/server/series_functions/graphite.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/graphite.test.js rename to src/plugins/vis_types/timelion/server/series_functions/graphite.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/helpers/get_series.js b/src/plugins/vis_types/timelion/server/series_functions/helpers/get_series.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/helpers/get_series.js rename to src/plugins/vis_types/timelion/server/series_functions/helpers/get_series.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/helpers/get_series_list.js b/src/plugins/vis_types/timelion/server/series_functions/helpers/get_series_list.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/helpers/get_series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/helpers/get_series_list.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/helpers/get_single_series_list.js b/src/plugins/vis_types/timelion/server/series_functions/helpers/get_single_series_list.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/helpers/get_single_series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/helpers/get_single_series_list.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/helpers/invoke_series_fn.js b/src/plugins/vis_types/timelion/server/series_functions/helpers/invoke_series_fn.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/helpers/invoke_series_fn.js rename to src/plugins/vis_types/timelion/server/series_functions/helpers/invoke_series_fn.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/hide.js b/src/plugins/vis_types/timelion/server/series_functions/hide.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/hide.js rename to src/plugins/vis_types/timelion/server/series_functions/hide.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/hide.test.js b/src/plugins/vis_types/timelion/server/series_functions/hide.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/hide.test.js rename to src/plugins/vis_types/timelion/server/series_functions/hide.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/holt/index.js b/src/plugins/vis_types/timelion/server/series_functions/holt/index.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/holt/index.js rename to src/plugins/vis_types/timelion/server/series_functions/holt/index.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/holt/lib/des.js b/src/plugins/vis_types/timelion/server/series_functions/holt/lib/des.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/holt/lib/des.js rename to src/plugins/vis_types/timelion/server/series_functions/holt/lib/des.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/holt/lib/ses.js b/src/plugins/vis_types/timelion/server/series_functions/holt/lib/ses.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/holt/lib/ses.js rename to src/plugins/vis_types/timelion/server/series_functions/holt/lib/ses.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/holt/lib/tes.js b/src/plugins/vis_types/timelion/server/series_functions/holt/lib/tes.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/holt/lib/tes.js rename to src/plugins/vis_types/timelion/server/series_functions/holt/lib/tes.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/label.js b/src/plugins/vis_types/timelion/server/series_functions/label.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/label.js rename to src/plugins/vis_types/timelion/server/series_functions/label.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/label.test.js b/src/plugins/vis_types/timelion/server/series_functions/label.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/label.test.js rename to src/plugins/vis_types/timelion/server/series_functions/label.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/legend.js b/src/plugins/vis_types/timelion/server/series_functions/legend.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/legend.js rename to src/plugins/vis_types/timelion/server/series_functions/legend.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/legend.test.js b/src/plugins/vis_types/timelion/server/series_functions/legend.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/legend.test.js rename to src/plugins/vis_types/timelion/server/series_functions/legend.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/lines.js b/src/plugins/vis_types/timelion/server/series_functions/lines.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/lines.js rename to src/plugins/vis_types/timelion/server/series_functions/lines.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/lines.test.js b/src/plugins/vis_types/timelion/server/series_functions/lines.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/lines.test.js rename to src/plugins/vis_types/timelion/server/series_functions/lines.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/log.js b/src/plugins/vis_types/timelion/server/series_functions/log.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/log.js rename to src/plugins/vis_types/timelion/server/series_functions/log.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/log.test.js b/src/plugins/vis_types/timelion/server/series_functions/log.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/log.test.js rename to src/plugins/vis_types/timelion/server/series_functions/log.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/max.js b/src/plugins/vis_types/timelion/server/series_functions/max.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/max.js rename to src/plugins/vis_types/timelion/server/series_functions/max.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/max.test.js b/src/plugins/vis_types/timelion/server/series_functions/max.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/max.test.js rename to src/plugins/vis_types/timelion/server/series_functions/max.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/min.js b/src/plugins/vis_types/timelion/server/series_functions/min.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/min.js rename to src/plugins/vis_types/timelion/server/series_functions/min.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/min.test.js b/src/plugins/vis_types/timelion/server/series_functions/min.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/min.test.js rename to src/plugins/vis_types/timelion/server/series_functions/min.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/movingaverage.js b/src/plugins/vis_types/timelion/server/series_functions/movingaverage.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/movingaverage.js rename to src/plugins/vis_types/timelion/server/series_functions/movingaverage.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/movingaverage.test.js b/src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/movingaverage.test.js rename to src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/movingstd.js b/src/plugins/vis_types/timelion/server/series_functions/movingstd.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/movingstd.js rename to src/plugins/vis_types/timelion/server/series_functions/movingstd.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/movingstd.test.js b/src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/movingstd.test.js rename to src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/multiply.js b/src/plugins/vis_types/timelion/server/series_functions/multiply.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/multiply.js rename to src/plugins/vis_types/timelion/server/series_functions/multiply.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/multiply.test.js b/src/plugins/vis_types/timelion/server/series_functions/multiply.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/multiply.test.js rename to src/plugins/vis_types/timelion/server/series_functions/multiply.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/points.js b/src/plugins/vis_types/timelion/server/series_functions/points.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/points.js rename to src/plugins/vis_types/timelion/server/series_functions/points.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/points.test.js b/src/plugins/vis_types/timelion/server/series_functions/points.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/points.test.js rename to src/plugins/vis_types/timelion/server/series_functions/points.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/precision.js b/src/plugins/vis_types/timelion/server/series_functions/precision.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/precision.js rename to src/plugins/vis_types/timelion/server/series_functions/precision.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/precision.test.js b/src/plugins/vis_types/timelion/server/series_functions/precision.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/precision.test.js rename to src/plugins/vis_types/timelion/server/series_functions/precision.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/props.js b/src/plugins/vis_types/timelion/server/series_functions/props.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/props.js rename to src/plugins/vis_types/timelion/server/series_functions/props.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/quandl.js b/src/plugins/vis_types/timelion/server/series_functions/quandl.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/quandl.js rename to src/plugins/vis_types/timelion/server/series_functions/quandl.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/quandl.test.js b/src/plugins/vis_types/timelion/server/series_functions/quandl.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/quandl.test.js rename to src/plugins/vis_types/timelion/server/series_functions/quandl.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/range.js b/src/plugins/vis_types/timelion/server/series_functions/range.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/range.js rename to src/plugins/vis_types/timelion/server/series_functions/range.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/range.test.js b/src/plugins/vis_types/timelion/server/series_functions/range.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/range.test.js rename to src/plugins/vis_types/timelion/server/series_functions/range.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/scale_interval.js b/src/plugins/vis_types/timelion/server/series_functions/scale_interval.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/scale_interval.js rename to src/plugins/vis_types/timelion/server/series_functions/scale_interval.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/scale_interval.test.js b/src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/scale_interval.test.js rename to src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/static.js b/src/plugins/vis_types/timelion/server/series_functions/static.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/static.js rename to src/plugins/vis_types/timelion/server/series_functions/static.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/static.test.js b/src/plugins/vis_types/timelion/server/series_functions/static.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/static.test.js rename to src/plugins/vis_types/timelion/server/series_functions/static.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/subtract.js b/src/plugins/vis_types/timelion/server/series_functions/subtract.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/subtract.js rename to src/plugins/vis_types/timelion/server/series_functions/subtract.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/subtract.test.js b/src/plugins/vis_types/timelion/server/series_functions/subtract.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/subtract.test.js rename to src/plugins/vis_types/timelion/server/series_functions/subtract.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/sum.js b/src/plugins/vis_types/timelion/server/series_functions/sum.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/sum.js rename to src/plugins/vis_types/timelion/server/series_functions/sum.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/sum.test.js b/src/plugins/vis_types/timelion/server/series_functions/sum.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/sum.test.js rename to src/plugins/vis_types/timelion/server/series_functions/sum.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/title.js b/src/plugins/vis_types/timelion/server/series_functions/title.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/title.js rename to src/plugins/vis_types/timelion/server/series_functions/title.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/title.test.js b/src/plugins/vis_types/timelion/server/series_functions/title.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/title.test.js rename to src/plugins/vis_types/timelion/server/series_functions/title.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/trend/index.js b/src/plugins/vis_types/timelion/server/series_functions/trend/index.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/trend/index.js rename to src/plugins/vis_types/timelion/server/series_functions/trend/index.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/trend/lib/regress.js b/src/plugins/vis_types/timelion/server/series_functions/trend/lib/regress.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/trend/lib/regress.js rename to src/plugins/vis_types/timelion/server/series_functions/trend/lib/regress.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/trim.js b/src/plugins/vis_types/timelion/server/series_functions/trim.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/trim.js rename to src/plugins/vis_types/timelion/server/series_functions/trim.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/trim.test.js b/src/plugins/vis_types/timelion/server/series_functions/trim.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/trim.test.js rename to src/plugins/vis_types/timelion/server/series_functions/trim.test.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/worldbank.js b/src/plugins/vis_types/timelion/server/series_functions/worldbank.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/worldbank.js rename to src/plugins/vis_types/timelion/server/series_functions/worldbank.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/worldbank_indicators.js b/src/plugins/vis_types/timelion/server/series_functions/worldbank_indicators.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/worldbank_indicators.js rename to src/plugins/vis_types/timelion/server/series_functions/worldbank_indicators.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/yaxis.js b/src/plugins/vis_types/timelion/server/series_functions/yaxis.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/yaxis.js rename to src/plugins/vis_types/timelion/server/series_functions/yaxis.js diff --git a/src/plugins/vis_type_timelion/server/series_functions/yaxis.test.js b/src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js similarity index 100% rename from src/plugins/vis_type_timelion/server/series_functions/yaxis.test.js rename to src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js diff --git a/src/plugins/vis_type_timelion/server/timelion.json b/src/plugins/vis_types/timelion/server/timelion.json similarity index 100% rename from src/plugins/vis_type_timelion/server/timelion.json rename to src/plugins/vis_types/timelion/server/timelion.json diff --git a/src/plugins/vis_type_timelion/server/types.ts b/src/plugins/vis_types/timelion/server/types.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/types.ts rename to src/plugins/vis_types/timelion/server/types.ts diff --git a/src/plugins/vis_type_timelion/server/ui_settings.ts b/src/plugins/vis_types/timelion/server/ui_settings.ts similarity index 100% rename from src/plugins/vis_type_timelion/server/ui_settings.ts rename to src/plugins/vis_types/timelion/server/ui_settings.ts diff --git a/src/plugins/vis_types/timelion/tsconfig.json b/src/plugins/vis_types/timelion/tsconfig.json new file mode 100644 index 0000000000000..8613f381e5e4f --- /dev/null +++ b/src/plugins/vis_types/timelion/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + { "path": "../../data/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../kibana_utils/tsconfig.json" }, + { "path": "../../kibana_react/tsconfig.json" }, + { "path": "../../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/tasks/config/peg.js b/tasks/config/peg.js index 0c299ae5748dd..d8162f5a72bd1 100644 --- a/tasks/config/peg.js +++ b/tasks/config/peg.js @@ -8,7 +8,7 @@ module.exports = { timelion_chain: { - src: 'src/plugins/vis_type_timelion/common/chain.peg', - dest: 'src/plugins/vis_type_timelion/common/_generated_/chain.js', + src: 'src/plugins/vis_types/timelion/common/chain.peg', + dest: 'src/plugins/vis_types/timelion/common/_generated_/chain.js', }, }; diff --git a/test/functional/apps/management/_field_formatter.ts b/test/functional/apps/management/_field_formatter.ts index 65b1f4d324fb1..e070b262af9ed 100644 --- a/test/functional/apps/management/_field_formatter.ts +++ b/test/functional/apps/management/_field_formatter.ts @@ -12,7 +12,6 @@ import { FIELD_FORMAT_IDS } from '../../../../src/plugins/field_formats/common'; import { WebElementWrapper } from '../../services/lib/web_element_wrapper'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const browser = getService('browser'); const PageObjects = getPageObjects(['settings', 'common']); @@ -32,13 +31,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'test_field_formatters', 'test_logstash_reader', ]); - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace({}); }); after(async function afterAll() { - await PageObjects.settings.navigateTo(); - await esArchiver.emptyKibanaIndex(); + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); }); describe('set and change field formatter', function describeIndexTests() { diff --git a/test/functional/apps/management/_handle_version_conflict.js b/test/functional/apps/management/_handle_version_conflict.js index 82723ad7ce967..f73489a5185b5 100644 --- a/test/functional/apps/management/_handle_version_conflict.js +++ b/test/functional/apps/management/_handle_version_conflict.js @@ -19,7 +19,7 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { const testSubjects = getService('testSubjects'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const browser = getService('browser'); const es = getService('es'); const retry = getService('retry'); @@ -30,7 +30,11 @@ export default function ({ getService, getPageObjects }) { describe('index version conflict', function describeIndexTests() { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); }); it('Should be able to surface version conflict notification while creating scripted field', async function () { diff --git a/test/functional/apps/management/_index_patterns_empty.ts b/test/functional/apps/management/_index_patterns_empty.ts index 038039275b843..e086a6ca18213 100644 --- a/test/functional/apps/management/_index_patterns_empty.ts +++ b/test/functional/apps/management/_index_patterns_empty.ts @@ -32,6 +32,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { path: '/logstash-a', method: 'DELETE', }); + await kibanaServer.savedObjects.clean({ types: ['index-pattern'] }); }); // create index pattern and return to verify list diff --git a/test/functional/apps/management/_mgmt_import_saved_objects.js b/test/functional/apps/management/_mgmt_import_saved_objects.js index b7bca79a25940..cf30b6f4ccf0d 100644 --- a/test/functional/apps/management/_mgmt_import_saved_objects.js +++ b/test/functional/apps/management/_mgmt_import_saved_objects.js @@ -10,21 +10,21 @@ import expect from '@kbn/expect'; import path from 'path'; export default function ({ getService, getPageObjects }) { - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); const PageObjects = getPageObjects(['common', 'settings', 'header', 'savedObjects']); //in 6.4.0 bug the Saved Search conflict would be resolved and get imported but the visualization //that referenced the saved search was not imported.( https://github.com/elastic/kibana/issues/22238) describe('mgmt saved objects', function describeIndexTests() { - beforeEach(async function () { - await esArchiver.emptyKibanaIndex(); - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + before(async () => { + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await PageObjects.settings.navigateTo(); }); - afterEach(async function () { - await esArchiver.unload('test/functional/fixtures/es_archiver/discover'); + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.savedObjects.clean({ types: ['search', 'visualization'] }); }); it('should import saved objects mgmt', async function () { diff --git a/test/functional/apps/management/_runtime_fields.js b/test/functional/apps/management/_runtime_fields.js index 745a3f9b079a4..09fa924b0b870 100644 --- a/test/functional/apps/management/_runtime_fields.js +++ b/test/functional/apps/management/_runtime_fields.js @@ -9,7 +9,6 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const log = getService('log'); const browser = getService('browser'); @@ -23,16 +22,12 @@ export default function ({ getService, getPageObjects }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); - // delete .kibana index and then wait for Kibana to re-create it + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace({}); - await kibanaServer.uiSettings.update({}); }); after(async function afterAll() { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.removeLogstashIndexPatternIfExist(); + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); }); describe('create runtime field', function describeIndexTests() { diff --git a/test/functional/apps/management/_scripted_fields.js b/test/functional/apps/management/_scripted_fields.js index 2ff9e55c59ebb..4aa06f4cd9ad7 100644 --- a/test/functional/apps/management/_scripted_fields.js +++ b/test/functional/apps/management/_scripted_fields.js @@ -25,7 +25,6 @@ import expect from '@kbn/expect'; export default function ({ getService, getPageObjects }) { - const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const log = getService('log'); const browser = getService('browser'); @@ -46,16 +45,14 @@ export default function ({ getService, getPageObjects }) { before(async function () { await browser.setWindowSize(1200, 800); - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); - // delete .kibana index and then wait for Kibana to re-create it + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.uiSettings.replace({}); await kibanaServer.uiSettings.update({ 'doc_table:legacy': true }); }); after(async function afterAll() { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.removeLogstashIndexPatternIfExist(); + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.uiSettings.replace({}); }); it('should not allow saving of invalid scripts', async function () { @@ -125,7 +122,7 @@ export default function ({ getService, getPageObjects }) { 'painless', 'number', null, - '1', + '100', script ); await retry.try(async function () { diff --git a/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap index 141d94e2b168f..c4658ae2ac22c 100644 --- a/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap @@ -304,7 +304,7 @@ exports[`Span ERROR_LOG_MESSAGE 1`] = `undefined`; exports[`Span ERROR_PAGE_URL 1`] = `undefined`; -exports[`Span EVENT_OUTCOME 1`] = `undefined`; +exports[`Span EVENT_OUTCOME 1`] = `"unknown"`; exports[`Span FCP_FIELD 1`] = `undefined`; @@ -541,7 +541,7 @@ exports[`Transaction ERROR_LOG_MESSAGE 1`] = `undefined`; exports[`Transaction ERROR_PAGE_URL 1`] = `undefined`; -exports[`Transaction EVENT_OUTCOME 1`] = `undefined`; +exports[`Transaction EVENT_OUTCOME 1`] = `"unknown"`; exports[`Transaction FCP_FIELD 1`] = `undefined`; diff --git a/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts b/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts index 6b24b43e9707d..debf75f79ec7e 100644 --- a/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts +++ b/x-pack/plugins/apm/common/elasticsearch_fieldnames.test.ts @@ -30,6 +30,7 @@ describe('Transaction', () => { provider: 'gcp', region: 'europe-west1', }, + event: { outcome: 'unknown' }, http: { request: { method: 'GET' }, response: { status_code: 200 }, @@ -87,6 +88,7 @@ describe('Span', () => { provider: 'gcp', region: 'europe-west1', }, + event: { outcome: 'unknown' }, processor: { name: 'transaction', event: 'span', diff --git a/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx b/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx index a7b1d99072d26..c8956c091d267 100644 --- a/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx +++ b/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx @@ -16,9 +16,10 @@ import { EuiToolTip, } from '@elastic/eui'; import numeral from '@elastic/numeral'; +import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; -import { useFetcher } from '../../../../hooks/use_fetcher'; +import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { I18LABELS } from '../translations'; import { CsmSharedContext } from '../CsmSharedContext'; import { ErrorDetailLink } from '../../../shared/Links/apm/ErrorDetailLink'; @@ -125,14 +126,21 @@ export function JSErrors() { ) } description={I18LABELS.totalErrors} - isLoading={status !== 'success'} + isLoading={status === FETCH_STATUS.LOADING} /> ({ status === FETCH_STATUS.LOADING ? loadingText : noDataText } loading={status === FETCH_STATUS.LOADING} + error={status === FETCH_STATUS.FAILURE ? errorMessage : ''} columns={columns} rowProps={(term) => { return { @@ -121,3 +122,8 @@ const noDataText = i18n.translate( 'xpack.apm.correlations.correlationsTable.noDataText', { defaultMessage: 'No data' } ); + +const errorMessage = i18n.translate( + 'xpack.apm.correlations.correlationsTable.errorMessage', + { defaultMessage: 'Failed to fetch' } +); diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx index 2cdb808622854..0b505c4f5ade8 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/index.tsx @@ -5,7 +5,12 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiLink, + EuiEmptyPrompt, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; import uuid from 'uuid'; @@ -20,7 +25,6 @@ import { useTimeRange } from '../../../hooks/use_time_range'; import { useUpgradeAssistantHref } from '../../shared/Links/kibana'; import { SearchBar } from '../../shared/search_bar'; import { getTimeRangeComparison } from '../../shared/time_comparison/get_time_range_comparison'; -import { NoServicesMessage } from './no_services_message'; import { ServiceList } from './service_list'; import { MLCallout } from './service_list/MLCallout'; @@ -179,6 +183,21 @@ export function ServiceInventory() { canCreateJob && !userHasDismissedCallout; + const isLoading = mainStatisticsStatus === FETCH_STATUS.LOADING; + const isFailure = mainStatisticsStatus === FETCH_STATUS.FAILURE; + const noItemsMessage = ( + + {i18n.translate('xpack.apm.servicesTable.notFoundLabel', { + defaultMessage: 'No services found', + })} +
+ } + titleSize="s" + /> + ); + return ( <> @@ -190,10 +209,11 @@ export function ServiceInventory() { )} } + noItemsMessage={noItemsMessage} /> diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.test.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.test.tsx deleted file mode 100644 index 3a3ddcc558679..0000000000000 --- a/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.test.tsx +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; -import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; -import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { NoServicesMessage } from './no_services_message'; - -function Wrapper({ children }: { children?: ReactNode }) { - return {children}; -} - -describe('NoServicesMessage', () => { - Object.values(FETCH_STATUS).forEach((status) => { - [true, false].forEach((historicalDataFound) => { - describe(`when status is ${status}`, () => { - describe(`when historicalDataFound is ${historicalDataFound}`, () => { - it('renders', () => { - expect(() => - render(, { - wrapper: Wrapper, - }) - ).not.toThrowError(); - }); - }); - }); - }); - }); -}); diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.tsx deleted file mode 100644 index 872359262cf02..0000000000000 --- a/x-pack/plugins/apm/public/components/app/service_inventory/no_services_message.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiEmptyPrompt } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import React from 'react'; -import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { ErrorStatePrompt } from '../../shared/ErrorStatePrompt'; - -interface Props { - status: FETCH_STATUS | undefined; -} - -export function NoServicesMessage({ status }: Props) { - if (status === FETCH_STATUS.LOADING) { - return null; - } - - if (status === FETCH_STATUS.FAILURE) { - return ; - } - - return ( - - {i18n.translate('xpack.apm.servicesTable.notFoundLabel', { - defaultMessage: 'No services found', - })} -
- } - titleSize="s" - /> - ); -} diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx index e085c5794f80a..17dfee35e221b 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/service_list/index.tsx @@ -214,6 +214,7 @@ interface Props { comparisonData?: ServicesDetailedStatisticsAPIResponse; noItemsMessage?: React.ReactNode; isLoading: boolean; + isFailure?: boolean; } export function ServiceList({ @@ -221,6 +222,7 @@ export function ServiceList({ noItemsMessage, comparisonData, isLoading, + isFailure, }: Props) { const breakpoints = useBreakpoints(); const displayHealthStatus = items.some((item) => 'healthStatus' in item); @@ -296,6 +298,7 @@ export function ServiceList({ - - + - { - setTableOptions({ - pageIndex: newTableOptions.page?.index ?? 0, - sort: newTableOptions.sort - ? { - field: newTableOptions.sort.field as SortField, - direction: newTableOptions.sort.direction, - } - : DEFAULT_SORT, - }); - }} - sorting={{ - enableAllColumns: true, - sort, - }} - /> - - + noItemsMessage={ + status === FETCH_STATUS.LOADING + ? i18n.translate( + 'xpack.apm.serviceOverview.errorsTable.loading', + { defaultMessage: 'Loading...' } + ) + : i18n.translate( + 'xpack.apm.serviceOverview.errorsTable.noResults', + { defaultMessage: 'No errors found' } + ) + } + columns={columns} + items={items} + pagination={{ + pageIndex, + pageSize: PAGE_SIZE, + totalItemCount: totalItems, + pageSizeOptions: [PAGE_SIZE], + hidePerPageOptions: true, + }} + loading={status === FETCH_STATUS.LOADING} + onChange={(newTableOptions: { + page?: { + index: number; + }; + sort?: { field: string; direction: SortDirection }; + }) => { + setTableOptions({ + pageIndex: newTableOptions.page?.index ?? 0, + sort: newTableOptions.sort + ? { + field: newTableOptions.sort.field as SortField, + direction: newTableOptions.sort.direction, + } + : DEFAULT_SORT, + }); + }} + sorting={{ + enableAllColumns: true, + sort, + }} + /> + ); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx index 9312a3c68a1ec..1df6803fdbbb1 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx @@ -17,7 +17,6 @@ import { useApmServiceContext } from '../../../../context/apm_service/use_apm_se import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { APIReturnType } from '../../../../services/rest/createCallApmApi'; -import { TableFetchWrapper } from '../../../shared/table_fetch_wrapper'; import { PAGE_SIZE, SortDirection, @@ -156,33 +155,39 @@ export function ServiceOverviewInstancesTable({ - - - - - + + + ); diff --git a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx index 5286b821dd23f..63cd27cba41e8 100644 --- a/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/trace_overview/index.tsx @@ -65,6 +65,7 @@ export function TraceOverview() { ); diff --git a/x-pack/plugins/apm/public/components/app/trace_overview/trace_list.tsx b/x-pack/plugins/apm/public/components/app/trace_overview/trace_list.tsx index 765a4b1aeae8c..7c4e0ffca1f58 100644 --- a/x-pack/plugins/apm/public/components/app/trace_overview/trace_list.tsx +++ b/x-pack/plugins/apm/public/components/app/trace_overview/trace_list.tsx @@ -30,6 +30,7 @@ const StyledTransactionLink = euiStyled(TransactionDetailLink)` interface Props { items: TraceGroup[]; isLoading: boolean; + isFailure: boolean; } const traceListColumns: Array> = [ @@ -124,10 +125,11 @@ const noItemsMessage = ( /> ); -export function TraceList({ items = [], isLoading }: Props) { +export function TraceList({ items = [], isLoading, isFailure }: Props) { return ( - - - - - + + + ); diff --git a/x-pack/plugins/apm/public/components/shared/managed_table/__snapshots__/managed_table.test.tsx.snap b/x-pack/plugins/apm/public/components/shared/managed_table/__snapshots__/managed_table.test.tsx.snap index 1e01c00543949..e4674b3add880 100644 --- a/x-pack/plugins/apm/public/components/shared/managed_table/__snapshots__/managed_table.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/shared/managed_table/__snapshots__/managed_table.test.tsx.snap @@ -17,6 +17,7 @@ exports[`ManagedTable should render a page-full of items, with defaults 1`] = ` }, ] } + error="" items={ Array [ Object { @@ -74,6 +75,7 @@ exports[`ManagedTable should render when specifying initial values 1`] = ` }, ] } + error="" items={ Array [ Object { diff --git a/x-pack/plugins/apm/public/components/shared/managed_table/index.tsx b/x-pack/plugins/apm/public/components/shared/managed_table/index.tsx index f7009956bcf84..54f0aebbe818c 100644 --- a/x-pack/plugins/apm/public/components/shared/managed_table/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/managed_table/index.tsx @@ -43,6 +43,7 @@ interface Props { ) => T[]; pagination?: boolean; isLoading?: boolean; + error?: boolean; } function defaultSortFn( @@ -68,6 +69,7 @@ function UnoptimizedManagedTable(props: Props) { sortFn = defaultSortFn, pagination = true, isLoading = false, + error = false, } = props; const { @@ -138,6 +140,13 @@ function UnoptimizedManagedTable(props: Props) { return ( >} // EuiBasicTableColumn is stricter than ITableColumn diff --git a/x-pack/plugins/apm/public/components/shared/table_fetch_wrapper/index.tsx b/x-pack/plugins/apm/public/components/shared/table_fetch_wrapper/index.tsx deleted file mode 100644 index 8a87ede9b3daa..0000000000000 --- a/x-pack/plugins/apm/public/components/shared/table_fetch_wrapper/index.tsx +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { ReactNode } from 'react'; -import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { ErrorStatePrompt } from '../ErrorStatePrompt'; - -export function TableFetchWrapper({ - status, - children, -}: { - status: FETCH_STATUS; - children: ReactNode; -}) { - if (status === FETCH_STATUS.FAILURE) { - return ; - } - - return <>{children}; -} diff --git a/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx b/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx index 08fc9e54c1444..60612b581e1d4 100644 --- a/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/transactions_table/index.tsx @@ -23,7 +23,6 @@ import { useApmServiceContext } from '../../../context/apm_service/use_apm_servi import { useUrlParams } from '../../../context/url_params_context/use_url_params'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { TransactionOverviewLink } from '../Links/apm/transaction_overview_link'; -import { TableFetchWrapper } from '../table_fetch_wrapper'; import { getTimeRangeComparison } from '../time_comparison/get_time_range_comparison'; import { OverviewTableContainer } from '../overview_table_container'; import { getColumns } from './get_columns'; @@ -302,47 +301,52 @@ export function TransactionsTable({ )} - - + - { - setTableOptions({ - pageIndex: newTableOptions.page?.index ?? 0, - sort: newTableOptions.sort - ? { - field: newTableOptions.sort.field as SortField, - direction: newTableOptions.sort.direction, - } - : DEFAULT_SORT, - }); - }} - /> - - + loading={isLoading} + error={ + status === FETCH_STATUS.FAILURE + ? i18n.translate('xpack.apm.transactionsTable.errorMessage', { + defaultMessage: 'Failed to fetch', + }) + : '' + } + items={transactionGroups} + columns={columns} + pagination={pagination} + sorting={{ sort: { field, direction } }} + onChange={(newTableOptions: { + page?: { + index: number; + }; + sort?: { field: string; direction: SortDirection }; + }) => { + setTableOptions({ + pageIndex: newTableOptions.page?.index ?? 0, + sort: newTableOptions.sort + ? { + field: newTableOptions.sort.field as SortField, + direction: newTableOptions.sort.direction, + } + : DEFAULT_SORT, + }); + }} + /> + diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/fields/event_outcome.ts b/x-pack/plugins/apm/typings/es_schemas/raw/fields/event_outcome.ts new file mode 100644 index 0000000000000..d0ca41fcba4ed --- /dev/null +++ b/x-pack/plugins/apm/typings/es_schemas/raw/fields/event_outcome.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export type EventOutcome = 'success' | 'failure' | 'unknown'; diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts b/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts index 1de497f2c7cd7..01bc0ed52ecae 100644 --- a/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts +++ b/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts @@ -6,6 +6,7 @@ */ import { APMBaseDoc } from './apm_base_doc'; +import { EventOutcome } from './fields/event_outcome'; import { Stackframe } from './fields/stackframe'; import { TimestampUs } from './fields/timestamp_us'; @@ -17,7 +18,7 @@ interface Processor { export interface SpanRaw extends APMBaseDoc { processor: Processor; trace: { id: string }; // trace is required - event?: { outcome?: 'success' | 'failure' }; + event?: { outcome?: EventOutcome }; service: { name: string; environment?: string; diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/transaction_raw.ts b/x-pack/plugins/apm/typings/es_schemas/raw/transaction_raw.ts index d6154d7ad4d23..34c391134b604 100644 --- a/x-pack/plugins/apm/typings/es_schemas/raw/transaction_raw.ts +++ b/x-pack/plugins/apm/typings/es_schemas/raw/transaction_raw.ts @@ -8,6 +8,7 @@ import { APMBaseDoc } from './apm_base_doc'; import { Cloud } from './fields/cloud'; import { Container } from './fields/container'; +import { EventOutcome } from './fields/event_outcome'; import { Host } from './fields/host'; import { Http } from './fields/http'; import { Kubernetes } from './fields/kubernetes'; @@ -28,7 +29,7 @@ export interface TransactionRaw extends APMBaseDoc { processor: Processor; timestamp: TimestampUs; trace: { id: string }; // trace is required - event?: { outcome?: 'success' | 'failure' }; + event?: { outcome?: EventOutcome }; transaction: { duration: { us: number }; id: string; diff --git a/x-pack/plugins/cloud/public/fullstory.ts b/x-pack/plugins/cloud/public/fullstory.ts index 25d5320a063bd..4f76abf540cae 100644 --- a/x-pack/plugins/cloud/public/fullstory.ts +++ b/x-pack/plugins/cloud/public/fullstory.ts @@ -14,8 +14,11 @@ export interface FullStoryDeps { packageInfo: PackageInfo; } +export type FullstoryUserVars = Record; + export interface FullStoryApi { - identify(userId: string, userVars?: Record): void; + identify(userId: string, userVars?: FullstoryUserVars): void; + setUserVars(userVars?: FullstoryUserVars): void; event(eventName: string, eventProperties: Record): void; } diff --git a/x-pack/plugins/cloud/public/plugin.test.mocks.ts b/x-pack/plugins/cloud/public/plugin.test.mocks.ts index 4eb206d07bf85..b79fb1bc65130 100644 --- a/x-pack/plugins/cloud/public/plugin.test.mocks.ts +++ b/x-pack/plugins/cloud/public/plugin.test.mocks.ts @@ -10,6 +10,7 @@ import type { FullStoryDeps, FullStoryApi, FullStoryService } from './fullstory' export const fullStoryApiMock: jest.Mocked = { event: jest.fn(), + setUserVars: jest.fn(), identify: jest.fn(), }; export const initializeFullStoryMock = jest.fn(() => ({ diff --git a/x-pack/plugins/cloud/public/plugin.test.ts b/x-pack/plugins/cloud/public/plugin.test.ts index 835a52cb814c8..f3d5bd902c6d7 100644 --- a/x-pack/plugins/cloud/public/plugin.test.ts +++ b/x-pack/plugins/cloud/public/plugin.test.ts @@ -11,6 +11,7 @@ import { homePluginMock } from 'src/plugins/home/public/mocks'; import { securityMock } from '../../security/public/mocks'; import { fullStoryApiMock, initializeFullStoryMock } from './plugin.test.mocks'; import { CloudPlugin, CloudConfigType, loadFullStoryUserId } from './plugin'; +import { Observable, Subject } from 'rxjs'; describe('Cloud Plugin', () => { describe('#setup', () => { @@ -23,10 +24,12 @@ describe('Cloud Plugin', () => { config = {}, securityEnabled = true, currentUserProps = {}, + currentAppId$ = undefined, }: { config?: Partial; securityEnabled?: boolean; currentUserProps?: Record; + currentAppId$?: Observable; }) => { const initContext = coreMock.createPluginInitializerContext({ id: 'cloudId', @@ -39,9 +42,15 @@ describe('Cloud Plugin', () => { }, ...config, }); + const plugin = new CloudPlugin(initContext); const coreSetup = coreMock.createSetup(); + const coreStart = coreMock.createStart(); + if (currentAppId$) { + coreStart.application.currentAppId$ = currentAppId$; + } + coreSetup.getStartServices.mockResolvedValue([coreStart, {}, undefined]); const securitySetup = securityMock.createSetup(); securitySetup.authc.getCurrentUser.mockResolvedValue( securityMock.createMockAuthenticatedUser(currentUserProps) @@ -78,10 +87,46 @@ describe('Cloud Plugin', () => { }); expect(fullStoryApiMock.identify).toHaveBeenCalledWith( - '03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4' + '03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4', + { + version_str: 'version', + version_major_int: -1, + version_minor_int: -1, + version_patch_int: -1, + } ); }); + it('calls FS.setUserVars everytime an app changes', async () => { + const currentAppId$ = new Subject(); + const { plugin } = await setupPlugin({ + config: { full_story: { enabled: true, org_id: 'foo' } }, + currentUserProps: { + username: '1234', + }, + currentAppId$, + }); + + expect(fullStoryApiMock.setUserVars).not.toHaveBeenCalled(); + currentAppId$.next('App1'); + expect(fullStoryApiMock.setUserVars).toHaveBeenCalledWith({ + app_id_str: 'App1', + }); + currentAppId$.next(); + expect(fullStoryApiMock.setUserVars).toHaveBeenCalledWith({ + app_id_str: 'unknown', + }); + + currentAppId$.next('App2'); + expect(fullStoryApiMock.setUserVars).toHaveBeenCalledWith({ + app_id_str: 'App2', + }); + + expect(currentAppId$.observers.length).toBe(1); + plugin.stop(); + expect(currentAppId$.observers.length).toBe(0); + }); + it('does not call FS.identify when security is not available', async () => { await setupPlugin({ config: { full_story: { enabled: true, org_id: 'foo' } }, diff --git a/x-pack/plugins/cloud/public/plugin.ts b/x-pack/plugins/cloud/public/plugin.ts index 29befcee397dd..6053f2eb5b8c3 100644 --- a/x-pack/plugins/cloud/public/plugin.ts +++ b/x-pack/plugins/cloud/public/plugin.ts @@ -12,8 +12,10 @@ import { PluginInitializerContext, HttpStart, IBasePath, + ApplicationStart, } from 'src/core/public'; import { i18n } from '@kbn/i18n'; +import { Subscription } from 'rxjs'; import type { AuthenticatedUser, SecurityPluginSetup, @@ -58,9 +60,15 @@ export interface CloudSetup { isCloudEnabled: boolean; } +interface SetupFullstoryDeps extends CloudSetupDependencies { + application?: Promise; + basePath: IBasePath; +} + export class CloudPlugin implements Plugin { private config!: CloudConfigType; private isCloudEnabled: boolean; + private appSubscription?: Subscription; constructor(private readonly initializerContext: PluginInitializerContext) { this.config = this.initializerContext.config.get(); @@ -68,7 +76,10 @@ export class CloudPlugin implements Plugin { } public setup(core: CoreSetup, { home, security }: CloudSetupDependencies) { - this.setupFullstory({ basePath: core.http.basePath, security }).catch((e) => + const application = core.getStartServices().then(([coreStart]) => { + return coreStart.application; + }); + this.setupFullstory({ basePath: core.http.basePath, security, application }).catch((e) => // eslint-disable-next-line no-console console.debug(`Error setting up FullStory: ${e.toString()}`) ); @@ -138,6 +149,10 @@ export class CloudPlugin implements Plugin { .catch(() => setLinks(true)); } + public stop() { + this.appSubscription?.unsubscribe(); + } + /** * Determines if the current user should see links back to Cloud. * This isn't a true authorization check, but rather a heuristic to @@ -164,10 +179,7 @@ export class CloudPlugin implements Plugin { return user?.roles.includes('superuser') ?? true; } - private async setupFullstory({ - basePath, - security, - }: CloudSetupDependencies & { basePath: IBasePath }) { + private async setupFullstory({ basePath, security, application }: SetupFullstoryDeps) { const { enabled, org_id: orgId } = this.config.full_story; if (!enabled || !orgId) { return; // do not load any fullstory code in the browser if not enabled @@ -198,7 +210,35 @@ export class CloudPlugin implements Plugin { if (userId) { // Do the hashing here to keep it at clear as possible in our source code that we do not send literal user IDs const hashedId = sha256(userId.toString()); - fullStory.identify(hashedId); + application + ?.then(async () => { + const appStart = await application; + this.appSubscription = appStart.currentAppId$.subscribe((appId) => { + // Update the current application every time it changes + fullStory.setUserVars({ + app_id_str: appId ?? 'unknown', + }); + }); + }) + .catch((e) => { + // eslint-disable-next-line no-console + console.error( + `[cloud.full_story] Could not retrieve application service due to error: ${e.toString()}`, + e + ); + }); + const kibanaVer = this.initializerContext.env.packageInfo.version; + // TODO: use semver instead + const parsedVer = (kibanaVer.indexOf('.') > -1 ? kibanaVer.split('.') : []).map((s) => + parseInt(s, 10) + ); + // `str` suffix is required for evn vars, see docs: https://help.fullstory.com/hc/en-us/articles/360020623234 + fullStory.identify(hashedId, { + version_str: kibanaVer, + version_major_int: parsedVer[0] ?? -1, + version_minor_int: parsedVer[1] ?? -1, + version_patch_int: parsedVer[2] ?? -1, + }); } } catch (e) { // eslint-disable-next-line no-console diff --git a/x-pack/plugins/enterprise_search/README.md b/x-pack/plugins/enterprise_search/README.md index 5c8d767de3099..64855dc1395ab 100644 --- a/x-pack/plugins/enterprise_search/README.md +++ b/x-pack/plugins/enterprise_search/README.md @@ -2,9 +2,7 @@ ## Overview -This plugin provides beta Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. - -> :warning: The Kibana interface for Enterprise Search is a beta feature. It is subject to change and is not covered by the same level of support as generally available features. This interface will become the sole management panel for Enterprise Search with the 8.0 release. Until then, the standalone Enterprise Search UI remains available and supported. +This plugin provides Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. ### App Search diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx index 282c7ca5721cb..3fbae0a564c17 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx @@ -13,7 +13,6 @@ import { EuiEmptyPrompt, EuiCode } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { KibanaLogic } from '../kibana'; -import { BetaNotification } from '../layout/beta'; import { EuiButtonTo } from '../react_router_helpers'; import './error_state_prompt.scss'; @@ -100,7 +99,6 @@ export const ErrorStatePrompt: React.FC = () => { defaultMessage="Review setup guide" /> , - , ]} /> ); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.scss b/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.scss deleted file mode 100644 index adf2dc16d8327..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -@include euiBreakpoint('m', 'l', 'xl') { - .betaSidebarNotification { - .euiSideNav { - display: flex; - flex-direction: column; - - .euiSideNav__content { - flex-grow: 1; - display: flex; - flex-direction: column; - justify-content: space-between; - } - } - } -} - -.betaNotification { - width: 350px; -} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.test.tsx deleted file mode 100644 index b8b6f6c257b22..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.test.tsx +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import '../../__mocks__/enterprise_search_url.mock'; - -import React from 'react'; - -import { shallow, ShallowWrapper } from 'enzyme'; - -import { EuiPopover, EuiPopoverTitle, EuiLink } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/react'; - -import { shallowWithIntl } from '../../test_helpers'; - -import { BetaNotification, appendBetaNotificationItem } from './beta'; - -describe('BetaNotification', () => { - const getToggleButton = (wrapper: ShallowWrapper) => { - return shallow(
{wrapper.prop('button')}
).childAt(0); - }; - - it('renders', () => { - const wrapper = shallow(); - - expect(wrapper.type()).toEqual(EuiPopover); - expect(wrapper.find(EuiPopoverTitle).prop('children')).toEqual( - 'Enterprise Search in Kibana is a beta user interface' - ); - }); - - describe('open/close popover state', () => { - const wrapper = shallow(); - - it('is initially closed', () => { - expect(wrapper.find(EuiPopover).prop('isOpen')).toBe(false); - }); - - it('opens the popover when the toggle button is pressed', () => { - getToggleButton(wrapper).simulate('click'); - - expect(wrapper.find(EuiPopover).prop('isOpen')).toBe(true); - }); - - it('closes the popover', () => { - wrapper.prop('closePopover')(); - - expect(wrapper.find(EuiPopover).prop('isOpen')).toBe(false); - }); - }); - - describe('toggle button props', () => { - it('defaults to a size of xs and flush', () => { - const wrapper = shallow(); - const toggleButton = getToggleButton(wrapper); - - expect(toggleButton.prop('size')).toEqual('xs'); - expect(toggleButton.prop('flush')).toEqual('both'); - }); - - it('passes down custom button props', () => { - const wrapper = shallow(); - const toggleButton = getToggleButton(wrapper); - - expect(toggleButton.prop('size')).toEqual('m'); - }); - }); - - describe('links', () => { - const wrapper = shallowWithIntl(); - const links = wrapper.find(FormattedMessage).dive(); - - it('renders a documentation link', () => { - const docLink = links.find(EuiLink).first(); - - expect(docLink.prop('href')).toContain('/user-interfaces.html'); - }); - - it('renders a link back to the standalone UI', () => { - const switchLink = links.find(EuiLink).last(); - - expect(switchLink.prop('href')).toBe('http://localhost:3002'); - }); - }); -}); - -describe('appendBetaNotificationItem', () => { - const mockSideNav = { - name: 'Hello world', - items: [ - { id: '1', name: 'Link 1' }, - { id: '2', name: 'Link 2' }, - ], - }; - - it('inserts a beta notification into a side nav items array', () => { - appendBetaNotificationItem(mockSideNav); - - expect(mockSideNav).toEqual({ - name: 'Hello world', - items: [ - { id: '1', name: 'Link 1' }, - { id: '2', name: 'Link 2' }, - { - id: 'beta', - name: '', - renderItem: expect.any(Function), - }, - ], - }); - }); - - it('renders the BetaNotification component as a side nav item', () => { - const SideNavItem = (mockSideNav.items[2] as any).renderItem; - const wrapper = shallow(); - - expect(wrapper.find(BetaNotification)).toHaveLength(1); - }); - - it('does nothing if no side nav was passed', () => { - const mockEmptySideNav = undefined; - appendBetaNotificationItem(mockEmptySideNav); - - expect(mockEmptySideNav).toEqual(undefined); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.tsx deleted file mode 100644 index 1f4c8328cc874..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/beta.tsx +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState } from 'react'; - -import { - EuiPopover, - EuiPopoverTitle, - EuiPopoverFooter, - EuiButtonEmpty, - EuiButtonEmptyProps, - EuiText, - EuiLink, -} from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; - -import { KibanaPageTemplateProps } from '../../../../../../../src/plugins/kibana_react/public'; - -import { docLinks } from '../doc_links'; -import { getEnterpriseSearchUrl } from '../enterprise_search_url'; - -import './beta.scss'; - -interface Props { - buttonProps?: EuiButtonEmptyProps; -} - -export const BetaNotification: React.FC = ({ buttonProps }) => { - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const togglePopover = () => setIsPopoverOpen((isOpen) => !isOpen); - const closePopover = () => setIsPopoverOpen(false); - - return ( - - {i18n.translate('xpack.enterpriseSearch.beta.buttonLabel', { - defaultMessage: 'This is a beta user interface', - })} - - } - isOpen={isPopoverOpen} - closePopover={closePopover} - anchorPosition="rightDown" - repositionOnScroll - > - - {i18n.translate('xpack.enterpriseSearch.beta.popover.title', { - defaultMessage: 'Enterprise Search in Kibana is a beta user interface', - })} - -
- -

- {i18n.translate('xpack.enterpriseSearch.beta.popover.description', { - defaultMessage: - 'The Kibana interface for Enterprise Search is a beta feature. It is subject to change and is not covered by the same level of support as generally available features. This interface will become the sole management panel for Enterprise Search with the 8.0 release. Until then, the standalone Enterprise Search UI remains available and supported.', - })} -

-
-
- - - Learn more - - ), - standaloneUILink: ( - switch to the Enterprise Search UI - ), - }} - /> - -
- ); -}; - -export const appendBetaNotificationItem = (sideNav: KibanaPageTemplateProps['solutionNav']) => { - if (sideNav) { - sideNav.items.push({ - id: 'beta', - name: '', - renderItem: () => , - }); - } -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.test.tsx index bc612de884f8b..5b02756e44b52 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.test.tsx @@ -7,8 +7,6 @@ import { setMockValues } from '../../__mocks__/kea_logic'; -jest.mock('./beta', () => ({ appendBetaNotificationItem: jest.fn() })); // Mostly adding this to get tests passing. Should be removed once we're out of beta - import React from 'react'; import { shallow } from 'enzyme'; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx index 202c9b6a59e8d..affec11921545 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx @@ -23,8 +23,6 @@ import { HttpLogic } from '../http'; import { BreadcrumbTrail } from '../kibana_chrome/generate_breadcrumbs'; import { Loading } from '../loading'; -import { appendBetaNotificationItem } from './beta'; - import './page_template.scss'; /* @@ -63,8 +61,6 @@ export const EnterpriseSearchPageTemplate: React.FC = ({ const hasCustomEmptyState = !!emptyState; const showCustomEmptyState = hasCustomEmptyState && isEmptyState; - appendBetaNotificationItem(solutionNav); - return ( = ({ }} isEmptyState={isEmptyState && !isLoading} solutionNav={solutionNav ? { icon: 'logoEnterpriseSearch', ...solutionNav } : undefined} - pageSideBarProps={{ className: 'betaSidebarNotification' }} > {setPageChrome} {readOnlyMode && ( diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/credential_item/credential_item.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/credential_item/credential_item.tsx index 61eaa4e42f8dd..e4067e1f98e5d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/credential_item/credential_item.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/credential_item/credential_item.tsx @@ -19,6 +19,21 @@ import { EuiFieldPassword, EuiToolTip, } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +export const COPY_TOOLTIP = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.credentialItem.copy.tooltip', + { + defaultMessage: 'Copy to clipboard', + } +); + +export const COPIED_TOOLTIP = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.credentialItem.copied.tooltip', + { + defaultMessage: 'Copied!', + } +); interface CredentialItemProps { label: string; @@ -37,6 +52,14 @@ export const CredentialItem: React.FC = ({ }) => { const [isVisible, setIsVisible] = useState(false); + const SHOW_CREDENTIAL_TOOLTIP = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.credentialItem.show.tooltip', + { + defaultMessage: 'Show {credential}.', + values: { credential: label }, + } + ); + return ( = ({ {!hideCopy && ( - + {(copy) => ( = ({ )} - + setIsVisible(!isVisible)} iconType={isVisible ? 'eyeClosed' : 'eye'} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/license_callout/license_callout.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/license_callout/license_callout.tsx index f278cda96ae83..270daf195bd38 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/license_callout/license_callout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/license_callout/license_callout.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { EuiLink, EuiFlexItem, EuiFlexGroup, EuiText } from '@elastic/eui'; +import { EXPLORE_PLATINUM_FEATURES_LINK } from '../../../constants'; import { ENT_SEARCH_LICENSE_MANAGEMENT } from '../../../routes'; interface LicenseCalloutProps { @@ -20,7 +21,7 @@ export const LicenseCallout: React.FC = ({ message }) => { <> {message}{' '} - Explore Platinum features + {EXPLORE_PLATINUM_FEATURES_LINK} ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts index d4fa2059f62fb..3666a794617ac 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/constants.ts @@ -583,8 +583,8 @@ export const NON_PLATINUM_OAUTH_DESCRIPTION = i18n.translate( } ); -export const NON_PLATINUM_OAUTH_LINK = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthLinkLabel', +export const EXPLORE_PLATINUM_FEATURES_LINK = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.explorePlatinumFeatures.link', { defaultMessage: 'Explore Platinum features', } @@ -734,6 +734,10 @@ export const FIELD_LABEL = i18n.translate('xpack.enterpriseSearch.workplaceSearc defaultMessage: 'Field', }); +export const LABEL_LABEL = i18n.translate('xpack.enterpriseSearch.workplaceSearch.label.label', { + defaultMessage: 'Label', +}); + export const DESCRIPTION_LABEL = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.description.label', { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/config_completed.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/config_completed.tsx index 965d71abd5101..18e147100a410 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/config_completed.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/config_completed.tsx @@ -30,6 +30,7 @@ import { } from '../../../../routes'; import { + CONFIG_COMPLETED_PRIVATE_SOURCES_DISABLED_LINK, CONFIG_COMPLETED_PRIVATE_SOURCES_DOCS_LINK, CONFIG_COMPLETED_CONFIGURE_NEW_BUTTON, } from './constants'; @@ -114,7 +115,7 @@ export const ConfigCompleted: React.FC = ({ values={{ securityLink: ( - enable private source connection + {CONFIG_COMPLETED_PRIVATE_SOURCES_DISABLED_LINK} ), }} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configuration_intro.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configuration_intro.tsx index d17e8b84efb2b..15941f14d5ab1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configuration_intro.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configuration_intro.tsx @@ -28,6 +28,7 @@ import { CONFIG_INTRO_STEPS_TEXT, CONFIG_INTRO_STEP1_HEADING, CONFIG_INTRO_STEP1_TEXT, + CONFIG_INTRO_STEP1_BADGE, CONFIG_INTRO_STEP2_HEADING, CONFIG_INTRO_STEP2_TITLE, CONFIG_INTRO_STEP2_TEXT, @@ -108,7 +109,9 @@ export const ConfigurationIntro: React.FC = ({ id="xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.step1.title" defaultMessage="Configure an OAuth application {badge}" values={{ - badge: One-Time Action, + badge: ( + {CONFIG_INTRO_STEP1_BADGE} + ), }} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configure_custom.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configure_custom.tsx index b142ddcf4937e..1529875e66af5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configure_custom.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/configure_custom.tsx @@ -22,8 +22,10 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { CUSTOM_SOURCE_DOCS_URL } from '../../../../routes'; +import { SOURCE_NAME_LABEL } from '../../constants'; + import { AddSourceLogic } from './add_source_logic'; -import { CONFIG_CUSTOM_BUTTON } from './constants'; +import { CONFIG_CUSTOM_BUTTON, CONFIG_CUSTOM_LINK_TEXT } from './constants'; interface ConfigureCustomProps { header: React.ReactNode; @@ -57,12 +59,12 @@ export const ConfigureCustom: React.FC = ({

{helpText}

- Read the documentation + {CONFIG_CUSTOM_LINK_TEXT} ), }} @@ -70,7 +72,7 @@ export const ConfigureCustom: React.FC = ({

- + = ({ - {SOURCE_FEATURES_EXPLORE_BUTTON} + {EXPLORE_PLATINUM_FEATURES_LINK} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts index 2bf185ee048bd..a2e6de8d9c7f5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/constants.ts @@ -101,6 +101,13 @@ export const AVAILABLE_SOURCE_CUSTOM_SOURCE_BUTTON = i18n.translate( } ); +export const CONFIG_COMPLETED_PRIVATE_SOURCES_DISABLED_LINK = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.link', + { + defaultMessage: 'enable private source connection', + } +); + export const CONFIG_COMPLETED_PRIVATE_SOURCES_DOCS_LINK = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.button', { @@ -136,6 +143,13 @@ export const CONFIG_INTRO_STEP1_HEADING = i18n.translate( } ); +export const CONFIG_INTRO_STEP1_BADGE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.step1.badge', + { + defaultMessage: 'One-Time Action', + } +); + export const CONFIG_INTRO_STEP1_TEXT = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.step1.text', { @@ -173,6 +187,13 @@ export const CONFIG_CUSTOM_BUTTON = i18n.translate( } ); +export const CONFIG_CUSTOM_LINK_TEXT = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.configCustom.docs.link.text', + { + defaultMessage: 'Read the documentation', + } +); + export const CONFIG_OAUTH_LABEL = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.configOauth.label', { @@ -293,6 +314,13 @@ export const SAVE_CUSTOM_VISUAL_WALKTHROUGH_TITLE = i18n.translate( } ); +export const SAVE_CUSTOM_VISUAL_WALKTHROUGH_LINK = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.visualWalkthrough.link', + { + defaultMessage: 'Check out the documentation', + } +); + export const SAVE_CUSTOM_STYLING_RESULTS_TITLE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.stylingResults.title', { @@ -300,6 +328,13 @@ export const SAVE_CUSTOM_STYLING_RESULTS_TITLE = i18n.translate( } ); +export const SAVE_CUSTOM_STYLING_RESULTS_LINK = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.stylingResults.link', + { + defaultMessage: 'Display Settings', + } +); + export const SAVE_CUSTOM_DOC_PERMISSIONS_TITLE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.docPermissions.title', { @@ -307,6 +342,13 @@ export const SAVE_CUSTOM_DOC_PERMISSIONS_TITLE = i18n.translate( } ); +export const SAVE_CUSTOM_DOC_PERMISSIONS_LINK = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.saveCustom.docPermissions.link', + { + defaultMessage: 'Document-level permissions', + } +); + export const INCLUDED_FEATURES_TITLE = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.includedFeaturesTitle', { @@ -314,31 +356,80 @@ export const INCLUDED_FEATURES_TITLE = i18n.translate( } ); -export const SOURCE_FEATURES_SEARCHABLE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.searchable.text', +export const SOURCE_FEATURES_SYNC_FREQUENCY_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.syncFrequency.title', + { + defaultMessage: 'Syncs every 2 hours', + } +); + +export const SOURCE_FEATURES_SYNC_FREQUENCY_TIME = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.syncFrequency.time', + { + defaultMessage: '2 hours', + } +); + +export const SOURCE_FEATURES_SYNCED_ITEMS_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.syncedItems.title', + { + defaultMessage: 'Synced items', + } +); + +export const SOURCE_FEATURES_SEARCHABLE_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.searchable.title', + { + defaultMessage: 'Searchable content', + } +); + +export const SOURCE_FEATURES_SEARCHABLE_DESCRIPTION = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.searchable.description', { defaultMessage: 'The following items are searchable:', } ); -export const SOURCE_FEATURES_REMOTE_FEATURE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.remote.text', +export const SOURCE_FEATURES_REMOTE_FEATURE_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.remote.title', + { + defaultMessage: 'Always up-to-date', + } +); + +export const SOURCE_FEATURES_REMOTE_FEATURE_DESCRIPTION = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.remote.description', { defaultMessage: 'Message data and other information is searchable in real-time from the Workplace Search experience.', } ); -export const SOURCE_FEATURES_PRIVATE_FEATURE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.private.text', +export const SOURCE_FEATURES_PRIVATE_FEATURE_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.private.title', + { + defaultMessage: 'Always private', + } +); + +export const SOURCE_FEATURES_PRIVATE_FEATURE_DESCRIPTION = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.private.description', { defaultMessage: 'Results returned are specific and relevant to you. Connecting this source does not expose your personal data to other search users - only you.', } ); -export const SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.globalAccessPermissions.text', +export const SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE_TITLE = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.globalAccessPermissions.title', + { + defaultMessage: 'Global access permissions', + } +); + +export const SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE_DESCRIPTION = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.globalAccessPermissions.description', { defaultMessage: 'All documents accessible to the connecting service user will be synchronized and made available to the organization’s users, or group’s users. Documents are immediately available for search', @@ -360,12 +451,6 @@ export const SOURCE_FEATURES_DOCUMENT_LEVEL_PERMISSIONS_FEATURE = i18n.translate } ); -export const SOURCE_FEATURES_EXPLORE_BUTTON = i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.explore.button', - { - defaultMessage: 'Explore Platinum features', - } -); export const CONNECT_WHICH_OPTION_LINK = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSource.connect.whichOption.link', { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx index bbece2f68c717..dbec5d1808167 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/save_custom.tsx @@ -46,8 +46,11 @@ import { SAVE_CUSTOM_API_KEYS_TITLE, SAVE_CUSTOM_API_KEYS_BODY, SAVE_CUSTOM_VISUAL_WALKTHROUGH_TITLE, + SAVE_CUSTOM_VISUAL_WALKTHROUGH_LINK, SAVE_CUSTOM_STYLING_RESULTS_TITLE, + SAVE_CUSTOM_STYLING_RESULTS_LINK, SAVE_CUSTOM_DOC_PERMISSIONS_TITLE, + SAVE_CUSTOM_DOC_PERMISSIONS_LINK, } from './constants'; interface SaveCustomProps { @@ -140,7 +143,7 @@ export const SaveCustom: React.FC = ({ values={{ link: ( - Check out the documentation + {SAVE_CUSTOM_VISUAL_WALKTHROUGH_LINK} ), }} @@ -168,7 +171,7 @@ export const SaveCustom: React.FC = ({ isOrganization )} > - Display Settings + {SAVE_CUSTOM_STYLING_RESULTS_LINK} ), }} @@ -193,7 +196,7 @@ export const SaveCustom: React.FC = ({ values={{ link: ( - Document-level permissions + {SAVE_CUSTOM_DOC_PERMISSIONS_LINK} ), }} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/source_features.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/source_features.tsx index 02856320aa535..940cb9cb7372a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/source_features.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/source_features.tsx @@ -26,10 +26,17 @@ import { Features, FeatureIds } from '../../../../types'; import { INCLUDED_FEATURES_TITLE, - SOURCE_FEATURES_SEARCHABLE, - SOURCE_FEATURES_REMOTE_FEATURE, - SOURCE_FEATURES_PRIVATE_FEATURE, - SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE, + SOURCE_FEATURES_SYNC_FREQUENCY_TITLE, + SOURCE_FEATURES_SYNC_FREQUENCY_TIME, + SOURCE_FEATURES_SYNCED_ITEMS_TITLE, + SOURCE_FEATURES_SEARCHABLE_TITLE, + SOURCE_FEATURES_SEARCHABLE_DESCRIPTION, + SOURCE_FEATURES_REMOTE_FEATURE_TITLE, + SOURCE_FEATURES_REMOTE_FEATURE_DESCRIPTION, + SOURCE_FEATURES_PRIVATE_FEATURE_TITLE, + SOURCE_FEATURES_PRIVATE_FEATURE_DESCRIPTION, + SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE_TITLE, + SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE_DESCRIPTION, } from './constants'; interface ConnectInstanceProps { @@ -76,7 +83,7 @@ export const SourceFeatures: React.FC = ({ features, objTy }; const SyncFrequencyFeature = ( - +

= ({ features, objTy defaultMessage="This source gets new content from {name} every {duration} (following the initial sync)." values={{ name, - duration: 2 hours, + duration: {SOURCE_FEATURES_SYNC_FREQUENCY_TIME}, }} />

@@ -93,10 +100,10 @@ export const SourceFeatures: React.FC = ({ features, objTy ); const SyncedItemsFeature = ( - + <> -

{SOURCE_FEATURES_SEARCHABLE}

+

{SOURCE_FEATURES_SEARCHABLE_DESCRIPTION}

@@ -111,10 +118,10 @@ export const SourceFeatures: React.FC = ({ features, objTy ); const SearchableContentFeature = ( - + -

{SOURCE_FEATURES_SEARCHABLE}

+

{SOURCE_FEATURES_SEARCHABLE_DESCRIPTION}

    @@ -127,25 +134,25 @@ export const SourceFeatures: React.FC = ({ features, objTy ); const RemoteFeature = ( - + -

    {SOURCE_FEATURES_REMOTE_FEATURE}

    +

    {SOURCE_FEATURES_REMOTE_FEATURE_DESCRIPTION}

    ); const PrivateFeature = ( - + -

    {SOURCE_FEATURES_PRIVATE_FEATURE}

    +

    {SOURCE_FEATURES_PRIVATE_FEATURE_DESCRIPTION}

    ); const GlobalAccessPermissionsFeature = ( - + -

    {SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE}

    +

    {SOURCE_FEATURES_GLOBAL_ACCESS_PERMISSIONS_FEATURE_DESCRIPTION}

    ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts index d6ee25da6e2b1..bd86eb31005af 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts @@ -80,6 +80,55 @@ export const TITLE_LABEL = i18n.translate( } ); +export const URL_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.url.label', + { + defaultMessage: 'URL', + } +); + +export const COLOR_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.color.label', + { + defaultMessage: 'Color', + } +); + +export const TYPE_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.type.label', + { + defaultMessage: 'Type', + } +); + +export const MEDIA_TYPE_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.mediaType.label', + { + defaultMessage: 'Media Type', + } +); + +export const CREATED_BY_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.createdBy.label', + { + defaultMessage: 'Created By', + } +); + +export const UPDATED_BY_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.updatedBy.label', + { + defaultMessage: 'Updated By', + } +); + +export const OPTIONAL_AREA_TEXT = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.optionalArea.text', + { + defaultMessage: 'This area is optional', + } +); + export const EMPTY_FIELDS_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.emptyFields.description', { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/field_editor_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/field_editor_modal.tsx index 717eebf5cf873..132adedb829ac 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/field_editor_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/field_editor_modal.tsx @@ -23,7 +23,13 @@ import { EuiSelect, } from '@elastic/eui'; -import { CANCEL_BUTTON, FIELD_LABEL, UPDATE_LABEL, ADD_LABEL } from '../../../../constants'; +import { + CANCEL_BUTTON, + FIELD_LABEL, + LABEL_LABEL, + UPDATE_LABEL, + ADD_LABEL, +} from '../../../../constants'; import { DisplaySettingsLogic } from './display_settings_logic'; @@ -67,7 +73,7 @@ export const FieldEditorModal: React.FC = () => { - + { onChange={(e) => setName(e.target.value)} /> - + { { onChange={(e) => setTitleField(e.target.value)} /> - + { onChange={(e) => setUrlField(e.target.value)} /> - + { /> { /> { /> { /> {

    {CONTENT_SUMMARY_TITLE}

    - {!summary && } + {!summary && } {!!summary && (totalDocuments === 0 ? ( emptyState diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.tsx index a97cc85cb822a..78d4d36cf0995 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_content.tsx @@ -46,6 +46,8 @@ import { GO_BUTTON, RESET_BUTTON, SOURCE_CONTENT_TITLE, + SEARCH_CONTENT_PLACEHOLDER, + FILTER_CONTENT_PLACEHOLDER, CONTENT_LOADING_TEXT, } from '../constants'; import { SourceLogic } from '../source_logic'; @@ -197,13 +199,9 @@ export const SourceContent: React.FC = () => { = () => { const { closeNewGroupModal, saveNewGroup, setNewGroupName } = useActions(GroupsLogic); @@ -55,7 +61,7 @@ export const AddGroupModal: React.FC<{}> = () => { - + = ({ const { contentSources } = useValues(GroupsLogic); const allSelected = numSelected === allItems.length; - const isSources = label === 'shared content sources'; - const showEmptyState = isSources && contentSources.length < 1; + const showEmptyState = contentSources.length < 1; const handleClose = () => hideModal(group); const handleSelectAll = () => selectAll(allSelected ? [] : allItems); @@ -125,13 +138,7 @@ export const GroupManagerModal: React.FC = ({ - {i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSelectAllToggle', - { - defaultMessage: '{action} All', - values: { action: allSelected ? 'Deselect' : 'Select' }, - } - )} + {allSelected ? ADD_SOURCE_MODAL_DESELECT_BUTTON : ADD_SOURCE_MODAL_SELECT_BUTTON} diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/groups_table.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/groups_table.tsx index 3c44261cc911f..41a1c92107661 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/groups_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/groups_table.tsx @@ -31,6 +31,14 @@ const GROUP_TABLE_HEADER = i18n.translate( defaultMessage: 'Group', } ); + +const GROUPS_PAGINATION_LABEL = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.groups.groupsTable.groupPagination.label', + { + defaultMessage: 'Groups', + } +); + const SOURCES_TABLE_HEADER = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.groups.groupsTable.sourcesTableHeader', { @@ -51,7 +59,7 @@ export const GroupsTable: React.FC<{}> = () => { const clearFiltersLink = hasFiltersSet ? : undefined; const paginationOptions = { - itemLabel: 'Groups', + itemLabel: GROUPS_PAGINATION_LABEL, totalPages, totalItems, activePage, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx index b0cc35fe10dff..b908211b83a43 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_steps.tsx @@ -41,11 +41,31 @@ const USERS_TITLE = i18n.translate( { defaultMessage: 'Users & invitations' } ); +const INVITE_FIRST_USERS_BUTTON = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.overviewOnboardingUsersCard.inviteFirstUsers.button', + { defaultMessage: 'Invite users' } +); + +const INVITE_MORE_USERS_BUTTON = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.overviewOnboardingUsersCard.inviteMoreUsers.button', + { defaultMessage: 'Invite more users' } +); + const ONBOARDING_SOURCES_CARD_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.overviewOnboardingSourcesCard.description', { defaultMessage: 'Add shared sources for your organization to start searching.' } ); +const ADD_FIRST_SOURCES_BUTTON = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.addFirstSources.button', + { defaultMessage: 'Add sources' } +); + +const ADD_MORE_SOURCES_BUTTON = i18n.translate( + 'xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.addMoreSources.button', + { defaultMessage: 'Add more sources' } +); + const USERS_CARD_DESCRIPTION = i18n.translate( 'xpack.enterpriseSearch.workplaceSearch.overviewUsersCard.title', { defaultMessage: 'Nice, you’ve invited colleagues to search with you.' } @@ -82,13 +102,7 @@ export const OnboardingSteps: React.FC = () => { description={ hasOrgSources ? SOURCES_CARD_DESCRIPTION : ONBOARDING_SOURCES_CARD_DESCRIPTION } - actionTitle={i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.buttonLabel', - { - defaultMessage: 'Add {label} sources', - values: { label: sourcesCount > 0 ? 'more' : '' }, - } - )} + actionTitle={sourcesCount > 0 ? ADD_MORE_SOURCES_BUTTON : ADD_FIRST_SOURCES_BUTTON} actionPath={ADD_SOURCE_PATH} complete={hasOrgSources} /> @@ -97,13 +111,7 @@ export const OnboardingSteps: React.FC = () => { testSubj="usersButton" icon="user" description={hasUsers ? USERS_CARD_DESCRIPTION : ONBOARDING_USERS_CARD_DESCRIPTION} - actionTitle={i18n.translate( - 'xpack.enterpriseSearch.workplaceSearch.usersOnboardingCard.buttonLabel', - { - defaultMessage: 'Invite {label} users', - values: { label: accountsCount > 0 ? 'more' : '' }, - } - )} + actionTitle={accountsCount > 0 ? INVITE_MORE_USERS_BUTTON : INVITE_FIRST_USERS_BUTTON} actionPath={USERS_AND_ROLES_PATH} complete={hasUsers} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/settings/components/oauth_application.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/settings/components/oauth_application.tsx index 075d95f726030..b55828f78344c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/settings/components/oauth_application.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/settings/components/oauth_application.tsx @@ -47,7 +47,7 @@ import { SAVE_CHANGES_BUTTON, NON_PLATINUM_OAUTH_TITLE, NON_PLATINUM_OAUTH_DESCRIPTION, - NON_PLATINUM_OAUTH_LINK, + EXPLORE_PLATINUM_FEATURES_LINK, } from '../../../constants'; import { ENT_SEARCH_LICENSE_MANAGEMENT } from '../../../routes'; import { SettingsLogic } from '../settings_logic'; @@ -101,7 +101,7 @@ export const OauthApplication: React.FC = () => { {NON_PLATINUM_OAUTH_DESCRIPTION} - {NON_PLATINUM_OAUTH_LINK} + {EXPLORE_PLATINUM_FEATURES_LINK} ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx index 05692a0ecab8c..61300bac47734 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/setup_guide/setup_guide.tsx @@ -55,7 +55,10 @@ export const SetupGuide: React.FC = () => { - Get started with Workplace Search + diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 4dc67a6771531..c58d064006a2b 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -2410,6 +2410,16 @@ }, "description": { "type": "string" + }, + "monitoring_enabled": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "metrics", + "logs" + ] + } } } }, diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index f2a12c0edb8a6..5a5b9838885ae 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -1513,6 +1513,13 @@ components: type: string description: type: string + monitoring_enabled: + type: array + items: + type: string + enum: + - metrics + - logs new_package_policy: title: New package policy type: object diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml index 06048c81d979a..1184e41c5fded 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/new_agent_policy.yaml @@ -7,3 +7,10 @@ properties: type: string description: type: string + monitoring_enabled: + type: array + items: + type: string + enum: + - metrics + - logs diff --git a/x-pack/plugins/lens/public/pie_visualization/render_function.tsx b/x-pack/plugins/lens/public/pie_visualization/render_function.tsx index 34476f4e3062e..e79066b0145d2 100644 --- a/x-pack/plugins/lens/public/pie_visualization/render_function.tsx +++ b/x-pack/plugins/lens/public/pie_visualization/render_function.tsx @@ -253,7 +253,7 @@ export function PieComponent( { meta: { type: 'number' }, } ) - ).toEqual(-100); + ).toEqual(0); }); - it('returns epsilon when metric is 0 without fallback', () => { + it('returns 0 when metric value is 0', () => { expect( getSliceValue( { a: 'Cat', b: 'Home', c: 0 }, @@ -46,7 +46,20 @@ describe('render helpers', () => { meta: { type: 'number' }, } ) - ).toEqual(Number.EPSILON); + ).toEqual(0); + }); + + it('returns 0 when metric value is infinite', () => { + expect( + getSliceValue( + { a: 'Cat', b: 'Home', c: Number.POSITIVE_INFINITY }, + { + id: 'c', + name: 'C', + meta: { type: 'number' }, + } + ) + ).toEqual(0); }); }); diff --git a/x-pack/plugins/lens/public/pie_visualization/render_helpers.ts b/x-pack/plugins/lens/public/pie_visualization/render_helpers.ts index 4a5587feaf271..d2858efa90153 100644 --- a/x-pack/plugins/lens/public/pie_visualization/render_helpers.ts +++ b/x-pack/plugins/lens/public/pie_visualization/render_helpers.ts @@ -10,10 +10,8 @@ import { Datatable, DatatableColumn } from 'src/plugins/expressions/public'; import { LensFilterEvent } from '../types'; export function getSliceValue(d: Datum, metricColumn: DatatableColumn) { - if (typeof d[metricColumn.id] === 'number' && d[metricColumn.id] !== 0) { - return d[metricColumn.id]; - } - return Number.EPSILON; + const value = d[metricColumn.id]; + return Number.isFinite(value) && value >= 0 ? value : 0; } export function getFilterContext( diff --git a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap index 69307d3d90cab..6326d8680757e 100644 --- a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap +++ b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap @@ -5,6 +5,7 @@ exports[`xy_expression XYChart component it renders area 1`] = ` renderer="canvas" > { }} /> ); - wrapper.find(Settings).first().prop('onBrushEnd')!({ x: [1585757732783, 1585758880838] }); expect(onSelectRange).toHaveBeenCalledWith({ @@ -1075,6 +1074,22 @@ describe('xy_expression', () => { expect(wrapper.find(Settings).first().prop('onBrushEnd')).toBeUndefined(); }); + test('allowBrushingLastHistogramBucket is true for date histogram data', () => { + const { args } = sampleArgs(); + + const wrapper = mountWithIntl( + + ); + expect(wrapper.find(Settings).at(0).prop('allowBrushingLastHistogramBucket')).toEqual(true); + }); + test('onElementClick returns correct context data', () => { const geometry: GeometryValue = { x: 5, y: 1, accessor: 'y1', mark: null, datum: {} }; const series = { @@ -1335,6 +1350,36 @@ describe('xy_expression', () => { }); }); + test('allowBrushingLastHistogramBucket should be fakse for ordinal data', () => { + const { args, data } = sampleArgs(); + + const wrapper = mountWithIntl( + + ); + + expect(wrapper.find(Settings).at(0).prop('allowBrushingLastHistogramBucket')).toEqual(false); + }); + test('onElementClick is not triggering event on non-interactive mode', () => { const { args, data } = sampleArgs(); diff --git a/x-pack/plugins/lens/public/xy_visualization/expression.tsx b/x-pack/plugins/lens/public/xy_visualization/expression.tsx index b7f1a9dabf3c7..026d9da71beea 100644 --- a/x-pack/plugins/lens/public/xy_visualization/expression.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/expression.tsx @@ -516,6 +516,7 @@ export function XYChart({ boundary: document.getElementById('app-fixed-viewport') ?? undefined, headerFormatter: (d) => safeXAccessorLabelRenderer(d.value), }} + allowBrushingLastHistogramBucket={Boolean(isTimeViz)} rotation={shouldRotate ? 90 : 0} xDomain={xDomain} onBrushEnd={interactive ? brushHandler : undefined} diff --git a/x-pack/plugins/monitoring/public/application/hooks/use_charts.tsx b/x-pack/plugins/monitoring/public/application/hooks/use_charts.tsx new file mode 100644 index 0000000000000..25d7f139e5bbe --- /dev/null +++ b/x-pack/plugins/monitoring/public/application/hooks/use_charts.tsx @@ -0,0 +1,81 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import moment from 'moment'; +import { useContext, useState, useEffect, useRef } from 'react'; +import { useHistory } from 'react-router-dom'; +import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; +import { MonitoringTimeContainer } from '../hooks/use_monitoring_time'; + +export function useCharts() { + const { services } = useKibana<{ data: any }>(); + const history = useHistory(); + const { handleTimeChange } = useContext(MonitoringTimeContainer.Context); + + const [zoomInLevel, setZoomInLevel] = useState(0); + + // We need something to know when the onBrush event was fired because the pop state event + // is also fired when the onBrush event is fired (although only on the first onBrush event) and + // causing the zoomInLevel to change. + // In Angular, this was handled by removing the listener before updating the state and adding + // it again after some milliseconds, but the same trick didn't work in React. + const [onBrushHappened, _setOnBrushHappened] = useState(false); + + const onBrushHappenedRef = useRef(onBrushHappened); + + const setOnBrushHappened = (data: boolean) => { + onBrushHappenedRef.current = data; + _setOnBrushHappened(data); + }; + + useEffect(() => { + const popstateHandler = () => { + if (onBrushHappenedRef.current) { + setOnBrushHappened(false); + } else { + setZoomInLevel((currentZoomInLevel) => { + if (currentZoomInLevel > 0) { + return currentZoomInLevel - 1; + } + return 0; + }); + } + }; + + window.addEventListener('popstate', popstateHandler); + return () => window.removeEventListener('popstate', popstateHandler); + }, []); + + const onBrush = ({ xaxis }: any) => { + const { to, from } = xaxis; + const timezone = services.uiSettings?.get('dateFormat:tz'); + const offset = getOffsetInMS(timezone); + const fromTime = moment(from - offset); + const toTime = moment(to - offset); + handleTimeChange(fromTime.toISOString(), toTime.toISOString()); + setOnBrushHappened(true); + setZoomInLevel(zoomInLevel + 1); + }; + + const zoomInfo = { + zoomOutHandler: () => history.goBack(), + showZoomOutBtn: () => zoomInLevel > 0, + }; + + return { + onBrush, + zoomInfo, + }; +} + +const getOffsetInMS = (timezone: string) => { + if (timezone === 'Browser') { + return 0; + } + const offsetInMinutes = moment.tz(timezone).utcOffset(); + const offsetInMS = offsetInMinutes * 1 * 60 * 1000; + return offsetInMS; +}; diff --git a/x-pack/plugins/monitoring/public/application/hooks/use_monitoring_time.ts b/x-pack/plugins/monitoring/public/application/hooks/use_monitoring_time.ts index 8a343a5c61cd6..e512f90d76e69 100644 --- a/x-pack/plugins/monitoring/public/application/hooks/use_monitoring_time.ts +++ b/x-pack/plugins/monitoring/public/application/hooks/use_monitoring_time.ts @@ -4,9 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { useCallback, useState } from 'react'; +import { useCallback, useState, useContext } from 'react'; import createContainer from 'constate'; import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; +import { Legacy } from '../../legacy_shims'; +import { GlobalStateContext } from '../../application/global_state_context'; interface TimeOptions { from: string; @@ -25,6 +27,8 @@ const DEFAULT_REFRESH_INTERVAL_PAUSE = false; export const useMonitoringTime = () => { const { services } = useKibana<{ data: any }>(); + const state = useContext(GlobalStateContext); + const defaultTimeRange = { ...DEFAULT_TIMERANGE, ...services.data?.query.timefilter.timefilter.getTime(), @@ -39,8 +43,14 @@ export const useMonitoringTime = () => { const handleTimeChange = useCallback( (start: string, end: string) => { setTimeRange({ ...currentTimerange, from: start, to: end }); + state.time = { + from: start, + to: end, + }; + Legacy.shims.timefilter.setTime(state.time); + state.save?.(); }, - [currentTimerange, setTimeRange] + [currentTimerange, setTimeRange, state] ); return { diff --git a/x-pack/plugins/monitoring/public/application/index.tsx b/x-pack/plugins/monitoring/public/application/index.tsx index 8d6c718d77ebb..6db9343035237 100644 --- a/x-pack/plugins/monitoring/public/application/index.tsx +++ b/x-pack/plugins/monitoring/public/application/index.tsx @@ -18,6 +18,8 @@ import { GlobalStateProvider } from './global_state_context'; import { ExternalConfigContext, ExternalConfig } from './external_config_context'; import { createPreserveQueryHistory } from './preserve_query_history'; import { RouteInit } from './route_init'; +import { ElasticsearchOverviewPage } from './pages/elasticsearch/overview'; +import { CODE_PATH_ELASTICSEARCH } from '../../common/constants'; import { MonitoringTimeContainer } from './hooks/use_monitoring_time'; import { BreadcrumbContainer } from './hooks/use_breadcrumbs'; @@ -72,6 +74,14 @@ const MonitoringApp: React.FC<{ codePaths={['all']} fetchAllClusters={false} /> + + {/* ElasticSearch Views */} + = () => { { id: 'clusterName', label: clusters[0].cluster_name, - disabled: false, - description: clusters[0].cluster_name, - onClick: () => {}, testSubj: 'clusterName', + route: '/overview', }, ]; } diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/elasticsearch_template.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/elasticsearch_template.tsx new file mode 100644 index 0000000000000..13e21912df896 --- /dev/null +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/elasticsearch_template.tsx @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { includes } from 'lodash'; +import { PageTemplate } from '../page_template'; +import { TabMenuItem, PageTemplateProps } from '../page_template'; +import { ML_SUPPORTED_LICENSES } from '../../../../common/constants'; + +interface ElasticsearchTemplateProps extends PageTemplateProps { + cluster: any; +} + +export const ElasticsearchTemplate: React.FC = ({ + cluster, + ...props +}) => { + const tabs: TabMenuItem[] = [ + { + id: 'overview', + label: i18n.translate('xpack.monitoring.esNavigation.overviewLinkText', { + defaultMessage: 'Overview', + }), + route: '/elasticsearch', + }, + { + id: 'nodes', + label: i18n.translate('xpack.monitoring.esNavigation.nodesLinkText', { + defaultMessage: 'Nodes', + }), + route: '/elasticsearch/nodes', + }, + { + id: 'indices', + label: i18n.translate('xpack.monitoring.esNavigation.indicesLinkText', { + defaultMessage: 'Indices', + }), + route: '/elasticsearch/indices', + }, + ]; + + if (mlIsSupported(cluster.license)) { + tabs.push({ + id: 'ml', + label: i18n.translate('xpack.monitoring.esNavigation.jobsLinkText', { + defaultMessage: 'Machine learning jobs', + }), + route: '/elasticsearch/ml_jobs', + }); + } + + if (cluster.isCcrEnabled) { + tabs.push({ + id: 'ccr', + label: i18n.translate('xpack.monitoring.esNavigation.ccrLinkText', { + defaultMessage: 'CCR', + }), + route: '/elasticsearch/ccr', + }); + } + + return ; +}; + +const mlIsSupported = (license: any) => includes(ML_SUPPORTED_LICENSES, license.type); diff --git a/x-pack/plugins/monitoring/public/application/pages/elasticsearch/overview.tsx b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/overview.tsx new file mode 100644 index 0000000000000..4e885229b436a --- /dev/null +++ b/x-pack/plugins/monitoring/public/application/pages/elasticsearch/overview.tsx @@ -0,0 +1,97 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import React, { useContext, useState, useCallback } from 'react'; +import { i18n } from '@kbn/i18n'; +import { find } from 'lodash'; +import { ElasticsearchTemplate } from './elasticsearch_template'; +import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; +import { GlobalStateContext } from '../../global_state_context'; +import { ElasticsearchOverview } from '../../../components/elasticsearch'; +import { ComponentProps } from '../../route_init'; +import { useCharts } from '../../hooks/use_charts'; + +export const ElasticsearchOverviewPage: React.FC = ({ clusters }) => { + const globalState = useContext(GlobalStateContext); + const { zoomInfo, onBrush } = useCharts(); + const { services } = useKibana<{ data: any }>(); + const clusterUuid = globalState.cluster_uuid; + const ccs = globalState.ccs; + const cluster = find(clusters, { + cluster_uuid: clusterUuid, + }); + const [data, setData] = useState(null); + const [showShardActivityHistory, setShowShardActivityHistory] = useState(false); + const toggleShardActivityHistory = () => { + setShowShardActivityHistory(!showShardActivityHistory); + }; + const filterShardActivityData = (shardActivity: any) => { + return shardActivity.filter((row: any) => { + return showShardActivityHistory || row.stage !== 'DONE'; + }); + }; + + const title = i18n.translate('xpack.monitoring.elasticsearch.overview.title', { + defaultMessage: 'Elasticsearch', + }); + + const pageTitle = i18n.translate('xpack.monitoring.elasticsearch.overview.pageTitle', { + defaultMessage: 'Elasticsearch overview', + }); + + const getPageData = useCallback(async () => { + const bounds = services.data?.query.timefilter.timefilter.getBounds(); + const url = `../api/monitoring/v1/clusters/${clusterUuid}/elasticsearch`; + + const response = await services.http?.fetch(url, { + method: 'POST', + body: JSON.stringify({ + ccs, + timeRange: { + min: bounds.min.toISOString(), + max: bounds.max.toISOString(), + }, + }), + }); + + setData(response); + }, [ccs, clusterUuid, services.data?.query.timefilter.timefilter, services.http]); + + const renderOverview = (overviewData: any) => { + if (overviewData === null) { + return null; + } + const { clusterStatus, metrics, shardActivity, logs } = overviewData || {}; + const shardActivityData = shardActivity && filterShardActivityData(shardActivity); // no filter on data = null + + return ( + + ); + }; + + return ( + +
    {renderOverview(data)}
    +
    + ); +}; diff --git a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx index 9ce717b37051b..7c6a6c56a1322 100644 --- a/x-pack/plugins/monitoring/public/application/pages/page_template.tsx +++ b/x-pack/plugins/monitoring/public/application/pages/page_template.tsx @@ -7,24 +7,26 @@ import { EuiTab, EuiTabs } from '@elastic/eui'; import React, { useContext, useState, useEffect } from 'react'; +import { useHistory } from 'react-router-dom'; import { useTitle } from '../hooks/use_title'; import { MonitoringToolbar } from '../../components/shared/toolbar'; import { MonitoringTimeContainer } from '../hooks/use_monitoring_time'; import { PageLoading } from '../../components'; +import { getSetupModeState, isSetupModeFeatureEnabled } from '../setup_mode/setup_mode'; +import { SetupModeFeature } from '../../../common/enums'; export interface TabMenuItem { id: string; label: string; - description: string; - disabled: boolean; - onClick: () => void; - testSubj: string; + testSubj?: string; + route: string; } -interface PageTemplateProps { +export interface PageTemplateProps { title: string; pageTitle?: string; tabs?: TabMenuItem[]; getPageData?: () => Promise; + product?: string; } export const PageTemplate: React.FC = ({ @@ -32,12 +34,14 @@ export const PageTemplate: React.FC = ({ pageTitle, tabs, getPageData, + product, children, }) => { useTitle('', title); const { currentTimerange } = useContext(MonitoringTimeContainer.Context); const [loaded, setLoaded] = useState(false); + const history = useHistory(); useEffect(() => { getPageData?.() @@ -55,6 +59,10 @@ export const PageTemplate: React.FC = ({ }); }; + const createHref = (route: string) => history.createHref({ pathname: route }); + + const isTabSelected = (route: string) => history.location.pathname === route; + return (
    @@ -64,10 +72,11 @@ export const PageTemplate: React.FC = ({ return ( {item.label} @@ -79,3 +88,31 @@ export const PageTemplate: React.FC = ({
    ); }; + +function isDisabledTab(product: string | undefined) { + const setupMode = getSetupModeState(); + if (!isSetupModeFeatureEnabled(SetupModeFeature.MetricbeatMigration)) { + return false; + } + + if (!setupMode.data) { + return false; + } + + if (!product) { + return false; + } + + const data = setupMode.data[product] || {}; + if (data.totalUniqueInstanceCount === 0) { + return true; + } + if ( + data.totalUniqueInternallyCollectedCount === 0 && + data.totalUniqueFullyMigratedCount === 0 && + data.totalUniquePartiallyMigratedCount === 0 + ) { + return true; + } + return false; +} diff --git a/x-pack/plugins/monitoring/public/application/route_init.tsx b/x-pack/plugins/monitoring/public/application/route_init.tsx index cf3b0c6646d0f..8a9a906dbd563 100644 --- a/x-pack/plugins/monitoring/public/application/route_init.tsx +++ b/x-pack/plugins/monitoring/public/application/route_init.tsx @@ -10,9 +10,12 @@ import { useClusters } from './hooks/use_clusters'; import { GlobalStateContext } from './global_state_context'; import { getClusterFromClusters } from '../lib/get_cluster_from_clusters'; +export interface ComponentProps { + clusters: []; +} interface RouteInitProps { path: string; - component: React.ComponentType; + component: React.ComponentType; codePaths: string[]; fetchAllClusters: boolean; unsetGlobalState?: boolean; @@ -58,7 +61,12 @@ export const RouteInit: React.FC = ({ } } - return loaded ? : null; + const Component = component; + return loaded ? ( + + + + ) : null; }; const isExpired = (license: any): boolean => { diff --git a/x-pack/plugins/monitoring/public/components/chart/get_chart_options.js b/x-pack/plugins/monitoring/public/components/chart/get_chart_options.js index 5cf983829b5e0..641125dd3e943 100644 --- a/x-pack/plugins/monitoring/public/components/chart/get_chart_options.js +++ b/x-pack/plugins/monitoring/public/components/chart/get_chart_options.js @@ -10,8 +10,17 @@ import { merge } from 'lodash'; import { CHART_LINE_COLOR, CHART_TEXT_COLOR } from '../../../common/constants'; export async function getChartOptions(axisOptions) { - const $injector = Legacy.shims.getAngularInjector(); - const timezone = $injector.get('config').get('dateFormat:tz'); + let timezone; + try { + const $injector = Legacy.shims.getAngularInjector(); + timezone = $injector.get('config').get('dateFormat:tz'); + } catch (error) { + if (error.message === 'Angular has been removed.') { + timezone = Legacy.shims.uiSettings?.get('dateFormat:tz'); + } else { + throw error; + } + } const opts = { legend: { show: false, diff --git a/x-pack/plugins/monitoring/public/components/elasticsearch/index.d.ts b/x-pack/plugins/monitoring/public/components/elasticsearch/index.d.ts new file mode 100644 index 0000000000000..4460b8432134b --- /dev/null +++ b/x-pack/plugins/monitoring/public/components/elasticsearch/index.d.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const ElasticsearchOverview: FunctionComponent; diff --git a/x-pack/plugins/monitoring/public/components/logs/logs.js b/x-pack/plugins/monitoring/public/components/logs/logs.js index 409b773a24856..3021240a157d3 100644 --- a/x-pack/plugins/monitoring/public/components/logs/logs.js +++ b/x-pack/plugins/monitoring/public/components/logs/logs.js @@ -16,9 +16,18 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { Reason } from './reason'; const getFormattedDateTimeLocal = (timestamp) => { - const injector = Legacy.shims.getAngularInjector(); - const timezone = injector.get('config').get('dateFormat:tz'); - return formatDateTimeLocal(timestamp, timezone); + try { + const injector = Legacy.shims.getAngularInjector(); + const timezone = injector.get('config').get('dateFormat:tz'); + return formatDateTimeLocal(timestamp, timezone); + } catch (error) { + if (error.message === 'Angular has been removed.') { + const timezone = Legacy.shims.uiSettings?.get('dateFormat:tz'); + return formatDateTimeLocal(timestamp, timezone); + } else { + throw error; + } + } }; const columnTimestampTitle = i18n.translate('xpack.monitoring.logs.listing.timestampTitle', { diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 082562b4e9819..e3fef367766b5 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2460,7 +2460,6 @@ "discover.fieldChooser.filter.availableFieldsTitle": "利用可能なフィールド", "discover.fieldChooser.filter.fieldSelectorLabel": "{id}フィルターオプションの選択", "discover.fieldChooser.filter.filterByTypeLabel": "タイプでフィルタリング", - "discover.fieldChooser.filter.hideMissingFieldsLabel": "未入力のフィールドを非表示", "discover.fieldChooser.filter.indexAndFieldsSectionAriaLabel": "インデックスとフィールド", "discover.fieldChooser.filter.popularTitle": "人気", "discover.fieldChooser.filter.searchableLabel": "検索可能", @@ -9755,10 +9754,6 @@ "xpack.enterpriseSearch.appSearch.tokens.search.description": "エンドポイントのみの検索では、公開検索キーが使用されます。", "xpack.enterpriseSearch.appSearch.tokens.search.name": "公開検索キー", "xpack.enterpriseSearch.appSearch.tokens.update": "APIキー'{name}'が更新されました", - "xpack.enterpriseSearch.beta.buttonLabel": "これはベータ版のユーザーインターフェースです", - "xpack.enterpriseSearch.beta.popover.description": "エンタープライズサーチのKibanaインターフェースはベータ版の機能です。この機能は変更される可能性があり、公開されている機能と同じレベルのサポートは受けられません。このインターフェースは、8.0リリースのエンタープライズサーチの唯一の管理パネルです。それまでは、スタンドアロンのエンタープライズサーチUIが提供され、サポートされます。", - "xpack.enterpriseSearch.beta.popover.footerDetail": "{learnMoreLink}または{standaloneUILink}。", - "xpack.enterpriseSearch.beta.popover.title": "Kibanaのエンタープライズサーチはベータ版のユーザーインターフェースです", "xpack.enterpriseSearch.emailLabel": "メール", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.description": "場所を問わず、何でも検索。組織を支える多忙なチームのために、パワフルでモダンな検索エクスペリエンスを簡単に導入できます。Webサイトやアプリ、ワークプレイスに事前調整済みの検索をすばやく追加しましょう。何でもシンプルに検索できます。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.notConfigured": "エンタープライズサーチはまだKibanaインスタンスで構成されていません。", @@ -9963,7 +9958,6 @@ "xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.button": "非公開コンテンツソースの詳細。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.message": "必ずセキュリティ設定で{securityLink}してください。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configCustom.button": "カスタムAPIソースの作成", - "xpack.enterpriseSearch.workplaceSearch.contentSource.configCustom.docs.link": "カスタムAPIソースの詳細については、{link}。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configDocs.applicationPortal.button": "{name}アプリケーションポータル", "xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.alt.text": "接続の例", "xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.configure.button": "{name}の構成", @@ -10027,11 +10021,6 @@ "xpack.enterpriseSearch.workplaceSearch.contentSource.schema.updated.message": "スキーマが更新されました。", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.documentLevelPermissions.text": "ドキュメントレベルのアクセス権は、定義されたルールに基づいて、ユーザーコンテンツアクセスを管理します。個人またはグループの特定のドキュメントへのアクセスを許可または拒否します。", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.documentLevelPermissions.title": "プラチナライセンスで提供されているドキュメントレベルのアクセス権", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.explore.button": "プラチナ機能の詳細", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.globalAccessPermissions.text": "接続しているサービスユーザーがアクセス可能なすべてのドキュメントは同期され、組織のユーザーまたはグループのユーザーが使用できるようになります。ドキュメントは直ちに検索で使用できます", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.private.text": "返された結果は自分に固有で関連性があります。このソースを接続しても、個人データは他の検索ユーザーに公開されません。", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.remote.text": "メッセージデータと他の情報は、Workplace Searchエクスペリエンスからリアルタイムで検索可能です。", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.searchable.text": "次の項目は検索可能です。", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.syncFrequency.text": "このソースは、(初回の同期の後){duration}ごとに{name}から新しいコンテンツを取得します。", "xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.displaySettings.description": "カスタムAPIソース検索結果の内容と表示をカスタマイズします。", "xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.displaySettings.title": "表示設定", @@ -10083,7 +10072,6 @@ "xpack.enterpriseSearch.workplaceSearch.groups.filterSources.buttonText": "ソース", "xpack.enterpriseSearch.workplaceSearch.groups.groupDeleted": "グループ「{groupName}」が正常に削除されました。", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerHeaderTitle": "{label}を管理", - "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSelectAllToggle": "{action}すべて", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSourceEmpty.body": "まだ共有コンテンツソースが追加されていない可能性があります。", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSourceEmpty.title": "おっと!", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerUpdateAddSourceButton": "共有ソースを追加", @@ -10146,7 +10134,6 @@ "xpack.enterpriseSearch.workplaceSearch.nav.settingsSourcePrioritization": "コンテンツソースコネクター", "xpack.enterpriseSearch.workplaceSearch.nav.sources": "ソース", "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthDescription": "Workplace Search検索APIを安全に使用するために、OAuthアプリケーションを構成します。プラチナライセンスにアップグレードして、検索APIを有効にし、OAuthアプリケーションを作成します。", - "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthLinkLabel": "プラチナ機能の詳細", "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthTitle": "カスタム検索アプリケーションのOAuthを構成", "xpack.enterpriseSearch.workplaceSearch.oauth.description": "組織のOAuthクライアントを作成します。", "xpack.enterpriseSearch.workplaceSearch.oauthAuthorize.authorizationDescription": "{strongClientName}によるアカウントの使用を許可しますか?", @@ -10351,7 +10338,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.settingsModal.text": "ソースドキュメントはWorkplace Searchから削除されます。{lineBreak}{name}を削除しますか?", "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.description": "コンテンツソースが自分と共有されたら、ここに表示され、検索エクスペリエンスで使用できます。", "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.title": "コンテンツソースがありません", - "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.searchBar.placeholder": "{prefix}コンテンツ...", "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.title": "ソースコンテンツ", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.button": "プラチナライセンスの詳細", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.description": "組織のライセンスレベルが変更されました。データは安全ですが、ドキュメントレベルのアクセス権はサポートされなくなり、このソースの検索は無効になっています。このソースを再有効化するには、プラチナライセンスにアップグレードしてください。", @@ -10386,7 +10372,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.time.header": "時間", "xpack.enterpriseSearch.workplaceSearch.sources.totalDocuments.label": "合計ドキュメント数", "xpack.enterpriseSearch.workplaceSearch.sources.understandButton": "理解します", - "xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.buttonLabel": "{label}ソースを追加", "xpack.enterpriseSearch.workplaceSearch.sourcesView.modal.docPermissions.description": "ユーザーおよびグループマッピングが構成されるまでは、ドキュメントをWorkplace Searchから検索できません。{documentPermissionsLink}", "xpack.enterpriseSearch.workplaceSearch.sourcesView.modal.heading": "{addedSourceName}には追加の構成が必要です", "xpack.enterpriseSearch.workplaceSearch.sourcesView.modal.success": "{addedSourceName}は正常に接続されました。初期コンテンツ同期がすでに実行中です。ドキュメントレベルのアクセス権情報を同期することを選択したので、{externalIdentitiesLink}を使用してユーザーおよびグループマッピングを指定する必要があります。", @@ -10394,7 +10379,6 @@ "xpack.enterpriseSearch.workplaceSearch.title": "Workplace Search", "xpack.enterpriseSearch.workplaceSearch.update.label": "更新", "xpack.enterpriseSearch.workplaceSearch.url.label": "URL", - "xpack.enterpriseSearch.workplaceSearch.usersOnboardingCard.buttonLabel": "{label}ユーザーを招待", "xpack.eventLog.savedObjectProviderRegistry.getProvidersClient.noDefaultProvider": "イベントログにはデフォルトプロバイダーが必要です。", "xpack.features.advancedSettingsFeatureName": "高度な設定", "xpack.features.dashboardFeatureName": "ダッシュボード", @@ -26889,4 +26873,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。", "xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index f4bb126eb6d92..786eb5bef3286 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2485,7 +2485,6 @@ "discover.fieldChooser.filter.availableFieldsTitle": "可用字段", "discover.fieldChooser.filter.fieldSelectorLabel": "{id} 筛选选项的选择", "discover.fieldChooser.filter.filterByTypeLabel": "按类型筛选", - "discover.fieldChooser.filter.hideMissingFieldsLabel": "隐藏缺失字段", "discover.fieldChooser.filter.indexAndFieldsSectionAriaLabel": "索引和字段", "discover.fieldChooser.filter.popularTitle": "常见", "discover.fieldChooser.filter.searchableLabel": "可搜索", @@ -9855,10 +9854,6 @@ "xpack.enterpriseSearch.appSearch.tokens.search.description": "公有搜索密钥仅用于搜索终端。", "xpack.enterpriseSearch.appSearch.tokens.search.name": "公有搜索密钥", "xpack.enterpriseSearch.appSearch.tokens.update": "API 密钥“{name}”已更新", - "xpack.enterpriseSearch.beta.buttonLabel": "这是公测版用户界面", - "xpack.enterpriseSearch.beta.popover.description": "Kibana 的企业搜索界面是公测版功能。其可能会进行更改,不提供与正式发行的功能一样的支持等级。此界面将成为 8.0 版本中企业搜索的唯一管理面板。届时,单机版企业搜索 UI 仍可用且受支持。", - "xpack.enterpriseSearch.beta.popover.footerDetail": "{learnMoreLink}或{standaloneUILink}。", - "xpack.enterpriseSearch.beta.popover.title": "Kibana 中的 Enterprise Search 是公测版用户界面", "xpack.enterpriseSearch.emailLabel": "电子邮件", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.description": "随时随地进行全面搜索。为工作繁忙的团队轻松实现强大的现代搜索体验。将预先调整的搜索功能快速添加到您的网站、应用或工作区。全面搜索就是这么简单。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.notConfigured": "企业搜索尚未在您的 Kibana 实例中配置。", @@ -10064,7 +10059,6 @@ "xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.button": "详细了解专用内容源。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configCompleted.privateDisabled.message": "切记在安全设置中{securityLink}。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configCustom.button": "创建定制 API 源", - "xpack.enterpriseSearch.workplaceSearch.contentSource.configCustom.docs.link": "{link}以详细了解定制 API 源。", "xpack.enterpriseSearch.workplaceSearch.contentSource.configDocs.applicationPortal.button": "{name} 应用程序门户", "xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.alt.text": "连接图示", "xpack.enterpriseSearch.workplaceSearch.contentSource.configIntro.configure.button": "配置 {name}", @@ -10128,11 +10122,6 @@ "xpack.enterpriseSearch.workplaceSearch.contentSource.schema.updated.message": "架构已更新。", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.documentLevelPermissions.text": "文档级别权限根据定义的规则管理用户内容访问权限。允许或拒绝个人和组对特定文档的访问。", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.documentLevelPermissions.title": "适用于白金级许可证的文档级别权限", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.explore.button": "了解白金级功能", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.globalAccessPermissions.text": "连接服务可访问的所有文档将同步,并提供给组织的用户或组的用户。文档立即可供搜索", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.private.text": "返回的结果特定于您且与您相关。连接此源不会将您的个人数据暴露给其他搜索用户 - 只有您可以看到。", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.remote.text": "在 Workplace Search 中,可实时搜索消息数据和其他信息。", - "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.searchable.text": "以下项目可搜索:", "xpack.enterpriseSearch.workplaceSearch.contentSource.sourceFeatures.syncFrequency.text": "此源每 {duration} 从 {name} 获取新内容(在初始同步后)。", "xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.displaySettings.description": "对定制 API 源搜索结果的内容和样式进行定制。", "xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettings.displaySettings.title": "显示设置", @@ -10184,7 +10173,6 @@ "xpack.enterpriseSearch.workplaceSearch.groups.filterSources.buttonText": "源", "xpack.enterpriseSearch.workplaceSearch.groups.groupDeleted": "组“{groupName}”已成功删除。", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerHeaderTitle": "管理 {label}", - "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSelectAllToggle": "全部{action}", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSourceEmpty.body": "可能您尚未添加任何共享内容源。", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerSourceEmpty.title": "哎哟!", "xpack.enterpriseSearch.workplaceSearch.groups.groupManagerUpdateAddSourceButton": "添加共享源", @@ -10247,7 +10235,6 @@ "xpack.enterpriseSearch.workplaceSearch.nav.settingsSourcePrioritization": "内容源连接器", "xpack.enterpriseSearch.workplaceSearch.nav.sources": "源", "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthDescription": "配置 OAuth 应用程序,以安全使用 Workplace Search 搜索 API。升级到白金级许可证,以启用搜索 API 并创建您的 OAuth 应用程序。", - "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthLinkLabel": "了解白金级功能", "xpack.enterpriseSearch.workplaceSearch.nonPlatinumOauthTitle": "正在为定制搜索应用程序配置 OAuth", "xpack.enterpriseSearch.workplaceSearch.oauth.description": "为您的组织创建 OAuth 客户端。", "xpack.enterpriseSearch.workplaceSearch.oauthAuthorize.authorizationDescription": "授权 {strongClientName} 使用您的帐户?", @@ -10453,7 +10440,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.settingsModal.text": "将从 Workplace Search 中删除您的源文档。{lineBreak}确定要移除 {name}?", "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.description": "内容源共享给您后,其将显示在此处,并可通过搜索体验获取。", "xpack.enterpriseSearch.workplaceSearch.sources.shared.empty.title": "没有可用的内容源", - "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.searchBar.placeholder": "{prefix} 内容......", "xpack.enterpriseSearch.workplaceSearch.sources.sourceContent.title": "源内容", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.button": "了解白金级许可证", "xpack.enterpriseSearch.workplaceSearch.sources.sourceDisabled.description": "您的组织的许可证级别已更改。您的数据是安全的,但不再支持文档级别权限,且已禁止搜索此源。升级到白金级许可证,以重新启用此源。", @@ -10488,7 +10474,6 @@ "xpack.enterpriseSearch.workplaceSearch.sources.time.header": "时间", "xpack.enterpriseSearch.workplaceSearch.sources.totalDocuments.label": "总文档数", "xpack.enterpriseSearch.workplaceSearch.sources.understandButton": "我理解", - "xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.buttonLabel": "添加 {label} 源", "xpack.enterpriseSearch.workplaceSearch.sourcesOnboardingCard.description": "您已添加 {sourcesCount, number} 个共享{sourcesCount, plural, other {源}}。祝您搜索愉快。", "xpack.enterpriseSearch.workplaceSearch.sourcesView.modal.docPermissions.description": "只有在配置用户和组映射后,才能在 Workplace Search 中搜索文档。{documentPermissionsLink}。", "xpack.enterpriseSearch.workplaceSearch.sourcesView.modal.heading": "{addedSourceName} 需要其他配置。", @@ -10497,7 +10482,6 @@ "xpack.enterpriseSearch.workplaceSearch.title": "Workplace Search", "xpack.enterpriseSearch.workplaceSearch.update.label": "更新", "xpack.enterpriseSearch.workplaceSearch.url.label": "URL", - "xpack.enterpriseSearch.workplaceSearch.usersOnboardingCard.buttonLabel": "邀请 {label} 用户", "xpack.eventLog.savedObjectProviderRegistry.getProvidersClient.noDefaultProvider": "事件日志需要默认提供程序。", "xpack.features.advancedSettingsFeatureName": "高级设置", "xpack.features.dashboardFeatureName": "仪表板", @@ -27335,4 +27319,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。", "xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。" } -} \ No newline at end of file +} diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/enqueue.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/enqueue.ts index 533570ae4c16d..3094269932640 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/enqueue.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/enqueue.ts @@ -23,7 +23,8 @@ export default function ({ getService }: FtrProviderContext) { const retry = getService('retry'); const esTestIndexTool = new ESTestIndexTool(es, retry); - describe('enqueue', () => { + // Failing: See https://github.com/elastic/kibana/issues/111812 + describe.skip('enqueue', () => { const objectRemover = new ObjectRemover(supertest); before(async () => { diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index c157c8ae354ac..e48ac32dfd991 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -113,7 +113,6 @@ export default function ({ getService }: FtrProviderContext) { 'infrastructure', 'logs', 'maps', - 'observabilityCases', 'osquery', 'uptime', 'siem', diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index 42666e10341f1..913d16ad52df0 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -33,7 +33,6 @@ export default function ({ getService }: FtrProviderContext) { stackAlerts: ['all', 'read'], ml: ['all', 'read'], siem: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_all', 'cases_read'], - observabilityCases: ['all', 'read'], uptime: ['all', 'read'], infrastructure: ['all', 'read'], logs: ['all', 'read'], diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index 368d5361b7e1c..1ad7e803bad37 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -32,7 +32,6 @@ export default function ({ getService }: FtrProviderContext) { maps: ['all', 'read'], canvas: ['all', 'read'], infrastructure: ['all', 'read'], - observabilityCases: ['all', 'read'], logs: ['all', 'read'], uptime: ['all', 'read'], apm: ['all', 'read'], diff --git a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts index 6f6d29db1ef0c..7cfdf87aaf9ea 100644 --- a/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts +++ b/x-pack/test/functional/apps/apm/feature_controls/apm_security.ts @@ -64,7 +64,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const navLinks = await appsMenu.readLinks(); expect(navLinks.map((link) => link.text)).to.eql([ 'Overview', - 'Alerts', 'APM', 'User Experience', 'Stack Management', @@ -117,13 +116,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows apm navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql([ - 'Overview', - 'Alerts', - 'APM', - 'User Experience', - 'Stack Management', - ]); + expect(navLinks).to.eql(['Overview', 'APM', 'User Experience', 'Stack Management']); }); it('can navigate to APM app', async () => { diff --git a/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts b/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts index 03fe2409bd834..0118cfdafc2b3 100644 --- a/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts +++ b/x-pack/test/functional/apps/infra/feature_controls/infrastructure_security.ts @@ -62,7 +62,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows metrics navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']); + expect(navLinks).to.eql(['Overview', 'Metrics', 'Stack Management']); }); describe('infrastructure landing page without data', () => { @@ -160,7 +160,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows metrics navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']); + expect(navLinks).to.eql(['Overview', 'Metrics', 'Stack Management']); }); describe('infrastructure landing page without data', () => { diff --git a/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts b/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts index e08d8e260811f..d5e22af657d6a 100644 --- a/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts +++ b/x-pack/test/functional/apps/infra/feature_controls/logs_security.ts @@ -59,7 +59,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows logs navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Overview', 'Alerts', 'Logs', 'Stack Management']); + expect(navLinks).to.eql(['Overview', 'Logs', 'Stack Management']); }); describe('logs landing page without data', () => { @@ -122,7 +122,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows logs navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Overview', 'Alerts', 'Logs', 'Stack Management']); + expect(navLinks).to.eql(['Overview', 'Logs', 'Stack Management']); }); describe('logs landing page without data', () => { diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts index d351e8f7057e4..ca330bb8e6a0a 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts @@ -114,7 +114,8 @@ export default function ({ getService }: FtrProviderContext) { }, ]; - describe('job on data set with date_nanos time field', function () { + // Failing: See https://github.com/elastic/kibana/issues/112194 + describe.skip('job on data set with date_nanos time field', function () { this.tags(['mlqa']); before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/event_rate_nanos'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts index 0c1b1620eb413..9cc570256f8f1 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts @@ -71,7 +71,8 @@ export default function ({ getService }: FtrProviderContext) { const calendarId = `wizard-test-calendar_${Date.now()}`; - describe('multi metric', function () { + // Failing: See https://github.com/elastic/kibana/issues/112174 + describe.skip('multi metric', function () { this.tags(['mlqa']); before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); diff --git a/x-pack/test/functional/apps/reporting/reporting.ts b/x-pack/test/functional/apps/reporting/reporting.ts index 8a0d9937fc213..0d8034f046e02 100644 --- a/x-pack/test/functional/apps/reporting/reporting.ts +++ b/x-pack/test/functional/apps/reporting/reporting.ts @@ -11,17 +11,22 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const pageObjects = getPageObjects(['dashboard', 'common', 'reporting']); const es = getService('es'); - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); describe('Reporting', function () { this.tags(['smoke', 'ciGroup2']); before(async () => { - await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/packaging'); + await kibanaServer.importExport.load( + 'x-pack/test/functional/fixtures/kbn_archiver/packaging' + ); }); after(async () => { - await esArchiver.unload('x-pack/test/functional/es_archives/packaging'); + await kibanaServer.importExport.unload( + 'x-pack/test/functional/fixtures/kbn_archiver/packaging' + ); await es.deleteByQuery({ index: '.reporting-*', refresh: true, diff --git a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts index 977a384062f79..7867170c1801c 100644 --- a/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts +++ b/x-pack/test/functional/apps/uptime/feature_controls/uptime_security.ts @@ -68,7 +68,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const navLinks = await appsMenu.readLinks(); expect(navLinks.map((link) => link.text)).to.eql([ 'Overview', - 'Alerts', 'Uptime', 'Stack Management', ]); @@ -122,7 +121,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows uptime navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Overview', 'Alerts', 'Uptime', 'Stack Management']); + expect(navLinks).to.eql(['Overview', 'Uptime', 'Stack Management']); }); it('can navigate to Uptime app', async () => { diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index f8e8ce76bace1..95a962388cdd6 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -87,8 +87,6 @@ export default async function ({ readConfigFile }) { '--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"', '--xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled=true', '--savedObjects.maxImportPayloadBytes=10485760', // for OSS test management/_import_objects - '--xpack.observability.unsafe.cases.enabled=true', - '--xpack.observability.unsafe.alertingExperience.enabled=true', // NOTE: Can be removed once enabled by default ], }, uiSettings: { diff --git a/x-pack/test/functional/es_archives/packaging/data.json.gz b/x-pack/test/functional/es_archives/packaging/data.json.gz deleted file mode 100644 index 69c9e4cb4d8a2..0000000000000 Binary files a/x-pack/test/functional/es_archives/packaging/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/es_archives/packaging/mappings.json b/x-pack/test/functional/es_archives/packaging/mappings.json deleted file mode 100644 index 0ec1e12567460..0000000000000 --- a/x-pack/test/functional/es_archives/packaging/mappings.json +++ /dev/null @@ -1,2519 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": { - } - }, - "index": ".kibana_1", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "action": "6e96ac5e648f57523879661ea72525b7", - "action_task_params": "a9d49f184ee89641044be0ca2950fa3a", - "alert": "0359d7fcc04da9878ee9aadbda38ba55", - "api_key_pending_invalidation": "16f515278a295f6245149ad7c5ddedb7", - "apm-indices": "9bb9b2bf1fa636ed8619cbab5ce6a1dd", - "apm-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "app_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", - "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", - "background-session": "721df406dbb7e35ac22e4df6c3ad2b2a", - "canvas-element": "7390014e1091044523666d97247392fc", - "canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231", - "canvas-workpad-template": "ae2673f678281e2c055d764b153e9715", - "cases": "477f214ff61acc3af26a7b7818e380c1", - "cases-comments": "8a50736330e953bca91747723a319593", - "cases-configure": "387c5f3a3bda7e0ae0dd4e106f914a69", - "cases-user-actions": "32277330ec6b721abe3b846cfd939a71", - "config": "c63748b75f39d0c54de12d12c1ccbc20", - "dashboard": "40554caf09725935e2c02e02563a2d07", - "endpoint:user-artifact": "4a11183eee21e6fbad864f7a30b39ad0", - "endpoint:user-artifact-manifest": "4b9c0e7cfaf86d82a7ee9ed68065e50d", - "enterprise_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "epm-packages": "2b83397e3eaaaa8ef15e38813f3721c3", - "exception-list": "67f055ab8c10abd7b2ebfd969b836788", - "exception-list-agnostic": "67f055ab8c10abd7b2ebfd969b836788", - "file-upload-telemetry": "0ed4d3e1983d1217a30982630897092e", - "fleet-agent-actions": "9511b565b1cc6441a42033db3d5de8e9", - "fleet-agent-events": "e20a508b6e805189356be381dbfac8db", - "fleet-agents": "cb661e8ede2b640c42c8e5ef99db0683", - "fleet-enrollment-api-keys": "a69ef7ae661dab31561d6c6f052ef2a7", - "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", - "index-pattern": "45915a1ad866812242df474eb0479052", - "infrastructure-ui-source": "3d1b76c39bfb2cc8296b024d73854724", - "ingest-agent-policies": "8b0733cce189659593659dad8db426f0", - "ingest-outputs": "8854f34453a47e26f86a29f8f3b80b4e", - "ingest-package-policies": "f74dfe498e1849267cda41580b2be110", - "ingest_manager_settings": "02a03095f0e05b7a538fa801b88a217f", - "inventory-view": "3d1b76c39bfb2cc8296b024d73854724", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "lens": "52346cfec69ff7b47d5f0c12361a2797", - "lens-ui-telemetry": "509bfa5978586998e05f9e303c07a327", - "map": "4a05b35c3a3a58fbc72dd0202dc3487f", - "maps-telemetry": "5ef305b18111b77789afefbd36b66171", - "metrics-explorer-view": "3d1b76c39bfb2cc8296b024d73854724", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "ml-job": "3bb64c31915acf93fc724af137a0891b", - "ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9", - "monitoring-telemetry": "2669d5ec15e82391cf58df4294ee9c68", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "43012c7ebc4cb57054e0a490e4b43023", - "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "siem-detection-engine-rule-actions": "6569b288c169539db10cb262bf79de18", - "siem-detection-engine-rule-status": "ae783f41c6937db6b7a2ef5c93a9e9b0", - "siem-ui-timeline": "d12c5474364d737d17252acf1dc4585c", - "siem-ui-timeline-note": "8874706eedc49059d4cf0f5094559084", - "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29", - "space": "c5ca8acafa0beaa4d08d014a97b6bc6b", - "tag": "83d55da58f6530f7055415717ec06474", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "upgrade-assistant-reindex-operation": "215107c281839ea9b3ad5f6419819763", - "upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b", - "uptime-dynamic-settings": "3d1b76c39bfb2cc8296b024d73854724", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "visualization": "f819cf6636b75c9e76ba733a0c6ef355", - "workplace_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724" - } - }, - "dynamic": "strict", - "properties": { - "action": { - "properties": { - "actionTypeId": { - "type": "keyword" - }, - "config": { - "enabled": false, - "type": "object" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "secrets": { - "type": "binary" - } - } - }, - "action_task_params": { - "properties": { - "actionId": { - "type": "keyword" - }, - "apiKey": { - "type": "binary" - }, - "params": { - "enabled": false, - "type": "object" - } - } - }, - "alert": { - "properties": { - "actions": { - "properties": { - "actionRef": { - "type": "keyword" - }, - "actionTypeId": { - "type": "keyword" - }, - "group": { - "type": "keyword" - }, - "params": { - "enabled": false, - "type": "object" - } - }, - "type": "nested" - }, - "alertTypeId": { - "type": "keyword" - }, - "apiKey": { - "type": "binary" - }, - "apiKeyOwner": { - "type": "keyword" - }, - "consumer": { - "type": "keyword" - }, - "createdAt": { - "type": "date" - }, - "createdBy": { - "type": "keyword" - }, - "enabled": { - "type": "boolean" - }, - "executionStatus": { - "properties": { - "error": { - "properties": { - "message": { - "type": "keyword" - }, - "reason": { - "type": "keyword" - } - } - }, - "lastExecutionDate": { - "type": "date" - }, - "status": { - "type": "keyword" - } - } - }, - "meta": { - "properties": { - "versionApiKeyLastmodified": { - "type": "keyword" - } - } - }, - "muteAll": { - "type": "boolean" - }, - "mutedInstanceIds": { - "type": "keyword" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "params": { - "enabled": false, - "type": "object" - }, - "schedule": { - "properties": { - "interval": { - "type": "keyword" - } - } - }, - "scheduledTaskId": { - "type": "keyword" - }, - "tags": { - "type": "keyword" - }, - "throttle": { - "type": "keyword" - }, - "updatedAt": { - "type": "date" - }, - "updatedBy": { - "type": "keyword" - } - } - }, - "api_key_pending_invalidation": { - "properties": { - "apiKeyId": { - "type": "keyword" - }, - "createdAt": { - "type": "date" - } - } - }, - "apm-indices": { - "properties": { - "apm_oss": { - "properties": { - "errorIndices": { - "type": "keyword" - }, - "metricsIndices": { - "type": "keyword" - }, - "onboardingIndices": { - "type": "keyword" - }, - "sourcemapIndices": { - "type": "keyword" - }, - "spanIndices": { - "type": "keyword" - }, - "transactionIndices": { - "type": "keyword" - } - } - } - } - }, - "apm-telemetry": { - "dynamic": "false", - "type": "object" - }, - "app_search_telemetry": { - "dynamic": "false", - "type": "object" - }, - "application_usage_daily": { - "dynamic": "false", - "properties": { - "timestamp": { - "type": "date" - } - } - }, - "application_usage_totals": { - "dynamic": "false", - "type": "object" - }, - "application_usage_transactional": { - "dynamic": "false", - "type": "object" - }, - "background-session": { - "properties": { - "created": { - "type": "date" - }, - "expires": { - "type": "date" - }, - "idMapping": { - "enabled": false, - "type": "object" - }, - "initialState": { - "enabled": false, - "type": "object" - }, - "name": { - "type": "keyword" - }, - "restoreState": { - "enabled": false, - "type": "object" - }, - "status": { - "type": "keyword" - } - } - }, - "canvas-element": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "content": { - "type": "text" - }, - "help": { - "type": "text" - }, - "image": { - "type": "text" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "canvas-workpad": { - "dynamic": "false", - "properties": { - "@created": { - "type": "date" - }, - "@timestamp": { - "type": "date" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "canvas-workpad-template": { - "dynamic": "false", - "properties": { - "help": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "name": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "tags": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "template_key": { - "type": "keyword" - } - } - }, - "cases": { - "properties": { - "closed_at": { - "type": "date" - }, - "closed_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "connector": { - "properties": { - "fields": { - "properties": { - "key": { - "type": "text" - }, - "value": { - "type": "text" - } - } - }, - "id": { - "type": "keyword" - }, - "name": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "created_at": { - "type": "date" - }, - "created_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "description": { - "type": "text" - }, - "external_service": { - "properties": { - "connector_id": { - "type": "keyword" - }, - "connector_name": { - "type": "keyword" - }, - "external_id": { - "type": "keyword" - }, - "external_title": { - "type": "text" - }, - "external_url": { - "type": "text" - }, - "pushed_at": { - "type": "date" - }, - "pushed_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - } - } - }, - "status": { - "type": "keyword" - }, - "tags": { - "type": "keyword" - }, - "title": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "updated_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - } - } - }, - "cases-comments": { - "properties": { - "alertId": { - "type": "keyword" - }, - "comment": { - "type": "text" - }, - "created_at": { - "type": "date" - }, - "created_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "index": { - "type": "keyword" - }, - "pushed_at": { - "type": "date" - }, - "pushed_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "updated_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - } - } - }, - "cases-configure": { - "properties": { - "closure_type": { - "type": "keyword" - }, - "connector": { - "properties": { - "fields": { - "properties": { - "key": { - "type": "text" - }, - "value": { - "type": "text" - } - } - }, - "id": { - "type": "keyword" - }, - "name": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "created_at": { - "type": "date" - }, - "created_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "updated_at": { - "type": "date" - }, - "updated_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - } - } - }, - "cases-user-actions": { - "properties": { - "action": { - "type": "keyword" - }, - "action_at": { - "type": "date" - }, - "action_by": { - "properties": { - "email": { - "type": "keyword" - }, - "full_name": { - "type": "keyword" - }, - "username": { - "type": "keyword" - } - } - }, - "action_field": { - "type": "keyword" - }, - "new_value": { - "type": "text" - }, - "old_value": { - "type": "text" - } - } - }, - "config": { - "dynamic": "false", - "properties": { - "buildNum": { - "type": "keyword" - } - } - }, - "dashboard": { - "properties": { - "description": { - "type": "text" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "optionsJSON": { - "index": false, - "type": "text" - }, - "panelsJSON": { - "index": false, - "type": "text" - }, - "refreshInterval": { - "properties": { - "display": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "pause": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "section": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "value": { - "doc_values": false, - "index": false, - "type": "integer" - } - } - }, - "timeFrom": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "timeRestore": { - "doc_values": false, - "index": false, - "type": "boolean" - }, - "timeTo": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "endpoint:user-artifact": { - "properties": { - "body": { - "type": "binary" - }, - "compressionAlgorithm": { - "index": false, - "type": "keyword" - }, - "created": { - "index": false, - "type": "date" - }, - "decodedSha256": { - "index": false, - "type": "keyword" - }, - "decodedSize": { - "index": false, - "type": "long" - }, - "encodedSha256": { - "type": "keyword" - }, - "encodedSize": { - "index": false, - "type": "long" - }, - "encryptionAlgorithm": { - "index": false, - "type": "keyword" - }, - "identifier": { - "type": "keyword" - } - } - }, - "endpoint:user-artifact-manifest": { - "properties": { - "created": { - "index": false, - "type": "date" - }, - "ids": { - "index": false, - "type": "keyword" - }, - "schemaVersion": { - "type": "keyword" - }, - "semanticVersion": { - "index": false, - "type": "keyword" - } - } - }, - "enterprise_search_telemetry": { - "dynamic": "false", - "type": "object" - }, - "epm-packages": { - "properties": { - "es_index_patterns": { - "enabled": false, - "type": "object" - }, - "install_source": { - "type": "keyword" - }, - "install_started_at": { - "type": "date" - }, - "install_status": { - "type": "keyword" - }, - "install_version": { - "type": "keyword" - }, - "installed_es": { - "properties": { - "id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "installed_kibana": { - "properties": { - "id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "internal": { - "type": "boolean" - }, - "name": { - "type": "keyword" - }, - "removable": { - "type": "boolean" - }, - "version": { - "type": "keyword" - } - } - }, - "exception-list": { - "properties": { - "_tags": { - "type": "keyword" - }, - "comments": { - "properties": { - "comment": { - "type": "keyword" - }, - "created_at": { - "type": "keyword" - }, - "created_by": { - "type": "keyword" - }, - "id": { - "type": "keyword" - }, - "updated_at": { - "type": "keyword" - }, - "updated_by": { - "type": "keyword" - } - } - }, - "created_at": { - "type": "keyword" - }, - "created_by": { - "type": "keyword" - }, - "description": { - "type": "keyword" - }, - "entries": { - "properties": { - "entries": { - "properties": { - "field": { - "type": "keyword" - }, - "operator": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "value": { - "fields": { - "text": { - "type": "text" - } - }, - "type": "keyword" - } - } - }, - "field": { - "type": "keyword" - }, - "list": { - "properties": { - "id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - } - }, - "operator": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "value": { - "fields": { - "text": { - "type": "text" - } - }, - "type": "keyword" - } - } - }, - "immutable": { - "type": "boolean" - }, - "item_id": { - "type": "keyword" - }, - "list_id": { - "type": "keyword" - }, - "list_type": { - "type": "keyword" - }, - "meta": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "os_types": { - "type": "keyword" - }, - "tags": { - "type": "keyword" - }, - "tie_breaker_id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "updated_by": { - "type": "keyword" - }, - "version": { - "type": "keyword" - } - } - }, - "exception-list-agnostic": { - "properties": { - "_tags": { - "type": "keyword" - }, - "comments": { - "properties": { - "comment": { - "type": "keyword" - }, - "created_at": { - "type": "keyword" - }, - "created_by": { - "type": "keyword" - }, - "id": { - "type": "keyword" - }, - "updated_at": { - "type": "keyword" - }, - "updated_by": { - "type": "keyword" - } - } - }, - "created_at": { - "type": "keyword" - }, - "created_by": { - "type": "keyword" - }, - "description": { - "type": "keyword" - }, - "entries": { - "properties": { - "entries": { - "properties": { - "field": { - "type": "keyword" - }, - "operator": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "value": { - "fields": { - "text": { - "type": "text" - } - }, - "type": "keyword" - } - } - }, - "field": { - "type": "keyword" - }, - "list": { - "properties": { - "id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - } - }, - "operator": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "value": { - "fields": { - "text": { - "type": "text" - } - }, - "type": "keyword" - } - } - }, - "immutable": { - "type": "boolean" - }, - "item_id": { - "type": "keyword" - }, - "list_id": { - "type": "keyword" - }, - "list_type": { - "type": "keyword" - }, - "meta": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "os_types": { - "type": "keyword" - }, - "tags": { - "type": "keyword" - }, - "tie_breaker_id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "updated_by": { - "type": "keyword" - }, - "version": { - "type": "keyword" - } - } - }, - "file-upload-telemetry": { - "properties": { - "filesUploadedTotalCount": { - "type": "long" - } - } - }, - "fleet-agent-actions": { - "properties": { - "ack_data": { - "type": "text" - }, - "agent_id": { - "type": "keyword" - }, - "created_at": { - "type": "date" - }, - "data": { - "type": "binary" - }, - "policy_id": { - "type": "keyword" - }, - "policy_revision": { - "type": "integer" - }, - "sent_at": { - "type": "date" - }, - "type": { - "type": "keyword" - } - } - }, - "fleet-agent-events": { - "properties": { - "action_id": { - "type": "keyword" - }, - "agent_id": { - "type": "keyword" - }, - "data": { - "type": "text" - }, - "message": { - "type": "text" - }, - "payload": { - "type": "text" - }, - "policy_id": { - "type": "keyword" - }, - "stream_id": { - "type": "keyword" - }, - "subtype": { - "type": "keyword" - }, - "timestamp": { - "type": "date" - }, - "type": { - "type": "keyword" - } - } - }, - "fleet-agents": { - "properties": { - "access_api_key_id": { - "type": "keyword" - }, - "active": { - "type": "boolean" - }, - "current_error_events": { - "index": false, - "type": "text" - }, - "default_api_key": { - "type": "binary" - }, - "default_api_key_id": { - "type": "keyword" - }, - "enrolled_at": { - "type": "date" - }, - "last_checkin": { - "type": "date" - }, - "last_checkin_status": { - "type": "keyword" - }, - "last_updated": { - "type": "date" - }, - "local_metadata": { - "type": "flattened" - }, - "packages": { - "type": "keyword" - }, - "policy_id": { - "type": "keyword" - }, - "policy_revision": { - "type": "integer" - }, - "shared_id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "unenrolled_at": { - "type": "date" - }, - "unenrollment_started_at": { - "type": "date" - }, - "updated_at": { - "type": "date" - }, - "upgrade_started_at": { - "type": "date" - }, - "upgraded_at": { - "type": "date" - }, - "user_provided_metadata": { - "type": "flattened" - }, - "version": { - "type": "keyword" - } - } - }, - "fleet-enrollment-api-keys": { - "properties": { - "active": { - "type": "boolean" - }, - "api_key": { - "type": "binary" - }, - "api_key_id": { - "type": "keyword" - }, - "created_at": { - "type": "date" - }, - "expire_at": { - "type": "date" - }, - "name": { - "type": "keyword" - }, - "policy_id": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - } - } - }, - "graph-workspace": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "type": "text" - } - } - }, - "numLinks": { - "type": "integer" - }, - "numVertices": { - "type": "integer" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - }, - "wsState": { - "type": "text" - } - } - }, - "index-pattern": { - "dynamic": "false", - "properties": { - "title": { - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "infrastructure-ui-source": { - "dynamic": "false", - "type": "object" - }, - "ingest-agent-policies": { - "properties": { - "description": { - "type": "text" - }, - "is_default": { - "type": "boolean" - }, - "monitoring_enabled": { - "index": false, - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "namespace": { - "type": "keyword" - }, - "package_policies": { - "type": "keyword" - }, - "revision": { - "type": "integer" - }, - "status": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - }, - "updated_by": { - "type": "keyword" - } - } - }, - "ingest-outputs": { - "properties": { - "ca_sha256": { - "index": false, - "type": "keyword" - }, - "config": { - "type": "flattened" - }, - "config_yaml": { - "type": "text" - }, - "fleet_enroll_password": { - "type": "binary" - }, - "fleet_enroll_username": { - "type": "binary" - }, - "hosts": { - "type": "keyword" - }, - "is_default": { - "type": "boolean" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - } - }, - "ingest-package-policies": { - "properties": { - "created_at": { - "type": "date" - }, - "created_by": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "enabled": { - "type": "boolean" - }, - "inputs": { - "enabled": false, - "properties": { - "config": { - "type": "flattened" - }, - "enabled": { - "type": "boolean" - }, - "streams": { - "properties": { - "compiled_stream": { - "type": "flattened" - }, - "config": { - "type": "flattened" - }, - "data_stream": { - "properties": { - "dataset": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - } - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "keyword" - }, - "vars": { - "type": "flattened" - } - }, - "type": "nested" - }, - "type": { - "type": "keyword" - }, - "vars": { - "type": "flattened" - } - }, - "type": "nested" - }, - "name": { - "type": "keyword" - }, - "namespace": { - "type": "keyword" - }, - "output_id": { - "type": "keyword" - }, - "package": { - "properties": { - "name": { - "type": "keyword" - }, - "title": { - "type": "keyword" - }, - "version": { - "type": "keyword" - } - } - }, - "policy_id": { - "type": "keyword" - }, - "revision": { - "type": "integer" - }, - "updated_at": { - "type": "date" - }, - "updated_by": { - "type": "keyword" - } - } - }, - "ingest_manager_settings": { - "properties": { - "agent_auto_upgrade": { - "type": "keyword" - }, - "has_seen_add_data_notice": { - "index": false, - "type": "boolean" - }, - "kibana_ca_sha256": { - "type": "keyword" - }, - "kibana_urls": { - "type": "keyword" - }, - "package_auto_upgrade": { - "type": "keyword" - } - } - }, - "inventory-view": { - "dynamic": "false", - "type": "object" - }, - "kql-telemetry": { - "properties": { - "optInCount": { - "type": "long" - }, - "optOutCount": { - "type": "long" - } - } - }, - "lens": { - "properties": { - "description": { - "type": "text" - }, - "expression": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "state": { - "type": "flattened" - }, - "title": { - "type": "text" - }, - "visualizationType": { - "type": "keyword" - } - } - }, - "lens-ui-telemetry": { - "properties": { - "count": { - "type": "integer" - }, - "date": { - "type": "date" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - } - }, - "map": { - "properties": { - "description": { - "type": "text" - }, - "layerListJSON": { - "type": "text" - }, - "mapStateJSON": { - "type": "text" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "maps-telemetry": { - "enabled": false, - "type": "object" - }, - "metrics-explorer-view": { - "dynamic": "false", - "type": "object" - }, - "migrationVersion": { - "dynamic": "true", - "properties": { - "config": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "dashboard": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "index-pattern": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "lens": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "search": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "space": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "ml-job": { - "properties": { - "datafeed_id": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "job_id": { - "fields": { - "keyword": { - "type": "keyword" - } - }, - "type": "text" - }, - "type": { - "type": "keyword" - } - } - }, - "ml-telemetry": { - "properties": { - "file_data_visualizer": { - "properties": { - "index_creation_count": { - "type": "long" - } - } - } - } - }, - "monitoring-telemetry": { - "properties": { - "reportedClusterUuids": { - "type": "keyword" - } - } - }, - "namespace": { - "type": "keyword" - }, - "namespaces": { - "type": "keyword" - }, - "originId": { - "type": "keyword" - }, - "query": { - "properties": { - "description": { - "type": "text" - }, - "filters": { - "enabled": false, - "type": "object" - }, - "query": { - "properties": { - "language": { - "type": "keyword" - }, - "query": { - "index": false, - "type": "keyword" - } - } - }, - "timefilter": { - "enabled": false, - "type": "object" - }, - "title": { - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "sample-data-telemetry": { - "properties": { - "installCount": { - "type": "long" - }, - "unInstallCount": { - "type": "long" - } - } - }, - "search": { - "properties": { - "columns": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "description": { - "type": "text" - }, - "hits": { - "doc_values": false, - "index": false, - "type": "integer" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "sort": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "version": { - "type": "integer" - } - } - }, - "search-telemetry": { - "dynamic": "false", - "type": "object" - }, - "siem-detection-engine-rule-actions": { - "properties": { - "actions": { - "properties": { - "action_type_id": { - "type": "keyword" - }, - "group": { - "type": "keyword" - }, - "id": { - "type": "keyword" - }, - "params": { - "enabled": false, - "type": "object" - } - } - }, - "alertThrottle": { - "type": "keyword" - }, - "ruleAlertId": { - "type": "keyword" - }, - "ruleThrottle": { - "type": "keyword" - } - } - }, - "siem-detection-engine-rule-status": { - "properties": { - "alertId": { - "type": "keyword" - }, - "bulkCreateTimeDurations": { - "type": "float" - }, - "gap": { - "type": "text" - }, - "lastFailureAt": { - "type": "date" - }, - "lastFailureMessage": { - "type": "text" - }, - "lastLookBackDate": { - "type": "date" - }, - "lastSuccessAt": { - "type": "date" - }, - "lastSuccessMessage": { - "type": "text" - }, - "searchAfterTimeDurations": { - "type": "float" - }, - "status": { - "type": "keyword" - }, - "statusDate": { - "type": "date" - } - } - }, - "siem-ui-timeline": { - "properties": { - "columns": { - "properties": { - "aggregatable": { - "type": "boolean" - }, - "category": { - "type": "keyword" - }, - "columnHeaderType": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "example": { - "type": "text" - }, - "id": { - "type": "keyword" - }, - "indexes": { - "type": "keyword" - }, - "name": { - "type": "text" - }, - "placeholder": { - "type": "text" - }, - "searchable": { - "type": "boolean" - }, - "type": { - "type": "keyword" - } - } - }, - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "dataProviders": { - "properties": { - "and": { - "properties": { - "enabled": { - "type": "boolean" - }, - "excluded": { - "type": "boolean" - }, - "id": { - "type": "keyword" - }, - "kqlQuery": { - "type": "text" - }, - "name": { - "type": "text" - }, - "queryMatch": { - "properties": { - "displayField": { - "type": "text" - }, - "displayValue": { - "type": "text" - }, - "field": { - "type": "text" - }, - "operator": { - "type": "text" - }, - "value": { - "type": "text" - } - } - }, - "type": { - "type": "text" - } - } - }, - "enabled": { - "type": "boolean" - }, - "excluded": { - "type": "boolean" - }, - "id": { - "type": "keyword" - }, - "kqlQuery": { - "type": "text" - }, - "name": { - "type": "text" - }, - "queryMatch": { - "properties": { - "displayField": { - "type": "text" - }, - "displayValue": { - "type": "text" - }, - "field": { - "type": "text" - }, - "operator": { - "type": "text" - }, - "value": { - "type": "text" - } - } - }, - "type": { - "type": "text" - } - } - }, - "dateRange": { - "properties": { - "end": { - "type": "date" - }, - "start": { - "type": "date" - } - } - }, - "description": { - "type": "text" - }, - "eventType": { - "type": "keyword" - }, - "excludedRowRendererIds": { - "type": "text" - }, - "favorite": { - "properties": { - "favoriteDate": { - "type": "date" - }, - "fullName": { - "type": "text" - }, - "keySearch": { - "type": "text" - }, - "userName": { - "type": "text" - } - } - }, - "filters": { - "properties": { - "exists": { - "type": "text" - }, - "match_all": { - "type": "text" - }, - "meta": { - "properties": { - "alias": { - "type": "text" - }, - "controlledBy": { - "type": "text" - }, - "disabled": { - "type": "boolean" - }, - "field": { - "type": "text" - }, - "formattedValue": { - "type": "text" - }, - "index": { - "type": "keyword" - }, - "key": { - "type": "keyword" - }, - "negate": { - "type": "boolean" - }, - "params": { - "type": "text" - }, - "type": { - "type": "keyword" - }, - "value": { - "type": "text" - } - } - }, - "missing": { - "type": "text" - }, - "query": { - "type": "text" - }, - "range": { - "type": "text" - }, - "script": { - "type": "text" - } - } - }, - "indexNames": { - "type": "text" - }, - "kqlMode": { - "type": "keyword" - }, - "kqlQuery": { - "properties": { - "filterQuery": { - "properties": { - "kuery": { - "properties": { - "expression": { - "type": "text" - }, - "kind": { - "type": "keyword" - } - } - }, - "serializedQuery": { - "type": "text" - } - } - } - } - }, - "savedQueryId": { - "type": "keyword" - }, - "sort": { - "properties": { - "columnId": { - "type": "keyword" - }, - "sortDirection": { - "type": "keyword" - } - } - }, - "status": { - "type": "keyword" - }, - "templateTimelineId": { - "type": "text" - }, - "templateTimelineVersion": { - "type": "integer" - }, - "timelineType": { - "type": "keyword" - }, - "title": { - "type": "text" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "siem-ui-timeline-note": { - "properties": { - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "eventId": { - "type": "keyword" - }, - "note": { - "type": "text" - }, - "timelineId": { - "type": "keyword" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "siem-ui-timeline-pinned-event": { - "properties": { - "created": { - "type": "date" - }, - "createdBy": { - "type": "text" - }, - "eventId": { - "type": "keyword" - }, - "timelineId": { - "type": "keyword" - }, - "updated": { - "type": "date" - }, - "updatedBy": { - "type": "text" - } - } - }, - "space": { - "properties": { - "_reserved": { - "type": "boolean" - }, - "color": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "disabledFeatures": { - "type": "keyword" - }, - "imageUrl": { - "index": false, - "type": "text" - }, - "initials": { - "type": "keyword" - }, - "name": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "tag": { - "properties": { - "color": { - "type": "text" - }, - "description": { - "type": "text" - }, - "name": { - "type": "text" - } - } - }, - "telemetry": { - "properties": { - "allowChangingOptInStatus": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - }, - "lastReported": { - "type": "date" - }, - "lastVersionChecked": { - "type": "keyword" - }, - "reportFailureCount": { - "type": "integer" - }, - "reportFailureVersion": { - "type": "keyword" - }, - "sendUsageFrom": { - "type": "keyword" - }, - "userHasSeenNotice": { - "type": "boolean" - } - } - }, - "tsvb-validation-telemetry": { - "properties": { - "failedRequests": { - "type": "long" - } - } - }, - "type": { - "type": "keyword" - }, - "ui-metric": { - "properties": { - "count": { - "type": "integer" - } - } - }, - "updated_at": { - "type": "date" - }, - "upgrade-assistant-reindex-operation": { - "properties": { - "errorMessage": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "indexName": { - "type": "keyword" - }, - "lastCompletedStep": { - "type": "long" - }, - "locked": { - "type": "date" - }, - "newIndexName": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "reindexOptions": { - "properties": { - "openAndClose": { - "type": "boolean" - }, - "queueSettings": { - "properties": { - "queuedAt": { - "type": "long" - }, - "startedAt": { - "type": "long" - } - } - } - } - }, - "reindexTaskId": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - }, - "reindexTaskPercComplete": { - "type": "float" - }, - "runningReindexCount": { - "type": "integer" - }, - "status": { - "type": "integer" - } - } - }, - "upgrade-assistant-telemetry": { - "properties": { - "features": { - "properties": { - "deprecation_logging": { - "properties": { - "enabled": { - "null_value": true, - "type": "boolean" - } - } - } - } - }, - "ui_open": { - "properties": { - "cluster": { - "null_value": 0, - "type": "long" - }, - "indices": { - "null_value": 0, - "type": "long" - }, - "overview": { - "null_value": 0, - "type": "long" - } - } - }, - "ui_reindex": { - "properties": { - "close": { - "null_value": 0, - "type": "long" - }, - "open": { - "null_value": 0, - "type": "long" - }, - "start": { - "null_value": 0, - "type": "long" - }, - "stop": { - "null_value": 0, - "type": "long" - } - } - } - } - }, - "uptime-dynamic-settings": { - "dynamic": "false", - "type": "object" - }, - "url": { - "properties": { - "accessCount": { - "type": "long" - }, - "accessDate": { - "type": "date" - }, - "createDate": { - "type": "date" - }, - "url": { - "fields": { - "keyword": { - "ignore_above": 2048, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "visualization": { - "properties": { - "description": { - "type": "text" - }, - "kibanaSavedObjectMeta": { - "properties": { - "searchSourceJSON": { - "index": false, - "type": "text" - } - } - }, - "savedSearchRefName": { - "doc_values": false, - "index": false, - "type": "keyword" - }, - "title": { - "type": "text" - }, - "uiStateJSON": { - "index": false, - "type": "text" - }, - "version": { - "type": "integer" - }, - "visState": { - "index": false, - "type": "text" - } - } - }, - "workplace_search_telemetry": { - "dynamic": "false", - "type": "object" - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1" - } - } - } -} - -{ - "type": "index", - "value": { - "aliases": { - }, - "index": "foo", - "mappings": { - "properties": { - "field": { - "type": "long" - } - } - }, - "settings": { - "index": { - "number_of_replicas": "1", - "number_of_shards": "1" - } - } - } -} \ No newline at end of file diff --git a/x-pack/test/functional/fixtures/kbn_archiver/packaging.json b/x-pack/test/functional/fixtures/kbn_archiver/packaging.json new file mode 100644 index 0000000000000..77f19d7fe7cbe --- /dev/null +++ b/x-pack/test/functional/fixtures/kbn_archiver/packaging.json @@ -0,0 +1,143 @@ +{ + "attributes": { + "fieldAttrs": "{}", + "fields": "[]", + "title": "foo" + }, + "coreMigrationVersion": "7.16.0", + "id": "f8a1e9a0-2dc5-11eb-8af3-cb3aa84dbabd", + "migrationVersion": { + "index-pattern": "7.11.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2020-11-23T19:56:26.810Z", + "version": "WzM4LDJd" +} + +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "sort": [], + "title": "search", + "version": 1 + }, + "coreMigrationVersion": "7.16.0", + "id": "0c0b1700-2dc6-11eb-8af3-cb3aa84dbabd", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "f8a1e9a0-2dc5-11eb-8af3-cb3aa84dbabd", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2020-11-23T19:56:59.376Z", + "version": "WzQ3LDJd" +} + +{ + "attributes": { + "description": "", + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "c6af0915-fc1c-41b5-b195-7b05a51b0271": { + "columnOrder": [ + "0ee222c6-215d-4adc-aac0-b45469d5f9c1" + ], + "columns": { + "0ee222c6-215d-4adc-aac0-b45469d5f9c1": { + "dataType": "number", + "isBucketed": false, + "label": "Average of field", + "operationType": "average", + "scale": "ratio", + "sourceField": "field" + } + } + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "accessor": "0ee222c6-215d-4adc-aac0-b45469d5f9c1", + "layerId": "c6af0915-fc1c-41b5-b195-7b05a51b0271", + "layerType": "data" + } + }, + "title": "visualization", + "visualizationType": "lnsMetric" + }, + "coreMigrationVersion": "7.16.0", + "id": "2be82220-2dc6-11eb-8af3-cb3aa84dbabd", + "migrationVersion": { + "lens": "7.15.0" + }, + "references": [ + { + "id": "f8a1e9a0-2dc5-11eb-8af3-cb3aa84dbabd", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "f8a1e9a0-2dc5-11eb-8af3-cb3aa84dbabd", + "name": "indexpattern-datasource-layer-c6af0915-fc1c-41b5-b195-7b05a51b0271", + "type": "index-pattern" + } + ], + "type": "lens", + "updated_at": "2020-11-23T19:57:52.834Z", + "version": "WzUyLDJd" +} + +{ + "attributes": { + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" + }, + "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"8.0.0\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"6ec4f48e-5704-47ef-8cde-9aa671a2c27a\"},\"panelIndex\":\"6ec4f48e-5704-47ef-8cde-9aa671a2c27a\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_0\"},{\"version\":\"8.0.0\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"a719fa94-58cc-4023-b95d-5aec25315045\"},\"panelIndex\":\"a719fa94-58cc-4023-b95d-5aec25315045\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_1\"}]", + "timeRestore": false, + "title": "dashboard", + "version": 1 + }, + "coreMigrationVersion": "7.16.0", + "id": "37b49c50-2dc6-11eb-8af3-cb3aa84dbabd", + "migrationVersion": { + "dashboard": "7.15.0" + }, + "references": [ + { + "id": "2be82220-2dc6-11eb-8af3-cb3aa84dbabd", + "name": "panel_0", + "type": "lens" + }, + { + "id": "0c0b1700-2dc6-11eb-8af3-cb3aa84dbabd", + "name": "panel_1", + "type": "search" + } + ], + "type": "dashboard", + "updated_at": "2020-11-23T19:58:12.629Z", + "version": "WzUzLDJd" +} \ No newline at end of file