diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 721de7917534d..52c47e1eb272b 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -161,7 +161,16 @@ enabled: - x-pack/test/fleet_api_integration/config.ts - x-pack/test/fleet_functional/config.ts - x-pack/test/ftr_apis/security_and_spaces/config.ts - - x-pack/test/functional_basic/config.ts + - x-pack/test/functional_basic/apps/ml/permissions/config.ts + - x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts + - x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts + - x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts + - x-pack/test/functional_basic/apps/transform/creation/index_pattern/config.ts + - x-pack/test/functional_basic/apps/transform/start_reset_delete/config.ts + - x-pack/test/functional_basic/apps/transform/edit_clone/config.ts + - x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/config.ts + - x-pack/test/functional_basic/apps/transform/permissions/config.ts + - x-pack/test/functional_basic/apps/transform/feature_controls/config.ts - x-pack/test/functional_cors/config.ts - x-pack/test/functional_embedded/config.ts - x-pack/test/functional_enterprise_search/without_host_configured.config.ts @@ -216,7 +225,12 @@ enabled: - x-pack/test/functional/apps/snapshot_restore/config.ts - x-pack/test/functional/apps/spaces/config.ts - x-pack/test/functional/apps/status_page/config.ts - - x-pack/test/functional/apps/transform/config.ts + - x-pack/test/functional/apps/transform/creation/index_pattern/config.ts + - x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts + - x-pack/test/functional/apps/transform/start_reset_delete/config.ts + - x-pack/test/functional/apps/transform/edit_clone/config.ts + - x-pack/test/functional/apps/transform/permissions/config.ts + - x-pack/test/functional/apps/transform/feature_controls/config.ts - x-pack/test/functional/apps/upgrade_assistant/config.ts - x-pack/test/functional/apps/uptime/config.ts - x-pack/test/functional/apps/visualize/config.ts diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index a36bd508f0ad0..221799d01a123 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 6855f8f9002c8..d79466e2ab874 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 2afb1f1ffe062..65d5f0f25e24c 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index ed0c19af12faf..04374ce79bf36 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index ec829fca26741..95bf2cd443bc6 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -202,7 +202,7 @@ "APMPluginSetupDependencies", ") => { config$: ", "Observable", - "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", + "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; telemetryCollectionEnabled: boolean; metricsInterval: number; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; forceSyntheticSource: boolean; }>>; getApmIndices: () => Promise>; createApmEventClient: ({ request, context, debug, }: { debug?: boolean | undefined; request: ", { @@ -448,7 +448,7 @@ "label": "config", "description": [], "signature": [ - "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", + "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; readonly forceSyntheticSource: boolean; }" ], @@ -840,7 +840,7 @@ "label": "APMConfig", "description": [], "signature": [ - "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", + "{ readonly indices: Readonly<{} & { metric: string; error: string; span: string; transaction: string; onboarding: string; }>; readonly autoCreateApmDataView: boolean; readonly serviceMapEnabled: boolean; readonly serviceMapFingerprintBucketSize: number; readonly serviceMapFingerprintGlobalBucketSize: number; readonly serviceMapTraceIdBucketSize: number; readonly serviceMapTraceIdGlobalBucketSize: number; readonly serviceMapMaxTracesPerRequest: number; readonly ui: Readonly<{} & { enabled: boolean; maxTraceItems: number; }>; readonly searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; readonly telemetryCollectionEnabled: boolean; readonly metricsInterval: number; readonly agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; readonly forceSyntheticSource: boolean; }" ], @@ -4798,7 +4798,7 @@ "section": "def-server.APMRouteHandlerResources", "text": "APMRouteHandlerResources" }, - ", { transactionGroups: { transactionType: string; name: string; latency: number | null; throughput: number; errorRate: number; impact: number; }[]; isAggregationAccurate: boolean; bucketSize: number; }, ", + ", { transactionGroups: { transactionType: string; name: string; latency: number | null; throughput: number; errorRate: number; impact: number; }[]; transactionOverflowCount: number; maxTransactionGroupsExceeded: boolean; }, ", "APMRouteCreateOptions", ">; \"GET /internal/apm/traces/{traceId}/spans/{spanId}\": ", { @@ -6396,7 +6396,7 @@ "AgentName", "; } & { serviceName: string; healthStatus: ", "ServiceHealthStatus", - "; } & { serviceName: string; alertsCount: number; }>; }, ", + "; } & { serviceName: string; alertsCount: number; }>; maxServiceCountExceeded: boolean; serviceOverflowCount: number; }, ", "APMRouteCreateOptions", ">; \"GET /internal/apm/service-map/dependency\": ", { @@ -7679,7 +7679,7 @@ "description": [], "signature": [ "Observable", - "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; transactionGroupBucketSize: number; maxTraceItems: number; }>; searchAggregatedTransactions: ", + "; autoCreateApmDataView: boolean; serviceMapEnabled: boolean; serviceMapFingerprintBucketSize: number; serviceMapFingerprintGlobalBucketSize: number; serviceMapTraceIdBucketSize: number; serviceMapTraceIdGlobalBucketSize: number; serviceMapMaxTracesPerRequest: number; ui: Readonly<{} & { enabled: boolean; maxTraceItems: number; }>; searchAggregatedTransactions: ", "SearchAggregatedTransactionSetting", "; telemetryCollectionEnabled: boolean; metricsInterval: number; agent: Readonly<{} & { migrations: Readonly<{} & { enabled: boolean; }>; }>; forceSyntheticSource: boolean; }>>" ], diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index a0a63f1dd4367..886fb1f646cbf 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index bb08afc588830..deef5b83df239 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index eae171c59adc6..514f8dbeb2ec8 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 0d228f8ad9a4d..8ba0ff20790c5 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 227d548020973..5cfc63f80c1f8 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 7743510f26d88..ea60e79861967 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index fe1dec5fe6310..4ee915cd8af70 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index ce2e358ea9f50..b4518b3731828 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index a90893f737fb1..0fdfd436b0cd2 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 0f4a756b7d724..2be599b951cb5 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index d82d0233f9c1b..eb16bfe1c51ce 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index ce8800ed5cb1c..10b74f47eaef8 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 35c90d18566f3..f98da45c805b3 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.devdocs.json b/api_docs/content_management.devdocs.json new file mode 100644 index 0000000000000..338c6568fdb4d --- /dev/null +++ b/api_docs/content_management.devdocs.json @@ -0,0 +1,100 @@ +{ + "id": "contentManagement", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "start": { + "parentPluginId": "contentManagement", + "id": "def-public.ContentManagementPublicStart", + "type": "Interface", + "tags": [], + "label": "ContentManagementPublicStart", + "description": [], + "path": "src/plugins/content_management/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "contentManagement", + "id": "def-server.ContentManagementServerSetup", + "type": "Interface", + "tags": [], + "label": "ContentManagementServerSetup", + "description": [], + "path": "src/plugins/content_management/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "contentManagement", + "id": "def-server.ContentManagementServerStart", + "type": "Interface", + "tags": [], + "label": "ContentManagementServerStart", + "description": [], + "path": "src/plugins/content_management/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "contentManagement", + "id": "def-common.API_ENDPOINT", + "type": "string", + "tags": [], + "label": "API_ENDPOINT", + "description": [], + "signature": [ + "\"/api/content_management\"" + ], + "path": "src/plugins/content_management/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "contentManagement", + "id": "def-common.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"contentManagement\"" + ], + "path": "src/plugins/content_management/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx new file mode 100644 index 0000000000000..01cb0b596215c --- /dev/null +++ b/api_docs/content_management.mdx @@ -0,0 +1,43 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibContentManagementPluginApi +slug: /kibana-dev-docs/api/contentManagement +title: "contentManagement" +image: https://source.unsplash.com/400x175/?github +description: API docs for the contentManagement plugin +date: 2023-02-01 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] +--- +import contentManagementObj from './content_management.devdocs.json'; + +Content management app + +Contact [@elastic/kibana-global-experience](https://github.com/orgs/elastic/teams/@elastic/kibana-global-experience) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Client + +### Start + + +## Server + +### Setup + + +### Start + + +## Common + +### Consts, variables and types + + diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 266c100addc1c..4c1f5d5145334 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 04ff270cbf464..7c69151e0d644 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -5098,27 +5098,27 @@ }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" }, { "plugin": "synthetics", @@ -5408,6 +5408,110 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingSetup", + "type": "Interface", + "tags": [], + "label": "CustomBrandingSetup", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingSetup.customBranding$", + "type": "Object", + "tags": [], + "label": "customBranding$", + "description": [], + "signature": [ + "Observable", + "<", + { + "pluginId": "@kbn/core-custom-branding-common", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingCommonPluginApi", + "section": "def-common.CustomBranding", + "text": "CustomBranding" + }, + ">" + ], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingSetup.hasCustomBranding$", + "type": "Object", + "tags": [], + "label": "hasCustomBranding$", + "description": [], + "signature": [ + "Observable", + "" + ], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingStart", + "type": "Interface", + "tags": [], + "label": "CustomBrandingStart", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingStart.customBranding$", + "type": "Object", + "tags": [], + "label": "customBranding$", + "description": [], + "signature": [ + "Observable", + "<", + { + "pluginId": "@kbn/core-custom-branding-common", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingCommonPluginApi", + "section": "def-common.CustomBranding", + "text": "CustomBranding" + }, + ">" + ], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "core", + "id": "def-public.CustomBrandingStart.hasCustomBranding$", + "type": "Object", + "tags": [], + "label": "hasCustomBranding$", + "description": [], + "signature": [ + "Observable", + "" + ], + "path": "packages/core/custom-branding/core-custom-branding-browser/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.DeprecationsServiceStart", @@ -15033,15 +15137,15 @@ }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" }, { "plugin": "graph", @@ -21018,6 +21122,14 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/services/so_references.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, { "plugin": "lists", "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts" @@ -22727,6 +22839,18 @@ "plugin": "lens", "path": "x-pack/plugins/lens/public/app_plugin/share_action.ts" }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/common/visualizations/lens/types.ts" @@ -22798,6 +22922,14 @@ { "plugin": "cases", "path": "x-pack/plugins/cases/server/services/user_actions/test_utils.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts" } ], "initialIsOpen": false @@ -32746,6 +32878,148 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup", + "type": "Interface", + "tags": [], + "label": "CustomBrandingSetup", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.register", + "type": "Function", + "tags": [], + "label": "register", + "description": [], + "signature": [ + "(fetchFn: ", + { + "pluginId": "@kbn/core-custom-branding-server", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingServerPluginApi", + "section": "def-common.CustomBrandingFetchFn", + "text": "CustomBrandingFetchFn" + }, + ") => void" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.register.$1", + "type": "Function", + "tags": [], + "label": "fetchFn", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-custom-branding-server", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingServerPluginApi", + "section": "def-common.CustomBrandingFetchFn", + "text": "CustomBrandingFetchFn" + } + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.getBrandingFor", + "type": "Function", + "tags": [], + "label": "getBrandingFor", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", options: { unauthenticated?: boolean | undefined; }) => Promise<", + { + "pluginId": "@kbn/core-custom-branding-common", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingCommonPluginApi", + "section": "def-common.CustomBranding", + "text": "CustomBranding" + }, + ">" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.getBrandingFor.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.getBrandingFor.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.CustomBrandingSetup.getBrandingFor.$2.unauthenticated", + "type": "CompoundType", + "tags": [], + "label": "unauthenticated", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-server.CustomHttpResponseOptions", diff --git a/api_docs/core.mdx b/api_docs/core.mdx index da92cad1c112c..e5e7a520235a2 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github description: API docs for the core plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] --- import coreObj from './core.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2832 | 17 | 1016 | 0 | +| 2845 | 17 | 1029 | 0 | ## Client diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 32e364fe911fb..9f9d2f9a7704f 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 800cf884e2595..ec379e1c1630f 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index cc5ff14a7dff3..4bc0c9cdfc4f4 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index b8f5b5f037f20..b00740d7bc6cb 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -11061,6 +11061,14 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/services/so_references.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, { "plugin": "lists", "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts" @@ -28906,6 +28914,14 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/services/so_references.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, { "plugin": "lists", "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts" diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 2c219784f20b9..65264eba67c93 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 69ec8375434e9..bce5fe2ef4334 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index e7ac4a8b2ea7d..ccaab0205ad5a 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 10d3dd109f98b..515732f643f8d 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 333a495f43154..5abd399934e65 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 3dcafe9a4960a..0bffb1b96517b 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index c945daf504f47..466a257497643 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -26220,6 +26220,14 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/services/so_references.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, { "plugin": "lists", "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 3592cc891b24c..0aec4d3dc3fd2 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 8ef7e6b003108..e98c997be3748 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index e47f998948116..a1edbcbe15b14 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index fd4dae4f0f318..136bc89aa7fd1 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -478,8 +478,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject)+ 22 more | - | -| | [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject)+ 38 more | - | +| | [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject)+ 26 more | - | +| | [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [so_references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/so_references.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [find.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/operations/find.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject), [test_utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/services/user_actions/test_utils.ts#:~:text=SavedObject)+ 44 more | - | | | [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=find) | - | | | [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject), [saved_objects_finder.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/markdown_editor/plugins/lens/saved_objects_finder.tsx#:~:text=SimpleSavedObject)+ 1 more | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject) | - | @@ -976,7 +976,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectsCreateOptions) | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectsBatchResponse), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectsBatchResponse) | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes)+ 2 more | - | -| | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference), [rx.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/rx.ts#:~:text=SavedObjectReference), [rx.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/rx.ts#:~:text=SavedObjectReference)+ 6 more | - | +| | [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference)+ 11 more | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=savedObjects), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=savedObjects), [use_delete_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx#:~:text=savedObjects), [use_delete_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx#:~:text=savedObjects), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=savedObjects), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=savedObjects), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=savedObjects)+ 1 more | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=savedObjects), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=savedObjects), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=savedObjects), [use_delete_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx#:~:text=savedObjects), [use_delete_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx#:~:text=savedObjects), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=savedObjects), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=savedObjects), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=savedObjects)+ 1 more | - | | | [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=create) | - | @@ -988,7 +988,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectsCreateOptions), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectsCreateOptions) | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectsBatchResponse), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectsBatchResponse) | - | | | [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_find_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_create_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_get_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_get_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes), [use_update_saved_object.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx#:~:text=SavedObjectAttributes)+ 2 more | - | -| | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference), [rx.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/rx.ts#:~:text=SavedObjectReference), [rx.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/rx.ts#:~:text=SavedObjectReference)+ 6 more | - | +| | [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [log_threshold_references_manager.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/types.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [cpu.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/cpu.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [load.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/load.ts#:~:text=SavedObjectReference), [memory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/public/common/visualizations/lens/hosts/memory.ts#:~:text=SavedObjectReference)+ 11 more | - | @@ -1506,16 +1506,16 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=create), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=create) | - | | | [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=bulkDelete) | - | -| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=find), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=find), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find) | - | +| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=find), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=find), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=get), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=get) | - | | | [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=bulkResolve), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=bulkResolve) | - | | | [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject), [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject), [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject) | - | -| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=savedObjects), [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=savedObjects), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=savedObjects), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=savedObjects)+ 1 more | - | -| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=savedObjects), [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=savedObjects), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=savedObjects), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=savedObjects)+ 1 more | - | +| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=savedObjects), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=savedObjects), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=savedObjects), [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=savedObjects)+ 1 more | - | +| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=savedObjects), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=savedObjects), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=savedObjects), [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=savedObjects), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=savedObjects), [use_locations_api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts#:~:text=savedObjects), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=savedObjects)+ 1 more | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=SavedObjectsClientContract) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=create), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=create) | - | | | [delete_param.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx#:~:text=bulkDelete) | - | -| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=find), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=find), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find) | - | +| | [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/monitor_config/use_monitor_name.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/manage_locations/hooks/use_location_monitors.ts#:~:text=find), [use_filters.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts#:~:text=find), [use_location_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts#:~:text=find), [use_monitor_name.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find), [use_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.test.ts#:~:text=find) | - | | | [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/state/private_locations/api.ts#:~:text=get), [api.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/state/private_locations/api.ts#:~:text=get) | - | | | [use_invalid_monitors.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/hooks/use_invalid_monitors.tsx#:~:text=bulkResolve), [use_recently_viewed_monitors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts#:~:text=bulkResolve) | - | | | [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject), [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject), [synthetics_monitor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts#:~:text=SimpleSavedObject) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index f30544104b267..71c1ebf2c534a 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 021378947c8ee..6aac317221159 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 99e6bd794bc63..57272e2c5e441 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 45ae471ab0234..92c7813c607c2 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 036fc068e8f61..1261f654bd9bd 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 1057d65fc99b9..73e81c93a52d9 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 5ad74c80cf9ec..1bc9189ecf45f 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 3f5f4e0ff0b91..57e5b3d028fe8 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 551d633a05a68..b3ed7e109d2bf 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 079c249780414..d8980493ab39d 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 326a2280f1c2d..2ae1e4a86c08b 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index eb2824379b766..f74e7651597ae 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 3d1c7b74a14e2..b503d2da2f561 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index cc540a226955a..dac8edc8dfa5d 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 5af5306ba4d05..ba9edb7fc4d14 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index afc44e3f5b28f..26e08a00d9f96 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 65876d1ada699..0308a37af8974 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 9e02dbb25fdb8..6936d6f749988 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 2c90a8e7f89af..cc03b631c2234 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 64ba3e3442a55..0cb42d317eebb 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 58f1a170b192e..55f6f26288a8b 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index b0efd4948a4fa..31d5f46c71043 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index baaf83c93dbc8..6e7ffea406d52 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index ea72821ebaa38..3c6e6dfeacbdc 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 7d5f816adaa3a..8931fa70257b9 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index ae4a52e4885f3..b5538ec05578f 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 1764465052363..c6b1b0fa71b83 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 8d5ccdc612397..7427690517b7e 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 3a8a8237f0b94..eac27a443386b 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 74b7a1f3c8838..ece7b2d45555d 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 6d9c800e6de48..fb8f22cb4a057 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -11206,17 +11206,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "fleet", - "id": "def-common.GetAgentsResponse.totalInactive", - "type": "number", - "tags": [], - "label": "totalInactive", - "description": [], - "path": "x-pack/plugins/fleet/common/types/rest_spec/agent.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "fleet", "id": "def-common.GetAgentsResponse.list", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index b899d6d2de663..d61c24e7d4884 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1040 | 3 | 935 | 25 | +| 1039 | 3 | 934 | 25 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index bcf7038f4b851..407d07b45f5ea 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 4d246c79461e5..cfe276612a180 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 4854c9abced73..f1e0ed4b1d357 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index a6699d0e86c3d..25a53cf4027ce 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 1d9adb71ac0e5..f041f767f3403 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 1ceea6db43660..5583391b4c549 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index eb094011f7443..70fde958a94cb 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 8f1d5f0129a8a..248912181e054 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 50efdb79e6cfb..bead9ba897c09 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index e9a76aa665eae..d116c21384942 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 8f0fd576c413b..e52ad4a76232d 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 7d18a038dbd52..00574cb8f2874 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 24a185f0bcafb..b0d5a104db701 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index fb7772ac2e53a..67a8e2d8c9352 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index b590e8eff06d7..0579e493822f9 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 0d15a40c8abed..e58af1a56f130 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index ad86db69ebf2a..95e3028ab798a 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index db8d903c06614..e2663779baf75 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 39db1ca3e617c..dd15c31d81e0d 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 1e7983eba24b8..92a136fc57a73 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index b60512f023b35..5b3dc0b49fadf 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 186c425d73057..c1e6e441d3a8a 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index b0422331cb101..7c272f970dbc0 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -2318,7 +2318,7 @@ "GeoLocation", "; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.ip': string; 'cloud.account.id': string; 'cloud.account.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.project.id': string; 'cloud.project.name': string; 'cloud.provider': string; 'cloud.region': string; 'cloud.service.name': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.manufacturer': string; 'device.model.identifier': string; 'device.model.name': string; 'ecs.version': string; 'error.exception': ", "ApmException", - "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'event.ingested': number; 'event.name': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'transaction.result': string; 'transaction.sampled': true; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>" + "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'event.ingested': number; 'event.name': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.aggregation.overflow_count': number; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'transaction.result': string; 'transaction.sampled': true; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts", "deprecated": false, diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 51fb8b8005858..6e24e3d773ce4 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index fbb95221542f5..c74dc1ad893f0 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 35c0fe796b9c5..1efd294af66dc 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index e2eac6071fba4..5b5452e73f215 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index f0bc5b1fb97e3..2300a4ce345c6 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 2c4a3016cc511..71ef1da7f620d 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 77e1342b6a7b8..2f77f83a5cb46 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 9b4395d47a864..7fe84bbafb7b6 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 4a84ced7636a9..0fc11118c9308 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 6d1ff577044ab..40311f52d8dda 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.devdocs.json b/api_docs/kbn_code_editor.devdocs.json new file mode 100644 index 0000000000000..0bd40c08dd6c4 --- /dev/null +++ b/api_docs/kbn_code_editor.devdocs.json @@ -0,0 +1,65 @@ +{ + "id": "@kbn/code-editor", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/code-editor", + "id": "def-common.CodeEditor", + "type": "Function", + "tags": [], + "label": "CodeEditor", + "description": [], + "signature": [ + "({ languageId, value, onChange, width, options, overrideEditorWillMount, editorDidMount, editorWillMount, useDarkTheme, transparentBackground, suggestionProvider, signatureProvider, hoverProvider, placeholder, languageConfiguration, \"aria-label\": ariaLabel, isCopyable, allowFullScreen, }: React.PropsWithChildren<", + "Props", + ">) => JSX.Element" + ], + "path": "packages/shared-ux/code_editor/impl/code_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor", + "id": "def-common.CodeEditor.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n languageId,\n value,\n onChange,\n width,\n options,\n overrideEditorWillMount,\n editorDidMount,\n editorWillMount,\n useDarkTheme,\n transparentBackground,\n suggestionProvider,\n signatureProvider,\n hoverProvider,\n placeholder,\n languageConfiguration,\n 'aria-label': ariaLabel = i18n.translate('sharedUXPackages.codeEditor.ariaLabel', {\n defaultMessage: 'Code Editor',\n }),\n isCopyable = false,\n allowFullScreen = false,\n}", + "description": [], + "signature": [ + "React.PropsWithChildren<", + "Props", + ">" + ], + "path": "packages/shared-ux/code_editor/impl/code_editor.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx new file mode 100644 index 0000000000000..a7db5345c0dca --- /dev/null +++ b/api_docs/kbn_code_editor.mdx @@ -0,0 +1,30 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnCodeEditorPluginApi +slug: /kibana-dev-docs/api/kbn-code-editor +title: "@kbn/code-editor" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/code-editor plugin +date: 2023-02-01 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] +--- +import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 2 | 1 | + +## Common + +### Functions + + diff --git a/api_docs/kbn_code_editor_mocks.devdocs.json b/api_docs/kbn_code_editor_mocks.devdocs.json new file mode 100644 index 0000000000000..1c39d497c16d1 --- /dev/null +++ b/api_docs/kbn_code_editor_mocks.devdocs.json @@ -0,0 +1,547 @@ +{ + "id": "@kbn/code-editor-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock", + "type": "Class", + "tags": [], + "label": "CodeEditorStorybookMock", + "description": [ + "\nStorybook mock for the `CodeEditor` component" + ], + "signature": [ + { + "pluginId": "@kbn/code-editor-mocks", + "scope": "common", + "docId": "kibKbnCodeEditorMocksPluginApi", + "section": "def-common.CodeEditorStorybookMock", + "text": "CodeEditorStorybookMock" + }, + " extends ", + { + "pluginId": "@kbn/shared-ux-storybook-mock", + "scope": "common", + "docId": "kibKbnSharedUxStorybookMockPluginApi", + "section": "def-common.AbstractStorybookMock", + "text": "AbstractStorybookMock" + }, + "<", + "Props", + ", {}, PropArguments, {}>" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments", + "type": "Object", + "tags": [], + "label": "propArguments", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.languageId", + "type": "Object", + "tags": [], + "label": "languageId", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.languageId.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.languageId.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.languageId.options", + "type": "Array", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.languageId.defaultValue", + "type": "string", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.value", + "type": "Object", + "tags": [], + "label": "value", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.value.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.value.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.value.defaultValue", + "type": "string", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.arialabel", + "type": "Object", + "tags": [], + "label": "'aria-label'", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.arialabel.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.arialabel.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.arialabel.defaultValue", + "type": "string", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.allowFullScreen", + "type": "Object", + "tags": [], + "label": "allowFullScreen", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.allowFullScreen.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.allowFullScreen.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.allowFullScreen.defaultValue", + "type": "boolean", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.useDarkTheme", + "type": "Object", + "tags": [], + "label": "useDarkTheme", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.useDarkTheme.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.useDarkTheme.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.useDarkTheme.defaultValue", + "type": "boolean", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.transparentBackground", + "type": "Object", + "tags": [], + "label": "transparentBackground", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.transparentBackground.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.transparentBackground.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.transparentBackground.defaultValue", + "type": "boolean", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.placeholder", + "type": "Object", + "tags": [], + "label": "placeholder", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.placeholder.control", + "type": "Object", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.placeholder.control.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.propArguments.placeholder.defaultValue", + "type": "string", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.serviceArguments", + "type": "Object", + "tags": [], + "label": "serviceArguments", + "description": [], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.dependencies", + "type": "Array", + "tags": [], + "label": "dependencies", + "description": [], + "signature": [ + "never[]" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.getProps", + "type": "Function", + "tags": [], + "label": "getProps", + "description": [], + "signature": [ + "(params?: ", + { + "pluginId": "@kbn/code-editor-mocks", + "scope": "common", + "docId": "kibKbnCodeEditorMocksPluginApi", + "section": "def-common.Params", + "text": "Params" + }, + " | undefined) => ", + "Props" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.getProps.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + { + "pluginId": "@kbn/code-editor-mocks", + "scope": "common", + "docId": "kibKbnCodeEditorMocksPluginApi", + "section": "def-common.Params", + "text": "Params" + }, + " | undefined" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.CodeEditorStorybookMock.getServices", + "type": "Function", + "tags": [], + "label": "getServices", + "description": [], + "signature": [ + "() => { width?: string | number | undefined; height?: string | number | undefined; languageId: enum; value: string; onChange?: ((value: string, event: ", + "editor", + ".IModelContentChangedEvent) => void) | undefined; options?: ", + "editor", + ".IStandaloneEditorConstructionOptions | undefined; suggestionProvider?: ", + "languages", + ".CompletionItemProvider | undefined; signatureProvider?: ", + "languages", + ".SignatureHelpProvider | undefined; hoverProvider?: ", + "languages", + ".HoverProvider | undefined; languageConfiguration?: ", + "languages", + ".LanguageConfiguration | undefined; editorWillMount?: (() => void) | undefined; overrideEditorWillMount?: (() => void) | undefined; editorDidMount?: ((editor: ", + "editor", + ".IStandaloneCodeEditor) => void) | undefined; useDarkTheme?: boolean | undefined; transparentBackground?: boolean | undefined; fullWidth?: boolean | undefined; placeholder?: string | undefined; 'aria-label'?: string | undefined; isCopyable?: boolean | undefined; allowFullScreen?: boolean | undefined; }" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/code-editor-mocks", + "id": "def-common.Params", + "type": "Type", + "tags": [], + "label": "Params", + "description": [], + "signature": [ + "{ value: any; placeholder: any; \"aria-label\": any; allowFullScreen: any; languageId: any; useDarkTheme: any; transparentBackground: any; }" + ], + "path": "packages/shared-ux/code_editor/mocks/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_code_editor_mocks.mdx b/api_docs/kbn_code_editor_mocks.mdx new file mode 100644 index 0000000000000..d2763366f0f01 --- /dev/null +++ b/api_docs/kbn_code_editor_mocks.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnCodeEditorMocksPluginApi +slug: /kibana-dev-docs/api/kbn-code-editor-mocks +title: "@kbn/code-editor-mocks" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/code-editor-mocks plugin +date: 2023-02-01 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mocks'] +--- +import kbnCodeEditorMocksObj from './kbn_code_editor_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 37 | 0 | 36 | 0 | + +## Common + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 069f23a0c6871..cf62d1fdd176c 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 444b276790315..f02f6470e5293 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 4f30ccfb5a5ea..77d8e550fb763 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index e1cf4c7c81a86..5311dcb05deb2 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 90acfb8d3c42d..65409b1480c71 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx index 989bfddc5ad4c..9d6182b553767 100644 --- a/api_docs/kbn_content_management_table_list.mdx +++ b/api_docs/kbn_content_management_table_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list title: "@kbn/content-management-table-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list'] --- import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 9207788b71dcb..2beae539bfec7 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 10ff4b00e813d..f39ca428da8da 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 0a3ad2de810c4..2079010102245 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 5e25155fe99b3..1283a3c3910a5 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index c735376e9bb3d..6b6cf4ab4e379 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index fca2385c43a2f..77f45608e9620 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 185c8a8c0d5da..098b044bc5744 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index eca95e4f9bb4d..1fe0ab33b6825 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index e3685fc2066d8..e9975d7d0676e 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 65fd987d8573e..cc4ed0cf981da 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 18e2f252c0c85..1aa8e70521510 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 6964da198d9a6..a4711f44713aa 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 841808f6c5d2d..76589d63b7b9e 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index c7c6e08deedc7..ef2ab6b0d676c 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 53833a277ff3b..a4340f8ace2ce 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 4626b08cc0781..abe2299780108 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 4e578e84321dd..dbf572cd5938b 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 69bbcc7424ca2..072b658f363fb 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 9f9920fbfcb44..bff0d619657c5 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 18f8e597892b9..f821fa0c13abd 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 22282d38e237a..86fe91c2d17fa 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 6851754193ed1..0a8bf1c86489e 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 4603c1b5db2c0..2c321aba988ac 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index d66ae746b8dd1..46a811ac6b85c 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 4607944fe34f2..6de686cfa251e 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index d36082c846d19..c93092cfea546 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 227fe7e79e6b0..502bcf575a946 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index e8525bba73e6f..6f76eb40edc51 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.devdocs.json b/api_docs/kbn_core_custom_branding_server.devdocs.json index bf777d2385605..ed18f14cb7ff5 100644 --- a/api_docs/kbn_core_custom_branding_server.devdocs.json +++ b/api_docs/kbn_core_custom_branding_server.devdocs.json @@ -76,6 +76,88 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-custom-branding-server", + "id": "def-common.CustomBrandingSetup.getBrandingFor", + "type": "Function", + "tags": [], + "label": "getBrandingFor", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ", options: { unauthenticated?: boolean | undefined; }) => Promise<", + { + "pluginId": "@kbn/core-custom-branding-common", + "scope": "common", + "docId": "kibKbnCoreCustomBrandingCommonPluginApi", + "section": "def-common.CustomBranding", + "text": "CustomBranding" + }, + ">" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-custom-branding-server", + "id": "def-common.CustomBrandingSetup.getBrandingFor.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-custom-branding-server", + "id": "def-common.CustomBrandingSetup.getBrandingFor.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-custom-branding-server", + "id": "def-common.CustomBrandingSetup.getBrandingFor.$2.unauthenticated", + "type": "CompoundType", + "tags": [], + "label": "unauthenticated", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -112,7 +194,7 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - ") => ", + ", unauthenticated: boolean) => ", { "pluginId": "@kbn/utility-types", "scope": "common", @@ -155,6 +237,17 @@ "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-custom-branding-server", + "id": "def-common.CustomBrandingFetchFn.$2", + "type": "boolean", + "tags": [], + "label": "unauthenticated", + "description": [], + "path": "packages/core/custom-branding/core-custom-branding-server/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index f191340be9c13..039d92aab7121 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 6 | 0 | 6 | 0 | +| 11 | 0 | 11 | 0 | ## Common diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index b7c7ce11ed2c2..bb1594a6822d5 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index bcf53c6b63efc..9b1287438d728 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index a969e55e05969..0815d0825c3a9 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 74d1f269f1bc5..1de79e8e0917e 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index af85ababf4a9f..10912630173e4 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index f5f50113bb830..00290f5415616 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 20535709f9bf4..0d66218afe409 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index e6f46741b98db..0b64cf1c4d7af 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 411104ede9491..2cf2e8e232c97 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 2e0f829c6f5d4..5448f89edab09 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index d046b63b65748..f414981ecbe07 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index db61e55d08c73..cbefeb615f12a 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index e0b8cf8c6275d..f96ed485483a2 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index f81a4b1dca0b2..f9170085bd0cd 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 878429f1f432c..176413c48a8c7 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index b74d61fd48bc0..eea069dabba9d 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index a0f6c751f1322..ce96fc2438d40 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index 675d43d95945c..99a9801ebe105 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 3468fa27b7967..7b5aa7edbd95c 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 9f58849fedb91..2cb9458d1d2e3 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 2f5d1108069ed..52c388cbb61c8 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index ddbdafb1c895b..c886f385d9416 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 8e317783178fe..ef7a19484cd56 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index e18968f71d09c..8e6e52b1de453 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 3bbc3dcb1ad3f..ab96f02695b0b 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 7bc1f355f3c50..6813312f4008d 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 1412f197a1178..149a501ac005f 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 2f6dde2fb228d..c9d26fb2b8bbe 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index acd6f5098cc1b..72ae38011da7e 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index c27ee0968e3c6..679c7f1a3f03b 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 0228a0b7f398c..5526a243ae9ef 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index cb8eb78565089..9bd8c24d66cd3 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index e807dd4b2bf2e..7b4d27ab0f550 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 4a3e1bb95abf0..ed788d9d0142f 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index ed4d689190141..bbba6b2c0c77a 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 66cbcfc913e75..3bd9101458901 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 16f80c2ef88c9..bc74ce1ce9f15 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index c76203c29fdd9..009de5c51edbb 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index de8f7fb32b44d..7bee4ae5e4676 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index eaacfeda3d0dc..caac0f15b41fd 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 3520dc1324a6e..1833b29b44bf6 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 6b7d2bcd26a8a..617f3ee0384cf 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 2d88ab176bdcf..51a88fbffcb66 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index d6147f89f809e..b3ac40cbcf54e 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 799798ef3955b..c959ac88b0051 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 2061333d751ba..47826f1992a76 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 0fdb792899e32..1109046184dba 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 84d4904227011..0c4cf114e1eb6 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 742add69ed5a7..99fd90b828adb 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 1f47663a9540e..89cd1ddaaec76 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 1dc629cf9d2e0..6715e20c8b786 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index 23c3e5ea7bcb4..d7b3a88c9551c 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -803,27 +803,27 @@ }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" }, { "plugin": "synthetics", diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 859261d83c679..5bd8b4fb8637d 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index e7b57a81de800..043b3a1a6bc2a 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index ac5ebf3e71e50..1e5240c6f6076 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index a3fed21b9979b..89551ade8b628 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 52ef44431a4d5..e26b0c64c9a26 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 23624669a3f8f..b86d2d46a836b 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 2449965e82474..8a00f03dff58f 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 65ffa182d4220..b24610b43af97 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index a0df57e09c979..debdb6573cf77 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index c67dd8b1dd1ca..4343bd4875805 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index c8ef726cdeb7d..4ff50e2d184c0 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 832de383b526e..c42993ddc7317 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 6ffc31d1fca27..b415539e7b8a0 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 4596f78a805ca..26083be71f436 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 069fcffdcb454..8ecf2674465bd 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index a6bd44f60b7c8..f5d5ba2f3401f 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 3b1e9026a48b9..f184df2cf48b2 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index fc77245dc3cf3..f5ed618d66457 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 4600e9d212c84..fe505e2a95f96 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 49d93560e3079..5e7088bec3e02 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index fb4b14a8a8542..92db82741b2e6 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 3fdf81609d4d2..f08b3ac8f238e 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 5c6dbc9a9ccb9..8eec5b674bec5 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 008e70efbdf43..19083e19794fd 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index f76760c79e8c4..6a0378f61fd29 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 7fa45105d4416..1565e4acf57aa 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 2fa60c1304427..07bd1183cf0b8 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 6ab1c7d6d41e2..05dd9332793d2 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 915d1bee31595..8050722d6309b 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 9196688eec7e7..196285a03a1cb 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 300ff8710b6d6..12695d092963e 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index f8a1aeaed572f..3e95fac0ac13e 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index b3dec96995eec..9987be67b4db9 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 50e74752502a2..effbbc3d521aa 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json index 27cd4d841d19d..cf0e48e2ee884 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json +++ b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json @@ -2305,15 +2305,15 @@ }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_location_monitors.ts" }, { "plugin": "synthetics", - "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitors_page/management/list_filters/use_filters.ts" + "path": "x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_name.ts" }, { "plugin": "graph", diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 387bf244f3e84..a6edaff7e5b52 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 7b51ae2386e4f..8c03cc1a94d12 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx index 732c0f388c492..5d588bdb8555a 100644 --- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal title: "@kbn/core-saved-objects-api-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal'] --- import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 4dbed3adb50a8..e6ad91427b5d9 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 168a6de3884bf..65b999860fb93 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 5ed0f53c38540..0ebbe272cdce8 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 3d3d8c7372407..23c26af387456 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 66402b1e33977..eaf9d5e5c98ee 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 05461ace74602..873ca1eddb1e2 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.devdocs.json b/api_docs/kbn_core_saved_objects_common.devdocs.json index 0b1701f00d67d..35b92637b9190 100644 --- a/api_docs/kbn_core_saved_objects_common.devdocs.json +++ b/api_docs/kbn_core_saved_objects_common.devdocs.json @@ -1564,6 +1564,14 @@ "plugin": "cases", "path": "x-pack/plugins/cases/server/services/so_references.ts" }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, + { + "plugin": "cases", + "path": "x-pack/plugins/cases/server/services/so_references.ts" + }, { "plugin": "lists", "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts" @@ -3289,6 +3297,18 @@ "plugin": "lens", "path": "x-pack/plugins/lens/public/app_plugin/share_action.ts" }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts" + }, { "plugin": "infra", "path": "x-pack/plugins/infra/public/common/visualizations/lens/types.ts" @@ -3360,6 +3380,14 @@ { "plugin": "cases", "path": "x-pack/plugins/cases/server/services/user_actions/test_utils.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts" + }, + { + "plugin": "infra", + "path": "x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts" } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 12c46e4a55d1f..642ed5d9f5669 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 2df56466d7b39..b641c0e5f2a90 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 3e322719e6c3f..a311e28395922 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 0c78327852c14..61b3107ed2e38 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index e7c2e6d106e8b..13aac634a0dbe 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 4fccae05fcfb9..06ed0898c9e3a 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 3968ab5e944ea..5c4cedca39cd4 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 5c8209b1dd160..7cdcfb95a84ae 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index a28d111a550b2..3dffe1a065d04 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 2bab6b5ae9535..8ed3896dae54d 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 357fa83730435..1727f27bd6d69 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 8dc92118c079f..afd9f57ffe411 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index f8c6c61f848cc..b12ab118289ed 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 8f5a6fbadf09b..2caed0589d6b6 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 390f909ce2513..5d4930f4f8a0e 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index ca0f19aa71b3a..f6637682ead74 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index de94f700b713f..e7760ed2dbeeb 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 815aa3601ead0..2ed6e76198a27 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 3c2f405761f69..01e170178bfc7 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index df472a1696b82..afbf87e89087f 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index eee3789145151..deaaf3ab690c9 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] --- import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 105503f3e6a6c..b9cba735ac744 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 4457d3c3e80d2..fe44d2b07fadf 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index e621db85bb8e1..c211345676ac2 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 35c0617de2b6f..7b608f7b644fb 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index dc1710d40a927..7f975e31e5b54 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 50d479a704290..b98debb2b85f3 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 9b4f92f88656a..4d4474a404c93 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 655d36907edc1..20a6052320b7c 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 721850f712396..d9acef7aa740c 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index d94d8f39d44d2..bbc68824fcf52 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index fe32fe6d09742..b3fb6316a7eec 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index f6f73955e945d..7591e1167b2f1 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index aa57bcafa5d95..0a95700eb48bf 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 31aa95ab485f3..d56fe5d87d046 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 5c7513c4776ef..39f76e4addcaa 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 20efd16d9c4d4..18d5de0d711fd 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 93a3bdf8fb699..fd0812f80843f 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index d2574656ee11c..c1862d838ece9 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index b027188acb6d6..b7cc038b52777 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index 02ef2e3f1f149..95bd54c7055c2 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -840,7 +840,7 @@ "label": "fleet", "description": [], "signature": [ - "{ readonly beatsAgentComparison: string; readonly guide: string; readonly fleetServer: string; readonly fleetServerAddFleetServer: string; readonly settings: string; readonly settingsFleetServerHostSettings: string; readonly settingsFleetServerProxySettings: string; readonly troubleshooting: string; readonly elasticAgent: string; readonly datastreams: string; readonly datastreamsILM: string; readonly datastreamsNamingScheme: string; readonly installElasticAgent: string; readonly installElasticAgentStandalone: string; readonly packageSignatures: string; readonly upgradeElasticAgent: string; readonly learnMoreBlog: string; readonly apiKeysLearnMore: string; readonly onPremRegistry: string; readonly secureLogstash: string; readonly agentPolicy: string; }" + "{ readonly beatsAgentComparison: string; readonly guide: string; readonly fleetServer: string; readonly fleetServerAddFleetServer: string; readonly settings: string; readonly settingsFleetServerHostSettings: string; readonly settingsFleetServerProxySettings: string; readonly troubleshooting: string; readonly elasticAgent: string; readonly datastreams: string; readonly datastreamsILM: string; readonly datastreamsNamingScheme: string; readonly datastreamsManualRollover: string; readonly installElasticAgent: string; readonly installElasticAgentStandalone: string; readonly packageSignatures: string; readonly upgradeElasticAgent: string; readonly learnMoreBlog: string; readonly apiKeysLearnMore: string; readonly onPremRegistry: string; readonly secureLogstash: string; readonly agentPolicy: string; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index a9529773dfc77..e363534129044 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index d809cce3b6274..f8ffc55cb1ff3 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index f6524ce9c0971..e41b559cb454e 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx index 84af0a7b98494..df1510473c72d 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 360f4b68d6d87..1e38d7a4f0361 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 714d4f044fe8c..7a4bed39fffa6 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 3c3a74d96af97..3ee87cadca56f 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index da781ad196acd..d469864ce6eee 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 5c495dd649658..8572b03b09bc4 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 7c43007947950..f4a9ee3a1ba09 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 159dc92930b43..e81cde7c6cb0c 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index d3c1d8f62910f..046beb59d0205 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index b91ea5b281d51..0937e3bc242c4 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 413dd63d35735..efa0e41495a92 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx index 64a9c1e5b7bf2..495408a2de7e1 100644 --- a/api_docs/kbn_get_repo_files.mdx +++ b/api_docs/kbn_get_repo_files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files title: "@kbn/get-repo-files" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/get-repo-files plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files'] --- import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.devdocs.json b/api_docs/kbn_guided_onboarding.devdocs.json index 09b27f31eede7..246ef8f89dd34 100644 --- a/api_docs/kbn_guided_onboarding.devdocs.json +++ b/api_docs/kbn_guided_onboarding.devdocs.json @@ -21,31 +21,31 @@ "functions": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.GuideCard", + "id": "def-common.GuideCards", "type": "Function", "tags": [], - "label": "GuideCard", + "label": "GuideCards", "description": [], "signature": [ - "({ useCase, guides, activateGuide, isDarkTheme, addBasePath, }: ", - "GuideCardProps", + "(props: ", + "GuideCardsProps", ") => JSX.Element" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_cards.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.GuideCard.$1", + "id": "def-common.GuideCards.$1", "type": "Object", "tags": [], - "label": "{\n useCase,\n guides,\n activateGuide,\n isDarkTheme,\n addBasePath,\n}", + "label": "props", "description": [], "signature": [ - "GuideCardProps" + "GuideCardsProps" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_cards.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -56,143 +56,32 @@ }, { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard", + "id": "def-common.GuideFilters", "type": "Function", "tags": [], - "label": "InfrastructureLinkCard", + "label": "GuideFilters", "description": [], "signature": [ - "({ navigateToApp, isDarkTheme, addBasePath, }: { navigateToApp: (appId: string, options?: ", - { - "pluginId": "@kbn/core-application-browser", - "scope": "common", - "docId": "kibKbnCoreApplicationBrowserPluginApi", - "section": "def-common.NavigateToAppOptions", - "text": "NavigateToAppOptions" - }, - " | undefined) => Promise; isDarkTheme: boolean; addBasePath: (url: string) => string; }) => JSX.Element" + "({ activeFilter, setActiveFilter }: GuideFiltersProps) => JSX.Element" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_filters.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1", + "id": "def-common.GuideFilters.$1", "type": "Object", "tags": [], - "label": "{\n navigateToApp,\n isDarkTheme,\n addBasePath,\n}", + "label": "{ activeFilter, setActiveFilter }", "description": [], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", + "signature": [ + "GuideFiltersProps" + ], + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_filters.tsx", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.navigateToApp", - "type": "Function", - "tags": [], - "label": "navigateToApp", - "description": [], - "signature": [ - "(appId: string, options?: ", - { - "pluginId": "@kbn/core-application-browser", - "scope": "common", - "docId": "kibKbnCoreApplicationBrowserPluginApi", - "section": "def-common.NavigateToAppOptions", - "text": "NavigateToAppOptions" - }, - " | undefined) => Promise" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.navigateToApp.$1", - "type": "string", - "tags": [], - "label": "appId", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.navigateToApp.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-application-browser", - "scope": "common", - "docId": "kibKbnCoreApplicationBrowserPluginApi", - "section": "def-common.NavigateToAppOptions", - "text": "NavigateToAppOptions" - }, - " | undefined" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.isDarkTheme", - "type": "boolean", - "tags": [], - "label": "isDarkTheme", - "description": [], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.addBasePath", - "type": "Function", - "tags": [], - "label": "addBasePath", - "description": [], - "signature": [ - "(url: string) => string" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.InfrastructureLinkCard.$1.addBasePath.$1", - "type": "string", - "tags": [], - "label": "url", - "description": [], - "signature": [ - "string" - ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/infrastructure_link_card.tsx", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ] + "isRequired": true } ], "returnComment": [], @@ -638,15 +527,16 @@ "misc": [ { "parentPluginId": "@kbn/guided-onboarding", - "id": "def-common.GuideCardUseCase", + "id": "def-common.GuideFilterValues", "type": "Type", "tags": [], - "label": "GuideCardUseCase", + "label": "GuideFilterValues", "description": [], "signature": [ - "\"search\" | \"kubernetes\" | \"siem\"" + "\"all\" | ", + "GuideCardSolutions" ], - "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_card.tsx", + "path": "packages/kbn-guided-onboarding/src/components/landing_page/guide_filters.tsx", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index e078a0ec24285..cf07b2c8de710 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 58 | 0 | 56 | 1 | +| 52 | 0 | 50 | 2 | ## Common diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 126aba552fcff..b4e2b37bdcee5 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 6adb4eb34c18e..b0b1612d91570 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 2e095a65db292..895d598ea4fe5 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 2b295a805e432..4e710b3dab4f9 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index c397501db921f..edbbf4e8169da 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 2a49529919548..abc1ac2d7e6a8 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 5fcd0953e989d..b5493cc1b3896 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 2c7b594374be4..c05e243c2af8e 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index b578d6f0ff054..43de89d4d2e6e 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index a5fd9cbf4e7dd..d5ed1281c13da 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 11853327bf239..bcee792974fe7 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 11b23f85db0ea..ce7ab220e8464 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 3927f61297815..754afcc9fc831 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.devdocs.json b/api_docs/kbn_kibana_manifest_schema.devdocs.json index fb46dedb5099d..e9509c172d6e8 100644 --- a/api_docs/kbn_kibana_manifest_schema.devdocs.json +++ b/api_docs/kbn_kibana_manifest_schema.devdocs.json @@ -1034,6 +1034,269 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build", + "type": "Object", + "tags": [], + "label": "build", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties", + "type": "Object", + "tags": [], + "label": "properties", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.extraExcludes", + "type": "Object", + "tags": [], + "label": "extraExcludes", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.extraExcludes.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.extraExcludes.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.extraExcludes.items", + "type": "Object", + "tags": [], + "label": "items", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.extraExcludes.items.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.noParse", + "type": "Object", + "tags": [], + "label": "noParse", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.noParse.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.noParse.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.noParse.items", + "type": "Object", + "tags": [], + "label": "items", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.build.properties.noParse.items.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + } + ] + } + ] + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders", + "type": "Object", + "tags": [], + "label": "serviceFolders", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders.items", + "type": "Object", + "tags": [], + "label": "items", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders.items.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.serviceFolders.deprecated", + "type": "boolean", + "tags": [], + "label": "deprecated", + "description": [], + "signature": [ + "true" + ], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.description", + "type": "Object", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.description.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/kibana-manifest-schema", + "id": "def-common.MANIFEST_V2.properties.description.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ] }, @@ -1045,7 +1308,7 @@ "label": "oneOf", "description": [], "signature": [ - "({ type: string; properties: { type: { enum: string[]; }; plugin: { type: string; required: string[]; properties: { id: { type: string; pattern: string; }; configPath: { description: string; type: string; items: { type: string; pattern: string; }; }; requiredPlugins: { type: string; items: { type: string; pattern: string; }; }; optionalPlugins: { type: string; items: { type: string; pattern: string; }; }; description: { description: string; type: string; }; enabledOnAnonymousPages: { description: string; type: string; }; serviceFolders: { description: string; type: string; items: { type: string; }; }; }; }; }; } | { type: string; properties: { type: { const: string; }; sharedBrowserBundle: { type: string; description: string; }; }; } | { type: string; properties: { type: { enum: string[]; }; }; })[]" + "({ type: string; required: string[]; properties: { type: { const: string; }; plugin: { type: string; required: string[]; properties: { id: { type: string; pattern: string; }; configPath: { description: string; oneOf: ({ type: string; items: { type: string; }; } | { type: string; })[]; }; requiredPlugins: { type: string; items: { type: string; pattern: string; }; }; optionalPlugins: { type: string; items: { type: string; pattern: string; }; }; enabledOnAnonymousPages: { description: string; type: string; }; type: { description: string; enum: string[]; }; browser: { type: string; description: string; }; server: { type: string; description: string; }; }; }; }; } | { type: string; properties: { type: { const: string; }; sharedBrowserBundle: { type: string; description: string; }; }; } | { type: string; properties: { type: { enum: string[]; }; }; })[]" ], "path": "packages/kbn-kibana-manifest-schema/src/kibana_json_v2_schema.ts", "deprecated": false, diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 3e923c48e785f..bda910dd759c7 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 86 | 0 | 85 | 0 | +| 108 | 0 | 107 | 0 | ## Common diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index ec6755a037e54..b7a9027702ecd 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 2884e1a95e53e..46ffc65b38056 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 1f5e5a603529a..bc8d8d9b625dc 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index e4fa5b1fc4406..f14bc4ece1457 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 9073884e3e906..927425c96d298 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 50230f0c37c4e..bacbe676b54d4 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index e0a807ae7fcfc..5ecb21bf53852 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 8663b0973a4fa..f52e97ed37226 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index bd86f138c7f45..09bcf080430d0 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index e8945cdbae852..2fe324778985d 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 32b05613d6862..669cdaaff9645 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 19e67e69be75c..dae7c87a336f8 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 726577ba097d1..83189bab3740d 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index a5b520a359366..0ab1f83f64497 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 9b21b62a02005..95d746e2d8a84 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index c1c4409f67b83..dc5b6494ced15 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index b6f86dc0cd4fa..dc84080dfbf45 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 0229ccceff20c..a4e4d01010871 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 1ac67e0201af6..37ae702f55a2e 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 182b3d18d1317..81f20bd4881b3 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 4a2f7a1548390..2e0ec4d77093b 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index bcc9621f6eaf5..22e0f619f59c0 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index a8aa63023c828..832404df2d18c 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 323e39b6192ff..258a9f199552d 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index eae842c432038..98787ab292c77 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 4dd0be8388470..b49a61b295ca2 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 977aecbf64ae4..394f805e6cb62 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index 41036062e5590..1b93a3e0236c8 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -328,6 +328,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.ALERT_LAST_DETECTED", + "type": "string", + "tags": [], + "label": "ALERT_LAST_DETECTED", + "description": [], + "signature": [ + "\"kibana.alert.last_detected\"" + ], + "path": "packages/kbn-rule-data-utils/src/default_alerts_as_data.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.ALERT_NAMESPACE", @@ -1296,7 +1311,7 @@ "label": "DefaultAlertFieldName", "description": [], "signature": [ - "\"kibana\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert\" | \"kibana.alert.rule\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.status\" | \"kibana.alert.flapping\" | \"kibana.version\" | \"kibana.alert.workflow_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.tags\" | \"kibana.alert.id\"" + "\"kibana\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert\" | \"kibana.alert.rule\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.start\" | \"kibana.alert.time_range\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.status\" | \"kibana.alert.flapping\" | \"kibana.version\" | \"kibana.alert.workflow_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.tags\" | \"kibana.alert.last_detected\" | \"kibana.alert.id\"" ], "path": "packages/kbn-rule-data-utils/src/default_alerts_as_data.ts", "deprecated": false, diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index aaae88b9fcbb1..d2a1c175ac15b 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 99 | 0 | 96 | 0 | +| 100 | 0 | 97 | 0 | ## Common diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 9d59e07d5c104..fd1cdb5c4d7e8 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 4dd583520714e..a006a87f124ee 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index dd045c36fcb75..44d76174ea74b 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 0d5b772d8a0dd..47e63f7995170 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 1ae1b5f1ccda9..e7e48598c9bf8 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index bbe20a810001c..9eee5fdf0e609 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 7d5c918352fe6..b1899b9468872 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index df64ef56e48f6..f514e8f37a65c 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 515fbef38847a..ab436077e4f77 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 2bb6eec809af1..907e0343d6ecd 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 69ccb1593f4d8..c417878f856bc 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index f85008faeacc6..11007f3ef82bc 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 0e2bbcefdc4d8..74cba902b01e5 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 3ba4c88efcf2e..e61f99c7727d5 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index b3be901ccd130..186208539f0e1 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 1354047ee3695..b0438ee5ca704 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 576d0e5930ffd..1d38ea6f878aa 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 3db2e619c3bad..7536ba82d3aad 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 0ddbad2831322..3487a0a506f86 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 613403ecdf068..152766810636e 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx index 129b0d1f90c20..6de8f422aa033 100644 --- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx +++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components title: "@kbn/shared-ux-avatar-user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components'] --- import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 0ddb60c7d6611..8942ece76a75e 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx index a1ae33e86b3f9..dbd3e398962e8 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks title: "@kbn/shared-ux-button-exit-full-screen-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks'] --- import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 64cc68ecff23d..d380c77cce04b 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 30dd624ba0889..7fb95d070966f 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 4c8a14cb5301d..9a7e46e693946 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 1f27f197f6aa7..d0b2fc0a9ceed 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index d6fa862f09ead..e1fd6be1eaa2f 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 36d55cb5d5ca2..a72f5a93df335 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 6b94f4f24bbca..baad7c1de6f71 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 060c2573ec94b..e449c2a4856ed 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index bb9b58d2daf61..8ae88cf8710cc 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 663368f7eff44..5e7c20d7324a8 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 729eaf3eaaa43..6d3d52245e244 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 837d0a3e579df..167b29b57ad0c 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 03ee5c2618af1..c65c446c3147b 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index cd35f7e5cf03d..9b8fe08216386 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.devdocs.json b/api_docs/kbn_shared_ux_page_analytics_no_data.devdocs.json index 82ac24347e054..217e49d5572e4 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.devdocs.json +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.devdocs.json @@ -66,7 +66,7 @@ "\nA pure component of an entire page that can be displayed when Kibana \"has no data\", specifically for Analytics." ], "signature": [ - "({ kibanaGuideDocLink, onDataViewCreated, allowAdHocDataView, }: ", + "({ kibanaGuideDocLink, onDataViewCreated, allowAdHocDataView, showPlainSpinner, }: ", "Props", ") => JSX.Element" ], @@ -79,7 +79,7 @@ "id": "def-common.AnalyticsNoDataPage.$1", "type": "Object", "tags": [], - "label": "{\n kibanaGuideDocLink,\n onDataViewCreated,\n allowAdHocDataView,\n}", + "label": "{\n kibanaGuideDocLink,\n onDataViewCreated,\n allowAdHocDataView,\n showPlainSpinner,\n}", "description": [], "signature": [ "Props" diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index dac874e621691..76d2cfede6e3d 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json index ee58f4094a5e3..7bd3c319b4cfd 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json @@ -108,6 +108,54 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/shared-ux-page-analytics-no-data-mocks", + "id": "def-common.StorybookMock.serviceArguments.customBranding", + "type": "Object", + "tags": [], + "label": "customBranding", + "description": [], + "path": "packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/shared-ux-page-analytics-no-data-mocks", + "id": "def-common.StorybookMock.serviceArguments.customBranding.hasCustomBranding$", + "type": "Object", + "tags": [], + "label": "hasCustomBranding$", + "description": [], + "path": "packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/shared-ux-page-analytics-no-data-mocks", + "id": "def-common.StorybookMock.serviceArguments.customBranding.hasCustomBranding$.control", + "type": "string", + "tags": [], + "label": "control", + "description": [], + "path": "packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/shared-ux-page-analytics-no-data-mocks", + "id": "def-common.StorybookMock.serviceArguments.customBranding.hasCustomBranding$.defaultValue", + "type": "boolean", + "tags": [], + "label": "defaultValue", + "description": [], + "path": "packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] } ] }, @@ -219,6 +267,24 @@ "children": [], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/shared-ux-page-analytics-no-data-mocks", + "id": "def-common.getServicesMockCustomBranding", + "type": "Function", + "tags": [], + "label": "getServicesMockCustomBranding", + "description": [], + "signature": [ + "() => ", + "AnalyticsNoDataPageServices" + ], + "path": "packages/shared-ux/page/analytics_no_data/mocks/src/jest.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [], diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 246359c3f1671..9852fad0567f0 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 0 | 12 | 0 | +| 17 | 0 | 17 | 0 | ## Common diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.devdocs.json b/api_docs/kbn_shared_ux_page_kibana_no_data.devdocs.json index e313723153e65..0076a7f37dc80 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.devdocs.json +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.devdocs.json @@ -29,7 +29,7 @@ "\nA page to display when Kibana has no data, prompting a person to add integrations or create a new data view." ], "signature": [ - "({ onDataViewCreated, noDataConfig, allowAdHocDataView, }: ", + "({ onDataViewCreated, noDataConfig, allowAdHocDataView, showPlainSpinner, }: ", "KibanaNoDataPageProps", ") => JSX.Element | null" ], @@ -42,7 +42,7 @@ "id": "def-common.KibanaNoDataPage.$1", "type": "Object", "tags": [], - "label": "{\n onDataViewCreated,\n noDataConfig,\n allowAdHocDataView,\n}", + "label": "{\n onDataViewCreated,\n noDataConfig,\n allowAdHocDataView,\n showPlainSpinner,\n}", "description": [], "signature": [ "KibanaNoDataPageProps" diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index b9c8d7b042dac..55c1ac0909315 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json index 6baad57602555..2134860750376 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json @@ -293,7 +293,7 @@ "section": "def-common.Params", "text": "Params" }, - ") => { noDataConfig: { solution: any; logo: any; action: { elasticAgent: { title: string; }; }; docsLink: string; }; onDataViewCreated: ", + ") => { showPlainSpinner: boolean; noDataConfig: { solution: any; logo: any; action: { elasticAgent: { title: string; }; }; docsLink: string; }; onDataViewCreated: ", "HandlerFunction", "; }" ], diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 4ab936ba53775..0c1e7b9e706a9 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index d67cbc6398ee7..9cc367f56e98e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 0295d42172b33..01a5fc9ee832d 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 6e7c46200490d..8d45bf81844d6 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 5306cc61ad823..4df85a30b0d54 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 953a303571a2e..5238d26b1ad74 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index c975b40c2d3c0..b6dbf00781ed3 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index ce5590d9103d9..ddc86afca0ffd 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 66bdc9c0ac3f5..d23ed78e67898 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index fea5b27e93efe..76561c82a3f30 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.devdocs.json b/api_docs/kbn_shared_ux_prompt_not_found.devdocs.json index 99a5e86068dfb..8b804e94e8b1d 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.devdocs.json +++ b/api_docs/kbn_shared_ux_prompt_not_found.devdocs.json @@ -29,7 +29,7 @@ "\nPredefined `EuiEmptyPrompt` for 404 pages." ], "signature": [ - "({ actions }: NotFoundProps) => JSX.Element" + "({ actions, title, body }: NotFoundProps) => JSX.Element" ], "path": "packages/shared-ux/prompt/not_found/src/not_found_prompt.tsx", "deprecated": false, @@ -40,7 +40,7 @@ "id": "def-common.NotFoundPrompt.$1", "type": "Object", "tags": [], - "label": "{ actions }", + "label": "{ actions, title, body }", "description": [], "signature": [ "NotFoundProps" diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 0d60150cd58b8..e160301c5ecc0 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index e6ce595ac568e..a8c45986c6704 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 920afbc20a329..7ec14b31d171f 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 5baf421f29c62..c97b2c79c3245 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index 5c97689451e8b..d8885d1f869e8 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index ff2270fc7658b..b1e4ccbe45ff6 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.devdocs.json b/api_docs/kbn_slo_schema.devdocs.json index e0241d83dc24d..74ba519202778 100644 --- a/api_docs/kbn_slo_schema.devdocs.json +++ b/api_docs/kbn_slo_schema.devdocs.json @@ -520,7 +520,7 @@ "label": "FindSLOResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }" + "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -535,7 +535,7 @@ "label": "GetSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -557,6 +557,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/slo-schema", + "id": "def-common.ManageSLOParams", + "type": "Type", + "tags": [], + "label": "ManageSLOParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/slo-schema", "id": "def-common.SLOResponse", @@ -565,7 +580,7 @@ "label": "SLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -580,7 +595,7 @@ "label": "SLOWithSummaryResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -665,7 +680,7 @@ "label": "UpdateSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -1527,7 +1542,9 @@ "section": "def-common.Duration", "text": "Duration" }, - ", string, unknown>; }>; createdAt: ", + ", string, unknown>; }>; enabled: ", + "BooleanC", + "; createdAt: ", "Type", "; updatedAt: ", "Type", @@ -1787,7 +1804,9 @@ "section": "def-common.Duration", "text": "Duration" }, - ", string, unknown>; }>; createdAt: ", + ", string, unknown>; }>; enabled: ", + "BooleanC", + "; createdAt: ", "Type", "; updatedAt: ", "Type", @@ -2092,6 +2111,26 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/slo-schema", + "id": "def-common.manageSLOParamsSchema", + "type": "Object", + "tags": [], + "label": "manageSLOParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/slo-schema", "id": "def-common.objectiveSchema", @@ -2447,7 +2486,9 @@ "section": "def-common.Duration", "text": "Duration" }, - ", string, unknown>; }>; createdAt: ", + ", string, unknown>; }>; enabled: ", + "BooleanC", + "; createdAt: ", "Type", "; updatedAt: ", "Type", @@ -2659,6 +2700,8 @@ }, ", string, unknown>; }>; revision: ", "NumberC", + "; enabled: ", + "BooleanC", "; createdAt: ", "Type", "; updatedAt: ", @@ -2873,7 +2916,9 @@ "section": "def-common.Duration", "text": "Duration" }, - ", string, unknown>; }>; createdAt: ", + ", string, unknown>; }>; enabled: ", + "BooleanC", + "; createdAt: ", "Type", "; updatedAt: ", "Type", @@ -3113,6 +3158,8 @@ }, ", string, unknown>; }>; revision: ", "NumberC", + "; enabled: ", + "BooleanC", "; createdAt: ", "Type", "; updatedAt: ", @@ -3685,7 +3732,9 @@ "section": "def-common.Duration", "text": "Duration" }, - ", string, unknown>; }>; createdAt: ", + ", string, unknown>; }>; enabled: ", + "BooleanC", + "; createdAt: ", "Type", "; updatedAt: ", "Type", diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index e9ef7a7af2377..d98678ff620b9 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 73 | 0 | 73 | 0 | +| 75 | 0 | 75 | 0 | ## Common diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index cae8b252bb919..9707c52a672b6 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index d03ada1ae175e..fb8b27f0307c3 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index e3a26453bf082..4b69a114d31c6 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 04ac3608174b9..0dec92b0d9388 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 960d40b23b79c..c4b6957ba4a64 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 1e2ace57b7990..eab411a9e9a89 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 935d7de444987..2d28278c774c9 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 44fd681205e76..808dadac6823f 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 951d9b19af659..22c1111321b56 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 68479d0480a5f..dc53137f78be6 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 70dad33d210fa..46f24f68bb5d8 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 1c2e1f15f9654..e83d6f4589d1e 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 673383ef97b67..1159e29cb7949 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 89f4e93704d27..1cb4c5f23ca01 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index fce46e8052a66..3ed69ffa0adac 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index e71ed78870a3b..6971b78773a5c 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 6e4fd9785a7dc..0ded8222bee0e 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 00e072693095c..707b3c2b7db6e 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index db5e4488f9758..3808cc6be6503 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index e5fd98c4ccc0b..4852d6072f7af 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 6352f703cc561..651b1364ddc45 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index fe1bcfa772cf6..04e9b5976f489 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 96d556658dbdf..c0c777ea22526 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 29a49dcef5bb7..a96869c9a9e09 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 54828ce874a67..6cb7cb99663ec 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index d627d5d0c6893..b6a176756c1c4 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index e9199a657935a..6cca0e0beff9b 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 2096ce8598128..ed0c71295e27f 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 713b6e659790a..6e44a2a6abe88 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 362ddfc8be3aa..fa53d9fff26d7 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index a0ec73841ae03..a823653af0f55 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index f8db2ec390c7a..2fe67de956160 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 7372a92b62978..c701aff90516f 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index dfad2c51573b2..a59eee2fc5fdd 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index e2be5b8a93ce7..06dc4e1ef55d4 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index e935ba982517e..557df4f10cc2c 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 38a0fe38afb2b..36b7b8cac7d0e 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index d369b808ecb52..d345c5b0e8783 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -4353,6 +4353,26 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "observability", + "id": "def-public.ObservabilityPublicPluginsStart.unifiedSearch", + "type": "Object", + "tags": [], + "label": "unifiedSearch", + "description": [], + "signature": [ + { + "pluginId": "unifiedSearch", + "scope": "public", + "docId": "kibUnifiedSearchPluginApi", + "section": "def-public.UnifiedSearchPublicPluginStart", + "text": "UnifiedSearchPublicPluginStart" + } + ], + "path": "x-pack/plugins/observability/public/plugin.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "observability", "id": "def-public.ObservabilityPublicPluginsStart.home", @@ -10002,7 +10022,85 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; }, ", + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; }, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteCreateOptions", + "text": "ObservabilityRouteCreateOptions" + }, + "> | undefined; \"GET /api/observability/slos/{id}\"?: ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "public", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-public.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /api/observability/slos/{id}\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteHandlerResources", + "text": "ObservabilityRouteHandlerResources" + }, + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteCreateOptions", + "text": "ObservabilityRouteCreateOptions" + }, + "> | undefined; \"GET /api/observability/slos\"?: ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "public", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-public.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /api/observability/slos\", ", + "PartialC", + "<{ query: ", + "PartialC", + "<{ name: ", + "StringC", + "; indicatorTypes: ", + "Type", + "; page: ", + "StringC", + "; perPage: ", + "StringC", + "; sortBy: ", + "UnionC", + "<[", + "LiteralC", + "<\"name\">, ", + "LiteralC", + "<\"indicatorType\">]>; sortDirection: ", + "UnionC", + "<[", + "LiteralC", + "<\"asc\">, ", + "LiteralC", + "<\"desc\">]>; }>; }>, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteHandlerResources", + "text": "ObservabilityRouteHandlerResources" + }, + ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", { "pluginId": "observability", "scope": "server", @@ -10042,7 +10140,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "> | undefined; \"GET /api/observability/slos/{id}\"?: ", + "> | undefined; \"POST /api/observability/slos/{id}/enable\"?: ", { "pluginId": "@kbn/server-route-repository", "scope": "public", @@ -10050,7 +10148,7 @@ "section": "def-public.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/observability/slos/{id}\", ", + "<\"POST /api/observability/slos/{id}/enable\", ", "TypeC", "<{ path: ", "TypeC", @@ -10064,7 +10162,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + ", void, ", { "pluginId": "observability", "scope": "server", @@ -10072,7 +10170,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "> | undefined; \"GET /api/observability/slos\"?: ", + "> | undefined; \"POST /api/observability/slos/{id}/disable\"?: ", { "pluginId": "@kbn/server-route-repository", "scope": "public", @@ -10080,31 +10178,13 @@ "section": "def-public.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/observability/slos\", ", - "PartialC", - "<{ query: ", - "PartialC", - "<{ name: ", - "StringC", - "; indicatorTypes: ", - "Type", - "; page: ", - "StringC", - "; perPage: ", + "<\"POST /api/observability/slos/{id}/disable\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", "StringC", - "; sortBy: ", - "UnionC", - "<[", - "LiteralC", - "<\"name\">, ", - "LiteralC", - "<\"indicatorType\">]>; sortDirection: ", - "UnionC", - "<[", - "LiteralC", - "<\"asc\">, ", - "LiteralC", - "<\"desc\">]>; }>; }>, ", + "; }>; }>, ", { "pluginId": "observability", "scope": "server", @@ -10112,7 +10192,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", + ", void, ", { "pluginId": "observability", "scope": "server", @@ -10656,7 +10736,85 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; }, ", + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; }, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteCreateOptions", + "text": "ObservabilityRouteCreateOptions" + }, + "> | undefined; \"GET /api/observability/slos/{id}\"?: ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "public", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-public.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /api/observability/slos/{id}\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteHandlerResources", + "text": "ObservabilityRouteHandlerResources" + }, + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteCreateOptions", + "text": "ObservabilityRouteCreateOptions" + }, + "> | undefined; \"GET /api/observability/slos\"?: ", + { + "pluginId": "@kbn/server-route-repository", + "scope": "public", + "docId": "kibKbnServerRouteRepositoryPluginApi", + "section": "def-public.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /api/observability/slos\", ", + "PartialC", + "<{ query: ", + "PartialC", + "<{ name: ", + "StringC", + "; indicatorTypes: ", + "Type", + "; page: ", + "StringC", + "; perPage: ", + "StringC", + "; sortBy: ", + "UnionC", + "<[", + "LiteralC", + "<\"name\">, ", + "LiteralC", + "<\"indicatorType\">]>; sortDirection: ", + "UnionC", + "<[", + "LiteralC", + "<\"asc\">, ", + "LiteralC", + "<\"desc\">]>; }>; }>, ", + { + "pluginId": "observability", + "scope": "server", + "docId": "kibObservabilityPluginApi", + "section": "def-server.ObservabilityRouteHandlerResources", + "text": "ObservabilityRouteHandlerResources" + }, + ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", { "pluginId": "observability", "scope": "server", @@ -10696,7 +10854,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "> | undefined; \"GET /api/observability/slos/{id}\"?: ", + "> | undefined; \"POST /api/observability/slos/{id}/enable\"?: ", { "pluginId": "@kbn/server-route-repository", "scope": "public", @@ -10704,7 +10862,7 @@ "section": "def-public.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/observability/slos/{id}\", ", + "<\"POST /api/observability/slos/{id}/enable\", ", "TypeC", "<{ path: ", "TypeC", @@ -10718,7 +10876,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + ", void, ", { "pluginId": "observability", "scope": "server", @@ -10726,7 +10884,7 @@ "section": "def-server.ObservabilityRouteCreateOptions", "text": "ObservabilityRouteCreateOptions" }, - "> | undefined; \"GET /api/observability/slos\"?: ", + "> | undefined; \"POST /api/observability/slos/{id}/disable\"?: ", { "pluginId": "@kbn/server-route-repository", "scope": "public", @@ -10734,31 +10892,13 @@ "section": "def-public.ServerRoute", "text": "ServerRoute" }, - "<\"GET /api/observability/slos\", ", - "PartialC", - "<{ query: ", - "PartialC", - "<{ name: ", - "StringC", - "; indicatorTypes: ", - "Type", - "; page: ", - "StringC", - "; perPage: ", + "<\"POST /api/observability/slos/{id}/disable\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", "StringC", - "; sortBy: ", - "UnionC", - "<[", - "LiteralC", - "<\"name\">, ", - "LiteralC", - "<\"indicatorType\">]>; sortDirection: ", - "UnionC", - "<[", - "LiteralC", - "<\"asc\">, ", - "LiteralC", - "<\"desc\">]>; }>; }>, ", + "; }>; }>, ", { "pluginId": "observability", "scope": "server", @@ -10766,7 +10906,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", + ", void, ", { "pluginId": "observability", "scope": "server", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index eee80c7d07501..24c92d56111bd 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 606 | 41 | 600 | 32 | +| 607 | 41 | 601 | 32 | ## Client diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index dd794c0fbfba7..bfcef3ec14001 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 96bd8997cd457..41c9a4e0b0e66 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 564 | 464 | 43 | +| 568 | 467 | 44 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 70017 | 527 | 59226 | 1206 | +| 70116 | 527 | 59323 | 1210 | ## Plugin Directory @@ -47,8 +47,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | cloudLinks | [Kibana Core](https://github.com/orgs/elastic/teams/@kibana-core) | Adds the links to the Elastic Cloud console | 0 | 0 | 0 | 0 | | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 17 | 0 | 2 | 2 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | +| | [@elastic/kibana-global-experience](https://github.com/orgs/elastic/teams/@elastic/kibana-global-experience) | Content management app | 5 | 0 | 5 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 268 | 0 | 264 | 9 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2832 | 17 | 1016 | 0 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2845 | 17 | 1029 | 0 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | customBranding | [global-experience](https://github.com/orgs/elastic/teams/kibana-global-experience) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 107 | 0 | 88 | 1 | @@ -89,7 +90,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 254 | 1 | 45 | 5 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/@elastic/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1040 | 3 | 935 | 25 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1039 | 3 | 934 | 25 | | ftrApis | [Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -126,7 +127,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 2 | 0 | 2 | 1 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 606 | 41 | 600 | 32 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 607 | 41 | 601 | 32 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 24 | 0 | 24 | 7 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 217 | 7 | 161 | 11 | @@ -134,7 +135,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 | | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 36 | 0 | 16 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 21 | 0 | 21 | 0 | -| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 241 | 0 | 213 | 10 | +| | [RAC](https://github.com/orgs/elastic/teams/rac) | - | 251 | 0 | 223 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 24 | 0 | 19 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 196 | 2 | 155 | 5 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 16 | 0 | 16 | 0 | @@ -150,7 +151,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 7 | 0 | 7 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 118 | 0 | 59 | 10 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 22 | 1 | 22 | 1 | -| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 260 | 0 | 64 | 0 | +| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 261 | 0 | 65 | 0 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 12 | 0 | 12 | 2 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | synthetics | [Uptime](https://github.com/orgs/elastic/teams/uptime) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | @@ -159,11 +160,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 31 | 0 | 26 | 6 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 5 | 0 | 0 | 0 | -| | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 35 | 0 | 15 | 5 | +| | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 35 | 0 | 14 | 5 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 257 | 1 | 214 | 20 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 587 | 11 | 558 | 53 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 589 | 11 | 560 | 53 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 134 | 2 | 92 | 9 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 140 | 9 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 267 | 0 | 242 | 7 | @@ -217,6 +218,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 62 | 0 | 17 | 1 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | +| | [Owner missing] | - | 2 | 0 | 2 | 1 | +| | [Owner missing] | - | 37 | 0 | 36 | 0 | | | [Owner missing] | - | 106 | 0 | 80 | 1 | | | Kibana Core | - | 73 | 0 | 44 | 9 | | | Kibana Core | - | 24 | 0 | 24 | 0 | @@ -251,7 +254,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 5 | 0 | 5 | 0 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 6 | 0 | 1 | 0 | -| | [Owner missing] | - | 6 | 0 | 6 | 0 | +| | [Owner missing] | - | 11 | 0 | 11 | 0 | | | [Owner missing] | - | 6 | 0 | 6 | 1 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | Kibana Core | - | 9 | 0 | 3 | 0 | @@ -401,7 +404,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 29 | 0 | 29 | 1 | | | [Owner missing] | - | 1 | 0 | 0 | 0 | | | [Owner missing] | - | 6 | 0 | 0 | 0 | -| | [Owner missing] | - | 58 | 0 | 56 | 1 | +| | [Owner missing] | - | 52 | 0 | 50 | 2 | | | [Owner missing] | - | 19 | 1 | 12 | 0 | | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | Kibana Core | - | 1 | 0 | 1 | 0 | @@ -415,7 +418,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 13 | 0 | 13 | 0 | | | [Owner missing] | - | 67 | 0 | 62 | 5 | | | [Owner missing] | - | 32 | 2 | 28 | 0 | -| | [Owner missing] | - | 86 | 0 | 85 | 0 | +| | [Owner missing] | - | 108 | 0 | 107 | 0 | | | [Owner missing] | - | 7 | 0 | 5 | 0 | | | Kibana Core | - | 27 | 0 | 1 | 2 | | | Kibana Core | - | 8 | 0 | 8 | 0 | @@ -443,7 +446,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 13 | 0 | 9 | 0 | | | [Owner missing] | - | 6 | 0 | 6 | 1 | | | [Owner missing] | - | 13 | 2 | 8 | 0 | -| | [Owner missing] | - | 99 | 0 | 96 | 0 | +| | [Owner missing] | - | 100 | 0 | 97 | 0 | | | [Owner missing] | Security Solution auto complete | 56 | 1 | 41 | 1 | | | [Owner missing] | - | 341 | 1 | 337 | 32 | | | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 67 | 0 | 61 | 1 | @@ -482,7 +485,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 2 | 0 | 2 | 1 | | | [Owner missing] | - | 32 | 0 | 31 | 0 | | | [Owner missing] | - | 14 | 0 | 5 | 1 | -| | [Owner missing] | - | 12 | 0 | 12 | 0 | +| | [Owner missing] | - | 17 | 0 | 17 | 0 | | | [Owner missing] | - | 8 | 0 | 3 | 0 | | | [Owner missing] | - | 25 | 0 | 24 | 0 | | | [Owner missing] | - | 11 | 0 | 6 | 0 | @@ -500,7 +503,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [Owner missing] | - | 2 | 0 | 0 | 0 | | | [Owner missing] | - | 15 | 0 | 4 | 0 | | | [Owner missing] | - | 9 | 0 | 3 | 0 | -| | [Owner missing] | SLO io-ts schema definition and common models shared between public and server. | 73 | 0 | 73 | 0 | +| | [Owner missing] | SLO io-ts schema definition and common models shared between public and server. | 75 | 0 | 75 | 0 | | | [Owner missing] | - | 20 | 0 | 12 | 0 | | | Kibana Core | - | 97 | 1 | 64 | 1 | | | [Owner missing] | - | 4 | 0 | 2 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index ad4d121202873..3a62d1aeb725a 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 148ce4163f187..b3f136201968d 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index f86b5ea1ad68b..6a4c5f000e9cd 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 10a64ef76481e..737f9a6fa500a 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 15e34aff07d77..7b3ca35b4286b 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 34a50ca6688ef..bd2a4566d8141 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -2475,7 +2475,7 @@ "signature": [ "(request: TSearchRequest) => Promise<", + ", TAlertDoc = Partial> & OutputOf>>>(request: TSearchRequest) => Promise<", { "pluginId": "@kbn/es-types", "scope": "common", @@ -2483,7 +2483,7 @@ "section": "def-common.ESSearchResponse", "text": "ESSearchResponse" }, - "> & OutputOf>>, TSearchRequest, { restTotalHitsAsInt: false; }>>" + ">" ], "path": "x-pack/plugins/rule_registry/server/rule_data_client/types.ts", "deprecated": false, @@ -3295,6 +3295,86 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression", + "type": "Function", + "tags": [], + "label": "alertWithSuppression", + "description": [], + "signature": [ + "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise, \"alertsWereTruncated\">>" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression.$1", + "type": "Array", + "tags": [], + "label": "alerts", + "description": [], + "signature": [ + "{ _id: string; _source: T; }[]" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression.$2", + "type": "string", + "tags": [], + "label": "suppressionWindow", + "description": [], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression.$3", + "type": "Function", + "tags": [], + "label": "enrichAlerts", + "description": [], + "signature": [ + "((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression.$4", + "type": "Object", + "tags": [], + "label": "currentTimeOverride", + "description": [], + "signature": [ + "Date | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "initialIsOpen": false @@ -3973,6 +4053,87 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService", + "type": "Type", + "tags": [], + "label": "SuppressedAlertService", + "description": [], + "signature": [ + "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise, \"alertsWereTruncated\">>" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService.$1", + "type": "Array", + "tags": [], + "label": "alerts", + "description": [], + "signature": [ + "{ _id: string; _source: T; }[]" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService.$2", + "type": "string", + "tags": [], + "label": "suppressionWindow", + "description": [], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService.$3", + "type": "Function", + "tags": [], + "label": "enrichAlerts", + "description": [], + "signature": [ + "((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService.$4", + "type": "Object", + "tags": [], + "label": "currentTimeOverride", + "description": [], + "signature": [ + "Date | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "ruleRegistry", "id": "def-server.Version", diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 2bec837f88bb2..baec7bcf04548 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; @@ -21,7 +21,7 @@ Contact [RAC](https://github.com/orgs/elastic/teams/rac) for questions regarding | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 241 | 0 | 213 | 10 | +| 251 | 0 | 223 | 11 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 795ac6a0fb15d..2b15f15c5708f 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 7123a0630fdc9..9e8cb02421dc2 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index a85d08d1dd6cb..abbcfc8c7cb7b 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index bcf415146653e..5c0e3b32931c9 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 7e69c9aa7f330..820ddf4e0fbb2 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index fc23fab122614..b1e5ed9732d4f 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 2a59f90373c6b..5c4b2d30cd7b6 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index e81521a36d9f3..18a417ae2f0fc 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index ab38e735def3e..bff5c39359c13 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index db4ef30ffff3e..0bcb2b698b29c 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 71cad56d90bfc..8d2f84311053b 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -95,7 +95,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly disableIsolationUIPendingStatuses: boolean; readonly pendingActionResponsesWithAck: boolean; readonly policyListEnabled: boolean; readonly policyResponseInFleetEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly responseActionsConsoleEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointRbacEnabled: boolean; readonly endpointRbacV1Enabled: boolean; readonly alertDetailsPageEnabled: boolean; readonly responseActionGetFileEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly riskyHostsEnabled: boolean; readonly riskyUsersEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly disableIsolationUIPendingStatuses: boolean; readonly pendingActionResponsesWithAck: boolean; readonly policyListEnabled: boolean; readonly policyResponseInFleetEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly responseActionsConsoleEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointRbacEnabled: boolean; readonly endpointRbacV1Enabled: boolean; readonly alertDetailsPageEnabled: boolean; readonly responseActionGetFileEnabled: boolean; readonly responseActionExecuteEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly riskyHostsEnabled: boolean; readonly riskyUsersEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/plugin.tsx", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 3d410710943c9..86ab70e0f4ddb 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 47228fc6d6467..e6f401303bb3b 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 9719d01b3b16e..32c091c4a2049 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index f391462896f27..c38dcebec4864 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.devdocs.json b/api_docs/spaces.devdocs.json index b343b7665dcc1..43d132ba17352 100644 --- a/api_docs/spaces.devdocs.json +++ b/api_docs/spaces.devdocs.json @@ -4964,6 +4964,21 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "spaces", + "id": "def-common.DEFAULT_SPACE_ID", + "type": "string", + "tags": [], + "label": "DEFAULT_SPACE_ID", + "description": [], + "signature": [ + "\"default\"" + ], + "path": "x-pack/plugins/spaces/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "spaces", "id": "def-common.ENTER_SPACE_PATH", diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 7e0ae543b84d7..d3a0d7e229a3b 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Platform Security](https://github.com/orgs/elastic/teams/kibana-securit | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 260 | 0 | 64 | 0 | +| 261 | 0 | 65 | 0 | ## Client diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index f2df54ac73815..5de27eddfe93e 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 966397d69a08c..066a511c807ce 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index e5e4626cebc7c..8048fce4529ef 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 42c7119795c87..de42eda2139f0 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 1c4babb819ffb..b3be09888e881 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 3f20854762aff..c7517987b9b68 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 61fc83e8d80d1..4a5ccc7e363c5 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.devdocs.json b/api_docs/threat_intelligence.devdocs.json index ccce9277fb240..7632f0a36a0cb 100644 --- a/api_docs/threat_intelligence.devdocs.json +++ b/api_docs/threat_intelligence.devdocs.json @@ -509,9 +509,11 @@ "type": "Object", "tags": [], "label": "blockList", - "description": [], + "description": [ + "\nAdd to blocklist feature" + ], "signature": [ - "{ exceptionListApiClient: unknown; useSetUrlParams: () => (params: Record, replace?: boolean | undefined) => void; getFlyoutComponent: () => React.NamedExoticComponent<", + "{ canWriteBlocklist: boolean; exceptionListApiClient: unknown; useSetUrlParams: () => (params: Record, replace?: boolean | undefined) => void; getFlyoutComponent: () => React.NamedExoticComponent<", "BlockListFlyoutProps", ">; getFormComponent: () => React.NamedExoticComponent<", "BlockListFormProps", diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index fdefb06e38d46..42341675f4a04 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Protections Experience Team](https://github.com/orgs/elastic/teams/prot | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 35 | 0 | 15 | 5 | +| 35 | 0 | 14 | 5 | ## Client diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index efdbc8646e154..9cd2fdcb0867c 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index d47d5255bcf4f..7ed79dc1efc30 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 8beabd8957f66..2692b9d183efb 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -3546,6 +3546,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.AlertsTableProps.showAlertStatusWithFlapping", + "type": "CompoundType", + "tags": [], + "label": "showAlertStatusWithFlapping", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "triggersActionsUi", "id": "def-public.AlertsTableProps.trailingControlColumns", @@ -8707,6 +8721,22 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesSettingsLink", + "type": "Function", + "tags": [], + "label": "getRulesSettingsLink", + "description": [], + "signature": [ + "() => React.ReactElement>" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "lifecycle": "start", diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0eb4b68b7548e..0a94d435ca1b2 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 587 | 11 | 558 | 53 | +| 589 | 11 | 560 | 53 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 495102dc60bea..8701979d5ff22 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 53e3048ef591a..df606efa0a1f8 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 2a5c72c19a055..99da70ff9f181 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index a23bcfb92f3d4..32e66df915519 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 03f7841649b46..382bc19c3825c 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 31747fe10f66a..d9c0d883eefd8 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 4b0a87e5f55a3..ca6b72edfe09d 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 22d3654c6a69d..f023aba43da7a 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 22d7e86e365a2..127cde6195a23 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index f5d28f485cf74..867f69ded97da 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 0b3d5343a149e..39e665bc294d1 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 672d59a578bc6..c32d860339204 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 827923c9236e3..bebbf827075bf 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index eef6fd0a968e6..778281ab6c5ec 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 2052315ac60fc..d9d25fa8a71bb 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 9a668ca887a6f..0ed4d97f594e0 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 09a9a548e978c..9120bf2a52bf8 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 6495677661504..28200b09ad21a 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 20790046ae6e9..7c9586ed2eed5 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 2d7bc6c01527c..8d98f8a4778e3 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2023-01-30 +date: 2023-02-01 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/api-generated/README.md b/docs/api-generated/README.md index 97a94e512e5c6..97fd32119b8bc 100644 --- a/docs/api-generated/README.md +++ b/docs/api-generated/README.md @@ -25,7 +25,7 @@ or a similar tool that can generate HTML output from OAS. . Rename the output files. For example: ``` - mv $GIT_HOME/kibana/docs/api-generated/rules/index.html $GIT_HOME/kibana/docs/api-generated/rules/rule-apis-passthru.asciidoc + mv $GIT_HOME/kibana/docs/api-generated/rules/index.html $GIT_HOME/kibana/docs/api-generated/rules/rule-apis-passthru.asciidoc mv $GIT_HOME/kibana/docs/api-generated/cases/index.html $GIT_HOME/kibana/docs/api-generated/cases/case-apis-passthru.asciidoc mv $GIT_HOME/kibana/docs/api-generated/connectors/index.html $GIT_HOME/kibana/docs/api-generated/connectors/connector-apis-passthru.asciidoc mv $GIT_HOME/kibana/docs/api-generated/machine-learning/index.html $GIT_HOME/kibana/docs/api-generated/machine-learning/ml-apis-passthru.asciidoc diff --git a/docs/api-generated/cases/case-apis-passthru.asciidoc b/docs/api-generated/cases/case-apis-passthru.asciidoc index 5801fe57ec075..d6d5b0d589ac1 100644 --- a/docs/api-generated/cases/case-apis-passthru.asciidoc +++ b/docs/api-generated/cases/case-apis-passthru.asciidoc @@ -78,7 +78,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -198,7 +198,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -306,7 +306,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -362,7 +362,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -410,7 +410,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -482,7 +482,6 @@ Any modifications made to this file will be overwritten.
{
   "userActions" : [ {
     "owner" : "cases",
-    "case_id" : "22df07d0-03b1-11ed-920c-974bfa104448",
     "action" : "create",
     "created_at" : "2022-05-13T09:16:17.416Z",
     "id" : "22fd3e30-03b1-11ed-920c-974bfa104448",
@@ -497,7 +496,6 @@ Any modifications made to this file will be overwritten.
     "version" : "WzM1ODg4LDFd"
   }, {
     "owner" : "cases",
-    "case_id" : "22df07d0-03b1-11ed-920c-974bfa104448",
     "action" : "create",
     "created_at" : "2022-05-13T09:16:17.416Z",
     "id" : "22fd3e30-03b1-11ed-920c-974bfa104448",
@@ -1519,7 +1517,7 @@ Any modifications made to this file will be overwritten.
     
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -1639,7 +1637,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -1740,7 +1738,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -1862,7 +1860,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -1984,7 +1982,7 @@ Any modifications made to this file will be overwritten.
kbn-xsrf (required)
-
Header Parameter — default: null
+
Header Parameter — Cross-site request forgery protection default: null
@@ -3001,7 +2999,6 @@ Any modifications made to this file will be overwritten.
action
-
case_id
comment_id
created_at
Date format: date-time
created_by
@@ -3009,7 +3006,9 @@ Any modifications made to this file will be overwritten.
owner
payload
version
-
type
+
type
String The type of action.
+
Enum:
+
assignees
create_case
comment
connector
description
pushed
tags
title
status
settings
severity
diff --git a/docs/management/action-types.asciidoc b/docs/management/action-types.asciidoc index 9a48f3c9b9ae4..288c0d1fe0c66 100644 --- a/docs/management/action-types.asciidoc +++ b/docs/management/action-types.asciidoc @@ -74,6 +74,10 @@ a| <> a| <> | Send actionable alerts to on-call xMatters resources. + +a| <> + +| Trigger a Torq workflow. |=== [NOTE] @@ -141,6 +145,9 @@ image::images/connector-select-type.png[Connector select type] After you create a connector, it is available for use any time you set up an action in the current space. +For out-of-the-box and standardized connectors, refer to +<>. + [float] [[importing-and-exporting-connectors]] === Importing and exporting connectors @@ -157,13 +164,6 @@ button appears in *{connectors-ui}*. [role="screenshot"] image::images/connectors-with-missing-secrets.png[Connectors with missing secrets] -[float] -[[create-connectors]] -=== Preconfigured connectors - -For out-of-the-box and standardized connectors, you can <> -before {kib} starts. - [float] [[montoring-connectors]] === Monitoring connectors diff --git a/docs/management/connectors/action-types/server-log.asciidoc b/docs/management/connectors/action-types/server-log.asciidoc index 7d9171ca99ed8..dca6eee379b52 100644 --- a/docs/management/connectors/action-types/server-log.asciidoc +++ b/docs/management/connectors/action-types/server-log.asciidoc @@ -1,50 +1,64 @@ -[role="xpack"] [[server-log-action-type]] -=== Server log connector and action +== Server log connector and action ++++ Server log ++++ -This connector writes an entry to the {kib} server log. +A server log connector writes an entry to the {kib} server log. -[float] -[[server-log-connector-configuration]] -==== Connector configuration - -Server log connectors have the following configuration properties. - -Name:: The name of the connector. +You can create a server log connector in {kib} or by using the +<>. If you are running {kib} +on-prem, you can also create a preconfigured server log connector. [float] -[[Preconfigured-server-log-configuration]] -==== Preconfigured connector type +[[server-log-connector-configuration]] +=== Connector configuration -[source,text] --- - my-server-log: - name: preconfigured-server-log-connector-type - actionTypeId: .server-log --- +Server log connectors do not have any configuration properties other than a name. [float] [[define-serverlog-ui]] -==== Define connector in {stack-manage-app} +=== Create a connector in {kib} -Define Server log connector properties. +You can create a server log connector in *{stack-manage-app} > {connectors-ui}* +or as needed when you're creating a rule. For example: [role="screenshot"] image::management/connectors/images/serverlog-connector.png[Server log connector] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. -Test Server log action parameters. +[float] +[[preconfigured-server-log-configuration]] +=== Create a preconfigured connector -[role="screenshot"] -image::management/connectors/images/serverlog-params-test.png[Server log params test] +If you are running {kib} on-prem, you can define a server log connector by +adding `xpack.actions.preconfigured` settings to your `kibana.yml` file. +For example: + +[source,text] +-- +xpack.actions.preconfigured: + my-server-log: + name: preconfigured-server-log-connector-type + actionTypeId: .server-log +-- + +For more information, go to <>. [float] [[server-log-action-configuration]] -==== Action configuration +=== Test the connector -Server log actions have the following properties. +You can test your server log connector with the +<> or as you're creating or editing +the connector in {kib}. For example: + +[role="screenshot"] +image::management/connectors/images/serverlog-params-test.png[Server log connector test] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. + +Server log actions have the following properties: Message:: The message to log. Level:: The log level of the message: `trace`, `debug`, `info`, `warn`, `error` or `fatal`. Defaults to `info`. + diff --git a/docs/management/connectors/action-types/torq.asciidoc b/docs/management/connectors/action-types/torq.asciidoc new file mode 100644 index 0000000000000..70ac19be25ec3 --- /dev/null +++ b/docs/management/connectors/action-types/torq.asciidoc @@ -0,0 +1,65 @@ +[role="xpack"] +[[torq-action-type]] +=== Torq connector and action +++++ +Torq +++++ + +The Torq connector uses a Torq webhook to trigger workflows with Kibana actions. + +[float] +[[torq-connector-configuration]] +==== Connector configuration +Torq connectors have the following configuration properties. + +Name:: The name of the connector. The name is used to identify a connector in the Stack Management UI connector listing, and in the connector list when configuring an action. + +Torq endpoint URL:: Endpoint URL (webhook) of the Elastic Security integration you created in Torq. + +Torq authentication header secret:: Secret of the webhook authentication header. + +[float] +[[Preconfigured-torq-configuration]] +==== Preconfigured connector type + +[source,yaml] +-- + my-torq: + name: preconfigured-torq-connector-type + actionTypeId: .torq + config: + webhookIntegrationUrl: https://hooks.torq.io/v1/somehook + secrets: + token: mytorqtoken +-- + +Config defines information for the connector type. + +`webhookIntegrationUrl`:: An address that corresponds to **Torq endpoint URL**. + +Secrets defines sensitive information for the connector type. + +`token`:: A string that corresponds to **Torq authentication header secret**. + +[float] +[[define-torq-ui]] +==== Define connector in Stack Management + +Define Torq connector properties. + +[role="screenshot"] +image::management/connectors/images/torq-configured-connector.png[configured Torq connector] + +Test Torq action parameters. + +[role="screenshot"] +image::management/connectors/images/torq-connector-test.png[Torq connector test] + +[float] +[[torq-action-configuration]] +==== Action configuration + + Torq actions have the following configuration properties. + + Body:: JSON payload to send to Torq. + diff --git a/docs/management/connectors/images/pre-configured-connectors-view-screen.png b/docs/management/connectors/images/pre-configured-connectors-view-screen.png deleted file mode 100644 index b2d00b307000e..0000000000000 Binary files a/docs/management/connectors/images/pre-configured-connectors-view-screen.png and /dev/null differ diff --git a/docs/management/connectors/images/pre-configured-connectors-managing.png b/docs/management/connectors/images/preconfigured-connectors-managing.png similarity index 100% rename from docs/management/connectors/images/pre-configured-connectors-managing.png rename to docs/management/connectors/images/preconfigured-connectors-managing.png diff --git a/docs/management/connectors/images/serverlog-connector.png b/docs/management/connectors/images/serverlog-connector.png index 983bb6afadd65..cc0b8745b2d6e 100644 Binary files a/docs/management/connectors/images/serverlog-connector.png and b/docs/management/connectors/images/serverlog-connector.png differ diff --git a/docs/management/connectors/images/serverlog-params-test.png b/docs/management/connectors/images/serverlog-params-test.png index 762721c7ead45..789381949bd43 100644 Binary files a/docs/management/connectors/images/serverlog-params-test.png and b/docs/management/connectors/images/serverlog-params-test.png differ diff --git a/docs/management/connectors/images/torq-configured-connector.png b/docs/management/connectors/images/torq-configured-connector.png new file mode 100644 index 0000000000000..1732276fa4f23 Binary files /dev/null and b/docs/management/connectors/images/torq-configured-connector.png differ diff --git a/docs/management/connectors/images/torq-connector-test.png b/docs/management/connectors/images/torq-connector-test.png new file mode 100644 index 0000000000000..13f416a1486c6 Binary files /dev/null and b/docs/management/connectors/images/torq-connector-test.png differ diff --git a/docs/management/connectors/index.asciidoc b/docs/management/connectors/index.asciidoc index b443ffd967a6f..7a3f8f9cb927c 100644 --- a/docs/management/connectors/index.asciidoc +++ b/docs/management/connectors/index.asciidoc @@ -5,14 +5,15 @@ include::action-types/jira.asciidoc[] include::action-types/teams.asciidoc[] include::action-types/opsgenie.asciidoc[] include::action-types/pagerduty.asciidoc[] -include::action-types/server-log.asciidoc[] +include::action-types/server-log.asciidoc[leveloffset=+1] include::action-types/servicenow.asciidoc[leveloffset=+1] include::action-types/servicenow-sir.asciidoc[leveloffset=+1] include::action-types/servicenow-itom.asciidoc[leveloffset=+1] include::action-types/swimlane.asciidoc[] include::action-types/slack.asciidoc[] include::action-types/tines.asciidoc[leveloffset=+1] +include::action-types/torq.asciidoc[] include::action-types/webhook.asciidoc[] include::action-types/cases-webhook.asciidoc[leveloffset=+1] include::action-types/xmatters.asciidoc[] -include::pre-configured-connectors.asciidoc[] +include::pre-configured-connectors.asciidoc[leveloffset=+1] diff --git a/docs/management/connectors/pre-configured-connectors.asciidoc b/docs/management/connectors/pre-configured-connectors.asciidoc index ad580d87e712b..43643f0f611ba 100644 --- a/docs/management/connectors/pre-configured-connectors.asciidoc +++ b/docs/management/connectors/pre-configured-connectors.asciidoc @@ -1,24 +1,28 @@ -[role="xpack"] [[pre-configured-connectors]] -=== Preconfigured connectors +== Preconfigured connectors -You can preconfigure a connector to have all the information it needs prior to -startup by adding it to the `kibana.yml` file. +If you are running {kib} on-prem, you can preconfigure a connector to have all +the information it needs prior to startup by adding it to the `kibana.yml` file. + +NOTE: {ess} provides a preconfigured email connector but you cannot create +additional preconfigured connectors. Preconfigured connectors offer the following benefits: -- Require no setup. Configuration and credentials needed to execute an -action are predefined, including the connector name and ID. +- Require no setup. Configuration and credentials needed to run an action are +predefined, including the connector name and ID. - Appear in all spaces because they are not saved objects. - Cannot be edited or deleted. [float] -[[preconfigured-connector-example]] -==== Preconfigured connectors example +[[create-preconfigured-connectors]] +=== Create preconfigured connectors + +Add `xpack.actions.preconfigured` settings to your `kibana.yml` file. The +settings vary depending on which type of connector you're adding. -This example shows a valid configuration for -two out-of-the box connectors: <> and -<>. +This example shows a valid configuration for a Slack connector and a Webhook +connector: ```js xpack.actions.preconfigured: @@ -50,31 +54,29 @@ two out-of-the box connectors: <> and [NOTE] ============================================== Sensitive properties, such as passwords, can also be stored in the -<>. +<>. ============================================== [float] [[build-in-preconfigured-connectors]] -==== Built-in preconfigured connectors +=== Built-in preconfigured connectors {kib} provides the following built-in preconfigured connectors: -* <> -* <> +* <> +* <> [float] [[managing-pre-configured-connectors]] -==== View preconfigured connectors +=== View preconfigured connectors When you open the main menu, click *{stack-manage-app} > {connectors-ui}*. Preconfigured connectors appear regardless of which space you are in. They are tagged as “preconfigured”, and you cannot delete them. [role="screenshot"] -image::images/pre-configured-connectors-managing.png[Connectors managing tab with pre-configured] +image::images/preconfigured-connectors-managing.png[Connectors managing tab with pre-configured] Clicking a preconfigured connector shows the description, but not the -configuration. A message indicates that this is a preconfigured connector. +configuration. -[role="screenshot"] -image::images/pre-configured-connectors-view-screen.png[Pre-configured connector view details] diff --git a/docs/settings/alert-action-settings.asciidoc b/docs/settings/alert-action-settings.asciidoc index 0f7763379e560..a2ac56be64ebf 100644 --- a/docs/settings/alert-action-settings.asciidoc +++ b/docs/settings/alert-action-settings.asciidoc @@ -131,7 +131,7 @@ A list of allowed email domains which can be used with the email connector. When WARNING: This feature is available in {kib} 7.17.4 and 8.3.0 onwards but is not supported in {kib} 8.0, 8.1 or 8.2. As such, this setting should be removed before upgrading from 7.17 to 8.0, 8.1 or 8.2. It is possible to configure the settings in 7.17.4 and then upgrade to 8.3.0 directly. `xpack.actions.enabledActionTypes` {ess-icon}:: -A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.opsgenie`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.tines`, `.xmatters`, and `.webhook`. An empty list `[]` will disable all action types. +A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.opsgenie`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.tines`, `.torq`, `.xmatters`, and `.webhook`. An empty list `[]` will disable all action types. + Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function. diff --git a/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx b/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx index c7fafa498bef4..11899a938da9f 100644 --- a/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx +++ b/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx @@ -126,7 +126,15 @@ export const AppContainer: FC = ({ const AppLoadingPlaceholder: FC<{ showPlainSpinner: boolean }> = ({ showPlainSpinner }) => { if (showPlainSpinner) { - return ; + return ( + + ); } return ( { ); @@ -50,6 +51,7 @@ describe('AnalyticsNoDataPageComponent', () => { onDataViewCreated={onDataViewCreated} kibanaGuideDocLink={'http://www.test.com'} allowAdHocDataView={true} + showPlainSpinner={false} /> ); diff --git a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.component.tsx b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.component.tsx index fe607b70120df..d67cb082f5539 100644 --- a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.component.tsx +++ b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.component.tsx @@ -19,6 +19,8 @@ export interface Props { onDataViewCreated: (dataView: unknown) => void; /** if set to true allows creation of an ad-hoc dataview from data view editor */ allowAdHocDataView?: boolean; + /** if the kibana instance is customly branded */ + showPlainSpinner: boolean; } const solution = i18n.translate('sharedUXPackages.noDataConfig.analytics', { @@ -47,6 +49,7 @@ export const AnalyticsNoDataPage = ({ kibanaGuideDocLink, onDataViewCreated, allowAdHocDataView, + showPlainSpinner, }: Props) => { const noDataConfig = { solution, @@ -61,5 +64,10 @@ export const AnalyticsNoDataPage = ({ }, docsLink: kibanaGuideDocLink, }; - return ; + + return ( + + ); }; diff --git a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.test.tsx b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.test.tsx index 996b9d062becf..c73f61e6c0e82 100644 --- a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.test.tsx +++ b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.test.tsx @@ -9,7 +9,10 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; import { mountWithIntl } from '@kbn/test-jest-helpers'; -import { getAnalyticsNoDataPageServicesMock } from '@kbn/shared-ux-page-analytics-no-data-mocks'; +import { + getAnalyticsNoDataPageServicesMock, + getAnalyticsNoDataPageServicesMockWithCustomBranding, +} from '@kbn/shared-ux-page-analytics-no-data-mocks'; import { AnalyticsNoDataPageProvider } from './services'; import { AnalyticsNoDataPage as Component } from './analytics_no_data_page.component'; @@ -19,6 +22,7 @@ describe('AnalyticsNoDataPage', () => { const onDataViewCreated = jest.fn(); const services = getAnalyticsNoDataPageServicesMock(); + const servicesWithCustomBranding = getAnalyticsNoDataPageServicesMockWithCustomBranding(); afterAll(() => { jest.resetAllMocks(); @@ -38,4 +42,15 @@ describe('AnalyticsNoDataPage', () => { expect(component.find(Component).props().onDataViewCreated).toBe(onDataViewCreated); expect(component.find(Component).props().allowAdHocDataView).toBe(true); }); + + it('passes correct boolean value to showPlainSpinner', () => { + const component = mountWithIntl( + + + + ); + + expect(component.find(Component).length).toBe(1); + expect(component.find(Component).props().showPlainSpinner).toBe(true); + }); }); diff --git a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.tsx b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.tsx index df1fc2486c1b3..9b600c374dd02 100644 --- a/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.tsx +++ b/packages/shared-ux/page/analytics_no_data/impl/src/analytics_no_data_page.tsx @@ -8,6 +8,7 @@ import React from 'react'; import type { AnalyticsNoDataPageProps } from '@kbn/shared-ux-page-analytics-no-data-types'; +import useObservable from 'react-use/lib/useObservable'; import { useServices } from './services'; import { AnalyticsNoDataPage as Component } from './analytics_no_data_page.component'; @@ -20,7 +21,9 @@ export const AnalyticsNoDataPage = ({ allowAdHocDataView, }: AnalyticsNoDataPageProps) => { const services = useServices(); - const { kibanaGuideDocLink } = services; + const { kibanaGuideDocLink, customBranding } = services; + const { hasCustomBranding$ } = customBranding; + const showPlainSpinner = useObservable(hasCustomBranding$) ?? false; return ( ); diff --git a/packages/shared-ux/page/analytics_no_data/impl/src/services.tsx b/packages/shared-ux/page/analytics_no_data/impl/src/services.tsx index bd486be8f8976..991893aeca501 100644 --- a/packages/shared-ux/page/analytics_no_data/impl/src/services.tsx +++ b/packages/shared-ux/page/analytics_no_data/impl/src/services.tsx @@ -27,10 +27,10 @@ export const AnalyticsNoDataPageProvider: FC = ({ children, ...services }) => { - const { kibanaGuideDocLink } = services; + const { kibanaGuideDocLink, customBranding } = services; return ( - + {children} ); @@ -45,8 +45,10 @@ export const AnalyticsNoDataPageKibanaProvider: FC { const value: Services = { kibanaGuideDocLink: dependencies.coreStart.docLinks.links.kibana.guide, + customBranding: { + hasCustomBranding$: dependencies.coreStart.customBranding.hasCustomBranding$, + }, }; - return ( {children} diff --git a/packages/shared-ux/page/analytics_no_data/mocks/index.ts b/packages/shared-ux/page/analytics_no_data/mocks/index.ts index cc73dc378452b..1f1ac86e9d247 100644 --- a/packages/shared-ux/page/analytics_no_data/mocks/index.ts +++ b/packages/shared-ux/page/analytics_no_data/mocks/index.ts @@ -7,6 +7,7 @@ */ export { getServicesMock as getAnalyticsNoDataPageServicesMock } from './src/jest'; +export { getServicesMockCustomBranding as getAnalyticsNoDataPageServicesMockWithCustomBranding } from './src/jest'; export { StorybookMock as AnalyticsNoDataPageStorybookMock } from './src/storybook'; export type { Params as AnalyticsNoDataPageStorybookParams } from './src/storybook'; diff --git a/packages/shared-ux/page/analytics_no_data/mocks/src/jest.ts b/packages/shared-ux/page/analytics_no_data/mocks/src/jest.ts index 29a79c40054aa..98885d55ba47d 100644 --- a/packages/shared-ux/page/analytics_no_data/mocks/src/jest.ts +++ b/packages/shared-ux/page/analytics_no_data/mocks/src/jest.ts @@ -8,11 +8,24 @@ import type { AnalyticsNoDataPageServices } from '@kbn/shared-ux-page-analytics-no-data-types'; import { getKibanaNoDataPageServicesMock } from '@kbn/shared-ux-page-kibana-no-data-mocks'; +import { of } from 'rxjs'; export const getServicesMock = () => { const services: AnalyticsNoDataPageServices = { ...getKibanaNoDataPageServicesMock(), kibanaGuideDocLink: 'Kibana guide', + customBranding: { hasCustomBranding$: of(false) }, + }; + + return services; +}; + +export const getServicesMockCustomBranding = () => { + const services: AnalyticsNoDataPageServices = { + ...getKibanaNoDataPageServicesMock(), + // this mock will have custom branding set to true + customBranding: { hasCustomBranding$: of(true) }, + kibanaGuideDocLink: 'Kibana guide', }; return services; diff --git a/packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts b/packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts index c909795647c4e..86bf25dbde9e9 100644 --- a/packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts +++ b/packages/shared-ux/page/analytics_no_data/mocks/src/storybook.ts @@ -15,8 +15,9 @@ import type { AnalyticsNoDataPageServices, AnalyticsNoDataPageProps, } from '@kbn/shared-ux-page-analytics-no-data-types'; +import { of } from 'rxjs'; -type ServiceArguments = Pick; +type ServiceArguments = Pick; export type Params = ArgumentParams<{}, ServiceArguments> & KibanaNoDataPageStorybookParams; @@ -34,6 +35,12 @@ export class StorybookMock extends AbstractStorybookMock< control: 'text', defaultValue: 'Kibana guide', }, + customBranding: { + hasCustomBranding$: { + control: 'boolean', + defaultValue: false, + }, + }, }; dependencies = [kibanaNoDataMock]; @@ -41,6 +48,9 @@ export class StorybookMock extends AbstractStorybookMock< getServices(params: Params): AnalyticsNoDataPageServices { return { kibanaGuideDocLink: 'Kibana guide', + customBranding: { + hasCustomBranding$: of(false), + }, ...kibanaNoDataMock.getServices(params), }; } diff --git a/packages/shared-ux/page/analytics_no_data/types/index.d.ts b/packages/shared-ux/page/analytics_no_data/types/index.d.ts index d4021360bea23..4e54315f071dd 100644 --- a/packages/shared-ux/page/analytics_no_data/types/index.d.ts +++ b/packages/shared-ux/page/analytics_no_data/types/index.d.ts @@ -9,12 +9,14 @@ import { KibanaNoDataPageServices, KibanaNoDataPageKibanaDependencies, } from '@kbn/shared-ux-page-kibana-no-data-types'; +import { Observable } from 'rxjs'; /** * A list of services that are consumed by this component. */ export interface Services { kibanaGuideDocLink: string; + customBranding: { hasCustomBranding$: Observable }; } /** @@ -31,6 +33,9 @@ export interface KibanaDependencies { }; }; }; + customBranding: { + hasCustomBranding$: Observable; + }; }; } diff --git a/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.test.tsx b/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.test.tsx index c15a5c061dd1b..a3484719a49ed 100644 --- a/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.test.tsx +++ b/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { act } from 'react-dom/test-utils'; -import { EuiLoadingElastic } from '@elastic/eui'; +import { EuiLoadingElastic, EuiLoadingSpinner } from '@elastic/eui'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { NoDataViewsPrompt } from '@kbn/shared-ux-prompt-no-data-views'; import { NoDataConfigPage } from '@kbn/shared-ux-page-no-data-config'; @@ -46,7 +46,7 @@ describe('Kibana No Data Page', () => { const services = getKibanaNoDataPageServicesMock(config); const component = mountWithIntl( - + ); @@ -61,7 +61,11 @@ describe('Kibana No Data Page', () => { const services = getKibanaNoDataPageServicesMock({ ...config, hasESData: true }); const component = mountWithIntl( - + ); @@ -86,7 +90,11 @@ describe('Kibana No Data Page', () => { const component = mountWithIntl( - + ); @@ -96,4 +104,15 @@ describe('Kibana No Data Page', () => { expect(component.find(NoDataViewsPrompt).length).toBe(0); expect(component.find(NoDataConfigPage).length).toBe(0); }); + + test('shows EuiLoadingSpinner vs EuiLoadingElastic for custom branding', () => { + const services = getKibanaNoDataPageServicesMock(config); + const component = mountWithIntl( + + + + ); + expect(component.find(EuiLoadingSpinner).length).toBe(1); + expect(component.find(EuiLoadingElastic).length).toBe(0); + }); }); diff --git a/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.tsx b/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.tsx index c3fbccd3a60fb..2773184b087bb 100644 --- a/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.tsx +++ b/packages/shared-ux/page/kibana_no_data/impl/src/kibana_no_data_page.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import React, { useEffect, useState } from 'react'; -import { EuiLoadingElastic } from '@elastic/eui'; +import { EuiLoadingElastic, EuiLoadingSpinner } from '@elastic/eui'; import { NoDataConfigPage } from '@kbn/shared-ux-page-no-data-config'; import { NoDataViewsPrompt } from '@kbn/shared-ux-prompt-no-data-views'; import { KibanaNoDataPageProps } from '@kbn/shared-ux-page-kibana-no-data-types'; @@ -20,6 +20,7 @@ export const KibanaNoDataPage = ({ onDataViewCreated, noDataConfig, allowAdHocDataView, + showPlainSpinner, }: KibanaNoDataPageProps) => { // These hooks are temporary, until this component is moved to a package. const services = useServices(); @@ -43,7 +44,11 @@ export const KibanaNoDataPage = ({ }, [hasESData, hasUserDataView]); if (isLoading) { - return ; + return showPlainSpinner ? ( + + ) : ( + + ); } if (!hasUserDataViews && dataExists) { diff --git a/packages/shared-ux/page/kibana_no_data/mocks/src/jest.ts b/packages/shared-ux/page/kibana_no_data/mocks/src/jest.ts index 5f2f6b309e56c..dc46f22286646 100644 --- a/packages/shared-ux/page/kibana_no_data/mocks/src/jest.ts +++ b/packages/shared-ux/page/kibana_no_data/mocks/src/jest.ts @@ -13,11 +13,13 @@ import { getNoDataViewsPromptServicesMock } from '@kbn/shared-ux-prompt-no-data- interface Params { hasESData: boolean; hasUserDataView: boolean; + showPlainSpinner: boolean; } const defaultParams = { hasESData: true, hasUserDataView: true, + showPlainSpinner: false, }; /** diff --git a/packages/shared-ux/page/kibana_no_data/mocks/src/storybook.ts b/packages/shared-ux/page/kibana_no_data/mocks/src/storybook.ts index 1f4a7453e59b6..10cc9a0f40961 100644 --- a/packages/shared-ux/page/kibana_no_data/mocks/src/storybook.ts +++ b/packages/shared-ux/page/kibana_no_data/mocks/src/storybook.ts @@ -79,7 +79,11 @@ export class StorybookMock extends AbstractStorybookMock< docsLink: 'http://docs.elastic.dev', }; - return { noDataConfig, onDataViewCreated: action('onDataViewCreated') }; + return { + showPlainSpinner: false, + noDataConfig, + onDataViewCreated: action('onDataViewCreated'), + }; } getServices(params: Params): KibanaNoDataPageServices { diff --git a/packages/shared-ux/page/kibana_no_data/types/index.d.ts b/packages/shared-ux/page/kibana_no_data/types/index.d.ts index 1cce51f372021..ff9b4d845f597 100644 --- a/packages/shared-ux/page/kibana_no_data/types/index.d.ts +++ b/packages/shared-ux/page/kibana_no_data/types/index.d.ts @@ -57,4 +57,6 @@ export interface KibanaNoDataPageProps { noDataConfig: NoDataPageProps; /** if set to true allows creation of an ad-hoc dataview from data view editor */ allowAdHocDataView?: boolean; + /** Set to true if the kibana is customly branded */ + showPlainSpinner: boolean; } diff --git a/packages/shared-ux/prompt/not_found/src/not_found_prompt.tsx b/packages/shared-ux/prompt/not_found/src/not_found_prompt.tsx index bd607e1beae07..116deb7098c39 100644 --- a/packages/shared-ux/prompt/not_found/src/not_found_prompt.tsx +++ b/packages/shared-ux/prompt/not_found/src/not_found_prompt.tsx @@ -32,12 +32,14 @@ const NOT_FOUND_GO_BACK = i18n.translate('sharedUXPackages.prompt.errors.notFoun interface NotFoundProps { /** Array of buttons, links and other actions to show at the bottom of the `EuiEmptyPrompt`. Defaults to a "Back" button. */ actions?: EuiEmptyPromptProps['actions']; + title?: EuiEmptyPromptProps['title'] | string; + body?: EuiEmptyPromptProps['body']; } /** * Predefined `EuiEmptyPrompt` for 404 pages. */ -export const NotFoundPrompt = ({ actions }: NotFoundProps) => { +export const NotFoundPrompt = ({ actions, title, body }: NotFoundProps) => { const { colorMode } = useEuiTheme(); const [imageSrc, setImageSrc] = useState(); const goBack = useCallback(() => history.back(), []); @@ -71,8 +73,8 @@ export const NotFoundPrompt = ({ actions }: NotFoundProps) => { color="subdued" titleSize="m" icon={icon} - title={

{NOT_FOUND_TITLE}

} - body={NOT_FOUND_BODY} + title={typeof title === 'string' || !title ?

{title ?? NOT_FOUND_TITLE}

: title} + body={body ?? NOT_FOUND_BODY} actions={actions ?? DEFAULT_ACTIONS} /> ); diff --git a/src/plugins/dashboard/public/dashboard_app/no_data/dashboard_app_no_data.tsx b/src/plugins/dashboard/public/dashboard_app/no_data/dashboard_app_no_data.tsx index 603a36bb3d59b..fb04a3187c72c 100644 --- a/src/plugins/dashboard/public/dashboard_app/no_data/dashboard_app_no_data.tsx +++ b/src/plugins/dashboard/public/dashboard_app/no_data/dashboard_app_no_data.tsx @@ -25,6 +25,7 @@ export const DashboardAppNoDataPage = ({ dataViewEditor, http: { basePath }, documentationLinks: { indexPatternsDocLink, kibanaGuideDocLink }, + customBranding, } = pluginServices.getServices(); const analyticsServices = { @@ -37,6 +38,9 @@ export const DashboardAppNoDataPage = ({ }, application, http: { basePath }, + customBranding: { + hasCustomBranding$: customBranding.hasCustomBranding$, + }, }, dataViews, dataViewEditor, diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index fa457c425440e..1d562877a5dea 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -49,6 +49,7 @@ import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plu import type { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding-plugin/public'; import type { SavedObjectTaggingOssPluginStart } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; import { DashboardContainerFactoryDefinition } from './dashboard_container/embeddable/dashboard_container_factory'; import { type DashboardAppLocator, @@ -97,6 +98,7 @@ export interface DashboardStartDependencies { urlForwarding: UrlForwardingStart; usageCollection?: UsageCollectionStart; visualizations: VisualizationsStart; + customBranding: CustomBrandingStart; } export interface DashboardSetup { diff --git a/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts b/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts new file mode 100644 index 0000000000000..5496c29b760f9 --- /dev/null +++ b/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts @@ -0,0 +1,20 @@ +/* + * 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 { PluginServiceFactory } from '@kbn/presentation-util-plugin/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import { DashboardCustomBrandingService } from './types'; + +type CustomBrandingServiceFactory = PluginServiceFactory; + +export const customBrandingServiceFactory: CustomBrandingServiceFactory = () => { + const pluginMock = coreMock.createStart(); + return { + hasCustomBranding$: pluginMock.customBranding.hasCustomBranding$, + }; +}; diff --git a/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts b/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts new file mode 100644 index 0000000000000..659a669a5bda1 --- /dev/null +++ b/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts @@ -0,0 +1,23 @@ +/* + * 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 type { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public'; +import { DashboardStartDependencies } from '../../plugin'; +import { DashboardCustomBrandingService } from './types'; + +export type CustomBrandingServiceFactory = KibanaPluginServiceFactory< + DashboardCustomBrandingService, + DashboardStartDependencies +>; + +export const customBrandingServiceFactory: CustomBrandingServiceFactory = ({ coreStart }) => { + const { customBranding } = coreStart; + return { + hasCustomBranding$: customBranding.hasCustomBranding$, + }; +}; diff --git a/src/plugins/dashboard/public/services/custom_branding/types.ts b/src/plugins/dashboard/public/services/custom_branding/types.ts new file mode 100644 index 0000000000000..7e7e88bb15a7a --- /dev/null +++ b/src/plugins/dashboard/public/services/custom_branding/types.ts @@ -0,0 +1,13 @@ +/* + * 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 type { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; + +export interface DashboardCustomBrandingService { + hasCustomBranding$: CustomBrandingStart['hasCustomBranding$']; +} diff --git a/src/plugins/dashboard/public/services/plugin_services.stub.ts b/src/plugins/dashboard/public/services/plugin_services.stub.ts index b8c39909dd61a..eabe85288687a 100644 --- a/src/plugins/dashboard/public/services/plugin_services.stub.ts +++ b/src/plugins/dashboard/public/services/plugin_services.stub.ts @@ -38,6 +38,7 @@ import { spacesServiceFactory } from './spaces/spaces.stub'; import { urlForwardingServiceFactory } from './url_forwarding/url_fowarding.stub'; import { visualizationsServiceFactory } from './visualizations/visualizations.stub'; import { dashboardSavedObjectServiceFactory } from './dashboard_saved_object/dashboard_saved_object.stub'; +import { customBrandingServiceFactory } from './custom_branding/custom_branding.stub'; export const providers: PluginServiceProviders = { dashboardSavedObject: new PluginServiceProvider(dashboardSavedObjectServiceFactory), @@ -64,6 +65,7 @@ export const providers: PluginServiceProviders = { urlForwarding: new PluginServiceProvider(urlForwardingServiceFactory), usageCollection: new PluginServiceProvider(usageCollectionServiceFactory), visualizations: new PluginServiceProvider(visualizationsServiceFactory), + customBranding: new PluginServiceProvider(customBrandingServiceFactory), }; export const registry = new PluginServiceRegistry(providers); diff --git a/src/plugins/dashboard/public/services/plugin_services.ts b/src/plugins/dashboard/public/services/plugin_services.ts index b4ee1b566a8ac..4382506a37948 100644 --- a/src/plugins/dashboard/public/services/plugin_services.ts +++ b/src/plugins/dashboard/public/services/plugin_services.ts @@ -39,6 +39,7 @@ import { visualizationsServiceFactory } from './visualizations/visualizations_se import { usageCollectionServiceFactory } from './usage_collection/usage_collection_service'; import { analyticsServiceFactory } from './analytics/analytics_service'; import { dashboardSavedObjectServiceFactory } from './dashboard_saved_object/dashboard_saved_object_service'; +import { customBrandingServiceFactory } from './custom_branding/custom_branding_service'; const providers: PluginServiceProviders = { dashboardSavedObject: new PluginServiceProvider(dashboardSavedObjectServiceFactory, [ @@ -78,6 +79,7 @@ const providers: PluginServiceProviders(); diff --git a/src/plugins/dashboard/public/services/types.ts b/src/plugins/dashboard/public/services/types.ts index 5d14b59e8a125..fc7e0acf1b5c4 100644 --- a/src/plugins/dashboard/public/services/types.ts +++ b/src/plugins/dashboard/public/services/types.ts @@ -14,6 +14,7 @@ import { DashboardAnalyticsService } from './analytics/types'; import { DashboardApplicationService } from './application/types'; import { DashboardChromeService } from './chrome/types'; import { DashboardCoreContextService } from './core_context/types'; +import { DashboardCustomBrandingService } from './custom_branding/types'; import { DashboardCapabilitiesService } from './dashboard_capabilities/types'; import { DashboardSavedObjectService } from './dashboard_saved_object/types'; import { DashboardSessionStorageServiceType } from './dashboard_session_storage/types'; @@ -64,4 +65,5 @@ export interface DashboardServices { urlForwarding: DashboardUrlForwardingService; usageCollection: DashboardUsageCollectionService; // TODO: make this optional in follow up visualizations: DashboardVisualizationsService; + customBranding: DashboardCustomBrandingService; } diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index c79c0bc281042..8ab580ccdfe72 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -51,6 +51,7 @@ "@kbn/core-saved-objects-common", "@kbn/task-manager-plugin", "@kbn/core-execution-context-common", + "@kbn/core-custom-branding-browser", ], "exclude": [ "target/**/*", diff --git a/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap b/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap index 3ac183860d215..453d20385e706 100644 --- a/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap +++ b/src/plugins/kibana_overview/public/components/overview/__snapshots__/overview.test.tsx.snap @@ -457,6 +457,7 @@ exports[`Overview renders correctly when there is no user data view 1`] = ` "navigateToUrl": [MockFunction], }, "chrome": undefined, + "customBranding": undefined, "docLinks": Object { "links": Object { "kibana": Object { diff --git a/src/plugins/kibana_overview/public/components/overview/overview.tsx b/src/plugins/kibana_overview/public/components/overview/overview.tsx index f87c90a4591d4..f6d97d54681e8 100644 --- a/src/plugins/kibana_overview/public/components/overview/overview.tsx +++ b/src/plugins/kibana_overview/public/components/overview/overview.tsx @@ -62,8 +62,17 @@ export const Overview: FC = ({ newsFetchResult, solutions, features }) => const [hasDataView, setHasDataView] = useState(false); const [isLoading, setIsLoading] = useState(true); const { services } = useKibana(); - const { http, docLinks, dataViews, share, uiSettings, application, chrome, dataViewEditor } = - services; + const { + http, + docLinks, + dataViews, + share, + uiSettings, + application, + chrome, + dataViewEditor, + customBranding, + } = services; const addBasePath = http.basePath.prepend; const IS_DARK_THEME = uiSettings.get('theme:darkMode'); @@ -177,6 +186,7 @@ export const Overview: FC = ({ newsFetchResult, solutions, features }) => chrome, docLinks, http, + customBranding, }, dataViews: { ...dataViews, diff --git a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts index 3d7f3b10390fe..11f57e8145e95 100644 --- a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts +++ b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts @@ -860,6 +860,45 @@ describe('AlertingEventLogger', () => { expect(alertingEventLogger.getEvent()).toEqual(loggedEvent); expect(eventLogger.logEvent).toHaveBeenCalledWith(loggedEvent); }); + + test('overwrites the message when the final status is error', () => { + alertingEventLogger.initialize(context); + alertingEventLogger.start(); + alertingEventLogger.setExecutionSucceeded('success message'); + + expect(alertingEventLogger.getEvent()!.message).toBe('success message'); + + alertingEventLogger.done({ + status: { + status: 'error', + lastExecutionDate: new Date(), + error: { reason: RuleExecutionStatusErrorReasons.Execute, message: 'failed execution' }, + }, + }); + + expect(alertingEventLogger.getEvent()!.message).toBe('test:123: execution failed'); + }); + + test('does not overwrites the message when there is already a failure message', () => { + alertingEventLogger.initialize(context); + alertingEventLogger.start(); + alertingEventLogger.setExecutionFailed('first failure message', 'failure error message'); + + expect(alertingEventLogger.getEvent()!.message).toBe('first failure message'); + + alertingEventLogger.done({ + status: { + status: 'error', + lastExecutionDate: new Date(), + error: { + reason: RuleExecutionStatusErrorReasons.Execute, + message: 'second failure execution', + }, + }, + }); + + expect(alertingEventLogger.getEvent()!.message).toBe('first failure message'); + }); }); }); diff --git a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts index 3422fb21bb1f9..fff026a358bc8 100644 --- a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts +++ b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts @@ -184,7 +184,7 @@ export class AlertingEventLogger { alertingOutcome: 'failure', reason: status.error?.reason || 'unknown', error: this.event?.error?.message || status.error.message, - ...(this.event.message + ...(this.event.message && this.event.event?.outcome === 'failure' ? {} : { message: `${this.ruleContext.ruleType.id}:${this.ruleContext.ruleId}: execution failed`, diff --git a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts index 20a5623edd392..3c97080e2d655 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/validate_actions.ts @@ -26,6 +26,8 @@ export async function validateActions( return; } + const errors = []; + // check for actions using connectors with missing secrets const actionsClient = await context.getActionsClient(); const actionIds = [...new Set(actions.map((action) => action.id))]; @@ -35,7 +37,7 @@ export async function validateActions( ); if (actionsUsingConnectorsWithMissingSecrets.length) { - throw Boom.badRequest( + errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.misconfiguredConnector', { defaultMessage: 'Invalid connectors: {groups}', values: { @@ -55,7 +57,7 @@ export async function validateActions( (group) => !availableAlertTypeActionGroups.has(group) ); if (invalidActionGroups.length) { - throw Boom.badRequest( + errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.invalidGroups', { defaultMessage: 'Invalid action groups: {groups}', values: { @@ -69,7 +71,7 @@ export async function validateActions( if (hasRuleLevelNotifyWhen || hasRuleLevelThrottle) { const actionsWithFrequency = actions.filter((action) => Boolean(action.frequency)); if (actionsWithFrequency.length) { - throw Boom.badRequest( + errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.mixAndMatchFreqParams', { defaultMessage: 'Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: {groups}', @@ -82,7 +84,7 @@ export async function validateActions( } else { const actionsWithoutFrequency = actions.filter((action) => !action.frequency); if (actionsWithoutFrequency.length) { - throw Boom.badRequest( + errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.notAllActionsWithFreq', { defaultMessage: 'Actions missing frequency parameters: {groups}', values: { @@ -101,7 +103,7 @@ export async function validateActions( parseDuration(action.frequency.throttle!) < scheduleInterval ); if (actionsWithInvalidThrottles.length) { - throw Boom.badRequest( + errors.push( i18n.translate('xpack.alerting.rulesClient.validateActions.actionsWithInvalidThrottles', { defaultMessage: 'Action throttle cannot be shorter than the schedule interval of {scheduleIntervalText}: {groups}', @@ -114,4 +116,18 @@ export async function validateActions( }) ); } + + // Finalize and throw any errors present + if (errors.length) { + throw Boom.badRequest( + i18n.translate('xpack.alerting.rulesClient.validateActions.errorSummary', { + defaultMessage: + 'Failed to validate actions due to the following {errorNum, plural, one {error:} other {# errors:\n-}} {errorList}', + values: { + errorNum: errors.length, + errorList: errors.join('\n- '), + }, + }) + ); + } } diff --git a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts index 7963ebd885a77..c11dc8be21ca4 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/create.test.ts @@ -2602,7 +2602,7 @@ describe('create()', () => { }, ]); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Invalid connectors: email connector"` + `"Failed to validate actions due to the following error: Invalid connectors: email connector"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2760,7 +2760,7 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default, group2"` + `"Failed to validate actions due to the following error: Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default, group2"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2790,7 +2790,7 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data: data2 })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default"` + `"Failed to validate actions due to the following error: Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2833,7 +2833,7 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Actions missing frequency parameters: default"` + `"Failed to validate actions due to the following error: Actions missing frequency parameters: default"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2891,7 +2891,7 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Actions missing frequency parameters: group2"` + `"Failed to validate actions due to the following error: Actions missing frequency parameters: group2"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2968,9 +2968,83 @@ describe('create()', () => { ], }); await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot( - `"Action throttle cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)"` + `"Failed to validate actions due to the following error: Action throttle cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); }); + + test('throws multiple errors when actions have multiple problems', async () => { + rulesClient = new RulesClient({ + ...rulesClientParams, + minimumScheduleInterval: { value: '1m', enforce: true }, + }); + ruleTypeRegistry.get.mockImplementation(() => ({ + id: '123', + name: 'Test', + actionGroups: [ + { id: 'default', name: 'Default' }, + { id: 'group2', name: 'Action Group 2' }, + { id: 'group3', name: 'Action Group 3' }, + ], + recoveryActionGroup: RecoveredActionGroup, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + async executor() { + return { state: {} }; + }, + producer: 'alerts', + useSavedObjectReferences: { + extractReferences: jest.fn(), + injectReferences: jest.fn(), + }, + })); + + const data = getMockData({ + notifyWhen: undefined, + throttle: undefined, + schedule: { interval: '3h' }, + actions: [ + { + group: 'default', + id: '1', + params: { + foo: true, + }, + frequency: { + summary: false, + notifyWhen: 'onThrottleInterval', + throttle: '1h', + }, + }, + { + group: 'group2', + id: '2', + params: { + foo: true, + }, + frequency: { + summary: false, + notifyWhen: 'onThrottleInterval', + throttle: '3m', + }, + }, + { + group: 'group3', + id: '3', + params: { + foo: true, + }, + }, + ], + }); + await expect(rulesClient.create({ data })).rejects.toThrowErrorMatchingInlineSnapshot(` + "Failed to validate actions due to the following 2 errors: + - Actions missing frequency parameters: group3 + - Action throttle cannot be shorter than the schedule interval of 3h: default (1h), group2 (3m)" + `); + expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); + expect(taskManager.schedule).not.toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts index 0de571c72916b..44c4eeb50fe27 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts @@ -1767,7 +1767,7 @@ describe('update()', () => { }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default, group2"` + `"Failed to validate actions due to the following error: Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default, group2"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -1808,7 +1808,7 @@ describe('update()', () => { }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default"` + `"Failed to validate actions due to the following error: Cannot specify per-action frequency params when notify_when or throttle are defined at the rule level: default"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -1844,7 +1844,7 @@ describe('update()', () => { }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Actions missing frequency parameters: default"` + `"Failed to validate actions due to the following error: Actions missing frequency parameters: default"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -1892,7 +1892,7 @@ describe('update()', () => { }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Actions missing frequency parameters: default"` + `"Failed to validate actions due to the following error: Actions missing frequency parameters: default"` ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); @@ -2016,7 +2016,9 @@ describe('update()', () => { ], }, }) - ).rejects.toThrowErrorMatchingInlineSnapshot(`"Invalid connectors: another connector"`); + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Failed to validate actions due to the following error: Invalid connectors: another connector"` + ); expect(unsecuredSavedObjectsClient.create).not.toHaveBeenCalled(); expect(taskManager.schedule).not.toHaveBeenCalled(); }); diff --git a/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts index 25a7cf5ae5815..4fa24358e7b07 100644 --- a/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts +++ b/x-pack/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts @@ -17,8 +17,9 @@ const indexTemplate: IndicesPutIndexTemplateRequest = { index_patterns: [APM_SOURCE_MAP_INDEX], template: { settings: { - number_of_shards: 1, index: { + number_of_shards: 1, + auto_expand_replicas: '0-2', hidden: true, }, }, diff --git a/x-pack/plugins/cases/common/api/connectors/connector.ts b/x-pack/plugins/cases/common/api/connectors/connector.ts index f3c733c85cd8c..7d96593d01316 100644 --- a/x-pack/plugins/cases/common/api/connectors/connector.ts +++ b/x-pack/plugins/cases/common/api/connectors/connector.ts @@ -18,14 +18,6 @@ import { SwimlaneFieldsRT } from './swimlane'; export type ActionConnector = ActionResult; export type ActionTypeConnector = ActionType; -export const ConnectorFieldsRt = rt.union([ - JiraFieldsRT, - ResilientFieldsRT, - ServiceNowITSMFieldsRT, - ServiceNowSIRFieldsRT, - rt.null, -]); - export enum ConnectorTypes { casesWebhook = '.cases-webhook', jira = '.jira', @@ -114,6 +106,3 @@ export type ConnectorServiceNowITSMTypeFields = rt.TypeOf< typeof ConnectorServiceNowITSMTypeFieldsRt >; export type ConnectorServiceNowSIRTypeFields = rt.TypeOf; - -// we need to change these types back and forth for storing in ES (arrays overwrite, objects merge) -export type ConnectorFields = rt.TypeOf; diff --git a/x-pack/plugins/cases/common/api/helpers.ts b/x-pack/plugins/cases/common/api/helpers.ts index 211e9ae6c9b09..ae1f89f4071b7 100644 --- a/x-pack/plugins/cases/common/api/helpers.ts +++ b/x-pack/plugins/cases/common/api/helpers.ts @@ -17,6 +17,7 @@ import { CASE_COMMENT_DELETE_URL, CASE_FIND_USER_ACTIONS_URL, INTERNAL_BULK_GET_ATTACHMENTS_URL, + INTERNAL_CONNECTORS_URL, } from '../constants'; export const getCaseDetailsUrl = (id: string): string => { @@ -62,3 +63,7 @@ export const getCasesFromAlertsUrl = (alertId: string): string => { export const getCaseBulkGetAttachmentsUrl = (id: string): string => { return INTERNAL_BULK_GET_ATTACHMENTS_URL.replace('{case_id}', id); }; + +export const getCaseConnectorsUrl = (id: string): string => { + return INTERNAL_CONNECTORS_URL.replace('{case_id}', id); +}; diff --git a/x-pack/plugins/cases/common/ui/types.ts b/x-pack/plugins/cases/common/ui/types.ts index 8231dd945bf9e..f4df0c1b72f98 100644 --- a/x-pack/plugins/cases/common/ui/types.ts +++ b/x-pack/plugins/cases/common/ui/types.ts @@ -17,7 +17,6 @@ import type { CaseStatuses, User, ActionConnector, - CaseExternalServiceBasic, CaseUserActionResponse, SingleCaseMetricsResponse, CommentResponse, @@ -30,6 +29,7 @@ import type { CaseSeverity, CommentResponseExternalReferenceType, CommentResponseTypePersistableState, + GetCaseConnectorsResponse, } from '../api'; import type { PUSH_CASES_CAPABILITY } from '../constants'; import type { SnakeToCamelCase } from '../types'; @@ -81,12 +81,12 @@ export type CaseUserActions = SnakeToCamelCase; export type FindCaseUserActions = Omit, 'userActions'> & { userActions: CaseUserActions[]; }; -export type CaseExternalService = SnakeToCamelCase; export type Case = Omit, 'comments'> & { comments: Comment[] }; export type Cases = Omit, 'cases'> & { cases: Case[] }; export type CasesStatus = SnakeToCamelCase; export type CasesMetrics = SnakeToCamelCase; export type CaseUpdateRequest = SnakeToCamelCase; +export type CaseConnectors = SnakeToCamelCase; export interface ResolvedCase { case: Case; diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 7260061d76b0b..37647324ccf7a 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -2111,9 +2111,9 @@ "description": "The page number to return.", "schema": { "type": "string", - "default": 1 + "default": "1" }, - "example": 1 + "example": "1" }, { "name": "perPage", @@ -2121,9 +2121,9 @@ "description": "The number of user actions to return per page.", "schema": { "type": "string", - "default": 20 + "default": "20" }, - "example": 20 + "example": "20" }, { "name": "sortOrder", @@ -2245,6 +2245,7 @@ }, "in": "header", "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", "required": true }, "space_id": { diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index aa55e180191cb..8098a2d8787ff 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -1309,15 +1309,15 @@ paths: description: The page number to return. schema: type: string - default: 1 - example: 1 + default: '1' + example: '1' - name: perPage in: query description: The number of user actions to return per page. schema: type: string - default: 20 - example: 20 + default: '20' + example: '20' - name: sortOrder in: query description: Determines the sort order. @@ -1398,6 +1398,7 @@ components: type: string in: header name: kbn-xsrf + description: Cross-site request forgery protection required: true space_id: in: path diff --git a/x-pack/plugins/cases/docs/openapi/components/headers/kbn_xsrf.yaml b/x-pack/plugins/cases/docs/openapi/components/headers/kbn_xsrf.yaml index 3d8dfae634e68..fe0402a43aa03 100644 --- a/x-pack/plugins/cases/docs/openapi/components/headers/kbn_xsrf.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/headers/kbn_xsrf.yaml @@ -2,4 +2,5 @@ schema: type: string in: header name: kbn-xsrf +description: Cross-site request forgery protection required: true diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml index 8ec83b50416ef..8cdeca5b9a7a9 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml @@ -15,15 +15,15 @@ get: description: The page number to return. schema: type: string - default: 1 - example: 1 + default: "1" + example: "1" - name: perPage in: query description: The number of user actions to return per page. schema: type: string - default: 20 - example: 20 + default: "20" + example: "20" - name: sortOrder in: query description: Determines the sort order. diff --git a/x-pack/plugins/cases/public/common/mock/connectors.ts b/x-pack/plugins/cases/public/common/mock/connectors.ts index e0b7b26a4c8a4..8a2cf618baff3 100644 --- a/x-pack/plugins/cases/public/common/mock/connectors.ts +++ b/x-pack/plugins/cases/public/common/mock/connectors.ts @@ -6,12 +6,14 @@ */ import type { ActionConnector, ActionTypeConnector } from '../../../common/api'; +import { basicPush } from '../../containers/mock'; +import type { CaseConnectors } from '../../containers/types'; export const connectorsMock: ActionConnector[] = [ { id: 'servicenow-1', actionTypeId: '.servicenow', - name: 'My Connector', + name: 'My SN connector', config: { apiUrl: 'https://instance1.service-now.com', }, @@ -21,7 +23,7 @@ export const connectorsMock: ActionConnector[] = [ { id: 'resilient-2', actionTypeId: '.resilient', - name: 'My Connector 2', + name: 'My Resilient connector', config: { apiUrl: 'https://test/', orgId: '201', @@ -52,7 +54,7 @@ export const connectorsMock: ActionConnector[] = [ { id: 'servicenow-uses-table-api', actionTypeId: '.servicenow', - name: 'My Connector', + name: 'My deprecated SN connector', config: { apiUrl: 'https://instance1.service-now.com', usesTableApi: true, @@ -118,3 +120,32 @@ export const actionTypesMock: ActionTypeConnector[] = [ supportedFeatureIds: ['alerting', 'cases'], }, ]; + +export const getCaseConnectorsMockResponse = ( + overrides: Partial = {} +): CaseConnectors => { + return connectorsMock.reduce( + (acc, connector) => ({ + ...acc, + [connector.id]: { + id: connector.id, + name: connector.name, + type: connector.actionTypeId, + fields: null, + push: { + needsToBePushed: false, + oldestUserActionPushDate: '2023-01-17T09:46:29.813Z', + latestUserActionPushDate: '2023-01-17T09:46:29.813Z', + hasBeenPushed: true, + externalService: { + ...basicPush, + connectorId: connector.id, + connectorName: connector.name, + }, + ...overrides, + }, + }, + }), + {} + ); +}; diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx index 65156c39202b4..909bb1dd24ea0 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx @@ -36,7 +36,7 @@ import { registerConnectorsToMockActionRegistry } from '../../common/mock/regist import { createStartServicesMock } from '../../common/lib/kibana/kibana_react.mock'; import { waitForComponentToUpdate } from '../../common/test_utils'; import { useCreateAttachments } from '../../containers/use_create_attachments'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; import { useUpdateCase } from '../../containers/use_update_case'; import { useGetCases, DEFAULT_QUERY_PARAMS } from '../../containers/use_get_cases'; @@ -52,7 +52,7 @@ jest.mock('../../containers/use_get_action_license'); jest.mock('../../containers/use_get_tags'); jest.mock('../../containers/user_profiles/use_get_current_user_profile'); jest.mock('../../containers/user_profiles/use_bulk_get_user_profiles'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../common/lib/kibana'); jest.mock('../../common/navigation/hooks'); jest.mock('../app/use_available_owners', () => ({ @@ -66,7 +66,7 @@ const useGetTagsMock = useGetTags as jest.Mock; const useGetCurrentUserProfileMock = useGetCurrentUserProfile as jest.Mock; const useBulkGetUserProfilesMock = useBulkGetUserProfiles as jest.Mock; const useKibanaMock = useKibana as jest.MockedFunction; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useCreateAttachmentsMock = useCreateAttachments as jest.Mock; const useUpdateCaseMock = useUpdateCase as jest.Mock; const useLicenseMock = useLicense as jest.Mock; diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx index 3b2b510a26f82..ab50f16083f8b 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx @@ -23,7 +23,7 @@ import type { EuiBasicTableOnChange } from './types'; import { CasesTable } from './table'; import { useCasesContext } from '../cases_context/use_cases_context'; import { CasesMetrics } from './cases_metrics'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { initialData, useGetCases } from '../../containers/use_get_cases'; import { useBulkGetUserProfiles } from '../../containers/user_profiles/use_bulk_get_user_profiles'; import { useGetCurrentUserProfile } from '../../containers/user_profiles/use_get_current_user_profile'; @@ -98,7 +98,7 @@ export const AllCasesList = React.memo( const { data: currentUserProfile, isLoading: isLoadingCurrentUserProfile } = useGetCurrentUserProfile(); - const { data: connectors = [] } = useGetConnectors(); + const { data: connectors = [] } = useGetSupportedActionConnectors(); const sorting = useMemo( () => ({ diff --git a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx index 72cdbc0c0ed5b..7ce32a2f123a5 100644 --- a/x-pack/plugins/cases/public/components/all_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/index.test.tsx @@ -13,7 +13,7 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer, noCreateCasesPermissions } from '../../common/mock'; import { useGetActionLicense } from '../../containers/use_get_action_license'; import { connectorsMock, useGetCasesMockState } from '../../containers/mock'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; import { useGetCases } from '../../containers/use_get_cases'; import { useGetCurrentUserProfile } from '../../containers/user_profiles/use_get_current_user_profile'; @@ -26,14 +26,14 @@ jest.mock('../../containers/use_get_action_license', () => { useGetActionLicense: jest.fn(), }; }); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/api'); jest.mock('../../containers/use_get_cases'); jest.mock('../../containers/user_profiles/use_get_current_user_profile'); jest.mock('../../containers/user_profiles/use_bulk_get_user_profiles'); jest.mock('../../api'); -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useGetCasesMock = useGetCases as jest.Mock; const useGetActionLicenseMock = useGetActionLicense as jest.Mock; const useGetCurrentUserProfileMock = useGetCurrentUserProfile as jest.Mock; diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx index 16bef4b933d6e..195d02f7931cf 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx @@ -29,10 +29,6 @@ jest.mock('react-router-dom', () => { }); const defaultProps = { - allCasesNavigation: { - href: 'all-cases-href', - onClick: () => {}, - }, caseData: basicCase, currentExternalIncident: null, }; @@ -123,10 +119,6 @@ describe('CaseView actions', () => { {...defaultProps} currentExternalIncident={{ ...basicPush, - firstPushIndex: 5, - lastPushIndex: 5, - commentsToUpdate: [], - hasDataToPush: false, }} /> diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx index b0697f9c962e7..d464946b60f82 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.tsx @@ -13,14 +13,13 @@ import { useDeleteCases } from '../../containers/use_delete_cases'; import { ConfirmDeleteCaseModal } from '../confirm_delete_case'; import { PropertyActions } from '../property_actions'; import type { Case } from '../../../common/ui/types'; -import type { CaseService } from '../../containers/use_find_case_user_actions'; import { useAllCasesNavigation } from '../../common/navigation'; import { useCasesContext } from '../cases_context/use_cases_context'; import { useCasesToast } from '../../common/use_cases_toast'; interface CaseViewActions { caseData: Case; - currentExternalIncident: CaseService | null; + currentExternalIncident: Case['externalService']; } const ActionsComponent: React.FC = ({ caseData, currentExternalIncident }) => { @@ -48,22 +47,22 @@ const ActionsComponent: React.FC = ({ caseData, currentExternal showSuccessToast(i18n.COPY_ID_ACTION_SUCCESS); }, }, - ...(permissions.delete + ...(currentExternalIncident != null && !isEmpty(currentExternalIncident?.externalUrl) ? [ { - iconType: 'trash', - label: i18n.DELETE_CASE(), - color: 'danger' as const, - onClick: openModal, + iconType: 'popout', + label: i18n.VIEW_INCIDENT(currentExternalIncident?.externalTitle ?? ''), + onClick: () => window.open(currentExternalIncident?.externalUrl, '_blank'), }, ] : []), - ...(currentExternalIncident != null && !isEmpty(currentExternalIncident?.externalUrl) + ...(permissions.delete ? [ { - iconType: 'popout', - label: i18n.VIEW_INCIDENT(currentExternalIncident?.externalTitle ?? ''), - onClick: () => window.open(currentExternalIncident?.externalUrl, '_blank'), + iconType: 'trash', + label: i18n.DELETE_CASE(), + color: 'danger' as const, + onClick: openModal, }, ] : []), diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx index 81560f99e5427..7263514fb6baa 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/index.test.tsx @@ -7,10 +7,10 @@ import React from 'react'; import { mount } from 'enzyme'; -import { render, screen } from '@testing-library/react'; +import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { basicCase, caseUserActions, getAlertUserAction } from '../../containers/mock'; +import { basicCase } from '../../containers/mock'; import type { CaseActionBarProps } from '.'; import { CaseActionBar } from '.'; import { @@ -19,42 +19,31 @@ import { noUpdateCasesPermissions, TestProviders, } from '../../common/mock'; -import { useFindCaseUserActions } from '../../containers/use_find_case_user_actions'; +import { useGetCaseConnectors } from '../../containers/use_get_case_connectors'; import { useRefreshCaseViewPage } from '../case_view/use_on_refresh_case_view_page'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; -jest.mock('../../containers/use_find_case_user_actions'); +jest.mock('../../containers/use_get_case_connectors'); jest.mock('../case_view/use_on_refresh_case_view_page'); -const useFindCaseUserActionsMock = useFindCaseUserActions as jest.Mock; -const defaultUseFindCaseUserActions = { - data: { - caseUserActions: [...caseUserActions, getAlertUserAction()], - caseServices: {}, - hasDataToPush: false, - participants: [basicCase.createdBy], - }, - isLoading: false, - isError: false, -}; +const useGetCaseConnectorsMock = useGetCaseConnectors as jest.Mock; describe('CaseActionBar', () => { + const caseConnectors = getCaseConnectorsMockResponse(); + const onUpdateField = jest.fn(); - const defaultProps = { - allCasesNavigation: { - href: 'all-cases-href', - onClick: () => {}, - }, + const defaultProps: CaseActionBarProps = { caseData: basicCase, - disableAlerting: false, isLoading: false, onUpdateField, - currentExternalIncident: null, - metricsFeatures: [], }; beforeEach(() => { jest.clearAllMocks(); - useFindCaseUserActionsMock.mockReturnValue(defaultUseFindCaseUserActions); + useGetCaseConnectorsMock.mockReturnValue({ + isLoading: false, + data: caseConnectors, + }); }); it('renders', () => { @@ -70,21 +59,6 @@ describe('CaseActionBar', () => { expect(wrapper.find(`[data-test-subj="sync-alerts-switch"]`).exists()).toBeTruthy(); expect(wrapper.find(`[data-test-subj="case-refresh"]`).exists()).toBeTruthy(); expect(wrapper.find(`[data-test-subj="case-view-actions"]`).exists()).toBeTruthy(); - // no loading bar - expect(wrapper.find(`[data-test-subj="case-view-action-bar-spinner"]`).exists()).toBeFalsy(); - }); - - it('shows a loading bar when user actions are loaded', async () => { - useFindCaseUserActionsMock.mockReturnValue({ - data: undefined, - isLoading: true, - }); - const wrapper = mount( - - - - ); - expect(wrapper.find(`[data-test-subj="case-view-action-bar-spinner"]`).exists()).toBeTruthy(); }); it('should show correct status', () => { @@ -249,4 +223,38 @@ describe('CaseActionBar', () => { userEvent.click(screen.getByTestId('property-actions-ellipses')); expect(queryByText('Delete case')).toBeInTheDocument(); }); + + it('shows the external incident action', async () => { + const connector = caseConnectors['servicenow-1']; + const { push, ...connectorWithoutPush } = connector; + + const props = { + ...defaultProps, + caseData: { ...defaultProps.caseData, connector: connectorWithoutPush }, + }; + + render( + + + + ); + + userEvent.click(screen.getByTestId('property-actions-ellipses')); + + await waitFor(() => { + expect(screen.getByTestId('property-actions-popout')).toBeInTheDocument(); + }); + }); + + it('does not show the external incident action', async () => { + render( + + + + ); + + userEvent.click(screen.getByTestId('property-actions-ellipses')); + + expect(screen.queryByTestId('property-actions-popout')).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx index d21427d579893..ba65234cd56ab 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/index.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback } from 'react'; import styled, { css } from 'styled-components'; import { EuiButtonEmpty, @@ -15,13 +15,11 @@ import { EuiFlexGroup, EuiFlexItem, EuiIconTip, - EuiLoadingSpinner, } from '@elastic/eui'; import type { Case } from '../../../common/ui/types'; import type { CaseStatuses } from '../../../common/api'; import * as i18n from '../case_view/translations'; import { Actions } from './actions'; -import { useFindCaseUserActions } from '../../containers/use_find_case_user_actions'; import { StatusContextMenu } from './status_context_menu'; import { SyncAlertsSwitch } from '../case_settings/sync_alerts_switch'; import type { OnUpdateFields } from '../case_view/types'; @@ -30,6 +28,7 @@ import { getStatusDate, getStatusTitle } from './helpers'; import { useRefreshCaseViewPage } from '../case_view/use_on_refresh_case_view_page'; import { useCasesContext } from '../cases_context/use_cases_context'; import { useCasesFeatures } from '../../common/use_cases_features'; +import { useGetCaseConnectors } from '../../containers/use_get_case_connectors'; const MyDescriptionList = styled(EuiDescriptionList)` ${({ theme }) => css` @@ -56,9 +55,14 @@ const CaseActionBarComponent: React.FC = ({ }) => { const { permissions } = useCasesContext(); const { isSyncAlertsEnabled, metricsFeatures } = useCasesFeatures(); - const date = useMemo(() => getStatusDate(caseData), [caseData]); - const title = useMemo(() => getStatusTitle(caseData.status), [caseData.status]); + + const { data: caseConnectors } = useGetCaseConnectors(caseData.id); + + const date = getStatusDate(caseData); + const title = getStatusTitle(caseData.status); + const refreshCaseViewPage = useRefreshCaseViewPage(); + const onStatusChanged = useCallback( (status: CaseStatuses) => onUpdateField({ @@ -68,19 +72,8 @@ const CaseActionBarComponent: React.FC = ({ [onUpdateField] ); - const { data: userActionsData, isLoading: isLoadingUserActions } = useFindCaseUserActions( - caseData.id, - caseData.connector.id - ); - - const currentExternalIncident = useMemo( - () => - userActionsData?.caseServices != null && - userActionsData.caseServices[caseData.connector.id] != null - ? userActionsData.caseServices[caseData.connector.id] - : null, - [userActionsData?.caseServices, caseData.connector] - ); + const currentExternalIncident = + caseConnectors?.[caseData.connector.id]?.push.externalService ?? null; const onSyncAlertsChanged = useCallback( (syncAlerts: boolean) => @@ -93,92 +86,84 @@ const CaseActionBarComponent: React.FC = ({ return ( - {isLoadingUserActions ? ( - - - - ) : ( - <> - - - - - {i18n.STATUS} - - - - - {!metricsFeatures.includes('lifespan') ? ( - - {title} - - - - - ) : null} - - - - - - - {permissions.update && isSyncAlertsEnabled && ( - - - - - {i18n.SYNC_ALERTS} - - - - - - - - - - - )} - - - - {i18n.CASE_REFRESH} - - - - - - - - - )} + + + + + {i18n.STATUS} + + + + + {!metricsFeatures.includes('lifespan') ? ( + + {title} + + + + + ) : null} + + + + + + + {permissions.update && isSyncAlertsEnabled && ( + + + + + {i18n.SYNC_ALERTS} + + + + + + + + + + + )} + + + + {i18n.CASE_REFRESH} + + + + + + + ); }; diff --git a/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx b/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx index 1dc62eeba4d97..6c5814c7830f9 100644 --- a/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx @@ -14,7 +14,7 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import '../../common/mock/match_media'; import { useCaseViewNavigation, useUrlParams } from '../../common/navigation/hooks'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { basicCaseClosed, connectorsMock } from '../../containers/mock'; import type { UseGetCase } from '../../containers/use_get_case'; import { useGetCase } from '../../containers/use_get_case'; @@ -22,6 +22,7 @@ import { useGetCaseMetrics } from '../../containers/use_get_case_metrics'; import { useFindCaseUserActions } from '../../containers/use_find_case_user_actions'; import { useGetTags } from '../../containers/use_get_tags'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; +import { useGetCaseConnectors } from '../../containers/use_get_case_connectors'; import { useUpdateCase } from '../../containers/use_update_case'; import { useBulkGetUserProfiles } from '../../containers/user_profiles/use_bulk_get_user_profiles'; import { CaseViewPage } from './case_view_page'; @@ -37,6 +38,7 @@ import type { CaseViewPageProps } from './types'; import { userProfiles } from '../../containers/user_profiles/api.mock'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; import { CASE_VIEW_PAGE_TABS } from '../../../common/types'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; jest.mock('../../containers/use_get_action_license'); jest.mock('../../containers/use_update_case'); @@ -44,8 +46,9 @@ jest.mock('../../containers/use_get_case_metrics'); jest.mock('../../containers/use_find_case_user_actions'); jest.mock('../../containers/use_get_tags'); jest.mock('../../containers/use_get_case'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/use_post_push_to_service'); +jest.mock('../../containers/use_get_case_connectors'); jest.mock('../../containers/user_profiles/use_bulk_get_user_profiles'); jest.mock('../user_actions/timestamp', () => ({ UserActionTimestamp: () => <>, @@ -59,8 +62,9 @@ const useUrlParamsMock = useUrlParams as jest.Mock; const useCaseViewNavigationMock = useCaseViewNavigation as jest.Mock; const useUpdateCaseMock = useUpdateCase as jest.Mock; const useFindCaseUserActionsMock = useFindCaseUserActions as jest.Mock; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const usePostPushToServiceMock = usePostPushToService as jest.Mock; +const useGetCaseConnectorsMock = useGetCaseConnectors as jest.Mock; const useGetCaseMetricsMock = useGetCaseMetrics as jest.Mock; const useGetTagsMock = useGetTags as jest.Mock; const useBulkGetUserProfilesMock = useBulkGetUserProfiles as jest.Mock; @@ -94,6 +98,7 @@ describe('CaseViewPage', () => { const pushCaseToExternalService = jest.fn(); const data = caseProps.caseData; let appMockRenderer: AppMockRenderer; + const caseConnectors = getCaseConnectorsMockResponse(); beforeEach(() => { mockGetCase(); @@ -102,6 +107,10 @@ describe('CaseViewPage', () => { useGetCaseMetricsMock.mockReturnValue(defaultGetCaseMetrics); useFindCaseUserActionsMock.mockReturnValue(defaultUseFindCaseUserActions); usePostPushToServiceMock.mockReturnValue({ isLoading: false, pushCaseToExternalService }); + useGetCaseConnectorsMock.mockReturnValue({ + isLoading: false, + data: caseConnectors, + }); useGetConnectorsMock.mockReturnValue({ data: connectorsMock, isLoading: false }); useGetTagsMock.mockReturnValue({ data: [], isLoading: false }); useBulkGetUserProfilesMock.mockReturnValue({ data: new Map(), isLoading: false }); @@ -249,17 +258,20 @@ describe('CaseViewPage', () => { }); it('should push updates on button click', async () => { - useFindCaseUserActionsMock.mockImplementation(() => ({ - ...defaultUseFindCaseUserActions, + useGetCaseConnectorsMock.mockImplementation(() => ({ + isLoading: false, data: { - ...defaultUseFindCaseUserActions.data, - hasDataToPush: true, + ...caseConnectors, + 'resilient-2': { + ...caseConnectors['resilient-2'], + push: { ...caseConnectors['resilient-2'].push, needsToBePushed: true }, + }, }, })); const result = appMockRenderer.render(); - expect(result.getByTestId('has-data-to-push-button')).toBeInTheDocument(); + expect(result.getByTestId('push-to-external-service')).toBeInTheDocument(); userEvent.click(result.getByTestId('push-to-external-service')); @@ -314,7 +326,7 @@ describe('CaseViewPage', () => { expect(updateObject.updateKey).toEqual('connector'); expect(updateObject.updateValue).toEqual({ id: 'resilient-2', - name: 'My Connector 2', + name: 'My Resilient connector', type: ConnectorTypes.resilient, fields: { incidentTypes: null, @@ -391,20 +403,15 @@ describe('CaseViewPage', () => { it('should show the correct connector name on the push button', async () => { useGetConnectorsMock.mockImplementation(() => ({ data: connectorsMock, isLoading: false })); - useFindCaseUserActionsMock.mockImplementation(() => ({ - ...defaultUseFindCaseUserActions, - data: { - ...defaultUseFindCaseUserActions.data, - hasDataToPush: true, - }, - })); const result = appMockRenderer.render( ); await waitFor(() => { - expect(result.getByTestId('has-data-to-push-button')).toHaveTextContent('My Connector 2'); + expect(result.getByTestId('push-to-external-service')).toHaveTextContent( + 'My Resilient connector' + ); }); }); diff --git a/x-pack/plugins/cases/public/components/case_view/case_view_page.tsx b/x-pack/plugins/cases/public/components/case_view/case_view_page.tsx index af796ff796d85..6e7e7348a8ab4 100644 --- a/x-pack/plugins/cases/public/components/case_view/case_view_page.tsx +++ b/x-pack/plugins/cases/public/components/case_view/case_view_page.tsx @@ -59,7 +59,6 @@ export const CaseViewPage = React.memo( const timelineUi = useTimelineContext()?.ui; const { onUpdateField, isLoading, loadingKey } = useOnUpdateField({ - caseId, caseData, }); diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx index bc6b1d7c0dc81..941a983659183 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx @@ -21,14 +21,17 @@ import type { Case } from '../../../../common'; import type { CaseViewProps } from '../types'; import { useFindCaseUserActions } from '../../../containers/use_find_case_user_actions'; import { usePostPushToService } from '../../../containers/use_post_push_to_service'; -import { useGetConnectors } from '../../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../../containers/use_get_tags'; import { useBulkGetUserProfiles } from '../../../containers/user_profiles/use_bulk_get_user_profiles'; +import { useGetCaseConnectors } from '../../../containers/use_get_case_connectors'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; import { waitForComponentToUpdate } from '../../../common/test_utils'; +import { waitFor } from '@testing-library/dom'; +import { getCaseConnectorsMockResponse } from '../../../common/mock/connectors'; jest.mock('../../../containers/use_find_case_user_actions'); -jest.mock('../../../containers/configure/use_connectors'); +jest.mock('../../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../../containers/use_post_push_to_service'); jest.mock('../../user_actions/timestamp', () => ({ UserActionTimestamp: () => <>, @@ -37,6 +40,7 @@ jest.mock('../../../common/navigation/hooks'); jest.mock('../../../containers/use_get_action_license'); jest.mock('../../../containers/use_get_tags'); jest.mock('../../../containers/user_profiles/use_bulk_get_user_profiles'); +jest.mock('../../../containers/use_get_case_connectors'); (useGetTags as jest.Mock).mockReturnValue({ data: ['coke', 'pepsi'], refetch: jest.fn() }); @@ -76,8 +80,6 @@ const pushCaseToExternalService = jest.fn(); const defaultUseFindCaseUserActions = { data: { caseUserActions: [...caseUserActions, getAlertUserAction()], - caseServices: {}, - hasDataToPush: false, participants: [caseData.createdBy], }, refetch: fetchCaseUserActions, @@ -92,16 +94,23 @@ export const caseProps = { }; const useFindCaseUserActionsMock = useFindCaseUserActions as jest.Mock; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const usePostPushToServiceMock = usePostPushToService as jest.Mock; const useBulkGetUserProfilesMock = useBulkGetUserProfiles as jest.Mock; +const useGetCaseConnectorsMock = useGetCaseConnectors as jest.Mock; describe('Case View Page activity tab', () => { + const caseConnectors = getCaseConnectorsMockResponse(); + beforeAll(() => { useFindCaseUserActionsMock.mockReturnValue(defaultUseFindCaseUserActions); useGetConnectorsMock.mockReturnValue({ data: connectorsMock, isLoading: false }); usePostPushToServiceMock.mockReturnValue({ isLoading: false, pushCaseToExternalService }); useBulkGetUserProfilesMock.mockReturnValue({ isLoading: false, data: new Map() }); + useGetCaseConnectorsMock.mockReturnValue({ + isLoading: false, + data: caseConnectors, + }); }); let appMockRender: AppMockRenderer; @@ -126,7 +135,7 @@ describe('Case View Page activity tab', () => { expect(result.getByTestId('case-tags')).toBeTruthy(); expect(result.getByTestId('connector-edit-header')).toBeTruthy(); expect(result.getByTestId('case-view-status-action-button')).toBeTruthy(); - expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id); await waitForComponentToUpdate(); }); @@ -143,7 +152,7 @@ describe('Case View Page activity tab', () => { expect(result.getByTestId('case-tags')).toBeTruthy(); expect(result.getByTestId('connector-edit-header')).toBeTruthy(); expect(result.queryByTestId('case-view-status-action-button')).not.toBeInTheDocument(); - expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id); await waitForComponentToUpdate(); }); @@ -160,7 +169,7 @@ describe('Case View Page activity tab', () => { expect(result.getByTestId('case-tags')).toBeTruthy(); expect(result.getByTestId('connector-edit-header')).toBeTruthy(); expect(result.getByTestId('case-severity-selection')).toBeDisabled(); - expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id); await waitForComponentToUpdate(); }); @@ -174,7 +183,7 @@ describe('Case View Page activity tab', () => { const result = appMockRender.render(); expect(result.getByTestId('case-view-loading-content')).toBeTruthy(); expect(result.queryByTestId('case-view-activity')).toBeFalsy(); - expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id, caseData.connector.id); + expect(useFindCaseUserActionsMock).toHaveBeenCalledWith(caseData.id); }); it('should not render the assignees on basic license', () => { @@ -205,7 +214,8 @@ describe('Case View Page activity tab', () => { const result = appMockRender.render(); - expect(result.getByTestId('case-view-edit-connector')).toBeInTheDocument(); - await waitForComponentToUpdate(); + await waitFor(() => { + expect(result.getByTestId('case-view-edit-connector')).toBeInTheDocument(); + }); }); }); diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx index 6218c152e5c85..bba0106f9984f 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_activity.tsx @@ -5,13 +5,16 @@ * 2.0. */ +/* eslint-disable complexity */ + import { EuiFlexGroup, EuiFlexItem, EuiLoadingContent } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { isEqual, uniq } from 'lodash'; +import { useGetCaseConnectors } from '../../../containers/use_get_case_connectors'; import { useCasesFeatures } from '../../../common/use_cases_features'; import { useGetCurrentUserProfile } from '../../../containers/user_profiles/use_get_current_user_profile'; import { useBulkGetUserProfiles } from '../../../containers/user_profiles/use_bulk_get_user_profiles'; -import { useGetConnectors } from '../../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../../containers/configure/use_get_supported_action_connectors'; import type { CaseSeverity } from '../../../../common/api'; import { useCaseViewNavigation } from '../../../common/navigation'; import type { UseFetchAlertData } from '../../../../common/ui/types'; @@ -25,8 +28,6 @@ import { UserList } from './user_list'; import { useOnUpdateField } from '../use_on_update_field'; import { useCasesContext } from '../../cases_context/use_cases_context'; import * as i18n from '../translations'; -import { getNoneConnector, normalizeActionConnector } from '../../configure_cases/utils'; -import { getConnectorById } from '../../utils'; import { SeveritySidebarSelector } from '../../severity/sidebar_selector'; import { useFindCaseUserActions } from '../../../containers/use_find_case_user_actions'; import { AssignUsers } from './assign_users'; @@ -49,9 +50,12 @@ export const CaseViewActivity = ({ const { getCaseViewUrl } = useCaseViewNavigation(); const { caseAssignmentAuthorized, pushToServiceAuthorized } = useCasesFeatures(); + const { data: caseConnectors, isLoading: isLoadingCaseConnectors } = useGetCaseConnectors( + caseData.id + ); + const { data: userActionsData, isLoading: isLoadingUserActions } = useFindCaseUserActions( - caseData.id, - caseData.connector.id + caseData.id ); const assignees = useMemo( @@ -79,7 +83,6 @@ export const CaseViewActivity = ({ ); const { onUpdateField, isLoading, loadingKey } = useOnUpdateField({ - caseId: caseData.id, caseData, }); @@ -125,37 +128,38 @@ export const CaseViewActivity = ({ [assignees, onUpdateField] ); - const { isLoading: isLoadingConnectors, data: connectors = [] } = useGetConnectors(); - - const [connectorName, isValidConnector] = useMemo(() => { - const connector = connectors.find((c) => c.id === caseData.connector.id); - return [connector?.name ?? '', !!connector]; - }, [connectors, caseData.connector]); + const { isLoading: isLoadingAllAvailableConnectors, data: supportedActionConnectors } = + useGetSupportedActionConnectors(); const onSubmitConnector = useCallback( - (connectorId, connectorFields, onError, onSuccess) => { - const connector = getConnectorById(connectorId, connectors); - const connectorToUpdate = connector - ? normalizeActionConnector(connector) - : getNoneConnector(); - + (connector, onError, onSuccess) => { onUpdateField({ key: 'connector', - value: { ...connectorToUpdate, fields: connectorFields }, + value: connector, onSuccess, onError, }); }, - [onUpdateField, connectors] + [onUpdateField] ); + const showUserActions = + !isLoadingUserActions && + !isLoadingCaseConnectors && + userActionsData && + caseConnectors && + userProfiles; + + const showConnectorSidebar = + pushToServiceAuthorized && userActionsData && caseConnectors && supportedActionConnectors; + return ( <> - {isLoadingUserActions && ( + {(isLoadingUserActions || isLoadingCaseConnectors) && ( )} - {!isLoadingUserActions && userActionsData && userProfiles && ( + {showUserActions && ( - {pushToServiceAuthorized && userActionsData ? ( + {showConnectorSidebar ? ( ) : null} diff --git a/x-pack/plugins/cases/public/components/case_view/index.test.tsx b/x-pack/plugins/cases/public/components/case_view/index.test.tsx index 369947fcc2b87..1004ce3d2f437 100644 --- a/x-pack/plugins/cases/public/components/case_view/index.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/index.test.tsx @@ -26,7 +26,7 @@ import { useGetCaseMetrics } from '../../containers/use_get_case_metrics'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; import { useKibana } from '../../common/lib/kibana'; import { useFindCaseUserActions } from '../../containers/use_find_case_user_actions'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import CaseView from '.'; @@ -49,7 +49,7 @@ jest.mock('../../containers/use_get_tags'); jest.mock('../../containers/use_find_case_user_actions'); jest.mock('../../containers/use_get_case'); jest.mock('../../containers/use_get_case_metrics'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/use_post_push_to_service'); jest.mock('../user_actions/timestamp', () => ({ UserActionTimestamp: () => <>, @@ -62,7 +62,7 @@ const useFetchCaseMock = useGetCase as jest.Mock; const useGetCaseMetricsMock = useGetCaseMetrics as jest.Mock; const useUpdateCaseMock = useUpdateCase as jest.Mock; const useFindCaseUserActionsMock = useFindCaseUserActions as jest.Mock; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const usePostPushToServiceMock = usePostPushToService as jest.Mock; const useKibanaMock = useKibana as jest.MockedFunction; const useGetTagsMock = useGetTags as jest.Mock; diff --git a/x-pack/plugins/cases/public/components/case_view/mocks.ts b/x-pack/plugins/cases/public/components/case_view/mocks.ts index 88069fe79cfe5..4c4bb40c81df6 100644 --- a/x-pack/plugins/cases/public/components/case_view/mocks.ts +++ b/x-pack/plugins/cases/public/components/case_view/mocks.ts @@ -102,8 +102,6 @@ export const defaultUpdateCaseState = { export const defaultUseFindCaseUserActions = { data: { caseUserActions: [...caseUserActions, getAlertUserAction()], - caseServices: {}, - hasDataToPush: false, participants: [caseData.createdBy], }, refetch: jest.fn(), diff --git a/x-pack/plugins/cases/public/components/case_view/use_on_update_field.ts b/x-pack/plugins/cases/public/components/case_view/use_on_update_field.ts index 449eb7b2ca8a9..d0fc6f98f0ce6 100644 --- a/x-pack/plugins/cases/public/components/case_view/use_on_update_field.ts +++ b/x-pack/plugins/cases/public/components/case_view/use_on_update_field.ts @@ -16,7 +16,7 @@ import { useUpdateCase } from '../../containers/use_update_case'; import { getTypedPayload } from '../../containers/utils'; import type { OnUpdateFields } from './types'; -export const useOnUpdateField = ({ caseData, caseId }: { caseData: Case; caseId: string }) => { +export const useOnUpdateField = ({ caseData }: { caseData: Case }) => { const { isLoading, updateKey: loadingKey, updateCaseProperty } = useUpdateCase(); const onUpdateField = useCallback( diff --git a/x-pack/plugins/cases/public/components/configure_cases/connectors.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/connectors.test.tsx index 2057d0153be68..19ac7d0b667c1 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/connectors.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/connectors.test.tsx @@ -121,7 +121,7 @@ describe('Connectors', () => { newWrapper .find('button[data-test-subj="case-configure-update-selected-connector-button"]') .text() - ).toBe('Update My Connector'); + ).toBe('Update My SN connector'); }); it('shows the deprecated callout when the connector is deprecated', async () => { diff --git a/x-pack/plugins/cases/public/components/configure_cases/connectors_dropdown.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/connectors_dropdown.test.tsx index 3f3bdedff3e3c..9c5681c4025b6 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/connectors_dropdown.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/connectors_dropdown.test.tsx @@ -83,7 +83,7 @@ describe('ConnectorsDropdown', () => { grow={false} > - My Connector + My SN connector , @@ -108,7 +108,7 @@ describe('ConnectorsDropdown', () => { grow={false} > - My Connector 2 + My Resilient connector , @@ -183,7 +183,7 @@ describe('ConnectorsDropdown', () => { grow={false} > - My Connector + My deprecated SN connector (deprecated) @@ -235,7 +235,7 @@ describe('ConnectorsDropdown', () => { .find('[data-test-subj="dropdown-connectors"]') .first() .text() - .includes('My Connector, is selected') + .includes('My SN connector, is selected') ).toBeTruthy(); }); diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx index 2699557bb51f1..bad53d324da3c 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx @@ -28,15 +28,15 @@ import { import { ConnectorTypes } from '../../../common/api'; import { actionTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/application/action_type_registry.mock'; import { useGetActionTypes } from '../../containers/configure/use_action_types'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; jest.mock('../../common/lib/kibana'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/configure/use_configure'); jest.mock('../../containers/configure/use_action_types'); const useKibanaMock = useKibana as jest.Mocked; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useCaseConfigureMock = useCaseConfigure as jest.Mock; const useGetUrlSearchMock = jest.fn(); const useGetActionTypesMock = useGetActionTypes as jest.Mock; @@ -417,7 +417,7 @@ describe('ConfigureCases', () => { expect(persistCaseConfigure).toHaveBeenCalledWith({ connector: { id: 'resilient-2', - name: 'My Connector 2', + name: 'My Resilient connector', type: ConnectorTypes.resilient, fields: null, }, @@ -440,7 +440,7 @@ describe('ConfigureCases', () => { ...useCaseConfigureResponse, connector: { id: 'resilient-2', - name: 'My connector 2', + name: 'My Resilient connector', type: ConnectorTypes.resilient, fields: null, }, @@ -459,7 +459,7 @@ describe('ConfigureCases', () => { wrapper .find('button[data-test-subj="case-configure-update-selected-connector-button"]') .text() - ).toBe('Update My Connector 2'); + ).toBe('Update My Resilient connector'); }); }); diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.tsx index ec9b8a8c7a2fb..2f7db2202a76b 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.tsx @@ -29,7 +29,7 @@ import { HeaderPage } from '../header_page'; import { useCasesContext } from '../cases_context/use_cases_context'; import { useCasesBreadcrumbs } from '../use_breadcrumbs'; import { CasesDeepLinkId } from '../../common/navigation'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; const FormWrapper = styled.div` ${({ theme }) => css` @@ -77,7 +77,7 @@ export const ConfigureCases: React.FC = React.memo(() => { isLoading: isLoadingConnectors, data: connectors = [], refetch: refetchConnectors, - } = useGetConnectors(); + } = useGetSupportedActionConnectors(); const { isLoading: isLoadingActionTypes, data: actionTypes = [], diff --git a/x-pack/plugins/cases/public/components/connectors/card.test.tsx b/x-pack/plugins/cases/public/components/connectors/card.test.tsx index 6254150620fd4..a654821830b23 100644 --- a/x-pack/plugins/cases/public/components/connectors/card.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/card.test.tsx @@ -6,15 +6,16 @@ */ import React from 'react'; -import { mount } from 'enzyme'; +import { render, screen } from '@testing-library/react'; import { ConnectorTypes } from '../../../common/api'; import { ConnectorCard } from './card'; +import { createQueryWithMarkup } from '../../common/test_utils'; describe('ConnectorCard ', () => { - it('it does not throw when accessing the icon if the connector type is not registered', () => { + it('does not throw when accessing the icon if the connector type is not registered', () => { expect(() => - mount( + render( { ) ).not.toThrowError(); }); + + it('shows the loading spinner if loading', () => { + render( + + ); + + expect(screen.getByTestId('connector-card-loading')).toBeInTheDocument(); + expect(screen.queryByTestId('connector-card')).not.toBeInTheDocument(); + }); + + it('shows the connector title', () => { + render( + + ); + + expect(screen.getByText('My connector')).toBeInTheDocument(); + }); + + it('shows the connector list items', () => { + const listItems = [ + { title: 'item 1 title', description: 'item 1 desc' }, + { title: 'item 2 title', description: 'item 2 desc' }, + ]; + + render( + + ); + + const getByText = createQueryWithMarkup(screen.getByText); + + for (const item of listItems) { + expect(getByText(`${item.title}: ${item.description}`)).toBeInTheDocument(); + } + }); }); diff --git a/x-pack/plugins/cases/public/components/connectors/card.tsx b/x-pack/plugins/cases/public/components/connectors/card.tsx index c4cd24787b01c..a9bf98dd7cf9d 100644 --- a/x-pack/plugins/cases/public/components/connectors/card.tsx +++ b/x-pack/plugins/cases/public/components/connectors/card.tsx @@ -5,9 +5,8 @@ * 2.0. */ -import React, { memo, useMemo } from 'react'; -import { EuiCard, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; -import styled from 'styled-components'; +import React, { memo } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import type { ConnectorTypes } from '../../../common/api'; import { useKibana } from '../../common/lib/kibana'; @@ -20,12 +19,6 @@ interface ConnectorCardProps { isLoading: boolean; } -const StyledText = styled.span` - span { - display: block; - } -`; - const ConnectorCardDisplay: React.FC = ({ connectorType, title, @@ -34,44 +27,30 @@ const ConnectorCardDisplay: React.FC = ({ }) => { const { triggersActionsUi } = useKibana().services; - const description = useMemo( - () => ( - - {listItems.length > 0 && - listItems.map((item, i) => ( - - {`${item.title}: `} - {item.description} - - ))} - - ), - [listItems] - ); - - const icon = useMemo( - () => , - // eslint-disable-next-line react-hooks/exhaustive-deps - [connectorType] - ); - return ( <> {isLoading && } {!isLoading && ( - - - + + + + + {title} + + + + + + + + {listItems.length > 0 && + listItems.map((item, i) => ( + + {`${item.title}: `} + {`${item.description}`} + + ))} - {icon} )} diff --git a/x-pack/plugins/cases/public/components/connectors/jira/case_fields.test.tsx b/x-pack/plugins/cases/public/components/connectors/jira/case_fields.test.tsx index 0e4d92139234b..751e9dadca491 100644 --- a/x-pack/plugins/cases/public/components/connectors/jira/case_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/jira/case_fields.test.tsx @@ -122,15 +122,12 @@ describe('Jira Fields', () => { connector={connector} /> ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(0).text()).toEqual( - 'Issue type: Task' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(1).text()).toEqual( - 'Parent issue: Parent Task' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(2).text()).toEqual( - 'Priority: High' - ); + + const nodes = wrapper.find('[data-test-subj="card-list-item"]').hostNodes(); + + expect(nodes.at(0).text()).toEqual('Issue type: Task'); + expect(nodes.at(1).text()).toEqual('Parent issue: Parent Task'); + expect(nodes.at(2).text()).toEqual('Priority: High'); }); test('it sets parent correctly', async () => { diff --git a/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_itsm_case_fields.test.tsx b/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_itsm_case_fields.test.tsx index 2273343d119b8..95510090cada1 100644 --- a/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_itsm_case_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_itsm_case_fields.test.tsx @@ -71,15 +71,11 @@ describe('ServiceNowITSM Fields', () => { onChoicesSuccess(mockChoices); }); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(0).text()).toEqual( - 'Urgency: 2 - High' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(1).text()).toEqual( - 'Severity: 1 - Critical' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(2).text()).toEqual( - 'Impact: 3 - Moderate' - ); + const nodes = wrapper.find('[data-test-subj="card-list-item"]').hostNodes(); + + expect(nodes.at(0).text()).toEqual('Urgency: 2 - High'); + expect(nodes.at(1).text()).toEqual('Severity: 1 - Critical'); + expect(nodes.at(2).text()).toEqual('Impact: 3 - Moderate'); }); it('transforms the categories to options correctly', async () => { diff --git a/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_sir_case_fields.test.tsx b/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_sir_case_fields.test.tsx index ee8681c7487dc..c66d40eb6827b 100644 --- a/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_sir_case_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/connectors/servicenow/servicenow_sir_case_fields.test.tsx @@ -75,29 +75,17 @@ describe('ServiceNowSIR Fields', () => { act(() => { onChoicesSuccess(mockChoices); }); - wrapper.update(); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(0).text()).toEqual( - 'Destination IPs: Yes' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(1).text()).toEqual( - 'Source IPs: Yes' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(2).text()).toEqual( - 'Malware URLs: Yes' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(3).text()).toEqual( - 'Malware Hashes: Yes' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(4).text()).toEqual( - 'Priority: 1 - Critical' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(5).text()).toEqual( - 'Category: Denial of Service' - ); - expect(wrapper.find('[data-test-subj="card-list-item"]').at(6).text()).toEqual( - 'Subcategory: Single or distributed (DoS or DDoS)' - ); + wrapper.update(); + const nodes = wrapper.find('[data-test-subj="card-list-item"]').hostNodes(); + + expect(nodes.at(0).text()).toEqual('Destination IPs: Yes'); + expect(nodes.at(1).text()).toEqual('Source IPs: Yes'); + expect(nodes.at(2).text()).toEqual('Malware URLs: Yes'); + expect(nodes.at(3).text()).toEqual('Malware Hashes: Yes'); + expect(nodes.at(4).text()).toEqual('Priority: 1 - Critical'); + expect(nodes.at(5).text()).toEqual('Category: Denial of Service'); + expect(nodes.at(6).text()).toEqual('Subcategory: Single or distributed (DoS or DDoS)'); }); test('it transforms the categories to options correctly', async () => { diff --git a/x-pack/plugins/cases/public/components/create/form.test.tsx b/x-pack/plugins/cases/public/components/create/form.test.tsx index d95f264089643..8aa50a4270414 100644 --- a/x-pack/plugins/cases/public/components/create/form.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form.test.tsx @@ -22,11 +22,11 @@ import { CreateCaseForm } from './form'; import { useCaseConfigure } from '../../containers/configure/use_configure'; import { useCaseConfigureResponse } from '../configure_cases/__mock__'; import { TestProviders } from '../../common/mock'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; jest.mock('../../containers/use_get_tags'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/configure/use_configure'); jest.mock('../markdown_editor/plugins/lens/use_lens_draft_comment'); jest.mock('../app/use_available_owners', () => ({ @@ -34,7 +34,7 @@ jest.mock('../app/use_available_owners', () => ({ })); const useGetTagsMock = useGetTags as jest.Mock; -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useCaseConfigureMock = useCaseConfigure as jest.Mock; const initialCaseValue: FormProps = { diff --git a/x-pack/plugins/cases/public/components/create/form_context.test.tsx b/x-pack/plugins/cases/public/components/create/form_context.test.tsx index 37971667da37b..192de92777fb6 100644 --- a/x-pack/plugins/cases/public/components/create/form_context.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form_context.test.tsx @@ -41,7 +41,7 @@ import { usePostPushToService } from '../../containers/use_post_push_to_service' import userEvent from '@testing-library/user-event'; import { connectorsMock } from '../../common/mock/connectors'; import type { CaseAttachments } from '../../types'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; import { waitForComponentToUpdate } from '../../common/test_utils'; import { userProfiles } from '../../containers/user_profiles/api.mock'; @@ -51,7 +51,7 @@ jest.mock('../../containers/use_post_case'); jest.mock('../../containers/use_create_attachments'); jest.mock('../../containers/use_post_push_to_service'); jest.mock('../../containers/use_get_tags'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/configure/use_configure'); jest.mock('../connectors/resilient/use_get_incident_types'); jest.mock('../connectors/resilient/use_get_severity'); @@ -64,7 +64,7 @@ jest.mock('../../common/lib/kibana'); jest.mock('../../containers/user_profiles/api'); jest.mock('../../common/use_license'); -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useCaseConfigureMock = useCaseConfigure as jest.Mock; const usePostCaseMock = usePostCase as jest.Mock; const useCreateAttachmentsMock = useCreateAttachments as jest.Mock; @@ -407,7 +407,7 @@ describe('Create case', () => { subcategory: null, }, id: 'servicenow-1', - name: 'My Connector', + name: 'My SN connector', type: '.servicenow', }, }); diff --git a/x-pack/plugins/cases/public/components/create/form_context.tsx b/x-pack/plugins/cases/public/components/create/form_context.tsx index 3a1c99f6d6218..ba859b21d7b0f 100644 --- a/x-pack/plugins/cases/public/components/create/form_context.tsx +++ b/x-pack/plugins/cases/public/components/create/form_context.tsx @@ -22,7 +22,7 @@ import { useCasesContext } from '../cases_context/use_cases_context'; import { useCasesFeatures } from '../../common/use_cases_features'; import { getConnectorById } from '../utils'; import type { CaseAttachmentsWithoutOwner } from '../../types'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useCreateCaseWithAttachmentsTransaction } from '../../common/apm/use_cases_transactions'; const initialCaseValue: FormProps = { @@ -55,7 +55,8 @@ export const FormContext: React.FC = ({ attachments, initialValue, }) => { - const { data: connectors = [], isLoading: isLoadingConnectors } = useGetConnectors(); + const { data: connectors = [], isLoading: isLoadingConnectors } = + useGetSupportedActionConnectors(); const { owner, appId } = useCasesContext(); const { isSyncAlertsEnabled } = useCasesFeatures(); const { postCase } = usePostCase(); diff --git a/x-pack/plugins/cases/public/components/create/index.test.tsx b/x-pack/plugins/cases/public/components/create/index.test.tsx index 24798c114fede..07a705ef41a90 100644 --- a/x-pack/plugins/cases/public/components/create/index.test.tsx +++ b/x-pack/plugins/cases/public/components/create/index.test.tsx @@ -30,13 +30,13 @@ import { useGetFieldsByIssueTypeResponse, } from './mock'; import { CreateCase } from '.'; -import { useGetConnectors } from '../../containers/configure/use_connectors'; +import { useGetSupportedActionConnectors } from '../../containers/configure/use_get_supported_action_connectors'; import { useGetTags } from '../../containers/use_get_tags'; jest.mock('../../containers/api'); jest.mock('../../containers/user_profiles/api'); jest.mock('../../containers/use_get_tags'); -jest.mock('../../containers/configure/use_connectors'); +jest.mock('../../containers/configure/use_get_supported_action_connectors'); jest.mock('../../containers/configure/use_configure'); jest.mock('../connectors/resilient/use_get_incident_types'); jest.mock('../connectors/resilient/use_get_severity'); @@ -45,7 +45,7 @@ jest.mock('../connectors/jira/use_get_fields_by_issue_type'); jest.mock('../connectors/jira/use_get_single_issue'); jest.mock('../connectors/jira/use_get_issues'); -const useGetConnectorsMock = useGetConnectors as jest.Mock; +const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useCaseConfigureMock = useCaseConfigure as jest.Mock; const useGetTagsMock = useGetTags as jest.Mock; const useGetIncidentTypesMock = useGetIncidentTypes as jest.Mock; diff --git a/x-pack/plugins/cases/public/components/edit_connector/helpers.test.ts b/x-pack/plugins/cases/public/components/edit_connector/helpers.test.ts deleted file mode 100644 index a3c13c1213e64..0000000000000 --- a/x-pack/plugins/cases/public/components/edit_connector/helpers.test.ts +++ /dev/null @@ -1,88 +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 type { ConnectorUserAction } from '../../../common/api'; -import { Actions, ConnectorTypes } from '../../../common/api'; -import type { CaseUserActions } from '../../containers/types'; -import { getConnectorFieldsFromUserActions } from './helpers'; - -const defaultJiraFields = { - issueType: '1', - parent: null, - priority: null, -}; - -describe('helpers', () => { - describe('getConnectorFieldsFromUserActions', () => { - it('returns null when it cannot find the connector id', () => { - expect(getConnectorFieldsFromUserActions('a', [])).toBeNull(); - }); - - it('returns null when it cannot find the connector id in a non empty array', () => { - expect( - getConnectorFieldsFromUserActions('a', [ - createConnectorUserAction({ - // @ts-expect-error payload missing fields - payload: { a: '1' }, - }), - ]) - ).toBeNull(); - }); - - it('returns the fields when it finds the connector id', () => { - expect(getConnectorFieldsFromUserActions('a', [createConnectorUserAction()])).toEqual( - defaultJiraFields - ); - }); - - it('returns the fields when it finds the connector id in the second user action', () => { - const expectedFields = { ...defaultJiraFields, issueType: '5' }; - - expect( - getConnectorFieldsFromUserActions('id-to-find', [ - createConnectorUserAction({}), - createConnectorUserAction({ - payload: { - connector: { - id: 'id-to-find', - name: 'test', - fields: expectedFields, - type: ConnectorTypes.jira, - }, - }, - }), - ]) - ).toEqual(expectedFields); - }); - - it('returns null when the action is not a connector', () => { - expect( - getConnectorFieldsFromUserActions('id-to-find', [ - createConnectorUserAction({ - // @ts-expect-error - type: 'not-a-connector', - }), - ]) - ).toBeNull(); - }); - }); -}); - -function createConnectorUserAction(attributes: Partial = {}): CaseUserActions { - return { - action: Actions.update, - createdBy: { username: 'user', fullName: null, email: null }, - createdAt: '2021-12-08T11:28:32.623Z', - type: 'connector', - id: '', - commentId: '', - payload: { - connector: { id: 'a', name: 'test', fields: defaultJiraFields, type: ConnectorTypes.jira }, - }, - ...attributes, - } as CaseUserActions; -} diff --git a/x-pack/plugins/cases/public/components/edit_connector/helpers.ts b/x-pack/plugins/cases/public/components/edit_connector/helpers.ts deleted file mode 100644 index 84d6984f35bbc..0000000000000 --- a/x-pack/plugins/cases/public/components/edit_connector/helpers.ts +++ /dev/null @@ -1,27 +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 { isConnectorUserAction, isCreateCaseUserAction } from '../../../common/utils/user_actions'; -import type { ConnectorTypeFields } from '../../../common/api'; -import type { CaseUserActions } from '../../containers/types'; - -export const getConnectorFieldsFromUserActions = ( - id: string, - userActions: CaseUserActions[] -): ConnectorTypeFields['fields'] => { - for (const action of [...userActions].reverse()) { - if (isConnectorUserAction(action) || isCreateCaseUserAction(action)) { - const connector = action.payload.connector; - - if (connector && id === connector.id) { - return connector.fields; - } - } - } - - return null; -}; diff --git a/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx b/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx index 401f43ae9afff..fe24145b10d68 100644 --- a/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx +++ b/x-pack/plugins/cases/public/components/edit_connector/index.test.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import { mount } from 'enzyme'; import { render, waitFor, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; @@ -20,47 +19,58 @@ import { noPushCasesPermissions, TestProviders, } from '../../common/mock'; -import { basicCase, basicPush, caseUserActions, connectorsMock } from '../../containers/mock'; +import { basicCase, connectorsMock } from '../../containers/mock'; import type { CaseConnector } from '../../containers/configure/types'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; const onSubmit = jest.fn(); -const caseServices = { - '123': { - ...basicPush, - firstPushIndex: 0, - lastPushIndex: 0, - commentsToUpdate: [], - hasDataToPush: true, - }, -}; -const getDefaultProps = (): EditConnectorProps => { - return { - caseData: basicCase, - caseServices, - connectorName: connectorsMock[0].name, - connectors: connectorsMock, - hasDataToPush: true, - isLoading: false, - isValidConnector: true, - onSubmit, - userActions: caseUserActions, - }; +const caseConnectors = getCaseConnectorsMockResponse(); + +const defaultProps: EditConnectorProps = { + caseData: basicCase, + supportedActionConnectors: connectorsMock, + isLoading: false, + caseConnectors, + onSubmit, }; describe('EditConnector ', () => { let appMockRender: AppMockRenderer; + beforeEach(() => { jest.clearAllMocks(); appMockRender = createAppMockRenderer(); }); + it('Renders the none connector', async () => { + render( + + + + ); + + expect( + await screen.findByText( + 'To create and update a case in an external system, select a connector.' + ) + ).toBeInTheDocument(); + + userEvent.click(screen.getByTestId('connector-edit-button')); + + await waitFor(() => { + expect(screen.getAllByTestId('dropdown-connector-no-connector').length).toBeGreaterThan(0); + }); + }); + it('Renders servicenow connector from case initially', async () => { - const defaultProps = getDefaultProps(); const serviceNowProps = { ...defaultProps, caseData: { ...defaultProps.caseData, - connector: { ...defaultProps.caseData.connector, id: 'servicenow-1' }, + connector: { + ...defaultProps.caseData.connector, + id: 'servicenow-1', + }, }, }; @@ -70,54 +80,76 @@ describe('EditConnector ', () => { ); - expect(await screen.findByText('My Connector')).toBeInTheDocument(); + expect(await screen.findByText('My SN connector')).toBeInTheDocument(); }); it('Renders no connector, and then edit', async () => { - const defaultProps = getDefaultProps(); - const wrapper = mount( + render( ); - expect(wrapper.find(`[data-test-subj="has-data-to-push-button"]`).exists()).toBeTruthy(); - wrapper.find('[data-test-subj="connector-edit"] button').simulate('click'); - expect( - wrapper.find(`span[data-test-subj="dropdown-connector-no-connector"]`).last().exists() - ).toBeTruthy(); + userEvent.click(screen.getByTestId('connector-edit-button')); + + await waitFor(() => { + expect(screen.getByTestId('caseConnectors')).toBeInTheDocument(); + }); + + userEvent.click(screen.getByTestId('dropdown-connectors')); - wrapper.find('button[data-test-subj="dropdown-connectors"]').simulate('click'); - wrapper.update(); - wrapper.find('button[data-test-subj="dropdown-connector-resilient-2"]').simulate('click'); - await waitFor(() => wrapper.update()); + await waitFor(() => { + expect(screen.getByTestId('dropdown-connector-resilient-2')).toBeInTheDocument(); + }); - expect(wrapper.find(`[data-test-subj="edit-connectors-submit"]`).last().exists()).toBeTruthy(); + userEvent.click(screen.getByTestId('dropdown-connector-resilient-2')); + + await waitFor(() => { + expect(screen.getByTestId('edit-connectors-submit')).toBeInTheDocument(); + }); }); it('Edit external service on submit', async () => { - const defaultProps = getDefaultProps(); - const wrapper = mount( + render( ); - wrapper.find('[data-test-subj="connector-edit"] button').simulate('click'); - wrapper.find('button[data-test-subj="dropdown-connectors"]').simulate('click'); - wrapper.update(); - wrapper.find('button[data-test-subj="dropdown-connector-resilient-2"]').simulate('click'); - wrapper.update(); + userEvent.click(screen.getByTestId('connector-edit-button')); + userEvent.click(screen.getByTestId('dropdown-connectors')); - expect(wrapper.find(`[data-test-subj="edit-connectors-submit"]`).last().exists()).toBeTruthy(); + await waitFor(() => { + expect(screen.getByTestId('dropdown-connector-resilient-2')).toBeInTheDocument(); + }); + + userEvent.click(screen.getByTestId('dropdown-connector-resilient-2'), undefined, { + skipPointerEventsCheck: true, + }); - wrapper.find(`[data-test-subj="edit-connectors-submit"]`).last().simulate('click'); - await waitFor(() => expect(onSubmit.mock.calls[0][0]).toBe('resilient-2')); + expect(screen.getByTestId('edit-connectors-submit')).toBeInTheDocument(); + + userEvent.click(screen.getByTestId('edit-connectors-submit')); + + await waitFor(() => + expect(onSubmit).toHaveBeenCalledWith( + { + fields: { + incidentTypes: null, + severityCode: null, + }, + id: 'resilient-2', + name: 'My Resilient connector', + type: '.resilient', + }, + expect.anything(), + expect.anything() + ) + ); }); it('Revert to initial external service on error', async () => { - const defaultProps = getDefaultProps(); - onSubmit.mockImplementation((connector, onSuccess, onError) => { + onSubmit.mockImplementation((connector, onError, onSuccess) => { onError(new Error('An error has occurred')); }); @@ -125,43 +157,46 @@ describe('EditConnector ', () => { ...defaultProps, caseData: { ...defaultProps.caseData, - connector: { ...defaultProps.caseData.connector, id: 'servicenow-1' }, + connector: { + ...defaultProps.caseData.connector, + id: 'servicenow-1', + }, }, }; - const wrapper = mount( + render( ); - wrapper.find('[data-test-subj="connector-edit"] button').simulate('click'); - wrapper.find('button[data-test-subj="dropdown-connectors"]').simulate('click'); + userEvent.click(screen.getByTestId('connector-edit-button')); + userEvent.click(screen.getByTestId('dropdown-connectors')); + + await waitFor(() => { + expect(screen.getByTestId('dropdown-connector-resilient-2')).toBeInTheDocument(); + }); + + userEvent.click(screen.getByTestId('dropdown-connector-resilient-2'), undefined, { + skipPointerEventsCheck: true, + }); + + userEvent.click(screen.getByTestId('edit-connectors-submit')); + await waitFor(() => { - wrapper.update(); - wrapper.find('button[data-test-subj="dropdown-connector-resilient-2"]').simulate('click'); - wrapper.update(); - expect( - wrapper.find(`[data-test-subj="edit-connectors-submit"]`).last().exists() - ).toBeTruthy(); - wrapper.find(`[data-test-subj="edit-connectors-submit"]`).last().simulate('click'); + expect(screen.queryByTestId('edit-connectors-submit')).not.toBeInTheDocument(); }); await waitFor(() => { - wrapper.update(); - expect(wrapper.find(`[data-test-subj="edit-connectors-submit"]`).exists()).toBeFalsy(); + expect(onSubmit).toHaveBeenCalled(); }); - /** - * If an error is being throw on submit the selected connector should - * be reverted to the initial one. In our test the initial one is the .servicenow-1 - * connector. The title of the .servicenow-1 connector is My Connector. - */ - expect(wrapper.text().includes('My Connector')).toBeTruthy(); + await waitFor(() => { + expect(screen.getByText('My SN connector')).toBeInTheDocument(); + }); }); it('Resets selector on cancel', async () => { - const defaultProps = getDefaultProps(); const props = { ...defaultProps, caseData: { @@ -173,57 +208,76 @@ describe('EditConnector ', () => { }, }; - const wrapper = mount( + render( ); - wrapper.find('[data-test-subj="connector-edit"] button').simulate('click'); - wrapper.find('button[data-test-subj="dropdown-connectors"]').simulate('click'); - wrapper.update(); - wrapper.find('button[data-test-subj="dropdown-connector-resilient-2"]').simulate('click'); - wrapper.update(); - wrapper.find(`[data-test-subj="edit-connectors-cancel"]`).last().simulate('click'); + userEvent.click(screen.getByTestId('connector-edit-button')); + userEvent.click(screen.getByTestId('dropdown-connectors')); await waitFor(() => { - wrapper.update(); - expect(wrapper.find(`[data-test-subj="edit-connectors-submit"]`).exists()).toBeFalsy(); + expect(screen.getByTestId('dropdown-connector-resilient-2')).toBeInTheDocument(); }); - expect(wrapper.text().includes('My Connector')).toBeTruthy(); + userEvent.click(screen.getByTestId('dropdown-connector-resilient-2')); + userEvent.click(screen.getByTestId('edit-connectors-cancel')); + + await waitFor(() => { + expect(screen.queryByTestId('edit-connectors-submit')).not.toBeInTheDocument(); + }); + + expect(screen.getByText('My SN connector')).toBeInTheDocument(); }); - it('Renders loading spinner', async () => { - const defaultProps = getDefaultProps(); + it('disabled the edit button when is loading', async () => { const props = { ...defaultProps, isLoading: true }; - const wrapper = mount( + + render( ); - await waitFor(() => - expect(wrapper.find(`[data-test-subj="connector-loading"]`).last().exists()).toBeTruthy() + + await waitFor(() => { + expect(screen.queryByTestId('connector-edit-button')).not.toBeInTheDocument(); + }); + }); + + it('does not shows the callouts when is loading', async () => { + const props = { ...defaultProps, isLoading: true }; + + render( + + + ); + + await waitFor(() => { + expect(screen.queryByTestId('push-callouts')).not.toBeInTheDocument(); + }); }); it('does not allow the connector to be edited when the user does not have write permissions', async () => { - const wrapper = mount( + render( - + ); - await waitFor(() => - expect(wrapper.find(`[data-test-subj="connector-edit"]`).exists()).toBeFalsy() - ); - expect(wrapper.find(`[data-test-subj="has-data-to-push-button"]`).exists()).toBeFalsy(); + await waitFor(() => { + expect(screen.queryByTestId('connector-edit-button')).not.toBeInTheDocument(); + }); + + await waitFor(() => { + expect(screen.queryByTestId('push-to-external-service')).not.toBeInTheDocument(); + }); }); it('display the callout message when none is selected', async () => { - const defaultProps = getDefaultProps(); - const props = { ...defaultProps, connectors: [] }; - const result = appMockRender.render(); + // default props has the none connector as selected + const result = appMockRender.render(); await waitFor(() => { expect(result.getByTestId('push-callouts')).toBeInTheDocument(); @@ -231,7 +285,6 @@ describe('EditConnector ', () => { }); it('disables the save button until changes are done ', async () => { - const defaultProps = getDefaultProps(); const serviceNowProps = { ...defaultProps, caseData: { @@ -261,18 +314,17 @@ describe('EditConnector ', () => { // simulate changing the connector userEvent.click(result.getByTestId('dropdown-connectors')); + await waitForEuiPopoverOpen(); + userEvent.click(result.getAllByTestId('dropdown-connector-no-connector')[0]); - expect(result.getByTestId('edit-connectors-submit')).toBeEnabled(); - // this strange assertion is required because of existing race conditions inside the EditConnector component await waitFor(() => { - expect(true).toBeTruthy(); + expect(result.getByTestId('edit-connectors-submit')).toBeEnabled(); }); }); it('disables the save button when no connector is the default', async () => { - const defaultProps = getDefaultProps(); const noneConnector = { ...defaultProps, caseData: { @@ -295,18 +347,17 @@ describe('EditConnector ', () => { // simulate changing the connector userEvent.click(result.getByTestId('dropdown-connectors')); + await waitForEuiPopoverOpen(); + userEvent.click(result.getAllByTestId('dropdown-connector-resilient-2')[0]); - expect(result.getByTestId('edit-connectors-submit')).toBeEnabled(); - // this strange assertion is required because of existing race conditions inside the EditConnector component await waitFor(() => { - expect(true).toBeTruthy(); + expect(result.getByTestId('edit-connectors-submit')).toBeEnabled(); }); }); it('shows the actions permission message if the user does not have read access to actions', async () => { - const defaultProps = getDefaultProps(); appMockRender.coreStart.application.capabilities = { ...appMockRender.coreStart.application.capabilities, actions: { save: false, show: false }, @@ -319,7 +370,6 @@ describe('EditConnector ', () => { }); it('does not show the actions permission message if the user has read access to actions', async () => { - const defaultProps = getDefaultProps(); appMockRender.coreStart.application.capabilities = { ...appMockRender.coreStart.application.capabilities, actions: { save: true, show: true }, @@ -332,7 +382,6 @@ describe('EditConnector ', () => { }); it('does not show the callout if the user does not have read access to actions', async () => { - const defaultProps = getDefaultProps(); const props = { ...defaultProps, connectors: [] }; appMockRender.coreStart.application.capabilities = { ...appMockRender.coreStart.application.capabilities, @@ -347,7 +396,6 @@ describe('EditConnector ', () => { }); it('does not show the push button if the user does not have read access to actions', async () => { - const defaultProps = getDefaultProps(); appMockRender.coreStart.application.capabilities = { ...appMockRender.coreStart.application.capabilities, actions: { save: false, show: false }, @@ -355,44 +403,43 @@ describe('EditConnector ', () => { const result = appMockRender.render(); await waitFor(() => { - expect(result.queryByTestId('has-data-to-push-button')).toBe(null); + expect(result.queryByTestId('push-to-external-service')).toBe(null); }); }); it('does not show the push button if the user does not have push permissions', async () => { - const defaultProps = getDefaultProps(); - appMockRender = createAppMockRenderer({ permissions: noPushCasesPermissions() }); const result = appMockRender.render(); + await waitFor(() => { - expect(result.queryByTestId('has-data-to-push-button')).toBe(null); + expect(result.queryByTestId('push-to-external-service')).toBe(null); }); }); it('does not show the edit connectors pencil if the user does not have read access to actions', async () => { - const defaultProps = getDefaultProps(); const props = { ...defaultProps, connectors: [] }; appMockRender.coreStart.application.capabilities = { ...appMockRender.coreStart.application.capabilities, actions: { save: false, show: false }, }; - const result = appMockRender.render(); + appMockRender.render(); + await waitFor(() => { - expect(result.getByTestId('connector-edit-header')).toBeInTheDocument(); - expect(result.queryByTestId('connector-edit')).toBe(null); + expect(screen.getByTestId('connector-edit-header')).toBeInTheDocument(); + expect(screen.queryByTestId('connector-edit-button')).not.toBeInTheDocument(); }); }); it('does not show the edit connectors pencil if the user does not have push permissions', async () => { - const defaultProps = getDefaultProps(); const props = { ...defaultProps, connectors: [] }; appMockRender = createAppMockRenderer({ permissions: noPushCasesPermissions() }); - const result = appMockRender.render(); + appMockRender.render(); + await waitFor(() => { - expect(result.getByTestId('connector-edit-header')).toBeInTheDocument(); - expect(result.queryByTestId('connector-edit')).toBe(null); + expect(screen.getByTestId('connector-edit-header')).toBeInTheDocument(); + expect(screen.queryByTestId('connector-edit-button')).toBe(null); }); }); }); diff --git a/x-pack/plugins/cases/public/components/edit_connector/index.tsx b/x-pack/plugins/cases/public/components/edit_connector/index.tsx index 25fc2a69ac4dc..8a63c9d02ad26 100644 --- a/x-pack/plugins/cases/public/components/edit_connector/index.tsx +++ b/x-pack/plugins/cases/public/components/edit_connector/index.tsx @@ -4,7 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useCallback, useEffect, useReducer, useState } from 'react'; + +/* eslint-disable complexity */ + +import React, { useCallback, useReducer } from 'react'; import deepEqual from 'fast-deep-equal'; import { EuiText, @@ -13,64 +16,34 @@ import { EuiFlexItem, EuiButton, EuiButtonEmpty, - EuiLoadingSpinner, EuiButtonIcon, } from '@elastic/eui'; -import styled from 'styled-components'; import { isEmpty, noop } from 'lodash/fp'; import type { FieldConfig } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import { Form, UseField, useForm } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; -import type { Case } from '../../../common/ui/types'; -import type { ActionConnector, ConnectorTypeFields } from '../../../common/api'; +import type { Case, CaseConnectors } from '../../../common/ui/types'; +import type { ActionConnector, CaseConnector, ConnectorTypeFields } from '../../../common/api'; import { NONE_CONNECTOR_ID } from '../../../common/api'; import { ConnectorSelector } from '../connector_selector/form'; import { ConnectorFieldsForm } from '../connectors/fields_form'; -import type { CaseUserActions } from '../../containers/types'; import { schema } from './schema'; -import { getConnectorFieldsFromUserActions } from './helpers'; import * as i18n from './translations'; import { getConnectorById, getConnectorsFormValidators } from '../utils'; import { usePushToService } from '../use_push_to_service'; -import type { CaseServices } from '../../containers/use_find_case_user_actions'; import { useApplicationCapabilities } from '../../common/lib/kibana'; -import { useCasesContext } from '../cases_context/use_cases_context'; +import { PushButton } from './push_button'; +import { PushCallouts } from './push_callouts'; +import { normalizeActionConnector, getNoneConnector } from '../configure_cases/utils'; export interface EditConnectorProps { caseData: Case; - caseServices: CaseServices; - connectorName: string; - connectors: ActionConnector[]; - hasDataToPush: boolean; + caseConnectors: CaseConnectors; + supportedActionConnectors: ActionConnector[]; isLoading: boolean; - isValidConnector: boolean; - onSubmit: ( - connectorId: string, - connectorFields: ConnectorTypeFields['fields'], - onError: () => void, - onSuccess: () => void - ) => void; - userActions: CaseUserActions[]; + onSubmit: (connector: CaseConnector, onError: () => void, onSuccess: () => void) => void; } -const MyFlexGroup = styled(EuiFlexGroup)` - ${({ theme }) => ` - p { - font-size: ${theme.eui.euiSizeM}; - } - `} -`; -const DisappearingFlexItem = styled(EuiFlexItem)` - ${({ $isHidden }: { $isHidden: boolean }) => - $isHidden && - ` - margin: 0 !important; - & .euiFlexItem { - margin: 0 !important; - } - `} -`; - interface State { currentConnector: ActionConnector | null; fields: ConnectorTypeFields['fields']; @@ -81,6 +54,7 @@ type Action = | { type: 'SET_CURRENT_CONNECTOR'; payload: State['currentConnector'] } | { type: 'SET_FIELDS'; payload: State['fields'] } | { type: 'SET_EDIT_CONNECTOR'; payload: State['editConnector'] }; + const editConnectorReducer = (state: State, action: Action) => { switch (action.type) { case 'SET_CURRENT_CONNECTOR': @@ -112,18 +86,15 @@ const initialState = { export const EditConnector = React.memo( ({ caseData, - caseServices, - connectorName, - connectors, - hasDataToPush, + caseConnectors, + supportedActionConnectors, isLoading, - isValidConnector, onSubmit, - userActions, }: EditConnectorProps) => { - const { permissions } = useCasesContext(); const caseFields = caseData.connector.fields; const selectedConnector = caseData.connector.id; + const actionConnector = getConnectorById(caseData.connector.id, supportedActionConnectors); + const isValidConnector = !!actionConnector; const { form } = useForm({ defaultValue: { connectorId: selectedConnector }, @@ -133,79 +104,46 @@ export const EditConnector = React.memo( const { actions } = useApplicationCapabilities(); const actionsReadCapabilities = actions.read; - // by default save if disabled - const [enableSave, setEnableSave] = useState(false); - const { setFieldValue, submit } = form; const [{ currentConnector, fields, editConnector }, dispatch] = useReducer( editConnectorReducer, - { ...initialState, fields: caseFields } - ); - - // only enable the save button if changes were made to the previous selected - // connector or its fields - useEffect(() => { - // null and none are equivalent to `no connector`. - // This makes sure we don't enable the button when the "no connector" option is selected - // by default. e.g. when a case is created without a selector - const isNoConnectorDeafultValue = - currentConnector === null && selectedConnector === NONE_CONNECTOR_ID; - const enable = - (!isNoConnectorDeafultValue && currentConnector?.id !== selectedConnector) || - !deepEqual(fields, caseFields); - - setEnableSave(enable); - }, [caseFields, currentConnector, fields, selectedConnector]); - - useEffect(() => { - // Initialize the current connector with the connector information attached to the case if we can find that - // connector in the retrieved connectors from the API call - if (!isLoading) { - dispatch({ - type: 'SET_CURRENT_CONNECTOR', - payload: getConnectorById(caseData.connector.id, connectors), - }); - - // Set the fields initially to whatever is present in the case, this should match with - // the latest user action for an update connector as well - dispatch({ - type: 'SET_FIELDS', - payload: caseFields, - }); + { + ...initialState, + fields: caseFields, + currentConnector: actionConnector, } - }, [caseData.connector.id, connectors, isLoading, caseFields]); + ); /** - * There is a race condition with this callback. At some point during the initial mounting of this component, this - * callback will be called. There are a couple problems with this: - * - * 1. If the call occurs before the above useEffect does its dispatches (aka while the connectors are still loading) this will - * result in setting the current connector to null when in fact we might have a valid connector. It could also - * cause issues when setting the fields because if there are no user actions then the getConnectorFieldsFromUserActions - * will return null even when the caseData.connector.fields is valid and populated. - * - * 2. If the call occurs after the above useEffect then the currentConnector should === newConnectorId - * - * As far as I know dispatch is synchronous so if the useEffect runs first it should successfully set currentConnector. If - * onChangeConnector runs first and sets stuff to null, then when useEffect runs it'll switch everything back to what we need it to be - * initially. + * only enable the save button if changes were made to the previous selected + * connector or its fields + * null and none are equivalent to `no connector`. + * This makes sure we don't enable the button when the "no connector" option is selected + * by default. e.g. when a case is created without a connector */ + const isDefaultNoneConnectorSelected = + currentConnector === null && selectedConnector === NONE_CONNECTOR_ID; + + const enableSave = + (!isDefaultNoneConnectorSelected && currentConnector?.id !== selectedConnector) || + !deepEqual(fields, caseFields); + const onChangeConnector = useCallback( (newConnectorId) => { // change connector on dropdown action if (currentConnector?.id !== newConnectorId) { dispatch({ type: 'SET_CURRENT_CONNECTOR', - payload: getConnectorById(newConnectorId, connectors), + payload: getConnectorById(newConnectorId, supportedActionConnectors), }); dispatch({ type: 'SET_FIELDS', - payload: getConnectorFieldsFromUserActions(newConnectorId, userActions ?? []), + payload: caseConnectors[newConnectorId]?.fields ?? null, }); } }, - [currentConnector, userActions, connectors] + [currentConnector, caseConnectors, supportedActionConnectors] ); const onFieldsChange = useCallback( @@ -220,36 +158,51 @@ export const EditConnector = React.memo( [fields, dispatch] ); - const onError = useCallback(() => { + const resetConnector = useCallback(() => { setFieldValue('connectorId', selectedConnector); + dispatch({ - type: 'SET_EDIT_CONNECTOR', - payload: false, + type: 'SET_CURRENT_CONNECTOR', + payload: actionConnector, }); - }, [dispatch, setFieldValue, selectedConnector]); - const onCancelConnector = useCallback(() => { - setFieldValue('connectorId', selectedConnector); dispatch({ type: 'SET_FIELDS', payload: caseFields, }); + dispatch({ type: 'SET_EDIT_CONNECTOR', payload: false, }); - }, [dispatch, selectedConnector, setFieldValue, caseFields]); + }, [actionConnector, caseFields, selectedConnector, setFieldValue]); + + const onError = useCallback(() => { + resetConnector(); + }, [resetConnector]); + + const onCancelConnector = useCallback(() => { + resetConnector(); + }, [resetConnector]); const onSubmitConnector = useCallback(async () => { const { isValid, data: newData } = await submit(); + if (isValid && newData.connectorId) { - onSubmit(newData.connectorId, fields, onError, noop); + const connector = getConnectorById(newData.connectorId, supportedActionConnectors); + const connectorToUpdate = connector + ? normalizeActionConnector(connector) + : getNoneConnector(); + + const connectorWithFields = { ...connectorToUpdate, fields } as CaseConnector; + onSubmit(connectorWithFields, onError, noop); + dispatch({ type: 'SET_EDIT_CONNECTOR', payload: false, }); } - }, [dispatch, submit, fields, onSubmit, onError]); + }, [submit, supportedActionConnectors, fields, onSubmit, onError]); const onEditClick = useCallback(() => { dispatch({ @@ -260,27 +213,42 @@ export const EditConnector = React.memo( const connectorIdConfig = getConnectorsFormValidators({ config: schema.connectorId as FieldConfig, - connectors, + connectors: supportedActionConnectors, }); - const { pushButton, pushCallouts } = usePushToService({ - connector: { - ...caseData.connector, - name: isEmpty(connectorName) ? caseData.connector.name : connectorName, - }, - caseServices, + const connectorWithName = { + ...caseData.connector, + name: isEmpty(actionConnector?.name) ? caseData.connector.name : actionConnector?.name ?? '', + }; + + const { + errorsMsg, + needsToBePushed, + hasBeenPushed, + isLoading: isLoadingPushToService, + hasPushPermissions, + hasErrorMessages, + hasLicenseError, + handlePushToService, + } = usePushToService({ + connector: connectorWithName, + caseConnectors, caseId: caseData.id, caseStatus: caseData.status, - connectors, - hasDataToPush, - onEditClick, isValidConnector, }); + const disablePushButton = + isLoadingPushToService || + errorsMsg.length > 0 || + !hasPushPermissions || + !isValidConnector || + !needsToBePushed; + return ( -

{i18n.CONNECTORS}

- {isLoading && } - {!isLoading && !editConnector && permissions.push && actionsReadCapabilities && ( + {!isLoading && !editConnector && hasPushPermissions && actionsReadCapabilities ? ( - )} - + ) : null} +
- - {!isLoading && !editConnector && pushCallouts && actionsReadCapabilities && ( - {pushCallouts} + + {!isLoading && !editConnector && hasErrorMessages && actionsReadCapabilities && ( + + 0} + onEditClick={onEditClick} + /> + )} - -
+ + - -
+ + {!editConnector && !actionsReadCapabilities && ( @@ -372,16 +346,26 @@ export const EditConnector = React.memo(
)} - {pushCallouts == null && + {!hasErrorMessages && !isLoading && !editConnector && - permissions.push && + hasPushPermissions && actionsReadCapabilities && ( - - {pushButton} + + + 0 || !needsToBePushed || !hasPushPermissions} + connectorName={connectorWithName.name} + /> + )} -
+ ); diff --git a/x-pack/plugins/cases/public/components/edit_connector/push_button.test.tsx b/x-pack/plugins/cases/public/components/edit_connector/push_button.test.tsx new file mode 100644 index 0000000000000..fee6fdc8d1557 --- /dev/null +++ b/x-pack/plugins/cases/public/components/edit_connector/push_button.test.tsx @@ -0,0 +1,91 @@ +/* + * 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 { screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import type { AppMockRenderer } from '../../common/mock'; +import { createAppMockRenderer } from '../../common/mock'; +import { PushButton } from './push_button'; + +const pushToService = jest.fn(); + +const defaultProps = { + disabled: false, + isLoading: false, + errorsMsg: [], + hasBeenPushed: false, + showTooltip: false, + connectorName: 'My SN connector', + pushToService, +}; + +describe('PushButton ', () => { + let appMockRender: AppMockRenderer; + + beforeEach(() => { + jest.clearAllMocks(); + appMockRender = createAppMockRenderer(); + }); + + it('renders the button without tooltip', async () => { + appMockRender.render(); + + expect(screen.getByTestId('push-to-external-service')).toBeInTheDocument(); + expect(screen.queryByTestId('push-button-tooltip')).not.toBeInTheDocument(); + }); + + it('renders the correct label when the connector has not been pushed', async () => { + appMockRender.render(); + + expect(screen.getByText('Push as My SN connector incident')).toBeInTheDocument(); + }); + + it('renders the correct label when the connector has been pushed', async () => { + appMockRender.render(); + + expect(screen.getByText('Update My SN connector incident')).toBeInTheDocument(); + }); + + it('pushed correctly', async () => { + appMockRender.render(); + + userEvent.click(screen.getByTestId('push-to-external-service')); + expect(pushToService).toHaveBeenCalled(); + }); + + it('disables the button', async () => { + appMockRender.render(); + + expect(screen.getByTestId('push-to-external-service')).toBeDisabled(); + }); + + it('shows the tooltip context correctly', async () => { + appMockRender.render(); + + userEvent.hover(screen.getByTestId('push-to-external-service')); + + expect(await screen.findByText('My SN connector incident is up to date')).toBeInTheDocument(); + expect(await screen.findByText('No update is required')).toBeInTheDocument(); + }); + + it('shows the tooltip context correctly with custom message', async () => { + appMockRender.render( + + ); + + userEvent.hover(screen.getByTestId('push-to-external-service')); + + expect(await screen.findByText('My title')).toBeInTheDocument(); + expect(await screen.findByText('My desc')).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/cases/public/components/edit_connector/push_button.tsx b/x-pack/plugins/cases/public/components/edit_connector/push_button.tsx new file mode 100644 index 0000000000000..d004d69da85cf --- /dev/null +++ b/x-pack/plugins/cases/public/components/edit_connector/push_button.tsx @@ -0,0 +1,60 @@ +/* + * 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 { EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; +import type { ErrorMessage } from '../use_push_to_service/callout/types'; +import * as i18n from './translations'; + +interface PushButtonProps { + isLoading: boolean; + disabled: boolean; + errorsMsg: ErrorMessage[]; + hasBeenPushed: boolean; + showTooltip: boolean; + connectorName: string; + pushToService: () => Promise; +} + +const PushButtonComponent: React.FC = ({ + disabled, + errorsMsg, + isLoading, + hasBeenPushed, + connectorName, + showTooltip, + pushToService, +}) => { + const button = ( + + {hasBeenPushed ? i18n.UPDATE_INCIDENT(connectorName) : i18n.PUSH_INCIDENT(connectorName)} + + ); + + return showTooltip ? ( + 0 ? errorsMsg[0].title : i18n.PUSH_LOCKED_TITLE(connectorName)} + content={

{errorsMsg.length > 0 ? errorsMsg[0].description : i18n.PUSH_LOCKED_DESC}

} + data-test-subj="push-button-tooltip" + > + {button} +
+ ) : ( + <>{button} + ); +}; + +PushButtonComponent.displayName = 'PushButton'; + +export const PushButton = React.memo(PushButtonComponent); diff --git a/x-pack/plugins/cases/public/components/edit_connector/push_callouts.test.tsx b/x-pack/plugins/cases/public/components/edit_connector/push_callouts.test.tsx new file mode 100644 index 0000000000000..46e2d56fbce9a --- /dev/null +++ b/x-pack/plugins/cases/public/components/edit_connector/push_callouts.test.tsx @@ -0,0 +1,38 @@ +/* + * 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 { screen } from '@testing-library/react'; + +import type { AppMockRenderer } from '../../common/mock'; +import { createAppMockRenderer } from '../../common/mock'; +import { PushCallouts } from './push_callouts'; + +const onEditClick = jest.fn(); + +const defaultProps = { + hasConnectors: false, + hasLicenseError: false, + errorsMsg: [{ id: 'test-id', title: 'My title', description: 'My desc' }], + onEditClick, +}; + +describe('PushCallouts ', () => { + let appMockRender: AppMockRenderer; + + beforeEach(() => { + jest.clearAllMocks(); + appMockRender = createAppMockRenderer(); + }); + + it('renders', async () => { + appMockRender.render(); + + expect(await screen.findByText('My title')).toBeInTheDocument(); + expect(await screen.findByText('My desc')).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/cases/public/components/edit_connector/push_callouts.tsx b/x-pack/plugins/cases/public/components/edit_connector/push_callouts.tsx new file mode 100644 index 0000000000000..65ea0f20a7e82 --- /dev/null +++ b/x-pack/plugins/cases/public/components/edit_connector/push_callouts.tsx @@ -0,0 +1,37 @@ +/* + * 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 { CaseCallOut } from '../use_push_to_service/callout'; +import type { ErrorMessage } from '../use_push_to_service/callout/types'; + +interface PushCalloutsProps { + hasConnectors: boolean; + hasLicenseError: boolean; + errorsMsg: ErrorMessage[]; + onEditClick: () => void; +} + +const PushCalloutsComponent: React.FC = ({ + hasConnectors, + hasLicenseError, + errorsMsg, + onEditClick, +}) => { + return ( + + ); +}; + +PushCalloutsComponent.displayName = 'PushCalloutsComponent'; + +export const PushCallouts = React.memo(PushCalloutsComponent); diff --git a/x-pack/plugins/cases/public/components/edit_connector/translations.ts b/x-pack/plugins/cases/public/components/edit_connector/translations.ts index ab69c94321703..532e0bb70e093 100644 --- a/x-pack/plugins/cases/public/components/edit_connector/translations.ts +++ b/x-pack/plugins/cases/public/components/edit_connector/translations.ts @@ -8,6 +8,12 @@ import { i18n } from '@kbn/i18n'; export * from '../../common/translations'; +export { + UPDATE_INCIDENT, + PUSH_INCIDENT, + PUSH_LOCKED_TITLE, + PUSH_LOCKED_DESC, +} from '../use_push_to_service/translations'; export const EDIT_CONNECTOR_ARIA = i18n.translate( 'xpack.cases.editConnector.editConnectorLinkAria', diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/callout/index.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/callout/index.tsx index 08192a1efc68f..07f4ab2768c0b 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/callout/index.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/callout/index.tsx @@ -67,25 +67,26 @@ const CaseCallOutComponent = ({ [messages] ); + const groupedByTypeErrorMessagesKeys = Object.keys(groupedByTypeErrorMessages) as Array< + keyof ErrorMessage['errorType'] + >; return ( <> - {(Object.keys(groupedByTypeErrorMessages) as Array).map( - (type: NonNullable) => { - const id = createCalloutId(groupedByTypeErrorMessages[type].messagesId); - return ( - - - - - ); - } - )} + {groupedByTypeErrorMessagesKeys.map((type: NonNullable, index) => { + const id = createCalloutId(groupedByTypeErrorMessages[type].messagesId); + return ( + + + {index !== groupedByTypeErrorMessagesKeys.length - 1 ? : null} + + ); + })} ); }; diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/helpers.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/helpers.tsx index 0a58678da6d0e..f2f19a91d11e5 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/helpers.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/helpers.tsx @@ -42,12 +42,15 @@ export const getKibanaConfigError = () => ({ title: i18n.PUSH_DISABLE_BY_KIBANA_CONFIG_TITLE, description: ( - {'coming soon...'} + + {i18n.LINK_ACTIONS_CONFIGURATION} ), }} diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx index 2cd381e7035b2..52598a80f000e 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/index.test.tsx @@ -7,18 +7,19 @@ import React from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; -import { render, screen } from '@testing-library/react'; import '../../common/mock/match_media'; import type { ReturnUsePushToService, UsePushToService } from '.'; import { usePushToService } from '.'; import { noPushCasesPermissions, readCasesPermissions, TestProviders } from '../../common/mock'; +import type { CaseConnector } from '../../../common/api'; import { CaseStatuses, ConnectorTypes } from '../../../common/api'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; -import { basicPush, actionLicenses, connectorsMock } from '../../containers/mock'; +import { actionLicenses } from '../../containers/mock'; import { CLOSED_CASE_PUSH_ERROR_ID } from './callout/types'; -import * as i18n from './translations'; import { useGetActionLicense } from '../../containers/use_get_action_license'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; +import { useRefreshCaseViewPage } from '../case_view/use_on_refresh_case_view_page'; jest.mock('../../containers/use_get_action_license', () => { return { @@ -28,80 +29,60 @@ jest.mock('../../containers/use_get_action_license', () => { jest.mock('../../containers/use_post_push_to_service'); jest.mock('../../containers/configure/api'); jest.mock('../../common/navigation/hooks'); +jest.mock('../case_view/use_on_refresh_case_view_page'); const useFetchActionLicenseMock = useGetActionLicense as jest.Mock; +const usePostPushToServiceMock = usePostPushToService as jest.Mock; describe('usePushToService', () => { const caseId = '12345'; - const onEditClick = jest.fn(); - const pushCaseToExternalService = jest.fn(); + const pushCaseToExternalService = jest.fn().mockReturnValue({}); const mockPostPush = { isLoading: false, pushCaseToExternalService, }; - const mockConnector = connectorsMock[0]; + const caseConnectors = getCaseConnectorsMockResponse(); + const mockConnector = caseConnectors['jira-1']; const actionLicense = actionLicenses[0]; - const caseServices = { - '123': { - ...basicPush, - firstPushIndex: 0, - lastPushIndex: 0, - commentsToUpdate: [], - hasDataToPush: true, - }, - }; const defaultArgs = { - actionsErrors: [], + caseId, + caseStatus: CaseStatuses.open, connector: { id: mockConnector.id, name: mockConnector.name, - type: ConnectorTypes.serviceNowITSM, - fields: null, - }, - caseId, - caseServices, - caseStatus: CaseStatuses.open, - configureCasesNavigation: { - href: 'href', - onClick: jest.fn(), - }, - connectors: connectorsMock, - hasDataToPush: true, - onEditClick, + type: mockConnector.type, + fields: mockConnector.fields, + } as CaseConnector, + caseConnectors, isValidConnector: true, }; beforeEach(() => { jest.clearAllMocks(); - (usePostPushToService as jest.Mock).mockImplementation(() => mockPostPush); - useFetchActionLicenseMock.mockImplementation(() => ({ + usePostPushToServiceMock.mockReturnValue(mockPostPush); + useFetchActionLicenseMock.mockReturnValue({ isLoading: false, data: actionLicense, - })); + }); }); - it('push case button posts the push with correct args', async () => { + it('calls pushCaseToExternalService with correct arguments', async () => { + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => usePushToService(defaultArgs), - { - wrapper: ({ children }) => {children}, - } - ); - await waitForNextUpdate(); - result.current.pushButton.props.children.props.onClick(); - expect(pushCaseToExternalService).toBeCalledWith({ - caseId, - connector: { - fields: null, - id: 'servicenow-1', - name: 'My Connector', - type: ConnectorTypes.serviceNowITSM, - }, - }); - expect(result.current.pushCallouts).toBeNull(); + await result.current.handlePushToService(); + }); + + expect(pushCaseToExternalService).toBeCalledWith({ + caseId, + connector: defaultArgs.connector, }); }); @@ -113,18 +94,18 @@ describe('usePushToService', () => { enabledInLicense: false, }, })); - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => usePushToService(defaultArgs), - { - wrapper: ({ children }) => {children}, - } - ); - await waitForNextUpdate(); - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); - expect(errorsMsg[0].id).toEqual('license-error'); - }); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + const errorsMsg = result.current.errorsMsg; + expect(errorsMsg).toHaveLength(1); + expect(errorsMsg[0].id).toEqual('license-error'); + expect(result.current.hasErrorMessages).toBe(true); }); it('Displays message when user does not have case enabled in config', async () => { @@ -136,28 +117,188 @@ describe('usePushToService', () => { }, })); + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + const errorsMsg = result.current.errorsMsg; + expect(errorsMsg).toHaveLength(1); + expect(errorsMsg[0].id).toEqual('kibana-config-error'); + expect(result.current.hasErrorMessages).toBe(true); + }); + + it('Displays message when user has select none as connector', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + connector: { + id: 'none', + name: 'none', + type: ConnectorTypes.none, + fields: null, + }, + }), + { + wrapper: ({ children }) => {children}, + } + ); + + const errorsMsg = result.current.errorsMsg; + expect(errorsMsg).toHaveLength(1); + expect(errorsMsg[0].id).toEqual('connector-missing-error'); + expect(result.current.hasErrorMessages).toBe(true); + }); + + it('Displays message when connector is deleted', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + connector: { + id: 'not-exist', + name: 'not-exist', + type: ConnectorTypes.none, + fields: null, + }, + isValidConnector: false, + }), + { + wrapper: ({ children }) => {children}, + } + ); + + const errorsMsg = result.current.errorsMsg; + expect(errorsMsg).toHaveLength(1); + expect(errorsMsg[0].id).toEqual('connector-deleted-error'); + expect(result.current.hasErrorMessages).toBe(true); + }); + + it('Displays message when case is closed', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + caseStatus: CaseStatuses.closed, + }), + { + wrapper: ({ children }) => {children}, + } + ); + + const errorsMsg = result.current.errorsMsg; + expect(errorsMsg).toHaveLength(1); + expect(errorsMsg[0].id).toEqual(CLOSED_CASE_PUSH_ERROR_ID); + expect(result.current.hasErrorMessages).toBe(true); + }); + + it('should not call pushCaseToExternalService when the selected connector is none', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + connector: { + id: 'none', + name: 'none', + type: ConnectorTypes.none, + fields: null, + }, + }), + { + wrapper: ({ children }) => {children}, + } + ); + await act(async () => { - const { result, waitForNextUpdate } = renderHook( + await result.current.handlePushToService(); + }); + + expect(pushCaseToExternalService).not.toBeCalled(); + }); + + it('refresh case view page after push', async () => { + const { result, waitFor } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + await act(async () => { + await result.current.handlePushToService(); + }); + + await waitFor(() => { + expect(useRefreshCaseViewPage()).toHaveBeenCalled(); + }); + }); + + describe('user does not have write or push permissions', () => { + it('returns correct information about push permissions', async () => { + const { result } = renderHook( () => usePushToService(defaultArgs), { - wrapper: ({ children }) => {children}, + wrapper: ({ children }) => ( + {children} + ), } ); - await waitForNextUpdate(); - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); - expect(errorsMsg[0].id).toEqual('kibana-config-error'); + expect(result.current.hasPushPermissions).toBe(false); }); - }); - it('Displays message when user does not have any connector configured', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( + it('does not display a message when user does not have a premium license', async () => { + useFetchActionLicenseMock.mockImplementation(() => ({ + isLoading: false, + data: { + ...actionLicense, + enabledInLicense: false, + }, + })); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => ( + {children} + ), + } + ); + + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); + }); + + it('does not display a message when user does not have case enabled in config', async () => { + useFetchActionLicenseMock.mockImplementation(() => ({ + isLoading: false, + data: { + ...actionLicense, + enabledInConfig: false, + }, + })); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => ( + {children} + ), + } + ); + + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); + }); + + it('does not display a message when user does not have any connector configured', async () => { + const { result } = renderHook( () => usePushToService({ ...defaultArgs, - connectors: [], connector: { id: 'none', name: 'none', @@ -166,24 +307,18 @@ describe('usePushToService', () => { }, }), { - wrapper: ({ children }) => {children}, + wrapper: ({ children }) => ( + {children} + ), } ); - await waitForNextUpdate(); - - render(result.current.pushCallouts ?? <>); - // getByText will thrown an error if the element is not found. - screen.getByText(i18n.CONFIGURE_CONNECTOR); - - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); }); - }); - it('Displays message when user does have a connector but is configured to none', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( + it('does not display a message when user does have a connector but is configured to none', async () => { + const { result } = renderHook( () => usePushToService({ ...defaultArgs, @@ -195,24 +330,18 @@ describe('usePushToService', () => { }, }), { - wrapper: ({ children }) => {children}, + wrapper: ({ children }) => ( + {children} + ), } ); - await waitForNextUpdate(); - - render(result.current.pushCallouts ?? <>); - // getByText will thrown an error if the element is not found. - screen.getByText(i18n.CONFIGURE_CONNECTOR); - - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); }); - }); - it('Displays message when connector is deleted', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( + it('does not display a message when connector is deleted', async () => { + const { result } = renderHook( () => usePushToService({ ...defaultArgs, @@ -225,23 +354,125 @@ describe('usePushToService', () => { isValidConnector: false, }), { - wrapper: ({ children }) => {children}, + wrapper: ({ children }) => ( + {children} + ), } ); - await waitForNextUpdate(); - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); - expect(errorsMsg[0].id).toEqual('connector-deleted-error'); + + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); + }); + + it('does not display a message when case is closed', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + caseStatus: CaseStatuses.closed, + }), + { + wrapper: ({ children }) => ( + {children} + ), + } + ); + + expect(result.current.errorsMsg).toEqual([]); + expect(result.current.hasErrorMessages).toBe(false); }); }); - it('Displays message when connector is deleted with empty connectors', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( + describe('returned values', () => { + it('initial', async () => { + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + const { handlePushToService, errorsMsg, ...rest } = result.current; + + expect(rest).toEqual({ + hasBeenPushed: true, + hasErrorMessages: false, + hasLicenseError: false, + hasPushPermissions: true, + isLoading: false, + needsToBePushed: false, + }); + }); + + it('isLoading is true when usePostPushToService is loading', async () => { + usePostPushToServiceMock.mockReturnValue({ ...mockPostPush, isLoading: true }); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.isLoading).toBe(true); + }); + + it('isLoading is true when loading license', async () => { + useFetchActionLicenseMock.mockReturnValue({ + isLoading: true, + data: actionLicense, + }); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.isLoading).toBe(true); + }); + + it('hasErrorMessages=true if there are error messages', async () => { + const { result } = renderHook( + () => usePushToService({ ...defaultArgs, caseStatus: CaseStatuses.closed }), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.hasErrorMessages).toBe(true); + }); + + it('needsToBePushed=true if the connector needs to be pushed', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + caseConnectors: { + ...caseConnectors, + [mockConnector.id]: { + ...caseConnectors[mockConnector.id], + push: { + ...caseConnectors[mockConnector.id].push, + needsToBePushed: true, + }, + }, + }, + }), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.needsToBePushed).toBe(true); + }); + + it('needsToBePushed=false if the connector does not exist', async () => { + const { result } = renderHook( () => usePushToService({ ...defaultArgs, - connectors: [], connector: { id: 'not-exist', name: 'not-exist', @@ -254,212 +485,106 @@ describe('usePushToService', () => { wrapper: ({ children }) => {children}, } ); - await waitForNextUpdate(); - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); - expect(errorsMsg[0].id).toEqual('connector-deleted-error'); + + expect(result.current.needsToBePushed).toBe(false); }); - }); - it('Displays message when case is closed', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( + it('hasBeenPushed=false if the connector has been pushed', async () => { + const { result } = renderHook( () => usePushToService({ ...defaultArgs, - caseStatus: CaseStatuses.closed, + caseConnectors: { + ...caseConnectors, + [mockConnector.id]: { + ...caseConnectors[mockConnector.id], + push: { + ...caseConnectors[mockConnector.id].push, + hasBeenPushed: false, + }, + }, + }, }), { wrapper: ({ children }) => {children}, } ); - await waitForNextUpdate(); - const errorsMsg = result.current.pushCallouts?.props.messages; - expect(errorsMsg).toHaveLength(1); - expect(errorsMsg[0].id).toEqual(CLOSED_CASE_PUSH_ERROR_ID); + + expect(result.current.hasBeenPushed).toBe(false); }); - }); - describe('user does not have write permissions', () => { - it('disables the push button when the user does not have push permissions', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => usePushToService(defaultArgs), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - - const { getByTestId } = render(result.current.pushButton); - - expect(getByTestId('push-to-external-service')).toBeDisabled(); - }); + it('hasBeenPushed=false if the connector does not exist', async () => { + const { result } = renderHook( + () => + usePushToService({ + ...defaultArgs, + connector: { + id: 'not-exist', + name: 'not-exist', + type: ConnectorTypes.none, + fields: null, + }, + isValidConnector: false, + }), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.hasBeenPushed).toBe(false); }); - it('does not display a message when user does not have a premium license', async () => { - useFetchActionLicenseMock.mockImplementation(() => ({ - isLoading: false, - data: { - ...actionLicense, - enabledInLicense: false, - }, - })); - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => usePushToService(defaultArgs), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); + it('hasPushPermissions=false if it does not have push permission', async () => { + useFetchActionLicenseMock.mockReturnValue({ + isLoading: true, + data: actionLicense, }); + + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => ( + {children} + ), + } + ); + + expect(result.current.hasPushPermissions).toBe(false); }); - it('does not display a message when user does not have case enabled in config', async () => { + it('hasLicenseError=true if enabledInLicense=false', async () => { useFetchActionLicenseMock.mockImplementation(() => ({ isLoading: false, data: { ...actionLicense, - enabledInConfig: false, + enabledInLicense: false, }, })); - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => usePushToService(defaultArgs), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); - }); - it('does not display a message when user does not have any connector configured', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - usePushToService({ - ...defaultArgs, - connectors: [], - connector: { - id: 'none', - name: 'none', - type: ConnectorTypes.none, - fields: null, - }, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); - }); + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); - it('does not display a message when user does have a connector but is configured to none', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - usePushToService({ - ...defaultArgs, - connector: { - id: 'none', - name: 'none', - type: ConnectorTypes.none, - fields: null, - }, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); + expect(result.current.hasLicenseError).toBe(true); }); - it('does not display a message when connector is deleted', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - usePushToService({ - ...defaultArgs, - connector: { - id: 'not-exist', - name: 'not-exist', - type: ConnectorTypes.none, - fields: null, - }, - isValidConnector: false, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); - }); + it('hasLicenseError=false if data=undefined', async () => { + useFetchActionLicenseMock.mockImplementation(() => ({ + isLoading: false, + data: undefined, + })); - it('does not display a message when connector is deleted with empty connectors', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - usePushToService({ - ...defaultArgs, - connectors: [], - connector: { - id: 'not-exist', - name: 'not-exist', - type: ConnectorTypes.none, - fields: null, - }, - isValidConnector: false, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); - }); + const { result } = renderHook( + () => usePushToService(defaultArgs), + { + wrapper: ({ children }) => {children}, + } + ); - it('does not display a message when case is closed', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - usePushToService({ - ...defaultArgs, - caseStatus: CaseStatuses.closed, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - await waitForNextUpdate(); - expect(result.current.pushCallouts).toBeNull(); - }); + expect(result.current.hasLicenseError).toBe(false); }); }); }); diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx b/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx index 71a6184c7286f..b31a4faa80524 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx +++ b/x-pack/plugins/cases/public/components/use_push_to_service/index.tsx @@ -5,11 +5,9 @@ * 2.0. */ -import { EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; -import { CaseCallOut } from './callout'; import { getLicenseError, getKibanaConfigError, @@ -17,47 +15,48 @@ import { getDeletedConnectorError, getCaseClosedInfo, } from './helpers'; -import * as i18n from './translations'; -import type { CaseConnector, ActionConnector } from '../../../common/api'; +import type { CaseConnector } from '../../../common/api'; import { CaseStatuses } from '../../../common/api'; -import type { CaseServices } from '../../containers/use_find_case_user_actions'; import type { ErrorMessage } from './callout/types'; import { useRefreshCaseViewPage } from '../case_view/use_on_refresh_case_view_page'; import { useGetActionLicense } from '../../containers/use_get_action_license'; import { useCasesContext } from '../cases_context/use_cases_context'; +import type { CaseConnectors } from '../../containers/types'; export interface UsePushToService { + caseConnectors: CaseConnectors; caseId: string; - caseServices: CaseServices; caseStatus: string; connector: CaseConnector; - connectors: ActionConnector[]; - hasDataToPush: boolean; isValidConnector: boolean; - onEditClick: () => void; } export interface ReturnUsePushToService { - pushButton: JSX.Element; - pushCallouts: JSX.Element | null; + errorsMsg: ErrorMessage[]; + hasBeenPushed: boolean; + needsToBePushed: boolean; + hasPushPermissions: boolean; + isLoading: boolean; + hasErrorMessages: boolean; + hasLicenseError: boolean; + handlePushToService: () => Promise; } export const usePushToService = ({ caseId, - caseServices, caseStatus, + caseConnectors, connector, - connectors, - hasDataToPush, isValidConnector, - onEditClick, }: UsePushToService): ReturnUsePushToService => { const { permissions } = useCasesContext(); const { isLoading, pushCaseToExternalService } = usePostPushToService(); + const refreshCaseViewPage = useRefreshCaseViewPage(); - const { isLoading: loadingLicense, data: actionLicense = null } = useGetActionLicense(); + const { isLoading: isLoadingLicense, data: actionLicense = null } = useGetActionLicense(); const hasLicenseError = actionLicense != null && !actionLicense.enabledInLicense; - const refreshCaseViewPage = useRefreshCaseViewPage(); + const needsToBePushed = !!caseConnectors[connector.id]?.push.needsToBePushed; + const hasBeenPushed = !!caseConnectors[connector.id]?.push.hasBeenPushed; const handlePushToService = useCallback(async () => { if (connector.id != null && connector.id !== 'none') { @@ -88,7 +87,7 @@ export const usePushToService = ({ * By priority of importance: * 1. Show license error. * 2. Show configuration error. - * 3. Show connector configuration error if the connector is set to none or no connectors have been created. + * 3. Show connector missing information if the connector is set to none. * 4. Show an error message if the connector has been deleted or the user does not have access to it. * 5. Show case closed message. */ @@ -101,11 +100,11 @@ export const usePushToService = ({ return [getKibanaConfigError()]; } - if (connector.id === 'none' && !loadingLicense && !hasLicenseError) { + if (connector.id === 'none' && !isLoadingLicense && !hasLicenseError) { return [getConnectorMissingInfo()]; } - if (!isValidConnector && !loadingLicense && !hasLicenseError) { + if (!isValidConnector && !isLoadingLicense && !hasLicenseError) { return [getDeletedConnectorError()]; } @@ -114,79 +113,24 @@ export const usePushToService = ({ } return errors; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [actionLicense, caseStatus, connectors.length, connector, loadingLicense, permissions.update]); - - const pushToServiceButton = useMemo( - () => ( - 0 || - !permissions.push || - !isValidConnector || - !hasDataToPush - } - isLoading={isLoading} - > - {caseServices[connector.id] - ? i18n.UPDATE_THIRD(connector.name) - : i18n.PUSH_THIRD(connector.name)} - - ), - // eslint-disable-next-line react-hooks/exhaustive-deps - [ - connector, - connectors, - errorsMsg, - handlePushToService, - hasDataToPush, - isLoading, - loadingLicense, - permissions.push, - isValidConnector, - ] - ); - - const objToReturn = useMemo(() => { - const hidePushButton = errorsMsg.length > 0 || !hasDataToPush || !permissions.push; - - return { - pushButton: hidePushButton ? ( - 0 ? errorsMsg[0].title : i18n.PUSH_LOCKED_TITLE(connector.name)} - content={

{errorsMsg.length > 0 ? errorsMsg[0].description : i18n.PUSH_LOCKED_DESC}

} - > - {pushToServiceButton} -
- ) : ( - <>{pushToServiceButton} - ), - pushCallouts: - errorsMsg.length > 0 ? ( - 0} - hasLicenseError={hasLicenseError} - messages={errorsMsg} - onEditClick={onEditClick} - /> - ) : null, - }; }, [ - connector.name, - connectors.length, - errorsMsg, - hasDataToPush, + actionLicense, + caseStatus, + connector.id, hasLicenseError, - onEditClick, - pushToServiceButton, - permissions.push, + isValidConnector, + isLoadingLicense, + permissions.update, ]); - return objToReturn; + return { + errorsMsg, + hasErrorMessages: errorsMsg.length > 0, + needsToBePushed, + hasBeenPushed, + isLoading: isLoading || isLoadingLicense, + hasPushPermissions: permissions.push, + hasLicenseError, + handlePushToService, + }; }; diff --git a/x-pack/plugins/cases/public/components/use_push_to_service/translations.ts b/x-pack/plugins/cases/public/components/use_push_to_service/translations.ts index 1214b9f790e0a..0f7e98a3845f2 100644 --- a/x-pack/plugins/cases/public/components/use_push_to_service/translations.ts +++ b/x-pack/plugins/cases/public/components/use_push_to_service/translations.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../common/translations'; -export const PUSH_THIRD = (thirdParty: string) => { +export const PUSH_INCIDENT = (thirdParty: string) => { if (thirdParty === 'none') { return i18n.translate('xpack.cases.caseView.pushThirdPartyIncident', { defaultMessage: 'Push as external incident', @@ -22,7 +22,7 @@ export const PUSH_THIRD = (thirdParty: string) => { }); }; -export const UPDATE_THIRD = (thirdParty: string) => { +export const UPDATE_INCIDENT = (thirdParty: string) => { if (thirdParty === 'none') { return i18n.translate('xpack.cases.caseView.updateThirdPartyIncident', { defaultMessage: 'Update external incident', @@ -76,3 +76,10 @@ export const PUSH_DISABLE_BY_LICENSE_TITLE = i18n.translate( export const LINK_CLOUD_DEPLOYMENT = i18n.translate('xpack.cases.caseView.cloudDeploymentLink', { defaultMessage: 'cloud deployment', }); + +export const LINK_ACTIONS_CONFIGURATION = i18n.translate( + 'xpack.cases.caseView.actionsConfigurationLink', + { + defaultMessage: 'Alerting and action settings in Kibana', + } +); diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/comment.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/comment.tsx index f5ec9ec742d55..c63f53f13bbe6 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/comment.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/comment.tsx @@ -86,7 +86,7 @@ const getCreateCommentUserAction = ({ comment: Comment; } & Omit< UserActionBuilderArgs, - 'caseServices' | 'comments' | 'index' | 'handleOutlineComment' | 'currentUserProfile' + 'comments' | 'index' | 'handleOutlineComment' | 'currentUserProfile' >): EuiCommentProps[] => { switch (comment.type) { case CommentType.user: @@ -185,6 +185,7 @@ export const createCommentUserActionBuilder: UserActionBuilder = ({ handleManageQuote, handleOutlineComment, actionsNavigation, + caseConnectors, }) => ({ build: () => { const commentUserAction = userAction as UserActionResponse; @@ -226,6 +227,7 @@ export const createCommentUserActionBuilder: UserActionBuilder = ({ handleDeleteComment, handleManageQuote, actionsNavigation, + caseConnectors, }); return commentAction; diff --git a/x-pack/plugins/cases/public/components/user_actions/index.test.tsx b/x-pack/plugins/cases/public/components/user_actions/index.test.tsx index 4ba2143254065..b9e8dac46ec17 100644 --- a/x-pack/plugins/cases/public/components/user_actions/index.test.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/index.test.tsx @@ -14,7 +14,6 @@ import routeData from 'react-router'; import { useUpdateComment } from '../../containers/use_update_comment'; import { basicCase, - basicPush, getUserAction, getHostIsolationUserAction, hostIsolationComment, @@ -24,6 +23,7 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer, TestProviders } from '../../common/mock'; import { Actions } from '../../../common/api'; import { userProfiles, userProfilesMap } from '../../containers/user_profiles/api.mock'; +import { connectorsMock, getCaseConnectorsMockResponse } from '../../common/mock/connectors'; const fetchUserActions = jest.fn(); const onUpdateField = jest.fn(); @@ -31,11 +31,11 @@ const updateCase = jest.fn(); const onShowAlertDetails = jest.fn(); const defaultProps = { - caseServices: {}, + caseConnectors: getCaseConnectorsMockResponse(), caseUserActions: [], userProfiles: new Map(), currentUserProfile: undefined, - connectors: [], + connectors: connectorsMock, actionsNavigation: { href: jest.fn(), onClick: jest.fn() }, getRuleDetailsHref: jest.fn(), onRuleDetailsClick: jest.fn(), @@ -95,29 +95,26 @@ describe(`UserActions`, () => { }); it('Renders service now update line with top and bottom when push is required', async () => { + const caseConnectors = getCaseConnectorsMockResponse({ needsToBePushed: true }); + const ourActions = [ - getUserAction('pushed', 'push_to_service'), - getUserAction('comment', Actions.update), + getUserAction('pushed', 'push_to_service', { + createdAt: '2023-01-17T09:46:29.813Z', + }), ]; const props = { ...defaultProps, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 0, - lastPushIndex: 0, - commentsToUpdate: [`${ourActions[ourActions.length - 1].commentId}`], - hasDataToPush: true, - }, - }, + caseConnectors, caseUserActions: ourActions, }; + const wrapper = mount( ); + await waitFor(() => { expect(wrapper.find(`[data-test-subj="top-footer"]`).exists()).toEqual(true); expect(wrapper.find(`[data-test-subj="bottom-footer"]`).exists()).toEqual(true); @@ -125,19 +122,15 @@ describe(`UserActions`, () => { }); it('Renders service now update line with top only when push is up to date', async () => { - const ourActions = [getUserAction('pushed', 'push_to_service')]; + const ourActions = [ + getUserAction('pushed', 'push_to_service', { + createdAt: '2023-01-17T09:46:29.813Z', + }), + ]; + const props = { ...defaultProps, caseUserActions: ourActions, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 0, - lastPushIndex: 0, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, }; const wrapper = mount( @@ -150,6 +143,7 @@ describe(`UserActions`, () => { expect(wrapper.find(`[data-test-subj="bottom-footer"]`).exists()).toEqual(false); }); }); + it('Outlines comment when update move to link is clicked', async () => { const ourActions = [ getUserAction('comment', Actions.create), diff --git a/x-pack/plugins/cases/public/components/user_actions/index.tsx b/x-pack/plugins/cases/public/components/user_actions/index.tsx index bf6aaf6ea2a3a..74c5cca881c2d 100644 --- a/x-pack/plugins/cases/public/components/user_actions/index.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/index.tsx @@ -80,7 +80,7 @@ const MyEuiCommentList = styled(EuiCommentList)` export const UserActions = React.memo( ({ - caseServices, + caseConnectors, caseUserActions, userProfiles, currentUserProfile, @@ -190,12 +190,12 @@ export const UserActions = React.memo( const userActionBuilder = builder({ appId, caseData, + caseConnectors, externalReferenceAttachmentTypeRegistry, persistableStateAttachmentTypeRegistry, userAction, userProfiles, currentUserProfile, - caseServices, comments: caseData.comments, index, commentRefs, @@ -220,6 +220,7 @@ export const UserActions = React.memo( ), [ appId, + caseConnectors, caseUserActions, userProfiles, currentUserProfile, @@ -227,7 +228,6 @@ export const UserActions = React.memo( persistableStateAttachmentTypeRegistry, descriptionCommentListObj, caseData, - caseServices, commentRefs, manageMarkdownEditIds, selectedOutlineCommentId, diff --git a/x-pack/plugins/cases/public/components/user_actions/mock.ts b/x-pack/plugins/cases/public/components/user_actions/mock.ts index 33eae2b43fbae..87034e4ccf191 100644 --- a/x-pack/plugins/cases/public/components/user_actions/mock.ts +++ b/x-pack/plugins/cases/public/components/user_actions/mock.ts @@ -9,22 +9,14 @@ import { Actions } from '../../../common/api'; import { SECURITY_SOLUTION_OWNER } from '../../../common/constants'; import { ExternalReferenceAttachmentTypeRegistry } from '../../client/attachment_framework/external_reference_registry'; import { PersistableStateAttachmentTypeRegistry } from '../../client/attachment_framework/persistable_state_registry'; -import { basicCase, basicPush, getUserAction } from '../../containers/mock'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; +import { basicCase, getUserAction } from '../../containers/mock'; import { userProfiles, userProfilesMap } from '../../containers/user_profiles/api.mock'; import type { UserActionBuilderArgs } from './types'; export const getMockBuilderArgs = (): UserActionBuilderArgs => { const userAction = getUserAction('title', Actions.update); const commentRefs = { current: {} }; - const caseServices = { - '123': { - ...basicPush, - firstPushIndex: 0, - lastPushIndex: 0, - commentsToUpdate: [], - hasDataToPush: true, - }, - }; const alertData = { 'alert-id-1': { @@ -51,6 +43,8 @@ export const getMockBuilderArgs = (): UserActionBuilderArgs => { }, }; + const caseConnectors = getCaseConnectorsMockResponse(); + const getRuleDetailsHref = jest.fn().mockReturnValue('https://example.com'); const onRuleDetailsClick = jest.fn(); const onShowAlertDetails = jest.fn(); @@ -70,7 +64,6 @@ export const getMockBuilderArgs = (): UserActionBuilderArgs => { persistableStateAttachmentTypeRegistry, caseData: basicCase, comments: basicCase.comments, - caseServices, index: 0, alertData, commentRefs, @@ -78,6 +71,7 @@ export const getMockBuilderArgs = (): UserActionBuilderArgs => { selectedOutlineCommentId: '', loadingCommentIds: [], loadingAlertData: false, + caseConnectors, getRuleDetailsHref, onRuleDetailsClick, onShowAlertDetails, diff --git a/x-pack/plugins/cases/public/components/user_actions/pushed.test.tsx b/x-pack/plugins/cases/public/components/user_actions/pushed.test.tsx index 219a7a6d2c7c8..5404486afb5c0 100644 --- a/x-pack/plugins/cases/public/components/user_actions/pushed.test.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/pushed.test.tsx @@ -14,13 +14,13 @@ import { getUserAction } from '../../containers/mock'; import { TestProviders } from '../../common/mock'; import { createPushedUserActionBuilder } from './pushed'; import { getMockBuilderArgs } from './mock'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; jest.mock('../../common/lib/kibana'); jest.mock('../../common/navigation/hooks'); describe('createPushedUserActionBuilder ', () => { const builderArgs = getMockBuilderArgs(); - const caseServices = builderArgs.caseServices; beforeEach(() => { jest.clearAllMocks(); @@ -31,8 +31,6 @@ describe('createPushedUserActionBuilder ', () => { const builder = createPushedUserActionBuilder({ ...builderArgs, userAction, - caseServices, - index: 0, }); const createdUserAction = builder.build(); @@ -42,20 +40,20 @@ describe('createPushedUserActionBuilder ', () => { ); - expect(screen.getByText('pushed as new incident connector name')).toBeInTheDocument(); + expect(screen.getByText('pushed as new incident My SN connector')).toBeInTheDocument(); expect(screen.getByText('external title').closest('a')).toHaveAttribute( 'href', 'basicPush.com' ); }); - it('renders correctly when updating an external service', async () => { + it('renders correctly if oldestUserActionPushDate is not defined', async () => { const userAction = getUserAction('pushed', Actions.push_to_service); + const caseConnectors = getCaseConnectorsMockResponse({ oldestUserActionPushDate: undefined }); const builder = createPushedUserActionBuilder({ ...builderArgs, + caseConnectors, userAction, - caseServices, - index: 1, }); const createdUserAction = builder.build(); @@ -65,22 +63,19 @@ describe('createPushedUserActionBuilder ', () => { ); - expect(screen.getByText('updated incident connector name')).toBeInTheDocument(); + expect(screen.getByText('pushed as new incident My SN connector')).toBeInTheDocument(); }); - it('renders the pushing indicators correctly', async () => { + it('renders correctly when updating an external service', async () => { const userAction = getUserAction('pushed', Actions.push_to_service); + const caseConnectors = getCaseConnectorsMockResponse({ + oldestUserActionPushDate: '2023-01-16T09:46:29.813Z', + }); + const builder = createPushedUserActionBuilder({ ...builderArgs, + caseConnectors, userAction, - caseServices: { - ...caseServices, - '123': { - ...caseServices['123'], - lastPushIndex: 1, - }, - }, - index: 1, }); const createdUserAction = builder.build(); @@ -90,24 +85,17 @@ describe('createPushedUserActionBuilder ', () => { ); - expect(screen.getByText('Already pushed to connector name incident')).toBeInTheDocument(); - expect(screen.getByText('Requires update to connector name incident')).toBeInTheDocument(); + expect(screen.getByText('updated incident My SN connector')).toBeInTheDocument(); }); - it('shows only the already pushed indicator if has no data to push', async () => { - const userAction = getUserAction('pushed', Actions.push_to_service); + it('shows only the top footer if it is the latest push and there is nothing to push', async () => { + const userAction = getUserAction('pushed', Actions.push_to_service, { + createdAt: '2023-01-17T09:46:29.813Z', + }); + const builder = createPushedUserActionBuilder({ ...builderArgs, userAction, - caseServices: { - ...caseServices, - '123': { - ...caseServices['123'], - lastPushIndex: 1, - hasDataToPush: false, - }, - }, - index: 1, }); const createdUserAction = builder.build(); @@ -117,14 +105,99 @@ describe('createPushedUserActionBuilder ', () => { ); - expect(screen.getByText('Already pushed to connector name incident')).toBeInTheDocument(); + expect(screen.getByText('Already pushed to My SN connector incident')).toBeInTheDocument(); expect( - screen.queryByText('Requires update to connector name incident') + screen.queryByText('Requires update to My SN connector incident') + ).not.toBeInTheDocument(); + }); + + it('shows both footers if the connectors needs to be pushed and is the latest push', async () => { + const caseConnectors = getCaseConnectorsMockResponse({ + needsToBePushed: true, + }); + + const userAction = getUserAction('pushed', Actions.push_to_service, { + createdAt: '2023-01-17T09:46:29.813Z', + }); + const builder = createPushedUserActionBuilder({ + ...builderArgs, + caseConnectors, + userAction, + }); + + const createdUserAction = builder.build(); + render( + + + + ); + + expect(screen.getByText('Already pushed to My SN connector incident')).toBeInTheDocument(); + expect(screen.getByText('Requires update to My SN connector incident')).toBeInTheDocument(); + }); + + it('does not show the footers if it is not the latest push', async () => { + const userAction = getUserAction('pushed', Actions.push_to_service, { + createdAt: '2020-01-17T09:46:29.813Z', + }); + + const builder = createPushedUserActionBuilder({ + ...builderArgs, + userAction, + }); + + const createdUserAction = builder.build(); + render( + + + + ); + + expect( + screen.queryByText('Already pushed to My SN connector incident') + ).not.toBeInTheDocument(); + + expect( + screen.queryByText('Requires update to My SN connector incident') + ).not.toBeInTheDocument(); + }); + + it('does not show the footers if latestUserActionPushDate is not defined', async () => { + const caseConnectors = getCaseConnectorsMockResponse({ + needsToBePushed: true, + latestUserActionPushDate: undefined, + }); + + const userAction = getUserAction('pushed', Actions.push_to_service, { + createdAt: '2023-01-17T09:46:29.813Z', + }); + + const builder = createPushedUserActionBuilder({ + ...builderArgs, + caseConnectors, + userAction, + }); + + const createdUserAction = builder.build(); + render( + + + + ); + + expect( + screen.queryByText('Already pushed to My SN connector incident') + ).not.toBeInTheDocument(); + + expect( + screen.queryByText('Requires update to My SN connector incident') ).not.toBeInTheDocument(); }); it('does not show the push information if the connector is none', async () => { + const caseConnectors = getCaseConnectorsMockResponse({ needsToBePushed: true }); const userAction = getUserAction('pushed', Actions.push_to_service, { + createdAt: '2023-01-17T09:46:29.813Z', payload: { externalService: { connectorId: NONE_CONNECTOR_ID, connectorName: 'none connector' }, }, @@ -132,15 +205,8 @@ describe('createPushedUserActionBuilder ', () => { const builder = createPushedUserActionBuilder({ ...builderArgs, + caseConnectors, userAction, - caseServices: { - ...caseServices, - '123': { - ...caseServices['123'], - lastPushIndex: 1, - }, - }, - index: 1, }); const createdUserAction = builder.build(); @@ -152,9 +218,11 @@ describe('createPushedUserActionBuilder ', () => { expect(screen.queryByText('pushed as new incident none connector')).not.toBeInTheDocument(); expect(screen.queryByText('updated incident none connector')).not.toBeInTheDocument(); - expect(screen.queryByText('Already pushed to connector name incident')).not.toBeInTheDocument(); expect( - screen.queryByText('Requires update to connector name incident') + screen.queryByText('Already pushed to My SN connector incident') + ).not.toBeInTheDocument(); + expect( + screen.queryByText('Requires update to My SN connector incident') ).not.toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx index e0352d7d96ccb..e0f62684c0199 100644 --- a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx @@ -10,29 +10,52 @@ import type { EuiCommentProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import type { PushedUserAction } from '../../../common/api'; -import { Actions, NONE_CONNECTOR_ID } from '../../../common/api'; +import { Actions } from '../../../common/api'; import type { UserActionBuilder, UserActionResponse } from './types'; import { createCommonUpdateUserActionBuilder } from './common'; import * as i18n from './translations'; -import type { CaseServices } from '../../containers/use_find_case_user_actions'; -import type { CaseExternalService } from '../../containers/types'; - -const getPushInfo = ( - caseServices: CaseServices, - externalService: CaseExternalService | undefined, - index: number -) => - externalService != null && externalService.connectorId !== NONE_CONNECTOR_ID - ? { - firstPush: caseServices[externalService.connectorId]?.firstPushIndex === index, - parsedConnectorId: externalService.connectorId, - parsedConnectorName: externalService.connectorName, - } - : { - firstPush: false, - parsedConnectorId: NONE_CONNECTOR_ID, - parsedConnectorName: NONE_CONNECTOR_ID, - }; +import type { CaseConnectors } from '../../containers/types'; + +const getPushDates = ( + userActionPushedAt: string, + connectorPushedAt: string | undefined +): { userActionDate: Date; connectorDate: Date } | undefined => { + if (!connectorPushedAt) { + return; + } + + const pushedDate = new Date(userActionPushedAt); + const connectorDate = new Date(connectorPushedAt); + + if (isNaN(pushedDate.getTime()) || isNaN(connectorDate.getTime())) { + return; + } + + return { + userActionDate: pushedDate, + connectorDate, + }; +}; + +const isLatestPush = (pushedAt: string, latestPush: string | undefined) => { + const dates = getPushDates(pushedAt, latestPush); + + if (!dates) { + return false; + } + + return dates.userActionDate.getTime() >= dates.connectorDate.getTime(); +}; + +const isFirstPush = (pushedAt: string, oldestPush: string | undefined) => { + const dates = getPushDates(pushedAt, oldestPush); + + if (!dates) { + return true; + } + + return dates.userActionDate.getTime() <= dates.connectorDate.getTime(); +}; const getLabelTitle = (action: UserActionResponse, firstPush: boolean) => { const externalService = action.payload.externalService; @@ -60,50 +83,36 @@ const getLabelTitle = (action: UserActionResponse, firstPush: const getFooters = ({ userAction, - caseServices, - connectorId, - connectorName, - index, + connectorInfo, }: { userAction: UserActionResponse; - caseServices: CaseServices; - connectorId: string; - connectorName: string; - index: number; + connectorInfo: CaseConnectors[string]; }): EuiCommentProps[] => { - const showTopFooter = - userAction.action === Actions.push_to_service && - index === caseServices[connectorId]?.lastPushIndex; - - const showBottomFooter = - userAction.action === Actions.push_to_service && - index === caseServices[connectorId]?.lastPushIndex && - caseServices[connectorId].hasDataToPush; + const footers: EuiCommentProps[] = []; + const latestPush = isLatestPush( + userAction.createdAt, + connectorInfo.push.latestUserActionPushDate + ); - let footers: EuiCommentProps[] = []; + const showTopFooter = userAction.action === Actions.push_to_service && latestPush; + const showBottomFooter = showTopFooter && connectorInfo.push.needsToBePushed; if (showTopFooter) { - footers = [ - ...footers, - { - username: '', - event: i18n.ALREADY_PUSHED_TO_SERVICE(`${connectorName}`), - timelineAvatar: 'sortUp', - 'data-test-subj': 'top-footer', - }, - ]; + footers.push({ + username: '', + event: i18n.ALREADY_PUSHED_TO_SERVICE(`${connectorInfo.name}`), + timelineAvatar: 'sortUp', + 'data-test-subj': 'top-footer', + }); } if (showBottomFooter) { - footers = [ - ...footers, - { - username: '', - event: i18n.REQUIRED_UPDATE_TO_SERVICE(`${connectorName}`), - timelineAvatar: 'sortDown', - 'data-test-subj': 'bottom-footer', - }, - ]; + footers.push({ + username: '', + event: i18n.REQUIRED_UPDATE_TO_SERVICE(`${connectorInfo.name}`), + timelineAvatar: 'sortDown', + 'data-test-subj': 'bottom-footer', + }); } return footers; @@ -112,31 +121,25 @@ const getFooters = ({ export const createPushedUserActionBuilder: UserActionBuilder = ({ userAction, userProfiles, - caseServices, - index, + caseConnectors, handleOutlineComment, }) => ({ build: () => { const pushedUserAction = userAction as UserActionResponse; - const { firstPush, parsedConnectorId, parsedConnectorName } = getPushInfo( - caseServices, - pushedUserAction.payload.externalService, - index - ); + const connectorId = pushedUserAction.payload.externalService.connectorId; + const connectorInfo = caseConnectors[connectorId]; - if (parsedConnectorId === NONE_CONNECTOR_ID) { + if (!connectorInfo) { return []; } - const footers = getFooters({ - userAction: pushedUserAction, - caseServices, - connectorId: parsedConnectorId, - connectorName: parsedConnectorName, - index, - }); - + const firstPush = isFirstPush( + userAction.createdAt, + connectorInfo.push.oldestUserActionPushDate + ); + const footers = getFooters({ userAction: pushedUserAction, connectorInfo }); const label = getLabelTitle(pushedUserAction, firstPush); + const commonBuilder = createCommonUpdateUserActionBuilder({ userProfiles, userAction, diff --git a/x-pack/plugins/cases/public/components/user_actions/types.ts b/x-pack/plugins/cases/public/components/user_actions/types.ts index 9bf750437d29d..92001d633e912 100644 --- a/x-pack/plugins/cases/public/components/user_actions/types.ts +++ b/x-pack/plugins/cases/public/components/user_actions/types.ts @@ -9,8 +9,13 @@ import type { EuiCommentProps } from '@elastic/eui'; import type { UserProfileWithAvatar } from '@kbn/user-profile-components'; import type { SnakeToCamelCase } from '../../../common/types'; import type { ActionTypes, UserActionWithResponse } from '../../../common/api'; -import type { Case, CaseUserActions, Comment, UseFetchAlertData } from '../../containers/types'; -import type { CaseServices } from '../../containers/use_find_case_user_actions'; +import type { + Case, + CaseConnectors, + CaseUserActions, + Comment, + UseFetchAlertData, +} from '../../containers/types'; import type { AddCommentRefObject } from '../add_comment'; import type { UserActionMarkdownRefObject } from './markdown_form'; import type { CasesNavigation } from '../links'; @@ -21,7 +26,7 @@ import type { PersistableStateAttachmentTypeRegistry } from '../../client/attach import type { CurrentUserProfile } from '../types'; export interface UserActionTreeProps { - caseServices: CaseServices; + caseConnectors: CaseConnectors; caseUserActions: CaseUserActions[]; userProfiles: Map; currentUserProfile: CurrentUserProfile; @@ -47,8 +52,8 @@ export interface UserActionBuilderArgs { currentUserProfile: CurrentUserProfile; externalReferenceAttachmentTypeRegistry: ExternalReferenceAttachmentTypeRegistry; persistableStateAttachmentTypeRegistry: PersistableStateAttachmentTypeRegistry; + caseConnectors: CaseConnectors; userAction: CaseUserActions; - caseServices: CaseServices; comments: Comment[]; index: number; commentRefs: React.MutableRefObject< diff --git a/x-pack/plugins/cases/public/containers/__mocks__/api.ts b/x-pack/plugins/cases/public/containers/__mocks__/api.ts index 431ce6626e2ea..ea329f67ad791 100644 --- a/x-pack/plugins/cases/public/containers/__mocks__/api.ts +++ b/x-pack/plugins/cases/public/containers/__mocks__/api.ts @@ -27,7 +27,7 @@ import { tags, findCaseUserActionsResponse, } from '../mock'; -import type { CaseUpdateRequest, ResolvedCase } from '../../../common/ui/types'; +import type { CaseConnectors, CaseUpdateRequest, ResolvedCase } from '../../../common/ui/types'; import { SeverityAll } from '../../../common/ui/types'; import type { CasePatchRequest, @@ -39,6 +39,7 @@ import { CaseStatuses } from '../../../common/api'; import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { UserProfile } from '@kbn/security-plugin/common'; import { userProfiles } from '../user_profiles/api.mock'; +import { getCaseConnectorsMockResponse } from '../../common/mock/connectors'; export const getCase = async ( caseId: string, @@ -140,3 +141,8 @@ export const getFeatureIds = async ( _query: { registrationContext: string[] }, _signal: AbortSignal ): Promise => Promise.resolve(['siem', 'observability']); + +export const getCaseConnectors = async ( + caseId: string, + signal: AbortSignal +): Promise => Promise.resolve(getCaseConnectorsMockResponse()); diff --git a/x-pack/plugins/cases/public/containers/api.test.tsx b/x-pack/plugins/cases/public/containers/api.test.tsx index c744fc36335cc..f7a57f8e65aff 100644 --- a/x-pack/plugins/cases/public/containers/api.test.tsx +++ b/x-pack/plugins/cases/public/containers/api.test.tsx @@ -11,6 +11,7 @@ import { KibanaServices } from '../common/lib/kibana'; import { ConnectorTypes, CommentType, CaseStatuses, CaseSeverity } from '../../common/api'; import { + CASES_INTERNAL_URL, CASES_URL, INTERNAL_BULK_CREATE_ATTACHMENTS_URL, SECURITY_SOLUTION_OWNER, @@ -34,6 +35,7 @@ import { resolveCase, getFeatureIds, postComment, + getCaseConnectors, } from './api'; import { @@ -54,10 +56,12 @@ import { caseWithRegisteredAttachmentsSnake, caseWithRegisteredAttachments, caseUserActionsWithRegisteredAttachmentsSnake, + basicPushSnake, } from './mock'; import { DEFAULT_FILTER_OPTIONS, DEFAULT_QUERY_PARAMS } from './use_get_cases'; import { getCasesStatus } from '../api'; +import { getCaseConnectorsMockResponse } from '../common/mock/connectors'; const abortCtrl = new AbortController(); const mockKibanaServices = KibanaServices.get as jest.Mock; @@ -846,4 +850,33 @@ describe('Cases API', () => { expect(resp).toEqual(caseWithRegisteredAttachments); }); }); + + describe('getCaseConnectors', () => { + const caseConnectors = getCaseConnectorsMockResponse(); + const connectorCamelCase = caseConnectors['servicenow-1']; + + const snakeCaseConnector = { + ...connectorCamelCase, + push: { ...connectorCamelCase.push, externalService: basicPushSnake }, + }; + + beforeEach(() => { + fetchMock.mockClear(); + fetchMock.mockResolvedValue({ 'servicenow-1': snakeCaseConnector }); + }); + + it('should be called with correct check url, method, signal', async () => { + await getCaseConnectors(basicCase.id, abortCtrl.signal); + + expect(fetchMock).toHaveBeenCalledWith(`${CASES_INTERNAL_URL}/${basicCase.id}/_connectors`, { + method: 'GET', + signal: abortCtrl.signal, + }); + }); + + it('should return correct response', async () => { + const resp = await getCaseConnectors(basicCase.id, abortCtrl.signal); + expect(resp).toEqual({ 'servicenow-1': connectorCamelCase }); + }); + }); }); diff --git a/x-pack/plugins/cases/public/containers/api.ts b/x-pack/plugins/cases/public/containers/api.ts index 9c4f1a07ee62f..aabe48638efa7 100644 --- a/x-pack/plugins/cases/public/containers/api.ts +++ b/x-pack/plugins/cases/public/containers/api.ts @@ -8,6 +8,7 @@ import type { ValidFeatureId } from '@kbn/rule-data-utils'; import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common/constants'; import type { + CaseConnectors, Cases, CaseUpdateRequest, FetchCasesProps, @@ -27,6 +28,7 @@ import type { User, SingleCaseMetricsResponse, CasesFindResponse, + GetCaseConnectorsResponse, } from '../../common/api'; import { CommentType, @@ -36,6 +38,7 @@ import { getCasePushUrl, getCaseFindUserActionsUrl, getCaseCommentDeleteUrl, + getCaseConnectorsUrl, } from '../../common/api'; import { CASE_REPORTERS_URL, @@ -378,3 +381,28 @@ export const getFeatureIds = async ( } ); }; + +export const getCaseConnectors = async ( + caseId: string, + signal: AbortSignal +): Promise => { + const res = await KibanaServices.get().http.fetch( + getCaseConnectorsUrl(caseId), + { + method: 'GET', + signal, + } + ); + + return Object.keys(res).reduce( + (acc, connectorId) => ({ + ...acc, + [connectorId]: { + ...convertToCamelCase( + res[connectorId] + ), + }, + }), + {} + ); +}; diff --git a/x-pack/plugins/cases/public/containers/configure/__mocks__/api.ts b/x-pack/plugins/cases/public/containers/configure/__mocks__/api.ts index 0d85e75478be3..607f6d01191ff 100644 --- a/x-pack/plugins/cases/public/containers/configure/__mocks__/api.ts +++ b/x-pack/plugins/cases/public/containers/configure/__mocks__/api.ts @@ -17,8 +17,9 @@ import type { CaseConfigure } from '../types'; import { caseConfigurationCamelCaseResponseMock } from '../mock'; import { actionTypesMock, connectorsMock } from '../../../common/mock/connectors'; -export const fetchConnectors = async ({ signal }: ApiProps): Promise => - Promise.resolve(connectorsMock); +export const getSupportedActionConnectors = async ({ + signal, +}: ApiProps): Promise => Promise.resolve(connectorsMock); export const getCaseConfigure = async ({ signal }: ApiProps): Promise => Promise.resolve(caseConfigurationCamelCaseResponseMock); diff --git a/x-pack/plugins/cases/public/containers/configure/api.test.ts b/x-pack/plugins/cases/public/containers/configure/api.test.ts index 0b1f0c8d172ea..9099f908a7871 100644 --- a/x-pack/plugins/cases/public/containers/configure/api.test.ts +++ b/x-pack/plugins/cases/public/containers/configure/api.test.ts @@ -6,7 +6,7 @@ */ import { - fetchConnectors, + getSupportedActionConnectors, getCaseConfigure, postCaseConfigure, patchCaseConfigure, @@ -37,7 +37,7 @@ describe('Case Configuration API', () => { }); test('check url, method, signal', async () => { - await fetchConnectors({ signal: abortCtrl.signal }); + await getSupportedActionConnectors({ signal: abortCtrl.signal }); expect(fetchMock).toHaveBeenCalledWith('/api/cases/configure/connectors/_find', { method: 'GET', signal: abortCtrl.signal, @@ -45,7 +45,7 @@ describe('Case Configuration API', () => { }); test('happy path', async () => { - const resp = await fetchConnectors({ signal: abortCtrl.signal }); + const resp = await getSupportedActionConnectors({ signal: abortCtrl.signal }); expect(resp).toEqual(connectorsMock); }); }); diff --git a/x-pack/plugins/cases/public/containers/configure/api.ts b/x-pack/plugins/cases/public/containers/configure/api.ts index 72702e27fbb56..b0f2b8df4a093 100644 --- a/x-pack/plugins/cases/public/containers/configure/api.ts +++ b/x-pack/plugins/cases/public/containers/configure/api.ts @@ -24,7 +24,9 @@ import type { ApiProps } from '../types'; import { decodeCaseConfigurationsResponse, decodeCaseConfigureResponse } from '../utils'; import type { CaseConfigure } from './types'; -export const fetchConnectors = async ({ signal }: ApiProps): Promise => { +export const getSupportedActionConnectors = async ({ + signal, +}: ApiProps): Promise => { const response = await KibanaServices.get().http.fetch( `${CASE_CONFIGURE_CONNECTORS_URL}/_find`, { method: 'GET', signal } diff --git a/x-pack/plugins/cases/public/containers/configure/use_connectors.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx similarity index 85% rename from x-pack/plugins/cases/public/containers/configure/use_connectors.tsx rename to x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx index f9c19ee1776bd..0bba69ca47df1 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_connectors.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx @@ -6,13 +6,13 @@ */ import { useQuery } from '@tanstack/react-query'; -import { fetchConnectors } from './api'; +import { getSupportedActionConnectors } from './api'; import { useApplicationCapabilities, useToasts } from '../../common/lib/kibana'; import * as i18n from './translations'; import { casesQueriesKeys } from '../constants'; import type { ServerError } from '../../types'; -export function useGetConnectors() { +export function useGetSupportedActionConnectors() { const toasts = useToasts(); const { actions } = useApplicationCapabilities(); return useQuery( @@ -22,7 +22,7 @@ export function useGetConnectors() { return []; } const abortCtrl = new AbortController(); - return fetchConnectors({ signal: abortCtrl.signal }); + return getSupportedActionConnectors({ signal: abortCtrl.signal }); }, { onError: (error: ServerError) => { diff --git a/x-pack/plugins/cases/public/containers/configure/use_connectors.test.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx.test.tsx similarity index 78% rename from x-pack/plugins/cases/public/containers/configure/use_connectors.test.tsx rename to x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx.test.tsx index 076e1a8408482..36cbd9417e375 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_connectors.test.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_supported_action_connectors.tsx.test.tsx @@ -10,7 +10,7 @@ import { renderHook } from '@testing-library/react-hooks'; import * as api from './api'; import { TestProviders } from '../../common/mock'; import { useApplicationCapabilities, useToasts } from '../../common/lib/kibana'; -import { useGetConnectors } from './use_connectors'; +import { useGetSupportedActionConnectors } from './use_get_supported_action_connectors'; const useApplicationCapabilitiesMock = useApplicationCapabilities as jest.Mocked< typeof useApplicationCapabilities @@ -25,8 +25,8 @@ describe('useConnectors', () => { }); it('fetches connectors', async () => { - const spy = jest.spyOn(api, 'fetchConnectors'); - const { waitForNextUpdate } = renderHook(() => useGetConnectors(), { + const spy = jest.spyOn(api, 'getSupportedActionConnectors'); + const { waitForNextUpdate } = renderHook(() => useGetSupportedActionConnectors(), { wrapper: ({ children }) => {children}, }); @@ -39,12 +39,12 @@ describe('useConnectors', () => { const addError = jest.fn(); (useToasts as jest.Mock).mockReturnValue({ addError }); - const spyOnfetchConnectors = jest.spyOn(api, 'fetchConnectors'); + const spyOnfetchConnectors = jest.spyOn(api, 'getSupportedActionConnectors'); spyOnfetchConnectors.mockImplementation(() => { throw new Error('Something went wrong'); }); - const { waitForNextUpdate } = renderHook(() => useGetConnectors(), { + const { waitForNextUpdate } = renderHook(() => useGetSupportedActionConnectors(), { wrapper: ({ children }) => {children}, }); await waitForNextUpdate(); @@ -53,10 +53,10 @@ describe('useConnectors', () => { }); it('does not fetch connectors when the user does not has access to actions', async () => { - const spyOnFetchConnectors = jest.spyOn(api, 'fetchConnectors'); + const spyOnFetchConnectors = jest.spyOn(api, 'getSupportedActionConnectors'); useApplicationCapabilitiesMock().actions = { crud: false, read: false }; - const { result, waitForNextUpdate } = renderHook(() => useGetConnectors(), { + const { result, waitForNextUpdate } = renderHook(() => useGetSupportedActionConnectors(), { wrapper: ({ children }) => {children}, }); diff --git a/x-pack/plugins/cases/public/containers/constants.ts b/x-pack/plugins/cases/public/containers/constants.ts index 2e57a17be08ec..10d890629311e 100644 --- a/x-pack/plugins/cases/public/containers/constants.ts +++ b/x-pack/plugins/cases/public/containers/constants.ts @@ -24,8 +24,8 @@ export const casesQueriesKeys = { case: (id: string) => [...casesQueriesKeys.caseView(), id] as const, caseMetrics: (id: string, features: SingleCaseMetricsFeature[]) => [...casesQueriesKeys.case(id), 'metrics', features] as const, - userActions: (id: string, connectorId: string) => - [...casesQueriesKeys.case(id), 'user-actions', connectorId] as const, + caseConnectors: (id: string) => [...casesQueriesKeys.case(id), 'connectors'], + userActions: (id: string) => [...casesQueriesKeys.case(id), 'user-actions'] as const, userProfiles: () => [...casesQueriesKeys.users, 'user-profiles'] as const, userProfilesList: (ids: string[]) => [...casesQueriesKeys.userProfiles(), ids] as const, currentUser: () => [...casesQueriesKeys.users, 'current-user'] as const, diff --git a/x-pack/plugins/cases/public/containers/mock.ts b/x-pack/plugins/cases/public/containers/mock.ts index 5cadec4818457..4abe077f378db 100644 --- a/x-pack/plugins/cases/public/containers/mock.ts +++ b/x-pack/plugins/cases/public/containers/mock.ts @@ -53,12 +53,14 @@ export { connectorsMock } from '../common/mock/connectors'; export const basicCaseId = 'basic-case-id'; export const caseWithAlertsId = 'case-with-alerts-id'; export const caseWithAlertsSyncOffId = 'case-with-alerts-syncoff-id'; +export const pushConnectorId = 'servicenow-1'; const basicCommentId = 'basic-comment-id'; const basicCreatedAt = '2020-02-19T23:06:33.798Z'; const basicUpdatedAt = '2020-02-20T15:02:57.995Z'; const basicClosedAt = '2020-02-21T15:02:57.995Z'; -const laterTime = '2020-02-28T15:02:57.995Z'; +const basicPushedAt = '2023-01-17T09:46:29.813Z'; +const laterTime = '2023-01-18T09:46:29.813Z'; export const elasticUser = { fullName: 'Leslie Knope', @@ -370,21 +372,21 @@ export const casesMetrics: CasesMetrics = { }; export const basicPush = { - connectorId: '123', - connectorName: 'connector name', + connectorId: pushConnectorId, + connectorName: 'My SN connector', externalId: 'external_id', externalTitle: 'external title', externalUrl: 'basicPush.com', - pushedAt: basicUpdatedAt, + pushedAt: basicPushedAt, pushedBy: elasticUser, }; export const pushedCase: Case = { ...basicCase, connector: { - id: '123', - name: 'My Connector', - type: ConnectorTypes.jira, + id: pushConnectorId, + name: 'My SN connector', + type: ConnectorTypes.serviceNowITSM, fields: null, }, externalService: basicPush, @@ -539,10 +541,9 @@ export const casesStatusSnake: CasesStatusResponse = { count_open_cases: 20, }; -export const pushConnectorId = '123'; export const pushSnake = { connector_id: pushConnectorId, - connector_name: 'connector name', + connector_name: 'My SN connector', external_id: 'external_id', external_title: 'external title', external_url: 'basicPush.com', @@ -550,16 +551,16 @@ export const pushSnake = { export const basicPushSnake = { ...pushSnake, - pushed_at: basicUpdatedAt, + pushed_at: basicPushedAt, pushed_by: elasticUserSnake, }; export const pushedCaseSnake = { ...basicCaseSnake, connector: { - id: '123', - name: 'My Connector', - type: ConnectorTypes.jira, + id: pushConnectorId, + name: 'My SN connector', + type: ConnectorTypes.serviceNowITSM, fields: null, }, external_service: { ...basicPushSnake, connector_id: pushConnectorId }, @@ -605,11 +606,11 @@ export const getUserAction = ( const externalService = { connectorId: pushConnectorId, - connectorName: 'connector name', + connectorName: 'My SN connector', externalId: 'external_id', externalTitle: 'external title', externalUrl: 'basicPush.com', - pushedAt: basicUpdatedAt, + pushedAt: basicPushedAt, pushedBy: elasticUser, }; @@ -667,6 +668,7 @@ export const getUserAction = ( case ActionTypes.pushed: return { ...commonProperties, + createdAt: basicPushedAt, type: ActionTypes.pushed, payload: { externalService, diff --git a/x-pack/plugins/cases/public/containers/use_find_case_user_actions.test.tsx b/x-pack/plugins/cases/public/containers/use_find_case_user_actions.test.tsx index 5b98b71468c6f..4330323d7a8b2 100644 --- a/x-pack/plugins/cases/public/containers/use_find_case_user_actions.test.tsx +++ b/x-pack/plugins/cases/public/containers/use_find_case_user_actions.test.tsx @@ -5,24 +5,20 @@ * 2.0. */ -import { renderHook, act } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react-hooks'; import type { UseFindCaseUserActions } from './use_find_case_user_actions'; -import { getPushedInfo, useFindCaseUserActions } from './use_find_case_user_actions'; +import { useFindCaseUserActions } from './use_find_case_user_actions'; import { basicCase, - basicPush, caseUserActions, elasticUser, - getJiraConnector, - getUserAction, - jiraFields, findCaseUserActionsResponse, + getUserAction, } from './mock'; import { Actions } from '../../common/api'; import React from 'react'; import { QueryClientProvider } from '@tanstack/react-query'; import { testQueryClient } from '../common/mock'; -import { waitFor } from '@testing-library/dom'; import * as api from './api'; import { useToasts } from '../common/lib/kibana'; @@ -39,36 +35,33 @@ const wrapper: React.FC = ({ children }) => ( {children} ); -describe('useFindCaseUserActions', () => { +describe('UseFindCaseUserActions', () => { beforeEach(() => { jest.clearAllMocks(); jest.restoreAllMocks(); }); it('returns proper state on findCaseUserActions', async () => { - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); - await waitFor(() => { - expect(result.current).toEqual( - expect.objectContaining({ - ...initialData, - data: { - caseServices: {}, - caseUserActions: [...findCaseUserActionsResponse.userActions], - hasDataToPush: true, - participants: [elasticUser], - profileUids: new Set(), - }, - isError: false, - isLoading: false, - isFetching: false, - }) - ); - }); - }); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); + + expect(result.current).toEqual( + expect.objectContaining({ + ...initialData, + data: { + caseUserActions: [...findCaseUserActionsResponse.userActions], + participants: [elasticUser], + profileUids: new Set(), + }, + isError: false, + isLoading: false, + isFetching: false, + }) + ); }); it('shows a toast error when the API returns an error', async () => { @@ -78,10 +71,12 @@ describe('useFindCaseUserActions', () => { (useToasts as jest.Mock).mockReturnValue({ addError }); const { waitForNextUpdate } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), + () => useFindCaseUserActions(basicCase.id), { wrapper } ); + await waitForNextUpdate(); + expect(spy).toHaveBeenCalledWith(basicCase.id, expect.any(AbortSignal)); expect(addError).toHaveBeenCalled(); }); @@ -97,20 +92,18 @@ describe('useFindCaseUserActions', () => { }) ); - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); - await waitFor(() => { - expect(result.current.data?.profileUids).toMatchInlineSnapshot(` + expect(result.current.data?.profileUids).toMatchInlineSnapshot(` Set { "456", } `); - }); - }); }); it('aggregates the uids from a push', async () => { @@ -127,20 +120,18 @@ describe('useFindCaseUserActions', () => { }) ); - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); - await waitFor(() => { - expect(result.current.data?.profileUids).toMatchInlineSnapshot(` + expect(result.current.data?.profileUids).toMatchInlineSnapshot(` Set { "123", } `); - }); - }); }); it('aggregates the uids from an assignment add user action', async () => { @@ -153,21 +144,19 @@ describe('useFindCaseUserActions', () => { }) ); - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); - await waitFor(() => { - expect(result.current.data?.profileUids).toMatchInlineSnapshot(` + expect(result.current.data?.profileUids).toMatchInlineSnapshot(` Set { "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", "u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0", } `); - }); - }); }); it('ignores duplicate uids', async () => { @@ -184,21 +173,19 @@ describe('useFindCaseUserActions', () => { }) ); - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); - await waitFor(() => { - expect(result.current.data?.profileUids).toMatchInlineSnapshot(` + expect(result.current.data?.profileUids).toMatchInlineSnapshot(` Set { "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", "u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0", } `); - }); - }); }); it('aggregates the uids from an assignment delete user action', async () => { @@ -211,562 +198,19 @@ describe('useFindCaseUserActions', () => { }) ); - await act(async () => { - const { result } = renderHook( - () => useFindCaseUserActions(basicCase.id, basicCase.connector.id), - { wrapper } - ); + const { result, waitForNextUpdate } = renderHook( + () => useFindCaseUserActions(basicCase.id), + { wrapper } + ); + + await waitForNextUpdate(); - await waitFor(() => { - expect(result.current.data?.profileUids).toMatchInlineSnapshot(` + expect(result.current.data?.profileUids).toMatchInlineSnapshot(` Set { "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", "u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0", } `); - }); - }); - }); - }); - - describe('getPushedInfo', () => { - it('Correctly marks first/last index - hasDataToPush: false', () => { - const userActions = [...caseUserActions, getUserAction('pushed', Actions.push_to_service)]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Correctly marks first/last index and comment id - hasDataToPush: true', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [userActions[userActions.length - 1].commentId], - hasDataToPush: true, - }, - }, - }); - }); - - it('Correctly marks first/last index and multiple comment ids, both needs push', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - { ...getUserAction('comment', Actions.create), commentId: 'muahaha' }, - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [ - userActions[userActions.length - 2].commentId, - userActions[userActions.length - 1].commentId, - ], - hasDataToPush: true, - }, - }, - }); - }); - - it('Correctly marks first/last index and multiple comment ids, one needs push', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - getUserAction('pushed', Actions.push_to_service), - { ...getUserAction('comment', Actions.create), commentId: 'muahaha' }, - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 5, - commentsToUpdate: [userActions[userActions.length - 1].commentId], - hasDataToPush: true, - }, - }, - }); - }); - - it('Correctly marks first/last index and multiple comment ids, one needs push and one needs update', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - getUserAction('pushed', Actions.push_to_service), - { ...getUserAction('comment', Actions.create), commentId: 'muahaha' }, - getUserAction('comment', Actions.update), - getUserAction('comment', Actions.update), - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 5, - commentsToUpdate: [ - userActions[userActions.length - 3].commentId, - userActions[userActions.length - 1].commentId, - ], - hasDataToPush: true, - }, - }, - }); - }); - - it('Does not count connector update as a reason to push', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('connector', Actions.update), - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Correctly handles multiple push actions', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - getUserAction('pushed', Actions.push_to_service), - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 5, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Correctly handles comment update with multiple push actions', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.create), - getUserAction('pushed', Actions.push_to_service), - getUserAction('comment', Actions.update), - ]; - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 5, - commentsToUpdate: [userActions[userActions.length - 1].commentId], - hasDataToPush: true, - }, - }, - }); - }); - - it('Multiple connector tracking - hasDataToPush: true', () => { - const pushAction123 = getUserAction('pushed', Actions.push_to_service); - const push456 = { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - }; - - const pushAction456 = getUserAction('pushed', Actions.push_to_service, { - payload: { externalService: push456 }, - }); - - const userActions = [ - ...caseUserActions, - pushAction123, - getUserAction('comment', Actions.create), - pushAction456, - ]; - - const result = getPushedInfo(userActions, '123'); - - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [userActions[userActions.length - 2].commentId], - hasDataToPush: true, - }, - '456': { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - firstPushIndex: 5, - lastPushIndex: 5, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Multiple connector tracking - hasDataToPush: false', () => { - const pushAction123 = getUserAction('pushed', Actions.push_to_service); - const push456 = { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - }; - - const pushAction456 = getUserAction('pushed', Actions.push_to_service, { - payload: { externalService: push456 }, - }); - - const userActions = [ - ...caseUserActions, - pushAction123, - getUserAction('comment', Actions.create), - pushAction456, - ]; - - const result = getPushedInfo(userActions, '456'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [userActions[userActions.length - 2].commentId], - hasDataToPush: true, - }, - '456': { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - firstPushIndex: 5, - lastPushIndex: 5, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Change fields of current connector - hasDataToPush: true', () => { - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - getUserAction('pushed', Actions.push_to_service), - createUpdate123LowPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: true, - }, - }, - }); - }); - - it('Change current connector - hasDataToPush: true', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - createUpdate456HighPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Change connector and back - hasDataToPush: true', () => { - const userActions = [ - ...caseUserActions, - getUserAction('pushed', Actions.push_to_service), - createUpdate456HighPriorityConnector(), - createUpdate123HighPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 3, - lastPushIndex: 3, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Change fields and connector after push - hasDataToPush: true', () => { - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - getUserAction('pushed', Actions.push_to_service), - createUpdate456HighPriorityConnector(), - createUpdate123LowPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: true, - }, - }, - }); - }); - - it('Change only connector after push - hasDataToPush: false', () => { - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - getUserAction('pushed', Actions.push_to_service), - createUpdate456HighPriorityConnector(), - createUpdate123HighPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Change connectors and fields - multiple pushes', () => { - const pushAction123 = getUserAction('pushed', Actions.push_to_service); - const push456 = { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - }; - - const pushAction456 = getUserAction('pushed', Actions.push_to_service, { - payload: { externalService: push456 }, - }); - - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - pushAction123, - createUpdate456HighPriorityConnector(), - pushAction456, - createUpdate123LowPriorityConnector(), - createUpdate456HighPriorityConnector(), - createUpdate123LowPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: true, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: true, - }, - '456': { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - firstPushIndex: 6, - lastPushIndex: 6, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('pushing other connectors does not count as an update', () => { - const pushAction123 = getUserAction('pushed', Actions.push_to_service); - const push456 = { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - }; - - const pushAction456 = getUserAction('pushed', Actions.push_to_service, { - payload: { externalService: push456 }, - }); - - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - pushAction123, - createUpdate456HighPriorityConnector(), - pushAction456, - createUpdate123HighPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: false, - }, - '456': { - ...basicPush, - connectorId: '456', - connectorName: 'other connector name', - externalId: 'other_external_id', - firstPushIndex: 6, - lastPushIndex: 6, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); - }); - - it('Changing other connectors fields does not count as an update', () => { - const userActions = [ - ...caseUserActions, - createUpdate123HighPriorityConnector(), - getUserAction('pushed', Actions.push_to_service), - createUpdate456HighPriorityConnector(), - createUpdate456HighPriorityConnector(), - ]; - - const result = getPushedInfo(userActions, '123'); - expect(result).toEqual({ - hasDataToPush: false, - caseServices: { - '123': { - ...basicPush, - firstPushIndex: 4, - lastPushIndex: 4, - commentsToUpdate: [], - hasDataToPush: false, - }, - }, - }); }); }); }); - -const jira123HighPriorityFields = { - fields: { ...jiraFields.fields, priority: 'High' }, -}; - -const jira123LowPriorityFields = { - fields: { ...jiraFields.fields, priority: 'Low' }, -}; - -const jira456Fields = { - fields: { issueType: '10', parent: null, priority: null }, -}; - -const jira456HighPriorityFields = { - id: '456', - fields: { ...jira456Fields.fields, priority: 'High' }, -}; - -const createUpdate123HighPriorityConnector = () => - getUserAction('connector', Actions.update, { - payload: { connector: getJiraConnector(jira123HighPriorityFields) }, - }); - -const createUpdate123LowPriorityConnector = () => - getUserAction('connector', Actions.update, { - payload: { connector: getJiraConnector(jira123LowPriorityFields) }, - }); - -const createUpdate456HighPriorityConnector = () => - getUserAction('connector', Actions.update, { - payload: { connector: getJiraConnector(jira456HighPriorityFields) }, - }); diff --git a/x-pack/plugins/cases/public/containers/use_find_case_user_actions.tsx b/x-pack/plugins/cases/public/containers/use_find_case_user_actions.tsx index 46236ed36be3d..8470ea439d6fa 100644 --- a/x-pack/plugins/cases/public/containers/use_find_case_user_actions.tsx +++ b/x-pack/plugins/cases/public/containers/use_find_case_user_actions.tsx @@ -6,209 +6,17 @@ */ import { isEmpty, uniqBy } from 'lodash/fp'; -import deepEqual from 'fast-deep-equal'; import { useQuery } from '@tanstack/react-query'; -import type { CaseUserActions, CaseExternalService } from '../../common/ui/types'; -import type { CaseConnector } from '../../common/api'; -import { ActionTypes, NONE_CONNECTOR_ID } from '../../common/api'; +import type { CaseUserActions } from '../../common/ui/types'; +import { ActionTypes } from '../../common/api'; import { findCaseUserActions } from './api'; -import { - isPushedUserAction, - isConnectorUserAction, - isCreateCaseUserAction, -} from '../../common/utils/user_actions'; +import { isPushedUserAction } from '../../common/utils/user_actions'; import type { ServerError } from '../types'; import { useToasts } from '../common/lib/kibana'; import { ERROR_TITLE } from './translations'; import { casesQueriesKeys } from './constants'; -export interface CaseService extends CaseExternalService { - firstPushIndex: number; - lastPushIndex: number; - commentsToUpdate: string[]; - hasDataToPush: boolean; -} - -export interface CaseServices { - [key: string]: CaseService; -} - -const groupConnectorFields = ( - userActions: CaseUserActions[] -): Record> => - userActions.reduce((acc, mua) => { - if ( - (isConnectorUserAction(mua) || isCreateCaseUserAction(mua)) && - mua.payload?.connector?.id !== NONE_CONNECTOR_ID - ) { - const connector = mua.payload.connector; - - return { - ...acc, - [connector.id]: [...(acc[connector.id] || []), connector.fields], - }; - } - - return acc; - }, {} as Record>); - -const connectorHasChangedFields = ({ - connectorFieldsBeforePush, - connectorFieldsAfterPush, - connectorId, -}: { - connectorFieldsBeforePush: Record> | null; - connectorFieldsAfterPush: Record> | null; - connectorId: string; -}): boolean => { - if (connectorFieldsAfterPush == null || connectorFieldsAfterPush[connectorId] == null) { - return false; - } - - const fieldsAfterPush = connectorFieldsAfterPush[connectorId]; - - if (connectorFieldsBeforePush != null && connectorFieldsBeforePush[connectorId] != null) { - const fieldsBeforePush = connectorFieldsBeforePush[connectorId]; - return !deepEqual( - fieldsBeforePush[fieldsBeforePush.length - 1], - fieldsAfterPush[fieldsAfterPush.length - 1] - ); - } - - if (fieldsAfterPush.length >= 2) { - return !deepEqual( - fieldsAfterPush[fieldsAfterPush.length - 2], - fieldsAfterPush[fieldsAfterPush.length - 1] - ); - } - - return false; -}; - -interface CommentsAndIndex { - commentId: string; - commentIndex: number; -} - -export const getPushedInfo = ( - caseUserActions: CaseUserActions[], - caseConnectorId: string -): { - caseServices: CaseServices; - hasDataToPush: boolean; -} => { - const hasDataToPushForConnector = (connectorId: string): boolean => { - const caseUserActionsReversed = [...caseUserActions].reverse(); - const lastPushOfConnectorReversedIndex = caseUserActionsReversed.findIndex( - (mua) => - isPushedUserAction<'camelCase'>(mua) && - mua.payload.externalService.connectorId === connectorId - ); - - if (lastPushOfConnectorReversedIndex === -1) { - return true; - } - - const lastPushOfConnectorIndex = - caseUserActionsReversed.length - lastPushOfConnectorReversedIndex - 1; - - const actionsBeforePush = caseUserActions.slice(0, lastPushOfConnectorIndex); - const actionsAfterPush = caseUserActions.slice( - lastPushOfConnectorIndex + 1, - caseUserActionsReversed.length - ); - - const connectorFieldsBeforePush = groupConnectorFields(actionsBeforePush); - const connectorFieldsAfterPush = groupConnectorFields(actionsAfterPush); - - const connectorHasChanged = connectorHasChangedFields({ - connectorFieldsBeforePush, - connectorFieldsAfterPush, - connectorId, - }); - - return ( - actionsAfterPush.some( - (mua) => mua.type !== ActionTypes.connector && mua.type !== ActionTypes.pushed - ) || connectorHasChanged - ); - }; - - const commentsAndIndex = caseUserActions.reduce( - (bacc, mua, index) => - mua.type === ActionTypes.comment && mua.commentId != null - ? [ - ...bacc, - { - commentId: mua.commentId, - commentIndex: index, - }, - ] - : bacc, - [] - ); - - let caseServices = caseUserActions.reduce((acc, cua, i) => { - if (!isPushedUserAction<'camelCase'>(cua)) { - return acc; - } - - const externalService = cua.payload.externalService; - if (externalService === null) { - return acc; - } - - return { - ...acc, - ...(acc[externalService.connectorId] != null - ? { - [externalService.connectorId]: { - ...acc[externalService.connectorId], - ...externalService, - lastPushIndex: i, - commentsToUpdate: [], - }, - } - : { - [externalService.connectorId]: { - ...externalService, - firstPushIndex: i, - lastPushIndex: i, - hasDataToPush: hasDataToPushForConnector(externalService.connectorId), - commentsToUpdate: [], - }, - }), - }; - }, {}); - - caseServices = Object.keys(caseServices).reduce((acc, key) => { - return { - ...acc, - [key]: { - ...caseServices[key], - // if the comment happens after the lastUpdateToCaseIndex, it should be included in commentsToUpdate - commentsToUpdate: commentsAndIndex.reduce( - (bacc, currentComment) => - currentComment.commentIndex > caseServices[key].lastPushIndex - ? bacc.indexOf(currentComment.commentId) > -1 - ? [...bacc.filter((e) => e !== currentComment.commentId), currentComment.commentId] - : [...bacc, currentComment.commentId] - : bacc, - [] - ), - }, - }; - }, {}); - - const hasDataToPush = - caseServices[caseConnectorId] != null ? caseServices[caseConnectorId].hasDataToPush : true; - return { - hasDataToPush, - caseServices, - }; -}; - export const getProfileUids = (userActions: CaseUserActions[]) => { const uids = userActions.reduce>((acc, userAction) => { if (userAction.type === ActionTypes.assignees) { @@ -235,29 +43,25 @@ export const getProfileUids = (userActions: CaseUserActions[]) => { return uids; }; -export const useFindCaseUserActions = (caseId: string, caseConnectorId: string) => { +export const useFindCaseUserActions = (caseId: string) => { const toasts = useToasts(); const abortCtrlRef = new AbortController(); return useQuery( - casesQueriesKeys.userActions(caseId, caseConnectorId), + casesQueriesKeys.userActions(caseId), async () => { const response = await findCaseUserActions(caseId, abortCtrlRef.signal); const participants = !isEmpty(response.userActions) ? uniqBy('createdBy.username', response.userActions).map((cau) => cau.createdBy) : []; - const caseUserActions: CaseUserActions[] = !isEmpty(response.userActions) - ? response.userActions - : []; - const pushedInfo = getPushedInfo(caseUserActions, caseConnectorId); + const caseUserActions = !isEmpty(response.userActions) ? response.userActions : []; const profileUids = getProfileUids(caseUserActions); return { caseUserActions, participants, profileUids, - ...pushedInfo, }; }, { diff --git a/x-pack/plugins/cases/public/containers/use_get_case_connectors.test.tsx b/x-pack/plugins/cases/public/containers/use_get_case_connectors.test.tsx new file mode 100644 index 0000000000000..220d37deefb5b --- /dev/null +++ b/x-pack/plugins/cases/public/containers/use_get_case_connectors.test.tsx @@ -0,0 +1,58 @@ +/* + * 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 { renderHook } from '@testing-library/react-hooks'; +import * as api from './api'; +import type { AppMockRenderer } from '../common/mock'; +import { createAppMockRenderer } from '../common/mock'; +import { useToasts } from '../common/lib/kibana'; +import { useGetCaseConnectors } from './use_get_case_connectors'; + +jest.mock('./api'); +jest.mock('../common/lib/kibana'); + +describe('useGetCaseConnectors', () => { + const caseId = 'test-id'; + const abortCtrl = new AbortController(); + const addSuccess = jest.fn(); + (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError: jest.fn() }); + + let appMockRender: AppMockRenderer; + + beforeEach(() => { + appMockRender = createAppMockRenderer(); + jest.clearAllMocks(); + }); + + it('calls getCaseConnectors with correct arguments', async () => { + const spyOnGetCases = jest.spyOn(api, 'getCaseConnectors'); + const { waitForNextUpdate } = renderHook(() => useGetCaseConnectors(caseId), { + wrapper: appMockRender.AppWrapper, + }); + + await waitForNextUpdate(); + + expect(spyOnGetCases).toBeCalledWith('test-id', abortCtrl.signal); + }); + + it('shows a toast error message when an error occurs in the response', async () => { + const spyOnGetCases = jest.spyOn(api, 'getCaseConnectors'); + spyOnGetCases.mockImplementation(() => { + throw new Error('Something went wrong'); + }); + + const addError = jest.fn(); + (useToasts as jest.Mock).mockReturnValue({ addSuccess, addError }); + + const { waitForNextUpdate } = renderHook(() => useGetCaseConnectors(caseId), { + wrapper: appMockRender.AppWrapper, + }); + + await waitForNextUpdate(); + expect(addError).toHaveBeenCalled(); + }); +}); diff --git a/x-pack/plugins/cases/public/containers/use_get_case_connectors.tsx b/x-pack/plugins/cases/public/containers/use_get_case_connectors.tsx new file mode 100644 index 0000000000000..fa7920a8c3553 --- /dev/null +++ b/x-pack/plugins/cases/public/containers/use_get_case_connectors.tsx @@ -0,0 +1,37 @@ +/* + * 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 { useQuery } from '@tanstack/react-query'; +import * as i18n from './translations'; +import { getCaseConnectors } from './api'; +import type { ServerError } from '../types'; +import { casesQueriesKeys } from './constants'; +import { useCasesToast } from '../common/use_cases_toast'; +import type { CaseConnectors } from './types'; + +// 30 seconds +const STALE_TIME = 1000 * 30; + +export const useGetCaseConnectors = (caseId: string) => { + const { showErrorToast } = useCasesToast(); + + return useQuery( + casesQueriesKeys.caseConnectors(caseId), + () => { + const abortCtrlRef = new AbortController(); + return getCaseConnectors(caseId, abortCtrlRef.signal); + }, + { + staleTime: STALE_TIME, + onError: (error: ServerError) => { + showErrorToast(error, { title: i18n.ERROR_TITLE }); + }, + } + ); +}; + +export type UseGetCaseConnectors = ReturnType; diff --git a/x-pack/plugins/cases/server/client/user_actions/connectors.ts b/x-pack/plugins/cases/server/client/user_actions/connectors.ts index d3079d466e662..e5e3a07830a3d 100644 --- a/x-pack/plugins/cases/server/client/user_actions/connectors.ts +++ b/x-pack/plugins/cases/server/client/user_actions/connectors.ts @@ -55,6 +55,7 @@ export const getConnectors = async ( connectors, latestUserAction, userActionService, + logger, }); return GetCaseConnectorsResponseRt.encode(results); @@ -121,23 +122,39 @@ const getConnectorsInfo = async ({ latestUserAction, actionsClient, userActionService, + logger, }: { caseId: string; connectors: CaseConnectorActivity[]; latestUserAction?: SavedObject; actionsClient: PublicMethodsOf; userActionService: CaseUserActionService; + logger: CasesClientArgs['logger']; }): Promise => { const connectorIds = connectors.map((connector) => connector.connectorId); const [pushInfo, actionConnectors] = await Promise.all([ getEnrichedPushInfo({ caseId, activity: connectors, userActionService }), - actionsClient.getBulk(connectorIds), + await getActionConnectors(actionsClient, logger, connectorIds), ]); return createConnectorInfoResult({ actionConnectors, connectors, pushInfo, latestUserAction }); }; +const getActionConnectors = async ( + actionsClient: PublicMethodsOf, + logger: CasesClientArgs['logger'], + ids: string[] +): Promise => { + try { + return await actionsClient.getBulk(ids); + } catch (error) { + // silent error and log it + logger.error(`Failed to retrieve action connectors in the get case connectors route: ${error}`); + return []; + } +}; + interface PushDetails { connectorId: string; externalService: CaseExternalServiceBasic; @@ -253,10 +270,12 @@ const createConnectorInfoResult = ({ latestUserAction?: SavedObject; }) => { const results: GetCaseConnectorsResponse = {}; + const actionConnectorsMap = new Map( + actionConnectors.map((actionConnector) => [actionConnector.id, { ...actionConnector }]) + ); - for (let i = 0; i < connectors.length; i++) { - const connectorDetails = actionConnectors[i]; - const aggregationConnector = connectors[i]; + for (const aggregationConnector of connectors) { + const connectorDetails = actionConnectorsMap.get(aggregationConnector.connectorId); const connector = getConnectorInfoFromSavedObject(aggregationConnector.fields); const latestUserActionCreatedAt = getDate(latestUserAction?.attributes.created_at); @@ -271,7 +290,7 @@ const createConnectorInfoResult = ({ results[connector.id] = { ...connector, - name: connectorDetails.name, + name: connectorDetails?.name ?? connector.name, push: { needsToBePushed, hasBeenPushed: hasBeenPushed(enrichedPushInfo), diff --git a/x-pack/plugins/file_upload/public/components/__snapshots__/import_complete_view.test.tsx.snap b/x-pack/plugins/file_upload/public/components/__snapshots__/import_complete_view.test.tsx.snap new file mode 100644 index 0000000000000..d24f877c21cb6 --- /dev/null +++ b/x-pack/plugins/file_upload/public/components/__snapshots__/import_complete_view.test.tsx.snap @@ -0,0 +1,519 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Should render error when upload fails from elasticsearch request failure 1`] = ` + + +

+ Error: simulated elasticsearch request failure +

+
+ + + +

+ Import response +

+
+
+ + + + + +
+
+ +
+ +
+`; + +exports[`Should render error when upload fails from http request timeout 1`] = ` + + +

+ Error: simulated http request timeout +

+
+ + + +

+ Import response +

+
+
+ + + + + +
+
+ +
+ +
+`; + +exports[`Should render success 1`] = ` + + +

+ Indexed 10 features. +

+
+ + + +

+ Import response +

+
+
+ + + + + +
+
+ +
+ + + + +

+ Data view response +

+
+
+ + + + + +
+
+ +
+ + +

+ + + + +

+
+
+`; + +exports[`Should render warning when some features failed import 1`] = ` + + +

+ Unable to index 1 of 10 features. +

+
+ + + +

+ Import response +

+
+
+ + + + + +
+
+ +
+ + + + +

+ Data view response +

+
+
+ + + + + +
+
+ +
+ + +

+ + + + +

+
+
+`; diff --git a/x-pack/plugins/file_upload/public/components/geo_upload_wizard.tsx b/x-pack/plugins/file_upload/public/components/geo_upload_wizard.tsx index 0c7f09c56f36f..b3d1711b1d2a8 100644 --- a/x-pack/plugins/file_upload/public/components/geo_upload_wizard.tsx +++ b/x-pack/plugins/file_upload/public/components/geo_upload_wizard.tsx @@ -17,6 +17,7 @@ import { ImportResults } from '../importer'; import { GeoFileImporter } from '../importer/geo'; import type { Settings } from '../../common/types'; import { hasImportPermission } from '../api'; +import { getPartialImportMessage } from './utils'; enum PHASE { CONFIGURE = 'CONFIGURE', @@ -175,6 +176,25 @@ export class GeoUploadWizard extends Component }); this.props.onUploadError(); return; + } else if (importResults.docCount === importResults.failures?.length) { + this.setState({ + // Force importResults into failure shape when no features are indexed + importResults: { + ...importResults, + success: false, + error: { + error: { + reason: getPartialImportMessage( + importResults.failures!.length, + importResults.docCount + ), + }, + }, + }, + phase: PHASE.COMPLETE, + }); + this.props.onUploadError(); + return; } // diff --git a/x-pack/plugins/file_upload/public/components/import_complete_view.test.tsx b/x-pack/plugins/file_upload/public/components/import_complete_view.test.tsx new file mode 100644 index 0000000000000..a31d8dcd04b84 --- /dev/null +++ b/x-pack/plugins/file_upload/public/components/import_complete_view.test.tsx @@ -0,0 +1,115 @@ +/* + * 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 { shallow } from 'enzyme'; + +import { ImportCompleteView } from './import_complete_view'; + +jest.mock('../kibana_services', () => ({ + get: jest.fn(), + getDocLinks: () => { + return { + links: { + maps: { + importGeospatialPrivileges: 'linkToPrvilegesDocs', + }, + }, + }; + }, + getHttp: () => { + return { + basePath: { + prepend: (path: string) => `abc${path}`, + }, + }; + }, + getUiSettings: () => { + return { + get: jest.fn(), + }; + }, +})); + +test('Should render success', () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); +}); + +test('Should render warning when some features failed import', () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); +}); + +test('Should render error when upload fails from http request timeout', () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); +}); + +test('Should render error when upload fails from elasticsearch request failure', () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); +}); diff --git a/x-pack/plugins/file_upload/public/components/import_complete_view.tsx b/x-pack/plugins/file_upload/public/components/import_complete_view.tsx index 46f566eb27e2e..f95aee869f93d 100644 --- a/x-pack/plugins/file_upload/public/components/import_complete_view.tsx +++ b/x-pack/plugins/file_upload/public/components/import_complete_view.tsx @@ -22,6 +22,7 @@ import { import { CodeEditor, KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { getDocLinks, getHttp, getUiSettings } from '../kibana_services'; import { ImportResults } from '../importer'; +import { getPartialImportMessage } from './utils'; const services = { uiSettings: getUiSettings(), @@ -133,7 +134,7 @@ export class ImportCompleteView extends Component { // Display http request error message reason = this.props.importResults.error.body.message; } else if (this.props.importResults?.error?.error?.reason) { - // Display elasticxsearch request error message + // Display elasticsearch request error message reason = this.props.importResults.error.error.reason; } const errorMsg = reason @@ -156,21 +157,25 @@ export class ImportCompleteView extends Component { ); } - const successMsg = i18n.translate('xpack.fileUpload.importComplete.uploadSuccessMsg', { - defaultMessage: 'Indexed {numFeatures} features.', - values: { - numFeatures: this.props.importResults.docCount, - }, - }); - - const failedFeaturesMsg = this.props.importResults.failures?.length - ? i18n.translate('xpack.fileUpload.importComplete.failedFeaturesMsg', { - defaultMessage: 'Unable to index {numFailures} features.', - values: { - numFailures: this.props.importResults.failures.length, - }, - }) - : ''; + if (this.props.importResults.failures?.length) { + return ( + +

+ {getPartialImportMessage( + this.props.importResults.failures!.length, + this.props.importResults.docCount + )} +

+
+ ); + } return ( { })} data-test-subj={STATUS_CALLOUT_DATA_TEST_SUBJ} > -

{`${successMsg} ${failedFeaturesMsg}`}

+

+ {i18n.translate('xpack.fileUpload.importComplete.uploadSuccessMsg', { + defaultMessage: 'Indexed {numFeatures} features.', + values: { + numFeatures: this.props.importResults.docCount, + }, + })} +

); } diff --git a/x-pack/plugins/file_upload/public/components/utils.ts b/x-pack/plugins/file_upload/public/components/utils.ts new file mode 100644 index 0000000000000..0b4df67f3a0ec --- /dev/null +++ b/x-pack/plugins/file_upload/public/components/utils.ts @@ -0,0 +1,27 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export function getPartialImportMessage(failedFeaturesCount: number, totalFeaturesCount?: number) { + const outOfTotalMsg = + typeof totalFeaturesCount === 'number' + ? i18n.translate('xpack.fileUpload.geoUploadWizard.outOfTotalMsg', { + defaultMessage: 'of {totalFeaturesCount}', + values: { + totalFeaturesCount, + }, + }) + : ''; + return i18n.translate('xpack.fileUpload.geoUploadWizard.partialImportMsg', { + defaultMessage: 'Unable to index {failedFeaturesCount} {outOfTotalMsg} features.', + values: { + failedFeaturesCount, + outOfTotalMsg, + }, + }); +} diff --git a/x-pack/plugins/fleet/common/constants/agent_policy.ts b/x-pack/plugins/fleet/common/constants/agent_policy.ts index 8e818ddf206cc..50cef1fbe43cf 100644 --- a/x-pack/plugins/fleet/common/constants/agent_policy.ts +++ b/x-pack/plugins/fleet/common/constants/agent_policy.ts @@ -17,6 +17,7 @@ export const AGENT_POLICY_DEFAULT_MONITORING_DATASETS = [ 'elastic_agent.elastic_agent', 'elastic_agent.apm_server', 'elastic_agent.filebeat', + 'elastic_agent.filebeat_input', 'elastic_agent.fleet_server', 'elastic_agent.metricbeat', 'elastic_agent.osquerybeat', diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts index 68b251f21e294..77bea13dda839 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts @@ -27,7 +27,6 @@ export interface GetAgentsRequest { } export interface GetAgentsResponse extends ListResult { - totalInactive: number; // deprecated in 8.x list?: Agent[]; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx index 24277e464582c..5bb69a73b3014 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx @@ -204,7 +204,7 @@ export function useOnSubmit({ packageToPackagePolicy( packageInfo, agentPolicy?.id || '', - DEFAULT_PACKAGE_POLICY.namespace, + agentPolicy?.namespace || DEFAULT_PACKAGE_POLICY.namespace, DEFAULT_PACKAGE_POLICY.name || incrementedName, DEFAULT_PACKAGE_POLICY.description, integrationToEnable diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_last_seen_inactive_agents_count.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_last_seen_inactive_agents_count.ts index ce767c82eec37..e1baf8f277ff1 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_last_seen_inactive_agents_count.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_last_seen_inactive_agents_count.ts @@ -11,7 +11,6 @@ const LOCAL_STORAGE_KEY = 'fleet.lastSeenInactiveAgentsCount'; export const useLastSeenInactiveAgentsCount = (): [number, (val: number) => void] => { const [lastSeenInactiveAgentsCount, setLastSeenInactiveAgentsCount] = useState(0); - useEffect(() => { const storageValue = localStorage.getItem(LOCAL_STORAGE_KEY); if (storageValue) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx index cefb6ae1c3f9b..57aa49019851d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.test.tsx @@ -143,7 +143,9 @@ describe('agent_list_page', () => { jest.advanceTimersByTime(65000); }); - expect(mockedSendGetAgentStatus).toHaveBeenCalledTimes(1); + // we call the status endpoint twice on page load, + // once for all inactive agents and one for the current kuery + expect(mockedSendGetAgentStatus).toHaveBeenCalledTimes(2); }); describe('selection change', () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index ee77846bce93c..6a11e6460022b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -226,7 +226,6 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { const [totalAgents, setTotalAgents] = useState(0); const [totalInactiveAgents, setTotalInactiveAgents] = useState(0); const [showAgentActivityTour, setShowAgentActivityTour] = useState({ isOpen: false }); - const getSortFieldForAPI = (field: keyof Agent): string => { if ([VERSION_FIELD, HOSTNAME_FIELD].includes(field as string)) { return `${field}.keyword`; @@ -275,7 +274,12 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { isLoadingVar.current = true; try { setIsLoading(true); - const [agentsResponse, agentsStatusResponse, agentTagsResponse] = await Promise.all([ + const [ + agentsResponse, + agentsStatusResponse, + totalInactiveAgentsResponse, + agentTagsResponse, + ] = await Promise.all([ sendGetAgents({ page: pagination.currentPage, perPage: pagination.pageSize, @@ -289,6 +293,9 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { sendGetAgentStatus({ kuery: kuery && kuery !== '' ? kuery : undefined, }), + sendGetAgentStatus({ + kuery: AgentStatusKueryHelper.buildKueryForInactiveAgents(), + }), sendGetAgentTags({ kuery: kuery && kuery !== '' ? kuery : undefined, showInactive, @@ -308,7 +315,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { if (agentsStatusResponse.error) { throw agentsStatusResponse.error; } - if (!agentsStatusResponse.data) { + if (!agentsStatusResponse.data || !totalInactiveAgentsResponse.data) { throw new Error('Invalid GET /agents_status response'); } if (agentTagsResponse.error) { @@ -339,7 +346,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { setAgents(agentsResponse.data.items); setTotalAgents(agentsResponse.data.total); - setTotalInactiveAgents(agentsResponse.data.totalInactive); + setTotalInactiveAgents(totalInactiveAgentsResponse.data.results.inactive || 0); } catch (error) { notifications.toasts.addError(error, { title: i18n.translate('xpack.fleet.agentList.errorFetchingDataTitle', { diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index bb43d32b6cfaf..a44f17547d60b 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -186,10 +186,9 @@ export const getAgentsHandler: RequestHandler< kuery: request.query.kuery, sortField: request.query.sortField, sortOrder: request.query.sortOrder, - getTotalInactive: request.query.showInactive, }); - const { total, page, perPage, totalInactive = 0 } = agentRes; + const { total, page, perPage } = agentRes; let { agents } = agentRes; // Assign metrics @@ -201,7 +200,6 @@ export const getAgentsHandler: RequestHandler< list: agents, // deprecated items: agents, total, - totalInactive, page, perPage, }; diff --git a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/monitoring_permissions.test.ts.snap b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/monitoring_permissions.test.ts.snap index 3917a7d71533b..49a11c226ce49 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/monitoring_permissions.test.ts.snap +++ b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/monitoring_permissions.test.ts.snap @@ -109,6 +109,7 @@ Object { "logs-elastic_agent.elastic_agent-testnamespace123", "logs-elastic_agent.apm_server-testnamespace123", "logs-elastic_agent.filebeat-testnamespace123", + "logs-elastic_agent.filebeat_input-testnamespace123", "logs-elastic_agent.fleet_server-testnamespace123", "logs-elastic_agent.metricbeat-testnamespace123", "logs-elastic_agent.osquerybeat-testnamespace123", @@ -122,6 +123,7 @@ Object { "metrics-elastic_agent.elastic_agent-testnamespace123", "metrics-elastic_agent.apm_server-testnamespace123", "metrics-elastic_agent.filebeat-testnamespace123", + "metrics-elastic_agent.filebeat_input-testnamespace123", "metrics-elastic_agent.fleet_server-testnamespace123", "metrics-elastic_agent.metricbeat-testnamespace123", "metrics-elastic_agent.osquerybeat-testnamespace123", @@ -152,6 +154,7 @@ Object { "logs-elastic_agent.elastic_agent-testnamespace123", "logs-elastic_agent.apm_server-testnamespace123", "logs-elastic_agent.filebeat-testnamespace123", + "logs-elastic_agent.filebeat_input-testnamespace123", "logs-elastic_agent.fleet_server-testnamespace123", "logs-elastic_agent.metricbeat-testnamespace123", "logs-elastic_agent.osquerybeat-testnamespace123", @@ -182,6 +185,7 @@ Object { "metrics-elastic_agent.elastic_agent-testnamespace123", "metrics-elastic_agent.apm_server-testnamespace123", "metrics-elastic_agent.filebeat-testnamespace123", + "metrics-elastic_agent.filebeat_input-testnamespace123", "metrics-elastic_agent.fleet_server-testnamespace123", "metrics-elastic_agent.metricbeat-testnamespace123", "metrics-elastic_agent.osquerybeat-testnamespace123", diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index cd86b5fdf68e7..3445aa36da42e 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -194,7 +194,6 @@ export async function getAgentsByKuery( soClient: SavedObjectsClientContract, options: ListWithKuery & { showInactive: boolean; - getTotalInactive?: boolean; sortField?: string; sortOrder?: 'asc' | 'desc'; pitId?: string; @@ -205,7 +204,6 @@ export async function getAgentsByKuery( total: number; page: number; perPage: number; - totalInactive?: number; }> { const { page = 1, @@ -217,7 +215,6 @@ export async function getAgentsByKuery( showUpgradeable, searchAfter, pitId, - getTotalInactive = false, } = options; const filters = []; @@ -239,7 +236,7 @@ export async function getAgentsByKuery( ? [{ 'local_metadata.host.hostname.keyword': { order: 'asc' } }] : []; const queryAgents = async (from: number, size: number) => - esClient.search({ + esClient.search({ from, size, track_total_hits: true, @@ -260,13 +257,6 @@ export async function getAgentsByKuery( ignore_unavailable: true, }), ...(pitId && searchAfter ? { search_after: searchAfter, from: 0 } : {}), - ...(getTotalInactive && { - aggregations: { - totalInactive: { - filter: { bool: { must: { terms: { status: ['inactive', 'unenrolled'] } } } }, - }, - }, - }), }); let res; try { @@ -278,10 +268,6 @@ export async function getAgentsByKuery( let agents = res.hits.hits.map(searchHitToAgent); let total = res.hits.total as number; - let totalInactive = 0; - if (getTotalInactive && res.aggregations) { - totalInactive = res.aggregations?.totalInactive?.doc_count ?? 0; - } // filtering for a range on the version string will not work, // nor does filtering on a flattened field (local_metadata), so filter here if (showUpgradeable) { @@ -308,7 +294,6 @@ export async function getAgentsByKuery( total, page, perPage, - ...(getTotalInactive && { totalInactive }), }; } diff --git a/x-pack/plugins/index_management/__jest__/a11y/indices_tab.a11y.test.ts b/x-pack/plugins/index_management/__jest__/a11y/indices_tab.a11y.test.ts index e6c071225316f..89717134002ec 100644 --- a/x-pack/plugins/index_management/__jest__/a11y/indices_tab.a11y.test.ts +++ b/x-pack/plugins/index_management/__jest__/a11y/indices_tab.a11y.test.ts @@ -53,7 +53,8 @@ describe('A11y Indices tab', () => { await expectToBeAccessible(component); }); - describe('index details flyout', () => { + // FLAKY: https://github.com/elastic/kibana/issues/128836 + describe.skip('index details flyout', () => { beforeEach(async () => { httpRequestsMockHelpers.setLoadIndicesResponse([ createNonDataStreamIndex('non-data-stream-test-index'), diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts index 4c310b5efa5d3..1d3301bd050e6 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/util.ts @@ -107,7 +107,7 @@ export function getOperationParams( }, {}); } -function getTypeI18n(type: string) { +export function getTypeI18n(type: string) { if (type === 'number') { return i18n.translate('xpack.lens.formula.number', { defaultMessage: 'number' }); } diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts index 0951f950310cb..364103ed3e365 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/formula/validation.ts @@ -23,6 +23,7 @@ import { findMathNodes, findVariables, getOperationParams, + getTypeI18n, getValueOrName, groupArgsByType, isMathNode, @@ -121,6 +122,8 @@ export interface ErrorWrapper { severity?: 'error' | 'warning'; } +const DEFAULT_RETURN_TYPE = getTypeI18n('number'); + function getNodeLocation(node: TinymathFunction): TinymathLocation[] { return [node.location].filter(nonNullable); } @@ -131,11 +134,11 @@ function getArgumentType(arg: TinymathAST, operations: Record ({ hits: { hits: [{ fields: { x: [1], y: [2] } }, { fields: { x: [2], y: [3] } }] }, })); @@ -21,6 +25,26 @@ jest.mock('../../contexts/kibana', () => ({ useMlApiContext: () => ({ esSearch: mockEsSearch, }), + useMlKibana: () => ({ + services: { + application: { + navigateToApp: jest.fn(), + }, + data: { + query: { + filterManager: mockFilterManager, + timefilter: { + timefilter: { + getTime: jest.fn(() => { + return { from: '', to: '' }; + }), + getRefreshInterval: jest.fn(), + }, + }, + }, + }, + }, + }), })); const mockEuiTheme = euiThemeLight; diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index e822d2ebd91d7..6e718e0f0ccd8 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import React, { useMemo, useEffect, useState, FC } from 'react'; - +import React, { useMemo, useEffect, useState, FC, useCallback } from 'react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import rison from '@kbn/rison'; import { EuiCallOut, @@ -17,12 +17,14 @@ import { EuiFlexItem, EuiFormRow, EuiIconTip, + EuiLink, EuiSelect, EuiSpacer, EuiSwitch, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { Query } from '@kbn/data-plugin/common/query'; import { DataView } from '@kbn/data-views-plugin/public'; import { stringHash } from '@kbn/ml-string-hash'; @@ -31,7 +33,7 @@ import { isRuntimeMappings } from '../../../../common/util/runtime_field_utils'; import { RuntimeMappings } from '../../../../common/types/fields'; import { getCombinedRuntimeMappings } from '../data_grid'; -import { useMlApiContext } from '../../contexts/kibana'; +import { useMlApiContext, useMlKibana } from '../../contexts/kibana'; import { getProcessedFields } from '../data_grid'; import { useCurrentEuiTheme } from '../color_range_legend'; @@ -101,6 +103,7 @@ export interface ScatterplotMatrixProps { searchQuery?: estypes.QueryDslQueryContainer; runtimeMappings?: RuntimeMappings; indexPattern?: DataView; + query?: Query; } export const ScatterplotMatrix: FC = ({ @@ -112,9 +115,13 @@ export const ScatterplotMatrix: FC = ({ searchQuery, runtimeMappings, indexPattern, + query, }) => { const { esSearch } = useMlApiContext(); - + const kibana = useMlKibana(); + const { + services: { application, data }, + } = kibana; // dynamicSize is optionally used for outlier charts where the scatterplot marks // are sized according to outlier_score const [dynamicSize, setDynamicSize] = useState(false); @@ -142,6 +149,8 @@ export const ScatterplotMatrix: FC = ({ { items: any[]; backgroundItems: any[]; columns: string[]; messages: string[] } | undefined >(); + const { euiTheme } = useCurrentEuiTheme(); + // formats the array of field names for EuiComboBox const fieldOptions = useMemo( () => @@ -172,7 +181,77 @@ export const ScatterplotMatrix: FC = ({ setDynamicSize(!dynamicSize); }; - const { euiTheme } = useCurrentEuiTheme(); + const getCustomVisualizationLink = useCallback(() => { + const { columns } = splom!; + const outlierScoreField = + resultsField !== undefined ? `${resultsField}.${OUTLIER_SCORE_FIELD}` : undefined; + const vegaSpec = getScatterplotMatrixVegaLiteSpec( + true, + [], + [], + columns, + euiTheme, + resultsField, + color, + legendType, + dynamicSize + ); + + vegaSpec.$schema = 'https://vega.github.io/schema/vega-lite/v5.json'; + vegaSpec.title = `Scatterplot matrix for ${index}`; + + const fieldsToFetch = [ + ...columns, + // Add outlier_score field in fetch if it's available so custom visualization can use it + ...(outlierScoreField ? [outlierScoreField] : []), + // Add field to color code by in fetch so custom visualization can use it - usually for classfication jobs + ...(color ? [color] : []), + ]; + + vegaSpec.data = { + url: { + '%context%': true, + ...(indexPattern?.timeFieldName + ? { ['%timefield%']: `${indexPattern?.timeFieldName}` } + : {}), + index, + body: { + fields: fieldsToFetch, + size: fetchSize, + _source: false, + }, + }, + format: { property: 'hits.hits' }, + }; + + const globalState = encodeURIComponent( + rison.encode({ + filters: data.query.filterManager.getFilters(), + refreshInterval: data.query.timefilter.timefilter.getRefreshInterval(), + time: data.query.timefilter.timefilter.getTime(), + }) + ); + + const appState = encodeURIComponent( + rison.encode({ + filters: [], + linked: false, + query, + uiState: {}, + vis: { + aggs: [], + params: { + spec: JSON.stringify(vegaSpec, null, 2), + }, + }, + }) + ); + + const basePath = `/create?type=vega&_g=${globalState}&_a=${appState}`; + + return { path: basePath }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [splom]); useEffect(() => { if (fields.length === 0) { @@ -316,6 +395,7 @@ export const ScatterplotMatrix: FC = ({ const { items, backgroundItems, columns } = splom; return getScatterplotMatrixVegaLiteSpec( + false, items, backgroundItems, columns, @@ -442,6 +522,29 @@ export const ScatterplotMatrix: FC = ({ )} + {splom ? ( + + { + const customVisLink = getCustomVisualizationLink(); + await application.navigateToApp('visualize#', { + path: customVisLink.path, + openInNewTab: false, + }); + }} + data-test-subj="mlSplomoExploreInCustomVisualizationLink" + > + + + + ) : null} {splom.messages.length > 0 && ( diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts index 0fbe08dd24af7..dfa2389c6e0a5 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts @@ -26,7 +26,7 @@ import { describe('getColorSpec()', () => { it('should return only user selection conditions and the default color for non-outlier specs', () => { - const colorSpec = getColorSpec(euiThemeLight); + const colorSpec = getColorSpec(false, euiThemeLight); expect(colorSpec).toEqual({ condition: [{ selection: USER_SELECTION }, { selection: SINGLE_POINT_CLICK }], @@ -35,7 +35,7 @@ describe('getColorSpec()', () => { }); it('should return user selection condition and conditional spec for outliers', () => { - const colorSpec = getColorSpec(euiThemeLight, 'outlier_score'); + const colorSpec = getColorSpec(false, euiThemeLight, 'outlier_score'); expect(colorSpec).toEqual({ condition: { @@ -53,7 +53,13 @@ describe('getColorSpec()', () => { it('should return user selection condition and a field based spec for non-outlier specs with legendType supplied', () => { const colorName = 'the-color-field'; - const colorSpec = getColorSpec(euiThemeLight, undefined, colorName, LEGEND_TYPES.NOMINAL); + const colorSpec = getColorSpec( + false, + euiThemeLight, + undefined, + colorName, + LEGEND_TYPES.NOMINAL + ); expect(colorSpec).toEqual({ condition: { @@ -70,10 +76,18 @@ describe('getColorSpec()', () => { }); describe('getScatterplotMatrixVegaLiteSpec()', () => { + const forCustomLink = false; + it('should return the default spec for non-outliers without a legend', () => { const data = [{ x: 1, y: 1 }]; - const vegaLiteSpec = getScatterplotMatrixVegaLiteSpec(data, [], ['x', 'y'], euiThemeLight); + const vegaLiteSpec = getScatterplotMatrixVegaLiteSpec( + forCustomLink, + data, + [], + ['x', 'y'], + euiThemeLight + ); const specForegroundLayer = vegaLiteSpec.spec.layer[0]; // A valid Vega Lite spec shouldn't throw an error when compiled. @@ -103,6 +117,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { const data = [{ x: 1, y: 1 }]; const vegaLiteSpec = getScatterplotMatrixVegaLiteSpec( + forCustomLink, data, [], ['x', 'y'], @@ -151,6 +166,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { const data = [{ x: 1, y: 1 }]; const vegaLiteSpec = getScatterplotMatrixVegaLiteSpec( + forCustomLink, data, [], ['x', 'y'], @@ -196,6 +212,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { const data = [{ ['x.a']: 1, ['y[a]']: 1 }]; const vegaLiteSpec = getScatterplotMatrixVegaLiteSpec( + forCustomLink, data, [], ['x.a', 'y[a]'], diff --git a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts index de29332f57ef6..31ec6403b8fd0 100644 --- a/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts +++ b/x-pack/plugins/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts @@ -29,8 +29,10 @@ export const COLOR_SELECTION = euiPaletteColorBlind()[2]; export const COLOR_RANGE_OUTLIER = [euiPaletteColorBlind()[1], euiPaletteColorBlind()[2]]; export const COLOR_RANGE_NOMINAL = euiPaletteColorBlind({ rotations: 2 }); export const COLOR_RANGE_QUANTITATIVE = euiPalettePositive(5); +const CUSTOM_VIS_FIELDS_PATH = 'fields'; export const getColorSpec = ( + forCustomVisLink: boolean, euiTheme: typeof euiThemeLight, escapedOutlierScoreField?: string, color?: string, @@ -58,7 +60,10 @@ export const getColorSpec = ( return { condition: { selection: USER_SELECTION, - field: getEscapedVegaFieldName(color ?? '00FF00'), + field: `${forCustomVisLink ? `${CUSTOM_VIS_FIELDS_PATH}.` : ''}${getEscapedVegaFieldName( + color ?? '00FF00' + // When creating the custom link - this field is returned in an array so we need to access it + )}${forCustomVisLink ? '[0]' : ''}`, type: legendType, scale: { range: @@ -76,6 +81,7 @@ export const getColorSpec = ( }; const getVegaSpecLayer = ( + forCustomVisLink: boolean, isBackground: boolean, values: VegaValue[], colorSpec: any, @@ -117,7 +123,8 @@ const getVegaSpecLayer = ( }; return { - data: { values: [...values] }, + // Don't need to add static data for custom vis links + ...(forCustomVisLink ? {} : { data: { values: [...values] } }), mark: { ...(outliers && dynamicSize ? { @@ -133,7 +140,9 @@ const getVegaSpecLayer = ( ? { transform: [ { - calculate: `datum['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff`, + calculate: `datum${ + forCustomVisLink ? `.${CUSTOM_VIS_FIELDS_PATH}` : '' + }['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff`, as: 'is_outlier', }, ], @@ -154,7 +163,9 @@ const getVegaSpecLayer = ( opacity: { condition: { value: 1, - test: `(datum['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff)`, + test: `(datum${ + forCustomVisLink ? `.${CUSTOM_VIS_FIELDS_PATH}` : '' + }['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff)`, }, value: 0.5, }, @@ -162,19 +173,27 @@ const getVegaSpecLayer = ( : {}), ...(outliers ? { - order: { field: escapedOutlierScoreField }, + order: { + field: `${ + forCustomVisLink ? `${CUSTOM_VIS_FIELDS_PATH}.` : '' + }${escapedOutlierScoreField}`, + }, size: { ...(!dynamicSize ? { condition: { value: 40, - test: `(datum['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff)`, + test: `(datum${ + forCustomVisLink ? `.${CUSTOM_VIS_FIELDS_PATH}` : '' + }['${escapedOutlierScoreField}'] >= mlOutlierScoreThreshold.cutoff)`, }, value: 8, } : { type: LEGEND_TYPES.QUANTITATIVE, - field: escapedOutlierScoreField, + field: `${ + forCustomVisLink ? `${CUSTOM_VIS_FIELDS_PATH}.` : '' + }${escapedOutlierScoreField}`, scale: { type: 'linear', range: [8, 200], @@ -197,7 +216,14 @@ const getVegaSpecLayer = ( tooltip: [ ...(color !== undefined ? // @ts-ignore - [{ type: colorSpec.condition.type, field: getEscapedVegaFieldName(color) }] + [ + { + type: colorSpec.condition.type, + field: `${ + forCustomVisLink ? `${CUSTOM_VIS_FIELDS_PATH}.` : '' + }${getEscapedVegaFieldName(color)}`, + }, + ] : []), ...vegaColumns.map((d) => ({ type: LEGEND_TYPES.QUANTITATIVE, @@ -207,7 +233,9 @@ const getVegaSpecLayer = ( ? [ { type: LEGEND_TYPES.QUANTITATIVE, - field: escapedOutlierScoreField, + field: `${ + forCustomVisLink ? `${CUSTOM_VIS_FIELDS_PATH}.` : '' + }${escapedOutlierScoreField}`, format: '.3f', }, ] @@ -215,21 +243,22 @@ const getVegaSpecLayer = ( ], }, ...(isBackground ? {} : selection), - width: SCATTERPLOT_SIZE, - height: SCATTERPLOT_SIZE, + ...(forCustomVisLink ? {} : { width: SCATTERPLOT_SIZE }), + ...(forCustomVisLink ? {} : { height: SCATTERPLOT_SIZE }), }; }; // Escapes the characters .[] in field names with double backslashes // since VEGA treats dots/brackets in field names as nested values. // See https://vega.github.io/vega-lite/docs/field.html for details. -function getEscapedVegaFieldName(fieldName: string) { - return fieldName.replace(/([\.|\[|\]])/g, '\\$1'); +function getEscapedVegaFieldName(fieldName: string, prependString: string = '') { + return `${prependString}${fieldName.replace(/([\.|\[|\]])/g, '\\$1')}`; } type VegaValue = Record; export const getScatterplotMatrixVegaLiteSpec = ( + forCustomVisLink: boolean, values: VegaValue[], backgroundValues: VegaValue[], columns: string[], @@ -240,12 +269,15 @@ export const getScatterplotMatrixVegaLiteSpec = ( dynamicSize?: boolean ): TopLevelSpec => { const vegaValues = values; - const vegaColumns = columns.map(getEscapedVegaFieldName); + const vegaColumns = columns.map((column) => + getEscapedVegaFieldName(column, forCustomVisLink ? 'fields.' : '') + ); const outliers = resultsField !== undefined; const escapedOutlierScoreField = `${resultsField}\\.${OUTLIER_SCORE_FIELD}`; const colorSpec = getColorSpec( + forCustomVisLink, euiTheme, resultsField && escapedOutlierScoreField, color, @@ -282,6 +314,7 @@ export const getScatterplotMatrixVegaLiteSpec = ( spec: { layer: [ getVegaSpecLayer( + forCustomVisLink, false, vegaValues, colorSpec, @@ -298,6 +331,7 @@ export const getScatterplotMatrixVegaLiteSpec = ( if (backgroundValues.length) { schema.spec.layer.unshift( getVegaSpecLayer( + forCustomVisLink, true, backgroundValues, colorSpec, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_page_wrapper/exploration_page_wrapper.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_page_wrapper/exploration_page_wrapper.tsx index c10c3e67be443..6cb860557b719 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_page_wrapper/exploration_page_wrapper.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_page_wrapper/exploration_page_wrapper.tsx @@ -225,6 +225,7 @@ export const ExplorationPageWrapper: FC = ({ = React.memo(({ jobId }) = index={jobConfig?.dest.index} resultsField={jobConfig?.dest.results_field} searchQuery={searchQuery} + query={query} /> )} {showLegacyFeatureInfluenceFormatCallout && ( diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx index fcd413b301108..4b482e2de1ed8 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.test.tsx @@ -55,6 +55,7 @@ const getMockedTimefilter = () => { enableAutoRefreshSelector: jest.fn(), getRefreshInterval: jest.fn(), setRefreshInterval: jest.fn(), + getActiveBounds: jest.fn(), getTime: jest.fn(), isAutoRefreshSelectorEnabled: jest.fn(), isTimeRangeSelectorEnabled: jest.fn(), @@ -68,7 +69,7 @@ const getMockedTimefilter = () => { }; }; -const getMockedDatePickeDependencies = () => { +const getMockedDatePickerDependencies = () => { return { data: { query: { @@ -138,7 +139,7 @@ describe('TimeSeriesExplorerUrlStateManager', () => { render( - + diff --git a/x-pack/plugins/observability/public/data/slo/slo.ts b/x-pack/plugins/observability/public/data/slo/slo.ts index 6d22027b908fd..047083c28986c 100644 --- a/x-pack/plugins/observability/public/data/slo/slo.ts +++ b/x-pack/plugins/observability/public/data/slo/slo.ts @@ -92,7 +92,7 @@ export const sloList: FindSLOResponse = { }, { ...baseSlo, - id: 'c0f8d669-9177-4706-9098-f397a88173a6', + id: 'c0f8d669-9277-4706-9098-f397a88173a6', summary: buildViolatedSummary(), timeWindow: buildRollingTimeWindow({ duration: '7d' }), }, diff --git a/x-pack/plugins/observability/public/hooks/slo/use_create_slo.ts b/x-pack/plugins/observability/public/hooks/slo/use_create_slo.ts index 31f8202c3c77e..1b810117fa288 100644 --- a/x-pack/plugins/observability/public/hooks/slo/use_create_slo.ts +++ b/x-pack/plugins/observability/public/hooks/slo/use_create_slo.ts @@ -41,6 +41,9 @@ export function useCreateOrUpdateSlo(): UseCreateOrUpdateSlo { setSuccess(true); } catch (e) { setError(e); + } finally { + setSuccess(false); + setLoading(false); } }, [http] @@ -58,6 +61,9 @@ export function useCreateOrUpdateSlo(): UseCreateOrUpdateSlo { setSuccess(true); } catch (e) { setError(e); + } finally { + setSuccess(false); + setLoading(false); } }, [http] diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list.tsx index e91d42fb5b438..ac7785cd4921c 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list.tsx @@ -24,11 +24,11 @@ export function SloList() { const [sort, setSort] = useState('name'); const [indicatorTypeFilter, setIndicatorTypeFilter] = useState([]); - const [deleting, setIsDeleting] = useState(false); + const [isCloningOrDeleting, setIsCloningOrDeleting] = useState(false); const [shouldReload, setShouldReload] = useState(false); const { - loading, + loading: isLoadingSloList, error, sloList: { results: sloList = [], total, perPage }, } = useFetchSloList({ @@ -42,16 +42,19 @@ export function SloList() { useEffect(() => { if (shouldReload) { setShouldReload(false); - setIsDeleting(false); } - }, [shouldReload]); - const handleDeleted = () => { - setShouldReload(true); + if (!isLoadingSloList) { + setIsCloningOrDeleting(false); + } + }, [isLoadingSloList, shouldReload]); + + const handleCloningOrDeleting = () => { + setIsCloningOrDeleting(true); }; - const handleDeleting = () => { - setIsDeleting(true); + const handleClonedOrDeleted = () => { + setShouldReload(true); }; const handlePageClick = (pageNumber: number) => { @@ -79,7 +82,7 @@ export function SloList() { diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx index 17d7c74ccc066..9eaec700ba3cf 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx @@ -29,6 +29,10 @@ const Template: ComponentStory = (props: SloListItemProps) => const defaultProps = { slo: buildSlo(), historicalSummary: historicalSummaryData[HEALTHY_ROLLING_SLO], + onCloned: () => {}, + onCloning: () => {}, + onDeleted: () => {}, + onDeleting: () => {}, }; export const SloListItem = Template.bind({}); diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.tsx index 0ea2f14a97352..03d5b5326e3a6 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { EuiButtonIcon, EuiContextMenuItem, @@ -20,15 +20,22 @@ import { i18n } from '@kbn/i18n'; import { HistoricalSummaryResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { useKibana } from '../../../utils/kibana_react'; +import { useCreateOrUpdateSlo } from '../../../hooks/slo/use_create_slo'; import { SloSummary } from './slo_summary'; import { SloDeleteConfirmationModal } from './slo_delete_confirmation_modal'; import { SloBadges } from './badges/slo_badges'; +import { + transformSloResponseToCreateSloInput, + transformValuesToCreateSLOInput, +} from '../../slo_edit/helpers/process_slo_form_values'; import { paths } from '../../../config'; export interface SloListItemProps { slo: SLOWithSummaryResponse; historicalSummary?: HistoricalSummaryResponse[]; historicalSummaryLoading: boolean; + onCloned: () => void; + onCloning: () => void; onDeleted: () => void; onDeleting: () => void; } @@ -37,6 +44,8 @@ export function SloListItem({ slo, historicalSummary = [], historicalSummaryLoading, + onCloned, + onCloning, onDeleted, onDeleting, }: SloListItemProps) { @@ -45,6 +54,8 @@ export function SloListItem({ http: { basePath }, } = useKibana().services; + const { createSlo, loading: isCloning, success: isCloned } = useCreateOrUpdateSlo(); + const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false); const [isDeleteConfirmationModalOpen, setDeleteConfirmationModalOpen] = useState(false); const [isDeleting, setIsDeleting] = useState(false); @@ -57,6 +68,15 @@ export function SloListItem({ navigateToUrl(basePath.prepend(paths.observability.sloEdit(slo.id))); }; + const handleClone = () => { + const newSlo = transformValuesToCreateSLOInput( + transformSloResponseToCreateSloInput({ ...slo, name: `[Copy] ${slo.name}` })! + ); + + createSlo(newSlo); + setIsActionsPopoverOpen(false); + }; + const handleDelete = () => { setDeleteConfirmationModalOpen(true); setIsDeleting(true); @@ -73,12 +93,23 @@ export function SloListItem({ onDeleted(); }; + useEffect(() => { + if (isCloning) { + onCloning(); + } + + if (isCloned) { + onCloned(); + } + }, [isCloned, isCloning, onCloned, onCloning]); + return ( {/* CONTENT */} @@ -124,12 +155,32 @@ export function SloListItem({ + {i18n.translate('xpack.observability.slos.slo.item.actions.edit', { defaultMessage: 'Edit', })} , - + + {i18n.translate('xpack.observability.slos.slo.item.actions.clone', { + defaultMessage: 'Clone', + })} + , + {i18n.translate('xpack.observability.slos.slo.item.actions.delete', { defaultMessage: 'Delete', })} diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx index 560353e483960..d51a454d002b9 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx @@ -24,6 +24,8 @@ const defaultProps: Props = { sloList: sloList.results, loading: false, error: false, + onCloned: () => {}, + onCloning: () => {}, onDeleted: () => {}, onDeleting: () => {}, }; diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.tsx index 71ba38092e6f7..c911d8ab19774 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.tsx @@ -17,11 +17,21 @@ export interface Props { sloList: SLOWithSummaryResponse[]; loading: boolean; error: boolean; + onCloned: () => void; + onCloning: () => void; onDeleted: () => void; onDeleting: () => void; } -export function SloListItems({ sloList, loading, error, onDeleted, onDeleting }: Props) { +export function SloListItems({ + sloList, + loading, + error, + onCloned, + onCloning, + onDeleted, + onDeleting, +}: Props) { const [sloIds, setSloIds] = useState([]); useEffect(() => { setSloIds(sloList.map((slo) => slo.id)); @@ -45,6 +55,8 @@ export function SloListItems({ sloList, loading, error, onDeleted, onDeleting }: slo={slo} historicalSummary={historicalSummaryBySlo[slo.id]} historicalSummaryLoading={historicalSummaryLoading} + onCloned={onCloned} + onCloning={onCloning} onDeleted={onDeleted} onDeleting={onDeleting} /> diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_summary.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_summary.tsx index e9d90c76ae6a8..029e18e4f38db 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_summary.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_summary.tsx @@ -64,9 +64,9 @@ export function SloSummary({ slo, historicalSummary = [], historicalSummaryLoadi - + - + ({ @@ -29,14 +33,26 @@ jest.mock('../../utils/kibana_react'); jest.mock('../../hooks/use_breadcrumbs'); jest.mock('../../hooks/use_license'); jest.mock('../../hooks/slo/use_fetch_slo_list'); +jest.mock('../../hooks/slo/use_create_slo'); +jest.mock('../../hooks/slo/use_delete_slo'); jest.mock('../../hooks/slo/use_fetch_historical_summary'); const useKibanaMock = useKibana as jest.Mock; const useLicenseMock = useLicense as jest.Mock; const useFetchSloListMock = useFetchSloList as jest.Mock; +const useCreateOrUpdateSloMock = useCreateOrUpdateSlo as jest.Mock; +const useDeleteSloMock = useDeleteSlo as jest.Mock; const useFetchHistoricalSummaryMock = useFetchHistoricalSummary as jest.Mock; +const mockCreateSlo = jest.fn(); +useCreateOrUpdateSloMock.mockReturnValue({ createSlo: mockCreateSlo }); + +const mockDeleteSlo = jest.fn(); +useDeleteSloMock.mockReturnValue({ deleteSlo: mockDeleteSlo }); + const mockNavigate = jest.fn(); +const mockAddSuccess = jest.fn(); +const mockAddError = jest.fn(); const mockKibana = () => { useKibanaMock.mockReturnValue({ @@ -48,6 +64,12 @@ const mockKibana = () => { prepend: jest.fn(), }, }, + notifications: { + toasts: { + addSuccess: mockAddSuccess, + addError: mockAddError, + }, + }, }, }); }; @@ -90,9 +112,12 @@ describe('SLOs Page', () => { }); describe('when the correct license is found', () => { + beforeEach(() => { + useLicenseMock.mockReturnValue({ hasAtLeast: () => true }); + }); + it('renders nothing when the API is loading', async () => { useFetchSloListMock.mockReturnValue({ loading: true, sloList: emptySloList }); - useLicenseMock.mockReturnValue({ hasAtLeast: () => true }); const { container } = render(, config); @@ -101,16 +126,15 @@ describe('SLOs Page', () => { it('renders the SLOs Welcome Prompt when the API has finished loading and there are no results', async () => { useFetchSloListMock.mockReturnValue({ loading: false, sloList: emptySloList }); - useLicenseMock.mockReturnValue({ hasAtLeast: () => true }); render(, config); expect(screen.queryByTestId('slosPageWelcomePrompt')).toBeTruthy(); }); - it('renders the SLOs page when the API has finished loading and there are results', async () => { + it('should have a create new SLO button', () => { useFetchSloListMock.mockReturnValue({ loading: false, sloList }); - useLicenseMock.mockReturnValue({ hasAtLeast: () => true }); + useFetchHistoricalSummaryMock.mockReturnValue({ loading: false, data: historicalSummaryData, @@ -118,8 +142,96 @@ describe('SLOs Page', () => { render(, config); - expect(screen.queryByTestId('slosPage')).toBeTruthy(); - expect(screen.queryByTestId('sloList')).toBeTruthy(); + expect(screen.getByText('Create new SLO')).toBeTruthy(); + }); + + describe('when API has returned results', () => { + it('renders the SLO list with SLO items', async () => { + useFetchSloListMock.mockReturnValue({ loading: false, sloList }); + + useFetchHistoricalSummaryMock.mockReturnValue({ + loading: false, + data: historicalSummaryData, + }); + + render(, config); + + expect(screen.queryByTestId('slosPage')).toBeTruthy(); + expect(screen.queryByTestId('sloList')).toBeTruthy(); + expect(screen.queryAllByTestId('sloItem')).toBeTruthy(); + expect(screen.queryAllByTestId('sloItem').length).toBe(sloList.results.length); + }); + + it('allows editing an SLO', async () => { + useFetchSloListMock.mockReturnValue({ loading: false, sloList }); + + useFetchHistoricalSummaryMock.mockReturnValue({ + loading: false, + data: historicalSummaryData, + }); + + render(, config); + + screen.getAllByLabelText('Actions').at(0)?.click(); + + await waitForEuiPopoverOpen(); + + const button = screen.getByTestId('sloActionsEdit'); + + expect(button).toBeTruthy(); + + button.click(); + + expect(mockNavigate).toBeCalled(); + }); + + it('allows deleting an SLO', async () => { + useFetchSloListMock.mockReturnValue({ loading: false, sloList }); + + useFetchHistoricalSummaryMock.mockReturnValue({ + loading: false, + data: historicalSummaryData, + }); + + render(, config); + + screen.getAllByLabelText('Actions').at(0)?.click(); + + await waitForEuiPopoverOpen(); + + const button = screen.getByTestId('sloActionsDelete'); + + expect(button).toBeTruthy(); + + button.click(); + + screen.getByTestId('confirmModalConfirmButton').click(); + + expect(mockDeleteSlo).toBeCalledWith(sloList.results.at(0)?.id); + }); + + it('allows cloning an SLO', async () => { + useFetchSloListMock.mockReturnValue({ loading: false, sloList }); + + useFetchHistoricalSummaryMock.mockReturnValue({ + loading: false, + data: historicalSummaryData, + }); + + render(, config); + + screen.getAllByLabelText('Actions').at(0)?.click(); + + await waitForEuiPopoverOpen(); + + const button = screen.getByTestId('sloActionsClone'); + + expect(button).toBeTruthy(); + + button.click(); + + expect(mockCreateSlo).toBeCalled(); + }); }); }); }); diff --git a/x-pack/plugins/observability/server/domain/services/compute_error_budget.test.ts b/x-pack/plugins/observability/server/domain/services/compute_error_budget.test.ts index ec8aec44e78ec..b10d4abb0e33c 100644 --- a/x-pack/plugins/observability/server/domain/services/compute_error_budget.test.ts +++ b/x-pack/plugins/observability/server/domain/services/compute_error_budget.test.ts @@ -169,12 +169,12 @@ describe('computeErrorBudget', () => { it('computes the error budget with rounded values', () => { const slo = createSLO(); const dateRange = toDateRange(slo.timeWindow); - const errorBudget = computeErrorBudget(slo, { good: 333, total: 777, dateRange }); + const errorBudget = computeErrorBudget(slo, { good: 770, total: 777, dateRange }); expect(errorBudget).toEqual({ initial: 0.001, - consumed: 571.428571, // i.e. 57,142% consumed - remaining: 0, + consumed: 9.009009, // i.e. 900.90% consumed + remaining: -8.009009, // i.e. -800.90% remaining isEstimated: false, }); }); @@ -187,7 +187,7 @@ describe('computeErrorBudget', () => { expect(errorBudget).toEqual({ initial: 0.001, consumed: 1000, // i.e. 100,000% consumed - remaining: 0, + remaining: -999, isEstimated: false, }); }); diff --git a/x-pack/plugins/observability/server/domain/services/compute_error_budget.ts b/x-pack/plugins/observability/server/domain/services/compute_error_budget.ts index 61da9597c2db9..3302ac35678ee 100644 --- a/x-pack/plugins/observability/server/domain/services/compute_error_budget.ts +++ b/x-pack/plugins/observability/server/domain/services/compute_error_budget.ts @@ -95,7 +95,7 @@ export function toErrorBudget( return { initial: toHighPrecision(initial), consumed: toHighPrecision(consumed), - remaining: Math.max(toHighPrecision(1 - consumed), 0), + remaining: toHighPrecision(1 - consumed), isEstimated, }; } diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap index e7b4a068d7ae0..56bb33309ea7d 100644 --- a/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap @@ -19,7 +19,7 @@ Object { "consumed": 100, "initial": 0.001, "isEstimated": false, - "remaining": 0, + "remaining": -99, }, "sliValue": 0.9, "status": "VIOLATED", @@ -32,7 +32,7 @@ Object { "consumed": 2, "initial": 0.05, "isEstimated": false, - "remaining": 0, + "remaining": -1, }, "sliValue": 0.9, "status": "VIOLATED", diff --git a/x-pack/plugins/security_solution/cypress/e2e/cases/connector_options.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/cases/connector_options.cy.ts index 03d7d9634f830..6d07ba6acf563 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/cases/connector_options.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/cases/connector_options.cy.ts @@ -73,9 +73,7 @@ describe('Cases connector incident fields', () => { cy.get(CONNECTOR_TITLE).should('have.text', getIbmResilientConnectorOptions().title); cy.get(CONNECTOR_CARD_DETAILS).should( 'have.text', - `${ - getIbmResilientConnectorOptions().title - }Incident Types: ${getIbmResilientConnectorOptions().incidentTypes.join(', ')}Severity: ${ + `Incident Types: ${getIbmResilientConnectorOptions().incidentTypes.join(', ')}Severity: ${ getIbmResilientConnectorOptions().severity }` ); diff --git a/x-pack/plugins/security_solution/cypress/screens/case_details.ts b/x-pack/plugins/security_solution/cypress/screens/case_details.ts index 1874d7f816eda..fcd8b60557fc1 100644 --- a/x-pack/plugins/security_solution/cypress/screens/case_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/case_details.ts @@ -43,9 +43,9 @@ export const CASES_TAGS = (tagName: string) => { export const CASE_USER_ACTION = '[data-test-subj="user-action-markdown"]'; -export const CONNECTOR_CARD_DETAILS = '[data-test-subj="connector-card"]'; +export const CONNECTOR_CARD_DETAILS = '[data-test-subj="connector-card-details"]'; -export const CONNECTOR_TITLE = '[data-test-subj="connector-card"] p.euiTitle'; +export const CONNECTOR_TITLE = '[data-test-subj="connector-card-title"]'; export const DELETE_CASE_CONFIRM_BUTTON = '[data-test-subj="confirmModalConfirmButton"]'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx index 0327c7c356966..ae8d652aeaeb9 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.test.tsx @@ -27,7 +27,7 @@ import { RESPONSE_ACTION_API_COMMANDS_NAMES } from '../../../../common/endpoint/ import { useUserPrivileges as _useUserPrivileges } from '../../../common/components/user_privileges'; import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; import { waitFor } from '@testing-library/react'; -import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__'; +import { getEndpointAuthzInitialStateMock } from '../../../../common/endpoint/service/authz/mocks'; let mockUseGetEndpointActionList: { isFetched?: boolean; @@ -123,6 +123,7 @@ jest.mock('../../hooks/endpoint/use_get_endpoints_list'); jest.mock('../../../common/experimental_features_service'); jest.mock('../../../common/components/user_privileges'); +const useUserPrivilegesMock = _useUserPrivileges as jest.Mock; let mockUseGetFileInfo: { isFetching?: boolean; @@ -139,12 +140,13 @@ jest.mock('../../hooks/response_actions/use_get_file_info', () => { const mockUseGetEndpointsList = useGetEndpointsList as jest.Mock; -// FLAKY https://github.com/elastic/kibana/issues/145635 -describe.skip('Response actions history', () => { - const useUserPrivilegesMock = _useUserPrivileges as jest.Mock< - ReturnType - >; - +const getBaseMockedActionList = () => ({ + isFetched: true, + isFetching: false, + error: null, + refetch: jest.fn(), +}); +describe('Response actions history', () => { const testPrefix = 'response-actions-list'; let render: ( @@ -155,14 +157,6 @@ describe.skip('Response actions history', () => { let mockedContext: AppContextTestRender; let apiMocks: ReturnType; - const refetchFunction = jest.fn(); - const baseMockedActionList = { - isFetched: true, - isFetching: false, - error: null, - refetch: refetchFunction, - }; - beforeEach(async () => { mockedContext = createAppRootMockRenderer(); ({ history } = mockedContext); @@ -173,7 +167,7 @@ describe.skip('Response actions history', () => { }); mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 13 }), }; @@ -189,20 +183,20 @@ describe.skip('Response actions history', () => { pageSize: 50, total: 50, }); + useUserPrivilegesMock.mockReturnValue({ + endpointPrivileges: getEndpointAuthzInitialStateMock(), + }); }); afterEach(() => { - mockUseGetEndpointActionList = { - ...baseMockedActionList, - }; - jest.clearAllMocks(); - useUserPrivilegesMock.mockImplementation(getUserPrivilegesMockDefaultValue); + mockUseGetEndpointActionList = getBaseMockedActionList(); + useUserPrivilegesMock.mockReset(); }); describe('When index does not exist yet', () => { it('should show global loader when waiting for response', () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), isFetched: false, isFetching: true, }; @@ -211,7 +205,7 @@ describe.skip('Response actions history', () => { }); it('should show empty page when there is no index', () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), error: { body: { statusCode: 404, message: 'index_not_found_exception' }, }, @@ -234,7 +228,7 @@ describe.skip('Response actions history', () => { it('should show empty state when there is no data', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 0 }), }; render(); @@ -295,7 +289,7 @@ describe.skip('Response actions history', () => { }; mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data, }; render({ showHostNames: true }); @@ -316,7 +310,7 @@ describe.skip('Response actions history', () => { }; mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data, }; render({ showHostNames: true }); @@ -339,7 +333,7 @@ describe.skip('Response actions history', () => { }; mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data, }; render({ showHostNames: true }); @@ -367,7 +361,7 @@ describe.skip('Response actions history', () => { it('should update per page rows on the table', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 33 }), }; @@ -398,7 +392,7 @@ describe.skip('Response actions history', () => { it('should show 1-1 record label when only 1 record', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 1 }), }; render(); @@ -446,7 +440,7 @@ describe.skip('Response actions history', () => { it('should contain download link in expanded row for `get-file` action WITH file operation permission', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 1, commands: ['get-file'] }), }; @@ -475,7 +469,7 @@ describe.skip('Response actions history', () => { it('should show file unavailable for download for `get-file` action WITH file operation permission when file is deleted', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 1, commands: ['get-file'] }), }; @@ -507,20 +501,14 @@ describe.skip('Response actions history', () => { }); it('should not contain download link in expanded row for `get-file` action when NO file operation permission', async () => { - const privileges = useUserPrivilegesMock(); - - useUserPrivilegesMock.mockImplementationOnce(() => { - return { - ...privileges, - endpointPrivileges: { - ...privileges.endpointPrivileges, - canWriteFileOperations: false, - }, - }; + useUserPrivilegesMock.mockReturnValue({ + endpointPrivileges: getEndpointAuthzInitialStateMock({ + canWriteFileOperations: false, + }), }); mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 1, commands: ['get-file'] }), }; @@ -536,6 +524,7 @@ describe.skip('Response actions history', () => { }); it('should refresh data when autoRefresh is toggled on', async () => { + mockUseGetEndpointActionList = getBaseMockedActionList(); render(); const { getByTestId } = renderResult; @@ -550,16 +539,19 @@ describe.skip('Response actions history', () => { reactTestingLibrary.fireEvent.change(intervalInput, { target: { value: 1 } }); await reactTestingLibrary.waitFor(() => { - expect(refetchFunction).toHaveBeenCalledTimes(3); + expect(mockUseGetEndpointActionList.refetch).toHaveBeenCalledTimes(3); }); }); it('should refresh data when super date picker refresh button is clicked', async () => { + mockUseGetEndpointActionList = getBaseMockedActionList(); render(); const superRefreshButton = renderResult.getByTestId(`${testPrefix}-super-refresh-button`); userEvent.click(superRefreshButton); - expect(refetchFunction).toHaveBeenCalledTimes(1); + await waitFor(() => { + expect(mockUseGetEndpointActionList.refetch).toHaveBeenCalled(); + }); }); it('should set date picker with relative dates', async () => { @@ -592,7 +584,7 @@ describe.skip('Response actions history', () => { it('shows completed status badge for successfully completed actions', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 2 }), }; render(); @@ -609,7 +601,7 @@ describe.skip('Response actions history', () => { it('shows Failed status badge for failed actions', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 2, wasSuccessful: false, status: 'failed' }), }; render(); @@ -623,7 +615,7 @@ describe.skip('Response actions history', () => { it('shows Failed status badge for expired actions', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 2, isCompleted: false, @@ -645,7 +637,7 @@ describe.skip('Response actions history', () => { it('shows Pending status badge for pending actions', async () => { mockUseGetEndpointActionList = { - ...baseMockedActionList, + ...getBaseMockedActionList(), data: await getActionListMock({ actionCount: 2, isCompleted: false, status: 'pending' }), }; render(); @@ -693,6 +685,7 @@ describe.skip('Response actions history', () => { 'suspend-process', 'processes', 'get-file', + 'execute', ]); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifact_tabs_in_policy_details.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifact_tabs_in_policy_details.cy.ts new file mode 100644 index 0000000000000..a74eba6274034 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifact_tabs_in_policy_details.cy.ts @@ -0,0 +1,246 @@ +/* + * 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 { getEndpointSecurityPolicyManager } from '../../../../scripts/endpoint/common/roles_users/endpoint_security_policy_manager'; +import { getArtifactsListTestsData } from '../fixtures/artifacts_page'; +import { + createPerPolicyArtifact, + createArtifactList, + removeAllArtifacts, + removeExceptionsList, + yieldFirstPolicyID, +} from '../tasks/artifacts'; +import { loadEndpointDataForEventFiltersIfNeeded } from '../tasks/load_endpoint_data'; +import { login, loginWithCustomRole, loginWithRole, ROLE } from '../tasks/login'; +import { performUserActions } from '../tasks/perform_user_actions'; + +const loginWithPrivilegeAll = () => { + loginWithRole(ROLE.endpoint_security_policy_manager); +}; + +const loginWithPrivilegeRead = (privilegePrefix: string) => { + const roleWithArtifactReadPrivilege = getRoleWithArtifactReadPrivilege(privilegePrefix); + loginWithCustomRole('roleWithArtifactReadPrivilege', roleWithArtifactReadPrivilege); +}; + +const loginWithPrivilegeNone = (privilegePrefix: string) => { + const roleWithoutArtifactPrivilege = getRoleWithoutArtifactPrivilege(privilegePrefix); + loginWithCustomRole('roleWithoutArtifactPrivilege', roleWithoutArtifactPrivilege); +}; + +const getRoleWithArtifactReadPrivilege = (privilegePrefix: string) => { + const endpointSecurityPolicyManagerRole = getEndpointSecurityPolicyManager(); + + return { + ...endpointSecurityPolicyManagerRole, + kibana: [ + { + ...endpointSecurityPolicyManagerRole.kibana[0], + feature: { + ...endpointSecurityPolicyManagerRole.kibana[0].feature, + siem: [ + ...endpointSecurityPolicyManagerRole.kibana[0].feature.siem.filter( + (privilege) => privilege !== `${privilegePrefix}all` + ), + `${privilegePrefix}read`, + ], + }, + }, + ], + }; +}; + +const getRoleWithoutArtifactPrivilege = (privilegePrefix: string) => { + const endpointSecurityPolicyManagerRole = getEndpointSecurityPolicyManager(); + + return { + ...endpointSecurityPolicyManagerRole, + kibana: [ + { + ...endpointSecurityPolicyManagerRole.kibana[0], + feature: { + ...endpointSecurityPolicyManagerRole.kibana[0].feature, + siem: endpointSecurityPolicyManagerRole.kibana[0].feature.siem.filter( + (privilege) => privilege !== `${privilegePrefix}all` + ), + }, + }, + ], + }; +}; + +const visitArtifactTab = (tabId: string) => { + visitPolicyDetailsPage(); + cy.get(`#${tabId}`).click(); +}; + +const visitPolicyDetailsPage = () => { + cy.visit('/app/security/administration/policy'); + cy.getBySel('policyNameCellLink').eq(0).click({ force: true }); + cy.getBySel('policyDetailsPage').should('exist'); + cy.get('#settings').should('exist'); // waiting for Policy Settings tab +}; + +describe('Artifact tabs in Policy Details page', () => { + before(() => { + login(); + loadEndpointDataForEventFiltersIfNeeded(); + }); + + after(() => { + login(); + removeAllArtifacts(); + }); + + for (const testData of getArtifactsListTestsData()) { + beforeEach(() => { + login(); + removeExceptionsList(testData.createRequestBody.list_id); + }); + + describe(`${testData.title} tab`, () => { + it(`[NONE] User cannot see the tab for ${testData.title}`, () => { + loginWithPrivilegeNone(testData.privilegePrefix); + visitPolicyDetailsPage(); + + cy.get(`#${testData.tabId}`).should('not.exist'); + }); + + context(`Given there are no ${testData.title} entries`, () => { + it(`[READ] User CANNOT add ${testData.title} artifact`, () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); + + cy.getBySel('policy-artifacts-empty-unexisting').should('exist'); + + cy.getBySel('unexisting-manage-artifacts-button').should('not.exist'); + }); + + it(`[ALL] User can add ${testData.title} artifact`, () => { + loginWithPrivilegeAll(); + visitArtifactTab(testData.tabId); + + cy.getBySel('policy-artifacts-empty-unexisting').should('exist'); + + cy.getBySel('unexisting-manage-artifacts-button').should('exist').click(); + + const { formActions, checkResults } = testData.create; + + performUserActions(formActions); + + // Add a per policy artifact - but not assign it to any policy + cy.get('[data-test-subj$="-perPolicy"]').click(); // test-subjects are generated in different formats, but all ends with -perPolicy + cy.getBySel(`${testData.pagePrefix}-flyout-submitButton`).click(); + + // Check new artifact is in the list + for (const checkResult of checkResults) { + cy.getBySel(checkResult.selector).should('have.text', checkResult.value); + } + + cy.getBySel('policyDetailsPage').should('not.exist'); + cy.getBySel('backToOrigin').contains(/^Back to .+ policy$/); + + cy.getBySel('backToOrigin').click(); + cy.getBySel('policyDetailsPage').should('exist'); + }); + }); + + context(`Given there are no assigned ${testData.title} entries`, () => { + beforeEach(() => { + login(); + createArtifactList(testData.createRequestBody.list_id); + createPerPolicyArtifact(testData.artifactName, testData.createRequestBody); + }); + + it(`[READ] User CANNOT Manage or Assign ${testData.title} artifacts`, () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); + + cy.getBySel('policy-artifacts-empty-unassigned').should('exist'); + + cy.getBySel('unassigned-manage-artifacts-button').should('not.exist'); + cy.getBySel('unassigned-assign-artifacts-button').should('not.exist'); + }); + + it(`[ALL] User can Manage and Assign ${testData.title} artifacts`, () => { + loginWithPrivilegeAll(); + visitArtifactTab(testData.tabId); + + cy.getBySel('policy-artifacts-empty-unassigned').should('exist'); + + // Manage artifacts + cy.getBySel('unassigned-manage-artifacts-button').should('exist').click(); + cy.location('pathname').should( + 'equal', + `/app/security/administration/${testData.urlPath}` + ); + cy.getBySel('backToOrigin').click(); + + // Assign artifacts + cy.getBySel('unassigned-assign-artifacts-button').should('exist').click(); + + cy.getBySel('artifacts-assign-flyout').should('exist'); + cy.getBySel('artifacts-assign-confirm-button').should('be.disabled'); + + cy.getBySel(`${testData.artifactName}_checkbox`).click(); + cy.getBySel('artifacts-assign-confirm-button').click(); + }); + }); + + context(`Given there are assigned ${testData.title} entries`, () => { + beforeEach(() => { + login(); + createArtifactList(testData.createRequestBody.list_id); + yieldFirstPolicyID().then((policyID) => { + createPerPolicyArtifact(testData.artifactName, testData.createRequestBody, policyID); + }); + }); + + it(`[READ] User can see ${testData.title} artifacts but CANNOT assign or remove from policy`, () => { + loginWithPrivilegeRead(testData.privilegePrefix); + visitArtifactTab(testData.tabId); + + // List of artifacts + cy.getBySel('artifacts-collapsed-list-card').should('have.length', 1); + cy.getBySel('artifacts-collapsed-list-card-header-titleHolder').contains( + testData.artifactName + ); + + // Cannot assign artifacts + cy.getBySel('artifacts-assign-button').should('not.exist'); + + // Cannot remove from policy + cy.getBySel('artifacts-collapsed-list-card-header-actions-button').click(); + cy.getBySel('remove-from-policy-action').should('not.exist'); + }); + + it(`[ALL] User can see ${testData.title} artifacts and can assign or remove artifacts from policy`, () => { + loginWithPrivilegeAll(); + visitArtifactTab(testData.tabId); + + // List of artifacts + cy.getBySel('artifacts-collapsed-list-card').should('have.length', 1); + cy.getBySel('artifacts-collapsed-list-card-header-titleHolder').contains( + testData.artifactName + ); + + // Assign artifacts + cy.getBySel('artifacts-assign-button').should('exist').click(); + cy.getBySel('artifacts-assign-flyout').should('exist'); + cy.getBySel('artifacts-assign-cancel-button').click(); + + // Remove from policy + cy.getBySel('artifacts-collapsed-list-card-header-actions-button').click(); + cy.getBySel('remove-from-policy-action').click(); + cy.getBySel('confirmModalConfirmButton').click(); + + cy.contains('Successfully removed'); + }); + }); + }); + } +}); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts.cy.ts index a094c7a498897..166d506514553 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts.cy.ts @@ -5,27 +5,12 @@ * 2.0. */ -import { isEmpty } from 'lodash'; -import { - ENDPOINT_ARTIFACT_LIST_IDS, - EXCEPTION_LIST_URL, -} from '@kbn/securitysolution-list-constants'; -import { BASE_ENDPOINT_ROUTE } from '../../../../common/endpoint/constants'; import { login, loginWithRole, ROLE } from '../tasks/login'; -import { type FormAction, getArtifactsListTestsData } from '../fixtures/artifacts_page'; -import { runEndpointLoaderScript } from '../tasks/run_endpoint_loader'; - -const removeAllArtifacts = () => { - for (const listId of ENDPOINT_ARTIFACT_LIST_IDS) { - cy.request({ - method: 'DELETE', - url: `${EXCEPTION_LIST_URL}?list_id=${listId}&namespace_type=agnostic`, - headers: { 'kbn-xsrf': 'kibana' }, - failOnStatusCode: false, - }); - } -}; +import { getArtifactsListTestsData } from '../fixtures/artifacts_page'; +import { removeAllArtifacts } from '../tasks/artifacts'; +import { performUserActions } from '../tasks/perform_user_actions'; +import { loadEndpointDataForEventFiltersIfNeeded } from '../tasks/load_endpoint_data'; const loginWithWriteAccess = (url: string) => { loginWithRole(ROLE.analyst_hunter); @@ -42,41 +27,6 @@ const loginWithoutAccess = (url: string) => { cy.visit(url); }; -// Checks for Endpoint data and creates it if needed -const loadEndpointDataForEventFiltersIfNeeded = () => { - cy.request({ - method: 'POST', - url: `${BASE_ENDPOINT_ROUTE}/suggestions/eventFilters`, - body: { - field: 'agent.type', - query: '', - }, - headers: { 'kbn-xsrf': 'kibana' }, - failOnStatusCode: false, - }).then(({ body }) => { - if (isEmpty(body)) { - runEndpointLoaderScript(); - } - }); -}; - -const runAction = (action: FormAction) => { - let element; - if (action.customSelector) { - element = cy.get(action.customSelector); - } else { - element = cy.getBySel(action.selector || ''); - } - - if (action.type === 'click') { - element.click(); - } else if (action.type === 'input') { - element.type(action.value || ''); - } else if (action.type === 'clear') { - element.clear(); - } -}; - describe('Artifacts pages', () => { before(() => { login(); @@ -117,9 +67,7 @@ describe('Artifacts pages', () => { // Opens add flyout cy.getBySel(`${testData.pagePrefix}-emptyState-addButton`).click(); - for (const formAction of testData.create.formActions) { - runAction(formAction); - } + performUserActions(testData.create.formActions); // Submit create artifact form cy.getBySel(`${testData.pagePrefix}-flyout-submitButton`).click(); @@ -153,9 +101,7 @@ describe('Artifacts pages', () => { cy.getBySel(`${testData.pagePrefix}-card-header-actions-button`).click(); cy.getBySel(`${testData.pagePrefix}-card-cardEditAction`).click(); - for (const formAction of testData.update.formActions) { - runAction(formAction); - } + performUserActions(testData.update.formActions); // Submit edit artifact form cy.getBySel(`${testData.pagePrefix}-flyout-submitButton`).click(); diff --git a/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts b/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts index 5577879af0241..ec99c404cc62e 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/fixtures/artifacts_page.ts @@ -5,31 +5,49 @@ * 2.0. */ -import type { ArtifactElasticsearchProperties } from '@kbn/fleet-plugin/server/services'; -import type { TranslatedExceptionListItem } from '../../../../server/endpoint/schemas'; +import { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants'; +import type { FormAction } from '../tasks/perform_user_actions'; -export interface ArtifactResponseType { - _index: string; - _id: string; - _score: number; - _source: ArtifactElasticsearchProperties; -} +interface FormEditingDescription { + formActions: FormAction[]; -export interface ArtifactBodyType { - entries: TranslatedExceptionListItem[]; + checkResults: Array<{ + selector: string; + value: string; + }>; } -export interface FormAction { - type: string; - selector?: string; - customSelector?: string; - value?: string; +interface ArtifactsFixtureType { + title: string; + pagePrefix: string; + tabId: string; + artifactName: string; + privilegePrefix: string; + urlPath: string; + emptyState: string; + + create: FormEditingDescription; + update: FormEditingDescription; + + delete: { + confirmSelector: string; + card: string; + }; + + createRequestBody: { + list_id: string; + entries: object[]; + os_types: string[]; + }; } -export const getArtifactsListTestsData = () => [ +export const getArtifactsListTestsData = (): ArtifactsFixtureType[] => [ { title: 'Trusted applications', pagePrefix: 'trustedAppsListPage', + tabId: 'trustedApps', + artifactName: 'Trusted application name', + privilegePrefix: 'trusted_applications_', create: { formActions: [ { @@ -122,13 +140,40 @@ export const getArtifactsListTestsData = () => [ confirmSelector: 'trustedAppsListPage-deleteModal-submitButton', card: 'trustedAppsListPage-card', }, - pageObject: 'trustedApplications', urlPath: 'trusted_apps', emptyState: 'trustedAppsListPage-emptyState', + + createRequestBody: { + list_id: ENDPOINT_ARTIFACT_LISTS.trustedApps.id, + entries: [ + { + entries: [ + { + field: 'trusted', + operator: 'included', + type: 'match', + value: 'true', + }, + { + field: 'subject_name', + operator: 'included', + type: 'match', + value: 'abcd', + }, + ], + field: 'process.Ext.code_signature', + type: 'nested', + }, + ], + os_types: ['windows'], + }, }, { title: 'Event Filters', pagePrefix: 'EventFiltersListPage', + tabId: 'eventFilters', + artifactName: 'Event filter name', + privilegePrefix: 'event_filters_', create: { formActions: [ { @@ -222,13 +267,28 @@ export const getArtifactsListTestsData = () => [ confirmSelector: 'EventFiltersListPage-deleteModal-submitButton', card: 'EventFiltersListPage-card', }, - pageObject: 'eventFilters', urlPath: 'event_filters', emptyState: 'EventFiltersListPage-emptyState', + + createRequestBody: { + list_id: ENDPOINT_ARTIFACT_LISTS.eventFilters.id, + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '1.2.3.4', + }, + ], + os_types: ['windows'], + }, }, { title: 'Blocklist', pagePrefix: 'blocklistPage', + tabId: 'blocklists', + artifactName: 'Blocklist name', + privilegePrefix: 'blocklist_', create: { formActions: [ { @@ -330,13 +390,34 @@ export const getArtifactsListTestsData = () => [ confirmSelector: 'blocklistDeletionConfirm', card: 'blocklistCard', }, - pageObject: 'blocklist', urlPath: 'blocklist', emptyState: 'blocklistPage-emptyState', + + createRequestBody: { + list_id: ENDPOINT_ARTIFACT_LISTS.blocklists.id, + entries: [ + { + field: 'file.Ext.code_signature', + entries: [ + { + field: 'subject_name', + value: ['wegwergwegw'], + type: 'match_any', + operator: 'included', + }, + ], + type: 'nested', + }, + ], + os_types: ['windows'], + }, }, { title: 'Host isolation exceptions', pagePrefix: 'hostIsolationExceptionsListPage', + tabId: 'hostIsolationExceptions', + artifactName: 'Host Isolation exception name', + privilegePrefix: 'host_isolation_exceptions_', create: { formActions: [ { @@ -411,8 +492,20 @@ export const getArtifactsListTestsData = () => [ confirmSelector: 'hostIsolationExceptionsDeletionConfirm', card: 'hostIsolationExceptionsCard', }, - pageObject: 'hostIsolationExceptions', urlPath: 'host_isolation_exceptions', emptyState: 'hostIsolationExceptionsListPage-emptyState', + + createRequestBody: { + list_id: ENDPOINT_ARTIFACT_LISTS.hostIsolationExceptions.id, + entries: [ + { + field: 'destination.ip', + operator: 'included', + type: 'match', + value: '1.2.3.4', + }, + ], + os_types: ['windows', 'linux', 'macos'], + }, }, ]; diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/artifacts.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/artifacts.ts new file mode 100644 index 0000000000000..53b191fbe3cfb --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/artifacts.ts @@ -0,0 +1,93 @@ +/* + * 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 { PACKAGE_POLICY_API_ROOT } from '@kbn/fleet-plugin/common'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; +import { + ENDPOINT_ARTIFACT_LISTS, + ENDPOINT_ARTIFACT_LIST_IDS, + EXCEPTION_LIST_ITEM_URL, + EXCEPTION_LIST_URL, +} from '@kbn/securitysolution-list-constants'; + +const API_HEADER = { 'kbn-xsrf': 'kibana' }; + +export const removeAllArtifacts = () => { + for (const listId of ENDPOINT_ARTIFACT_LIST_IDS) { + removeExceptionsList(listId); + } +}; + +export const removeExceptionsList = (listId: string) => { + cy.request({ + method: 'DELETE', + url: `${EXCEPTION_LIST_URL}?list_id=${listId}&namespace_type=agnostic`, + headers: API_HEADER, + failOnStatusCode: false, + }).then(({ status }) => { + expect(status).to.be.oneOf([200, 404]); // should either be success or not found + }); +}; + +const ENDPOINT_ARTIFACT_LIST_TYPES = { + [ENDPOINT_ARTIFACT_LISTS.trustedApps.id]: ExceptionListTypeEnum.ENDPOINT, + [ENDPOINT_ARTIFACT_LISTS.eventFilters.id]: ExceptionListTypeEnum.ENDPOINT_EVENTS, + [ENDPOINT_ARTIFACT_LISTS.hostIsolationExceptions.id]: + ExceptionListTypeEnum.ENDPOINT_HOST_ISOLATION_EXCEPTIONS, + [ENDPOINT_ARTIFACT_LISTS.blocklists.id]: ExceptionListTypeEnum.ENDPOINT_BLOCKLISTS, +}; + +export const createArtifactList = (listId: string) => { + cy.request({ + method: 'POST', + url: EXCEPTION_LIST_URL, + headers: API_HEADER, + body: { + name: listId, + description: 'This is a test list', + list_id: listId, + type: ENDPOINT_ARTIFACT_LIST_TYPES[listId], + namespace_type: 'agnostic', + }, + }).then((response) => { + expect(response.status).to.eql(200); + expect(response.body.list_id).to.eql(listId); + expect(response.body.type).to.eql(ENDPOINT_ARTIFACT_LIST_TYPES[listId]); + }); +}; + +export const createPerPolicyArtifact = (name: string, body: object, policyId?: 'all' | string) => { + cy.request({ + method: 'POST', + url: EXCEPTION_LIST_ITEM_URL, + + headers: API_HEADER, + body: { + name, + description: '', + type: 'simple', + namespace_type: 'agnostic', + ...body, + ...(policyId ? { tags: [`policy:${policyId}`] } : {}), + }, + }).then((response) => { + expect(response.status).to.eql(200); + expect(response.body.name).to.eql(name); + }); +}; + +export const yieldFirstPolicyID = () => { + return cy + .request({ + method: 'GET', + url: `${PACKAGE_POLICY_API_ROOT}?page=1&perPage=1&kuery=ingest-package-policies.package.name: endpoint`, + }) + .then(({ body }) => { + expect(body.items.length).to.be.least(1); + return body.items[0].id; + }); +}; diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/load_endpoint_data.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/load_endpoint_data.ts new file mode 100644 index 0000000000000..5e6650404e29a --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/load_endpoint_data.ts @@ -0,0 +1,28 @@ +/* + * 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 { isEmpty } from 'lodash'; +import { BASE_ENDPOINT_ROUTE } from '../../../../common/endpoint/constants'; +import { runEndpointLoaderScript } from './run_endpoint_loader'; + +// Checks for Endpoint data and creates it if needed +export const loadEndpointDataForEventFiltersIfNeeded = () => { + cy.request({ + method: 'POST', + url: `${BASE_ENDPOINT_ROUTE}/suggestions/eventFilters`, + body: { + field: 'agent.type', + query: '', + }, + headers: { 'kbn-xsrf': 'kibana' }, + failOnStatusCode: false, + }).then(({ body }) => { + if (isEmpty(body)) { + runEndpointLoaderScript(); + } + }); +}; diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts index 2278e9dad6ac2..7d13090ac0ff8 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/login.ts @@ -19,6 +19,7 @@ import { getSocManager } from '../../../../scripts/endpoint/common/roles_users/s import { getPlatformEngineer } from '../../../../scripts/endpoint/common/roles_users/platform_engineer'; import { getEndpointOperationsAnalyst } from '../../../../scripts/endpoint/common/roles_users/endpoint_operations_analyst'; import { getEndpointSecurityPolicyManager } from '../../../../scripts/endpoint/common/roles_users/endpoint_security_policy_manager'; +import { getDetectionsEngineer } from '../../../../scripts/endpoint/common/roles_users/detections_engineer'; export enum ROLE { t1_analyst = 't1Analyst', @@ -32,7 +33,7 @@ export enum ROLE { endpoint_security_policy_manager = 'endpointSecurityPolicyManager', } -export const rolesMapping: { [id: string]: Omit } = { +export const rolesMapping: { [key in ROLE]: Omit } = { t1Analyst: getT1Analyst(), t2Analyst: getT2Analyst(), hunter: getHunter(), @@ -41,6 +42,7 @@ export const rolesMapping: { [id: string]: Omit } = { platformEngineer: getPlatformEngineer(), endpointOperationsAnalyst: getEndpointOperationsAnalyst(), endpointSecurityPolicyManager: getEndpointSecurityPolicyManager(), + detectionsEngineer: getDetectionsEngineer(), }; /** * Credentials in the `kibana.dev.yml` config file will be used to authenticate @@ -77,6 +79,13 @@ const ELASTICSEARCH_PASSWORD = 'ELASTICSEARCH_PASSWORD'; */ const LOGIN_API_ENDPOINT = '/internal/security/login'; +const API_AUTH = { + user: Cypress.env(ELASTICSEARCH_USERNAME), + pass: Cypress.env(ELASTICSEARCH_PASSWORD), +}; + +const API_HEADERS = { 'kbn-xsrf': 'cypress' }; + /** * cy.visit will default to the baseUrl which uses the default kibana test user * This function will override that functionality in cy.visit by building the baseUrl @@ -85,7 +94,7 @@ const LOGIN_API_ENDPOINT = '/internal/security/login'; * @param role string role/user to log in with * @param route string route to visit */ -export const getUrlWithRoute = (role: ROLE, route: string) => { +export const getUrlWithRoute = (role: string, route: string) => { const url = Cypress.config().baseUrl; const kibana = new URL(String(url)); const theUrl = `${Url.format({ @@ -138,38 +147,32 @@ export const getCurlScriptEnvVars = () => ({ }); export const createRoleAndUser = (role: ROLE) => { + createCustomRoleAndUser(role, rolesMapping[role]); +}; + +export const createCustomRoleAndUser = (role: string, rolePrivileges: Omit) => { const env = getCurlScriptEnvVars(); // post the role cy.request({ method: 'PUT', url: `${env.KIBANA_URL}/api/security/role/${role}`, - body: rolesMapping[role], - headers: { - 'kbn-xsrf': 'cypress', - }, - auth: { - user: Cypress.env(ELASTICSEARCH_USERNAME), - pass: Cypress.env(ELASTICSEARCH_PASSWORD), - }, + body: rolePrivileges, + headers: API_HEADERS, + auth: API_AUTH, }); // post the user associated with the role to elasticsearch cy.request({ method: 'POST', url: `${env.KIBANA_URL}/internal/security/users/${role}`, - headers: { - 'kbn-xsrf': 'cypress', - }, + headers: API_HEADERS, body: { username: role, password: Cypress.env(ELASTICSEARCH_PASSWORD), roles: [role], }, - auth: { - user: Cypress.env(ELASTICSEARCH_USERNAME), - pass: Cypress.env(ELASTICSEARCH_PASSWORD), - }, + auth: API_AUTH, }); }; @@ -178,24 +181,14 @@ export const deleteRoleAndUser = (role: ROLE) => { cy.request({ method: 'DELETE', - auth: { - user: Cypress.env(ELASTICSEARCH_USERNAME), - pass: Cypress.env(ELASTICSEARCH_PASSWORD), - }, - headers: { - 'kbn-xsrf': 'cypress', - }, + auth: API_AUTH, + headers: API_HEADERS, url: `${env.KIBANA_URL}/internal/security/users/${role}`, }); cy.request({ method: 'DELETE', - auth: { - user: Cypress.env(ELASTICSEARCH_USERNAME), - pass: Cypress.env(ELASTICSEARCH_PASSWORD), - }, - headers: { - 'kbn-xsrf': 'cypress', - }, + auth: API_AUTH, + headers: API_HEADERS, url: `${env.KIBANA_URL}/api/security/role/${role}`, }); }; @@ -220,7 +213,11 @@ export const loginWithUser = (user: User) => { }; export const loginWithRole = async (role: ROLE) => { - createRoleAndUser(role); + loginWithCustomRole(role, rolesMapping[role]); +}; + +export const loginWithCustomRole = async (role: string, rolePrivileges: Omit) => { + createCustomRoleAndUser(role, rolePrivileges); const theUrl = Url.format({ auth: `${role}:changeme`, username: role, diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/perform_user_actions.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/perform_user_actions.ts new file mode 100644 index 0000000000000..69c7bd369cdeb --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/perform_user_actions.ts @@ -0,0 +1,38 @@ +/* + * 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 ActionTypes = 'click' | 'input' | 'clear'; + +export interface FormAction { + type: ActionTypes; + selector?: string; + customSelector?: string; + value?: string; +} + +export const performUserActions = (actions: FormAction[]) => { + for (const action of actions) { + performAction(action); + } +}; + +const performAction = (action: FormAction) => { + let element; + if (action.customSelector) { + element = cy.get(action.customSelector); + } else { + element = cy.getBySel(action.selector || ''); + } + + if (action.type === 'click') { + element.click(); + } else if (action.type === 'input') { + element.type(action.value || ''); + } else if (action.type === 'clear') { + element.clear(); + } +}; diff --git a/x-pack/plugins/security_solution/public/management/cypress/tsconfig.json b/x-pack/plugins/security_solution/public/management/cypress/tsconfig.json index a99e4af76fe2e..a385fa4c78ec6 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tsconfig.json +++ b/x-pack/plugins/security_solution/public/management/cypress/tsconfig.json @@ -24,6 +24,7 @@ }, "@kbn/security-plugin", "@kbn/securitysolution-list-constants", - "@kbn/fleet-plugin" + "@kbn/fleet-plugin", + "@kbn/securitysolution-io-ts-list-types", ] } diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx index 8b1ab7dee0854..52b9f95ce591b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx @@ -540,6 +540,7 @@ export const BlockListForm = memo( onChange={handleOnPolicyChange} isLoading={policiesIsLoading} description={POLICY_SELECT_DESCRIPTION} + data-test-subj={getTestId('effectedPolicies')} /> diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts index 5a983574f7545..671347dcd27b3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts @@ -156,7 +156,6 @@ const endpointListApiPathHandlerMocks = ({ return { total: totalAgentsUsingEndpoint, items: [], - totalInactive: 0, page: 1, perPage: 10, }; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/endpoint_security_policy_manager.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/endpoint_security_policy_manager.ts index 5b57f4e2888bb..0a9679b8dbfd6 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/endpoint_security_policy_manager.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/endpoint_security_policy_manager.ts @@ -17,7 +17,15 @@ export const getEndpointSecurityPolicyManager: () => Omit = () => ...noResponseActionsRole.kibana[0], feature: { ...noResponseActionsRole.kibana[0].feature, - siem: ['minimal_all'], + siem: [ + 'blocklist_all', + 'endpoint_list_all', + 'event_filters_all', + 'host_isolation_exceptions_all', + 'minimal_all', + 'policy_management_all', + 'trusted_applications_all', + ], }, }, ], diff --git a/x-pack/plugins/security_solution/server/features.ts b/x-pack/plugins/security_solution/server/features.ts index d4e541e3cb7b5..5a0b3b1011227 100644 --- a/x-pack/plugins/security_solution/server/features.ts +++ b/x-pack/plugins/security_solution/server/features.ts @@ -117,6 +117,12 @@ const responseActionSubFeatures: SubFeatureConfig[] = [ defaultMessage: 'Response Actions History', } ), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.responseActionsHistory.description', + { + defaultMessage: 'Access the history of response actions performed on endpoints.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -158,6 +164,10 @@ const responseActionSubFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.hostIsolation', { defaultMessage: 'Host Isolation', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.hostIsolation.description', + { defaultMessage: 'Perform the "isolate" and "release" response actions.' } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -188,6 +198,12 @@ const responseActionSubFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.processOperations', { defaultMessage: 'Process Operations', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.processOperations.description', + { + defaultMessage: 'Perform process-related response actions in the response console.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -288,6 +304,13 @@ const subFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.endpointList', { defaultMessage: 'Endpoint List', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.endpointList.description', + { + defaultMessage: + 'Displays all hosts running Elastic Defend and their relevant integration details.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -329,6 +352,13 @@ const subFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.trustedApplications', { defaultMessage: 'Trusted Applications', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.trustedApplications.description', + { + defaultMessage: + 'Helps mitigate conflicts with other software, usually other antivirus or endpoint security applications.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -379,6 +409,13 @@ const subFeatures: SubFeatureConfig[] = [ defaultMessage: 'Host Isolation Exceptions', } ), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.hostIsolationExceptions.description', + { + defaultMessage: + 'Add specific IP addresses that isolated hosts are still allowed to communicate with, even when isolated from the rest of the network.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -426,6 +463,13 @@ const subFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.blockList', { defaultMessage: 'Blocklist', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.blockList.description', + { + defaultMessage: + 'Extend Elastic Defend’s protection against malicious processes and protect against potentially harmful applications.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -473,6 +517,13 @@ const subFeatures: SubFeatureConfig[] = [ name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.eventFilters', { defaultMessage: 'Event Filters', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.eventFilters.description', + { + defaultMessage: + 'Filter out endpoint events that you do not need or want stored in Elasticsearch.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', @@ -518,8 +569,15 @@ const subFeatures: SubFeatureConfig[] = [ } ), name: i18n.translate('xpack.securitySolution.featureRegistry.subFeatures.policyManagement', { - defaultMessage: 'Policy Management', + defaultMessage: 'Elastic Defend Policy Management', }), + description: i18n.translate( + 'xpack.securitySolution.featureRegistry.subFeatures.policyManagement.description', + { + defaultMessage: + 'Access the Elastic Defend integration policy to configure protections, event collection, and advanced policy features.', + } + ), privilegeGroups: [ { groupType: 'mutually_exclusive', diff --git a/x-pack/plugins/stack_connectors/public/connector_types/index.ts b/x-pack/plugins/stack_connectors/public/connector_types/index.ts index ddfc694b1fd86..55b2a31d2ca80 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/index.ts @@ -22,6 +22,7 @@ import { getSlackConnectorType } from './slack'; import { getSwimlaneConnectorType } from './swimlane'; import { getTeamsConnectorType } from './teams'; import { getTinesConnectorType } from './tines'; +import { getTorqConnectorType } from './torq'; import { getWebhookConnectorType } from './webhook'; import { getXmattersConnectorType } from './xmatters'; @@ -55,5 +56,6 @@ export function registerConnectorTypes({ connectorTypeRegistry.register(getResilientConnectorType()); connectorTypeRegistry.register(getOpsgenieConnectorType()); connectorTypeRegistry.register(getTeamsConnectorType()); + connectorTypeRegistry.register(getTorqConnectorType()); connectorTypeRegistry.register(getTinesConnectorType()); } diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/index.ts b/x-pack/plugins/stack_connectors/public/connector_types/torq/index.ts new file mode 100644 index 0000000000000..e7c2d205fe97b --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/index.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 { getActionType as getTorqConnectorType } from './torq'; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/logo.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/logo.tsx new file mode 100644 index 0000000000000..3e73aefd98853 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/logo.tsx @@ -0,0 +1,22 @@ +/* + * 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 { LogoProps } from '../types'; + +const Logo = (props: LogoProps) => { + return ( + + + + + + ); +}; + +// eslint-disable-next-line import/no-default-export +export { Logo as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.test.tsx new file mode 100644 index 0000000000000..09bb5a210a333 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.test.tsx @@ -0,0 +1,75 @@ +/* + * 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 { ActionTypeModel } from '@kbn/triggers-actions-ui-plugin/public'; +import { TypeRegistry } from '@kbn/triggers-actions-ui-plugin/public/application/type_registry'; +import { registerConnectorTypes } from '..'; +import { registrationServicesMock } from '../../mocks'; + +const ACTION_TYPE_ID = '.torq'; +let actionTypeModel: ActionTypeModel; + +beforeAll(() => { + const connectorTypeRegistry = new TypeRegistry(); + registerConnectorTypes({ connectorTypeRegistry, services: registrationServicesMock }); + const getResult = connectorTypeRegistry.get(ACTION_TYPE_ID); + if (getResult !== null) { + actionTypeModel = getResult; + } +}); + +describe('actionTypeRegistry.get() works', () => { + test('action type static data is as expected', () => { + expect(actionTypeModel.id).toEqual(ACTION_TYPE_ID); + }); +}); + +describe('torq action params validation', () => { + test('action params validation succeeds when action params is valid', async () => { + const actionParams = { + body: '{"message": "{test}"}', + }; + + expect(await actionTypeModel.validateParams(actionParams)).toEqual({ + errors: { body: [] }, + }); + }); + + test('action params validation succeeds when action params is valid - mustache', async () => { + const actionParams = { + body: '{"message": {{number}}}', + }; + + expect(await actionTypeModel.validateParams(actionParams)).toEqual({ + errors: { body: [] }, + }); + }); + + test('params validation fails when body is empty', async () => { + const actionParams = { + body: '', + }; + + expect(await actionTypeModel.validateParams(actionParams)).toEqual({ + errors: { + body: ['Body is required.'], + }, + }); + }); + + test('params validation fails when body is not a valid JSON', async () => { + const actionParams = { + body: 'some text', + }; + + expect(await actionTypeModel.validateParams(actionParams)).toEqual({ + errors: { + body: ['Body must be a valid JSON.'], + }, + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.tsx new file mode 100644 index 0000000000000..04eef6afa638b --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq.tsx @@ -0,0 +1,62 @@ +/* + * 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 { + ActionTypeModel, + GenericValidationResult, +} from '@kbn/triggers-actions-ui-plugin/public/types'; +import { lazy } from 'react'; +import { TorqActionParams, TorqConfig, TorqSecrets } from '../types'; +import * as i18n from './translations'; + +const torqDefaultBody = `{ + "alert": {{alert}}, + "context": {{context}}, + "rule": {{rule}}, + "state": {{state}}, + "date": "{{date}}", + "kibana_base_url": "{{kibanaBaseUrl}}" +}`; + +function replaceReferencesWithNumbers(body: string) { + return body.replace(/\{\{[.\w]+\}\}/gm, '42'); +} + +export function getActionType(): ActionTypeModel { + const validateParams = async ( + actionParams: TorqActionParams + ): Promise> => { + const translations = await import('./translations'); + const errors = { + body: [] as string[], + }; + const validationResult = { errors }; + validationResult.errors = errors; + if (!actionParams.body?.length) { + errors.body.push(translations.BODY_REQUIRED); + } else { + try { + JSON.parse(replaceReferencesWithNumbers(actionParams.body || '')); + } catch (e) { + errors.body.push(translations.INVALID_JSON); + } + } + return validationResult; + }; + return { + id: '.torq', + iconClass: lazy(() => import('./logo')), + selectMessage: i18n.TORQ_SELECT_MESSAGE, + actionTypeTitle: i18n.TORQ_ACTION_TYPE_TITLE, + validateParams, + actionConnectorFields: lazy(() => import('./torq_connectors')), + actionParamsFields: lazy(() => import('./torq_params')), + defaultActionParams: { + body: torqDefaultBody, + }, + }; +} diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.test.tsx new file mode 100644 index 0000000000000..d392d14d8b94e --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.test.tsx @@ -0,0 +1,180 @@ +/* + * 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 { mountWithIntl } from '@kbn/test-jest-helpers'; +import { act, render } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import React from 'react'; +import { ConnectorFormTestProvider, waitForComponentToUpdate } from '../lib/test_utils'; +import TorqActionConnectorFields from './torq_connectors'; + +const EMPTY_FUNC = () => {}; + +describe('TorqActionConnectorFields renders', () => { + test('all connector fields are rendered', async () => { + const actionConnector = { + actionTypeId: '.torq', + name: 'torq', + config: { + webhookIntegrationUrl: 'https://hooks.torq.io/v1/webhooks/fjdkljfekdfjlsa', + }, + secrets: { + token: 'testtoken', + }, + isDeprecated: false, + }; + + const wrapper = mountWithIntl( + + + + ); + + await waitForComponentToUpdate(); + + expect(wrapper.find('[data-test-subj="torqUrlText"]').length > 0).toBeTruthy(); + expect(wrapper.find('[data-test-subj="torqTokenInput"]').length > 0).toBeTruthy(); + }); + + describe('Validation', () => { + const onSubmit = jest.fn(); + const actionConnector = { + actionTypeId: '.torq', + name: 'torq', + config: { + webhookIntegrationUrl: 'https://hooks.torq.io/v1/webhooks/fjdksla', + }, + secrets: { + token: 'testtoken', + }, + isDeprecated: false, + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('connector validation succeeds when connector config is valid', async () => { + const { getByTestId } = render( + + + + ); + + await act(async () => { + userEvent.click(getByTestId('form-test-provide-submit')); + }); + + expect(onSubmit).toBeCalledWith({ + data: { + actionTypeId: '.torq', + name: 'torq', + config: { + webhookIntegrationUrl: 'https://hooks.torq.io/v1/webhooks/fjdksla', + }, + secrets: { + token: 'testtoken', + }, + isDeprecated: false, + }, + isValid: true, + }); + }); + + it('connector validation fails when there is no token', async () => { + const connector = { + ...actionConnector, + secrets: { + token: '', + }, + }; + + const { getByTestId } = render( + + + + ); + + await act(async () => { + userEvent.click(getByTestId('form-test-provide-submit')); + }); + + expect(onSubmit).toBeCalledWith({ + data: {}, + isValid: false, + }); + }); + + it('connector validation fails when there is no webhook URL', async () => { + const connector = { + ...actionConnector, + config: { + webhookIntegrationUrl: '', + }, + }; + + const { getByTestId } = render( + + + + ); + + await act(async () => { + userEvent.click(getByTestId('form-test-provide-submit')); + }); + + expect(onSubmit).toBeCalledWith({ + data: {}, + isValid: false, + }); + }); + + it('connector validation fails if the URL is not of a Torq webhook', async () => { + const connector = { + ...actionConnector, + config: { + webhookIntegrationUrl: 'https://test.com', + }, + }; + + const { getByTestId } = render( + + + + ); + + await act(async () => { + userEvent.click(getByTestId('form-test-provide-submit')); + }); + + expect(onSubmit).toBeCalledWith({ + data: {}, + isValid: false, + }); + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.tsx new file mode 100644 index 0000000000000..84aaf1a8738ce --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_connectors.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 { EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import { Field } from '@kbn/es-ui-shared-plugin/static/forms/components'; +import { fieldValidators } from '@kbn/es-ui-shared-plugin/static/forms/helpers'; +import { ERROR_CODE } from '@kbn/es-ui-shared-plugin/static/forms/helpers/field_validators/types'; +import { + UseField, + ValidationError, + ValidationFunc, +} from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import { isUrl } from '@kbn/es-ui-shared-plugin/static/validators/string'; +import { ActionConnectorFieldsProps, PasswordField } from '@kbn/triggers-actions-ui-plugin/public'; +import React from 'react'; +import * as i18n from './translations'; + +const { urlField } = fieldValidators; + +const Callout: React.FC<{ title: string; dataTestSubj: string }> = ({ title, dataTestSubj }) => { + return ( + <> + + + + + ); +}; + +const torqWebhookEndpoint = + (message: string) => + (...args: Parameters): ReturnType> => { + const [{ value }] = args as Array<{ value: string }>; + const error: ValidationError = { + code: 'ERR_FIELD_FORMAT', + formatType: 'URL', + message, + }; + if (!isUrl(value)) return error; + const hostname = new URL(value).hostname; + return hostname === 'hooks.torq.io' ? undefined : error; + }; + +const TorqActionConnectorFields: React.FunctionComponent = ({ + readOnly, +}) => { + return ( + <> + + + + + + + + + + + + + + + + + ); +}; + +// eslint-disable-next-line import/no-default-export +export { TorqActionConnectorFields as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.test.tsx new file mode 100644 index 0000000000000..43e1d1248eec6 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.test.tsx @@ -0,0 +1,52 @@ +/* + * 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 { mountWithIntl } from '@kbn/test-jest-helpers'; +import { MockCodeEditor } from '@kbn/triggers-actions-ui-plugin/public/application/code_editor.mock'; +import React from 'react'; +import TorqParamsFields from './torq_params'; + +const kibanaReactPath = '../../../../../../src/plugins/kibana_react/public'; + +jest.mock(kibanaReactPath, () => { + const original = jest.requireActual(kibanaReactPath); + return { + ...original, + CodeEditor: (props: any) => { + return ; + }, + }; +}); + +describe('TorqParamsFields renders', () => { + test('all params fields is rendered', () => { + const actionParams = { + body: 'test message', + }; + + const wrapper = mountWithIntl( + {}} + index={0} + messageVariables={[ + { + name: 'myVar', + description: 'My variable description', + useWithTripleBracesInTemplates: true, + }, + ]} + /> + ); + expect(wrapper.find('[data-test-subj="bodyJsonEditor"]').length > 0).toBeTruthy(); + expect(wrapper.find('[data-test-subj="bodyJsonEditor"]').first().prop('value')).toStrictEqual( + 'test message' + ); + expect(wrapper.find('[data-test-subj="bodyAddVariableButton"]').length > 0).toBeTruthy(); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.tsx new file mode 100644 index 0000000000000..e6cb9880c3ef2 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/torq_params.tsx @@ -0,0 +1,60 @@ +/* + * 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 { + ActionParamsProps, + JsonEditorWithMessageVariables, +} from '@kbn/triggers-actions-ui-plugin/public'; +import React from 'react'; +import { TorqActionParams } from '../types'; +import * as i18n from './translations'; + +const TorqParamsFields: React.FunctionComponent> = ({ + actionParams, + editAction, + index, + messageVariables, + errors, +}) => { + const { body } = actionParams; + return ( + { + editAction('body', json, index); + }} + onBlur={() => { + if (!body) { + editAction('body', '', index); + } + }} + euiCodeEditorProps={{ + options: { + renderValidationDecorations: body && errors?.body?.length ? 'on' : 'off', + lineNumbers: 'on', + fontSize: 14, + minimap: { + enabled: false, + }, + scrollBeyondLastLine: false, + folding: true, + wordWrap: 'on', + wrappingIndent: 'indent', + automaticLayout: true, + }, + }} + /> + ); +}; + +// eslint-disable-next-line import/no-default-export +export { TorqParamsFields as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/torq/translations.ts b/x-pack/plugins/stack_connectors/public/connector_types/torq/translations.ts new file mode 100644 index 0000000000000..6985e6dd01ce3 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/torq/translations.ts @@ -0,0 +1,84 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const URL_LABEL = i18n.translate('xpack.stackConnectors.torqAction.urlTextFieldLabel', { + defaultMessage: 'Torq endpoint URL', +}); + +export const URL_INVALID = i18n.translate( + 'xpack.stackConnectors.torqAction.error.invalidUrlTextField', + { + defaultMessage: 'URL is invalid.', + } +); + +export const BODY_FIELD_LABEL = i18n.translate('xpack.stackConnectors.torqAction.bodyFieldLabel', { + defaultMessage: 'Body', +}); + +export const BODY_FIELD_ARIA_LABEL = i18n.translate( + 'xpack.stackConnectors.torqAction.bodyCodeEditorAriaLabel', + { + defaultMessage: 'Code editor', + } +); + +export const URL_NOT_TORQ_WEBHOOK = i18n.translate( + 'xpack.stackConnectors.torqAction.error.urlIsNotTorqWebhook', + { + defaultMessage: 'URL is not a Torq integration endpoint.', + } +); + +export const TORQ_TOKEN_LABEL = i18n.translate('xpack.stackConnectors.torqAction.token', { + defaultMessage: 'Torq integration token', +}); + +export const BODY_REQUIRED = i18n.translate('xpack.stackConnectors.error.requiredWebhookBodyText', { + defaultMessage: 'Body is required.', +}); + +export const INVALID_JSON = i18n.translate('xpack.stackConnectors.error.requireValidJSONBody', { + defaultMessage: 'Body must be a valid JSON.', +}); + +export const TORQ_SELECT_MESSAGE = i18n.translate( + 'xpack.stackConnectors.torqAction.selectMessageText', + { + defaultMessage: 'Trigger a Torq workflow.', + } +); + +export const TORQ_ACTION_TYPE_TITLE = i18n.translate( + 'xpack.stackConnectors.torqAction.actionTypeTitle', + { + defaultMessage: 'Alert data', + } +); + +export const TORQ_TOKEN_HELP_TEXT = i18n.translate( + 'xpack.stackConnectors.torqAction.tokenHelpText', + { + defaultMessage: + 'Enter the webhook authentication header secret generated when you created the Elastic Security integration.', + } +); + +export const URL_HELP_TEXT = i18n.translate('xpack.stackConnectors.torqAction.urlHelpText', { + defaultMessage: + 'Enter the endpoint URL generated when you created the Elastic Security integration on Torq.', +}); + +export const HOW_TO_TEXT = i18n.translate( + 'xpack.stackConnectors.torqActionConnectorFields.calloutTitle', + { + defaultMessage: + 'Create an Elastic Security integration on Torq, and then come back and paste the endpoint URL and token generated for your integration.', + } +); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/types.ts b/x-pack/plugins/stack_connectors/public/connector_types/types.ts index 693681333ea1c..72319df375e1f 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/types.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/types.ts @@ -72,6 +72,10 @@ export interface WebhookActionParams { body?: string; } +export interface TorqActionParams { + body?: string; +} + export interface EmailConfig { from: string; host: string; @@ -132,6 +136,16 @@ export interface WebhookSecrets { export type WebhookActionConnector = UserConfiguredActionConnector; +export interface TorqConfig { + url: string; +} + +export interface TorqSecrets { + token: string; +} + +export type TorqActionConnector = UserConfiguredActionConnector; + export enum XmattersSeverityOptions { CRITICAL = 'critical', HIGH = 'high', diff --git a/x-pack/plugins/stack_connectors/server/connector_types/index.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/index.test.ts index ead127d7dd521..c2aaf7c7ea5d8 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/index.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/index.test.ts @@ -18,6 +18,7 @@ const ACTION_TYPE_IDS = [ '.teams', '.webhook', '.xmatters', + '.torq', ]; const mockedActions = actionsMock.createSetup(); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/index.ts index 0c0e6d123a792..648695bc7cbbd 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/index.ts @@ -14,6 +14,7 @@ import { getServiceNowITSMConnectorType } from './servicenow_itsm'; import { getServiceNowSIRConnectorType } from './servicenow_sir'; import { getServiceNowITOMConnectorType } from './servicenow_itom'; import { getTinesConnectorType } from './tines'; +import { getActionType as getTorqConnectorType } from './torq'; import { getConnectorType as getEmailConnectorType } from './email'; import { getConnectorType as getIndexConnectorType } from './es_index'; import { getConnectorType as getPagerDutyConnectorType } from './pagerduty'; @@ -89,6 +90,7 @@ export function registerConnectorTypes({ actions.registerType(getJiraConnectorType()); actions.registerType(getResilientConnectorType()); actions.registerType(getTeamsConnectorType()); + actions.registerType(getTorqConnectorType()); actions.registerSubActionConnectorType(getOpsgenieConnectorType()); actions.registerSubActionConnectorType(getTinesConnectorType()); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/torq/index.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/torq/index.test.ts new file mode 100644 index 0000000000000..e970e1f678bde --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/torq/index.test.ts @@ -0,0 +1,235 @@ +/* + * 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 { Logger } from '@kbn/core/server'; + +import axios from 'axios'; +import { ActionTypeConfigType, getActionType, TorqActionType } from '.'; + +import * as utils from '@kbn/actions-plugin/server/lib/axios_utils'; +import { validateConfig, validateParams, validateSecrets } from '@kbn/actions-plugin/server/lib'; +import { actionsMock } from '@kbn/actions-plugin/server/mocks'; +import { Services } from '@kbn/actions-plugin/server/types'; +import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock'; +import { loggerMock } from '@kbn/logging-mocks'; +import { ActionsConfigurationUtilities } from '@kbn/actions-plugin/server/actions_config'; + +jest.mock('axios'); +jest.mock('@kbn/actions-plugin/server/lib/axios_utils', () => { + const originalUtils = jest.requireActual('@kbn/actions-plugin/server/lib/axios_utils'); + return { + ...originalUtils, + request: jest.fn(), + patch: jest.fn(), + }; +}); + +const requestMock = utils.request as jest.Mock; + +axios.create = jest.fn(() => axios); + +const services: Services = actionsMock.createServices(); + +let actionType: TorqActionType; +const mockedLogger: jest.Mocked = loggerMock.create(); +let configurationUtilities: jest.Mocked; + +beforeAll(() => { + actionType = getActionType(); + configurationUtilities = actionsConfigMock.create(); +}); + +describe('actionType', () => { + test('exposes the action as `torq` on its Id and Name', () => { + expect(actionType.id).toEqual('.torq'); + expect(actionType.name).toEqual('Torq'); + }); +}); + +describe('secrets validation', () => { + test('succeeds when secrets is valid', () => { + const secrets: Record = { + token: 'jfi2fji3ofeaiw34if', + }; + expect(validateSecrets(actionType, secrets, { configurationUtilities })).toEqual(secrets); + }); + + test('fails when secret token is not provided', () => { + expect(() => { + validateSecrets(actionType, {}, { configurationUtilities }); + }).toThrowErrorMatchingInlineSnapshot( + `"error validating action type secrets: [token]: expected value of type [string] but got [undefined]"` + ); + }); +}); + +describe('config validation', () => { + const defaultValues: Record = {}; + + test('config validation passes with an appropriate endpoint', () => { + const config: Record = { + webhookIntegrationUrl: 'https://hooks.torq.io/v1/test', + }; + expect(validateConfig(actionType, config, { configurationUtilities })).toEqual({ + ...defaultValues, + ...config, + }); + }); + + const errorCases: Array<{ name: string; url: string; errorMsg: string }> = [ + { + name: 'invalid URL leads to error', + url: 'iamnotavalidurl', + errorMsg: `"error validating action type config: error configuring send to Torq action: unable to parse url: TypeError: Invalid URL: iamnotavalidurl"`, + }, + { + name: 'incomplete URL leads to error', + url: 'example.com/do-something', + errorMsg: `"error validating action type config: error configuring send to Torq action: unable to parse url: TypeError: Invalid URL: example.com/do-something"`, + }, + { + name: 'fails when URL is not a Torq webhook endpoint', + url: 'http://mylisteningserver:9200/endpoint', + errorMsg: `"error validating action type config: error configuring send to Torq action: url must begin with https://hooks.torq.io"`, + }, + ]; + errorCases.forEach(({ name, url, errorMsg }) => { + test(name, () => { + const config: Record = { + webhookIntegrationUrl: url, + }; + expect(() => { + validateConfig(actionType, config, { configurationUtilities }); + }).toThrowErrorMatchingInlineSnapshot(errorMsg); + }); + }); + + test("config validation returns an error if the specified URL isn't added to allowedHosts", () => { + actionType = getActionType(); + + const configUtils = { + ...actionsConfigMock.create(), + ensureUriAllowed: (_: string) => { + throw new Error(`target url is not present in allowedHosts`); + }, + }; + + // any for testing + const config: Record = { + webhookIntegrationUrl: 'http://mylisteningserver.com:9200/endpoint', + }; + + expect(() => { + validateConfig(actionType, config, { configurationUtilities: configUtils }); + }).toThrowErrorMatchingInlineSnapshot( + `"error validating action type config: error configuring send to Torq action: target url is not present in allowedHosts"` + ); + }); +}); + +describe('params validation', () => { + test('params validation passes when a valid body is provided', () => { + const params: Record = { + body: '{"message": "Hello"}', + }; + expect(validateParams(actionType, params, { configurationUtilities })).toEqual({ + ...params, + }); + }); +}); + +describe('execute Torq action', () => { + beforeAll(() => { + requestMock.mockReset(); + actionType = getActionType(); + }); + + beforeEach(() => { + requestMock.mockReset(); + requestMock.mockResolvedValue({ + status: 200, + statusText: '', + data: '', + headers: [], + config: {}, + }); + }); + + test('execute with token happy flow', async () => { + const config: ActionTypeConfigType = { + webhookIntegrationUrl: 'https://hooks.torq.io/v1/test', + }; + await actionType.executor({ + actionId: 'some-id', + services, + config, + secrets: { token: '1234' }, + params: { body: '{"msg": "some data"}' }, + configurationUtilities, + logger: mockedLogger, + }); + + delete requestMock.mock.calls[0][0].configurationUtilities; + expect(requestMock.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "axios": [MockFunction], + "data": Object { + "msg": "some data", + }, + "headers": Object { + "Content-Type": "application/json", + "X-Torq-Token": "1234", + }, + "logger": Object { + "context": Array [], + "debug": [MockFunction] { + "calls": Array [ + Array [ + "response from Torq action \\"some-id\\": [HTTP 200] ", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], + }, + "error": [MockFunction], + "fatal": [MockFunction], + "get": [MockFunction], + "info": [MockFunction], + "isLevelEnabled": [MockFunction], + "log": [MockFunction], + "trace": [MockFunction], + "warn": [MockFunction], + }, + "method": "post", + "url": "https://hooks.torq.io/v1/test", + "validateStatus": [Function], + } + `); + }); + + test('renders parameter templates as expected', async () => { + const templatedObject = `{"material": "rubber", "kind": "band"}`; + + expect(actionType.renderParameterTemplates).toBeTruthy(); + const paramsWithTemplates = { + body: '{"x": {{obj}}, "y": "{{scalar}}", "z": "{{scalar_with_json_chars}}"}', + }; + const variables = { + obj: templatedObject, + scalar: '1970', + scalar_with_json_chars: 'noinjection", "here": "', + }; + const params = actionType.renderParameterTemplates!(paramsWithTemplates, variables); + expect(params.body).toBe( + `{"x": ${templatedObject}, "y": "${variables.scalar}", "z": "${variables.scalar_with_json_chars}"}` + ); + }); +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/torq/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/torq/index.ts new file mode 100644 index 0000000000000..860e87397eb44 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/torq/index.ts @@ -0,0 +1,391 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { curry } from 'lodash'; +import axios, { AxiosError, AxiosResponse } from 'axios'; +import { schema, TypeOf } from '@kbn/config-schema'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { map, getOrElse } from 'fp-ts/lib/Option'; +import { Logger } from '@kbn/core/server'; +import { ActionType, ActionTypeExecutorOptions } from '@kbn/actions-plugin/server'; +import { + AlertingConnectorFeatureId, + UptimeConnectorFeatureId, + SecurityConnectorFeatureId, + ActionTypeExecutorResult, +} from '@kbn/actions-plugin/common'; +import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer'; +import { request } from '@kbn/actions-plugin/server/lib/axios_utils'; +import { ValidatorServices } from '@kbn/actions-plugin/server/types'; +import { getRetryAfterIntervalFromHeaders } from '../lib/http_response_retry_header'; +import { promiseResult, isOk, Result } from '../lib/result_type'; + +export type TorqActionType = ActionType< + ActionTypeConfigType, + ActionTypeSecretsType, + ActionParamsType, + unknown +>; +export type TorqActionTypeExecutorOptions = ActionTypeExecutorOptions< + ActionTypeConfigType, + ActionTypeSecretsType, + ActionParamsType +>; + +const configSchemaProps = { + webhookIntegrationUrl: schema.string(), +}; +const ConfigSchema = schema.object(configSchemaProps); +export type ActionTypeConfigType = TypeOf; + +// secrets definition +export type ActionTypeSecretsType = TypeOf; +const secretSchemaProps = { + token: schema.string(), +}; +const SecretsSchema = schema.object(secretSchemaProps); + +// params definition +export type ActionParamsType = TypeOf; +const ParamsSchema = schema.object({ + body: schema.string(), +}); + +export const ActionTypeId = '.torq'; +// action type definition +export function getActionType(): TorqActionType { + return { + id: ActionTypeId, + minimumLicenseRequired: 'gold', + name: i18n.translate('xpack.stackConnectors.torqTitle', { + defaultMessage: 'Torq', + }), + supportedFeatureIds: [ + AlertingConnectorFeatureId, + UptimeConnectorFeatureId, + SecurityConnectorFeatureId, + ], + validate: { + config: { + schema: schema.object(configSchemaProps), + customValidator: validateActionTypeConfig, + }, + secrets: { + schema: SecretsSchema, + }, + params: { + schema: ParamsSchema, + }, + }, + renderParameterTemplates, + executor: curry(executor)(), + }; +} + +function renderParameterTemplates( + params: ActionParamsType, + variables: Record +): ActionParamsType { + if (!params.body) return params; + return renderMustacheObject(params, variables); +} + +function validateActionTypeConfig( + configObject: ActionTypeConfigType, + validatorServices: ValidatorServices +) { + const configuredUrl = configObject.webhookIntegrationUrl; + let configureUrlObj: URL; + try { + configureUrlObj = new URL(configuredUrl); + } catch (err) { + throw new Error( + i18n.translate('xpack.stackConnectors.torq.torqConfigurationErrorNoHostname', { + defaultMessage: 'error configuring send to Torq action: unable to parse url: {err}', + values: { + err, + }, + }) + ); + } + + try { + validatorServices.configurationUtilities.ensureUriAllowed(configuredUrl); + } catch (allowListError) { + throw new Error( + i18n.translate('xpack.stackConnectors.torq.torqConfigurationError', { + defaultMessage: 'error configuring send to Torq action: {message}', + values: { + message: allowListError.message, + }, + }) + ); + } + + if (configureUrlObj.hostname !== 'hooks.torq.io' && configureUrlObj.hostname !== 'localhost') { + throw new Error( + i18n.translate('xpack.stackConnectors.torq.torqConfigurationErrorInvalidHostname', { + defaultMessage: + 'error configuring send to Torq action: url must begin with https://hooks.torq.io', + }) + ); + } +} + +// action executor +export async function executor( + execOptions: TorqActionTypeExecutorOptions +): Promise> { + const actionId = execOptions.actionId; + const { webhookIntegrationUrl } = execOptions.config; + const { body: data } = execOptions.params; + const configurationUtilities = execOptions.configurationUtilities; + + const secrets: ActionTypeSecretsType = execOptions.secrets; + const token = secrets.token; + + let body; + try { + body = JSON.parse(data || 'null'); + } catch (err) { + return errorInvalidBody(actionId, execOptions.logger, err); + } + + const axiosInstance = axios.create(); + const result: Result> = await promiseResult( + request({ + axios: axiosInstance, + url: webhookIntegrationUrl, + method: 'post', + headers: { + 'X-Torq-Token': token || '', + 'Content-Type': 'application/json', + }, + data: body, + configurationUtilities, + logger: execOptions.logger, + validateStatus: (status: number) => status >= 200 && status < 300, + }) + ); + + if (isOk(result)) { + const { + value: { status, statusText }, + } = result; + execOptions.logger.debug( + `response from Torq action "${actionId}": [HTTP ${status}] ${statusText}` + ); + return successResult(actionId, data); + } + const { error } = result; + return handleExecutionError(error, execOptions.logger, actionId); +} + +async function handleExecutionError( + error: AxiosError<{ message: string }>, + logger: Logger, + actionId: string +): Promise> { + if (error.response) { + const { + status, + statusText, + headers: responseHeaders, + data: { message: responseMessage }, + } = error.response; + const responseMessageAsSuffix = responseMessage ? `: ${responseMessage}` : ''; + const message = `[${status}] ${statusText}${responseMessageAsSuffix}`; + logger.error(`error on ${actionId} Torq event: ${message}`); + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + // special handling for 5xx + if (status >= 500) { + return retryResult(actionId, message); + } + + // special handling for rate limiting + if (status === 429) { + return pipe( + getRetryAfterIntervalFromHeaders(responseHeaders), + map((retry) => retryResultSeconds(actionId, message, retry)), + getOrElse(() => retryResult(actionId, message)) + ); + } + + if (status === 405) { + return errorResultInvalidMethod(actionId, message); + } + + if (status === 401) { + return errorResultUnauthorised(actionId, message); + } + + if (status === 404) { + return errorNotFound(actionId, message); + } + + return errorResultInvalid(actionId, message); + } else if (error.code) { + const message = `[${error.code}] ${error.message}`; + logger.error(`error on ${actionId} Torq event: ${message}`); + return errorResultRequestFailed(actionId, message); + } else if (error.isAxiosError) { + const message = `${error.message}`; + logger.error(`error on ${actionId} Torq event: ${message}`); + return errorResultRequestFailed(actionId, message); + } + logger.error(`error on ${actionId} Torq action: unexpected error`); + return errorResultUnexpectedError(actionId); +} + +function successResult(actionId: string, data: unknown): ActionTypeExecutorResult { + return { status: 'ok', data, actionId }; +} + +function errorInvalidBody( + actionId: string, + logger: Logger, + err: Error +): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.invalidBodyErrorMessage', { + defaultMessage: 'error triggering Torq workflow, invalid body', + }); + logger.error(`error on ${actionId} Torq event: ${errMessage}: ${err.message}`); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage: err.message, + }; +} + +function errorResultInvalid( + actionId: string, + serviceMessage: string +): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.invalidResponseErrorMessage', { + defaultMessage: 'error triggering Torq workflow, invalid response', + }); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage, + }; +} + +function errorNotFound(actionId: string, serviceMessage: string): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.notFoundErrorMessage', { + defaultMessage: 'error triggering Torq workflow, make sure the webhook URL is valid', + }); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage, + }; +} + +function errorResultRequestFailed( + actionId: string, + serviceMessage: string +): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.requestFailedErrorMessage', { + defaultMessage: 'error triggering Torq workflow, request failed', + }); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage, + }; +} + +function errorResultInvalidMethod( + actionId: string, + serviceMessage: string +): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.invalidMethodErrorMessage', { + defaultMessage: 'error triggering Torq workflow, method is not supported', + }); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage, + }; +} + +function errorResultUnauthorised( + actionId: string, + serviceMessage: string +): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.unauthorisedErrorMessage', { + defaultMessage: 'error triggering Torq workflow, unauthorised', + }); + return { + status: 'error', + message: errMessage, + actionId, + serviceMessage, + }; +} + +function errorResultUnexpectedError(actionId: string): ActionTypeExecutorResult { + const errMessage = i18n.translate('xpack.stackConnectors.torq.unreachableErrorMessage', { + defaultMessage: 'error triggering Torq workflow, unexpected error', + }); + return { + status: 'error', + message: errMessage, + actionId, + }; +} + +function retryResult(actionId: string, serviceMessage: string): ActionTypeExecutorResult { + const errMessage = i18n.translate( + 'xpack.stackConnectors.torq.invalidResponseRetryLaterErrorMessage', + { + defaultMessage: 'error triggering Torq workflow, retry later', + } + ); + return { + status: 'error', + message: errMessage, + retry: true, + actionId, + serviceMessage, + }; +} + +function retryResultSeconds( + actionId: string, + serviceMessage: string, + + retryAfter: number +): ActionTypeExecutorResult { + const retryEpoch = Date.now() + retryAfter * 1000; + const retry = new Date(retryEpoch); + const retryString = retry.toISOString(); + const errMessage = i18n.translate( + 'xpack.stackConnectors.torq.invalidResponseRetryDateErrorMessage', + { + defaultMessage: 'error triggering Torq workflow, retry at {retryString}', + values: { + retryString, + }, + } + ); + return { + status: 'error', + message: errMessage, + retry, + actionId, + serviceMessage, + }; +} diff --git a/x-pack/plugins/stack_connectors/server/plugin.test.ts b/x-pack/plugins/stack_connectors/server/plugin.test.ts index b28899ecf0865..bfc2bb9fd4197 100644 --- a/x-pack/plugins/stack_connectors/server/plugin.test.ts +++ b/x-pack/plugins/stack_connectors/server/plugin.test.ts @@ -25,7 +25,7 @@ describe('Stack Connectors Plugin', () => { it('should register built in connector types', () => { const actionsSetup = actionsMock.createSetup(); plugin.setup(coreSetup, { actions: actionsSetup }); - expect(actionsSetup.registerType).toHaveBeenCalledTimes(15); + expect(actionsSetup.registerType).toHaveBeenCalledTimes(16); expect(actionsSetup.registerType).toHaveBeenNthCalledWith( 1, expect.objectContaining({ diff --git a/x-pack/plugins/synthetics/common/constants/ui.ts b/x-pack/plugins/synthetics/common/constants/ui.ts index bc6c70f60a7fe..57737c2cef192 100644 --- a/x-pack/plugins/synthetics/common/constants/ui.ts +++ b/x-pack/plugins/synthetics/common/constants/ui.ts @@ -7,6 +7,8 @@ export const MONITOR_ROUTE = '/monitor/:monitorId?'; +export const MONITOR_NOT_FOUND_ROUTE = '/monitor-not-found/:monitorId'; + export const MONITOR_HISTORY_ROUTE = '/monitor/:monitorId/history'; export const MONITOR_ERRORS_ROUTE = '/monitor/:monitorId/errors'; diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/test_now_mode.journey.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/test_now_mode.journey.ts index 67ee9f278b9bf..6c61272b24b91 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/test_now_mode.journey.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/test_now_mode.journey.ts @@ -137,7 +137,7 @@ journey(`TestNowMode`, async ({ page, params }) => { await page.waitForSelector('text=1 step completed'); await page.waitForSelector('text=Go to https://www.google.com'); - await page.waitForSelector('text=1.4 s'); + await page.waitForSelector('text=1.42 s'); await page.waitForSelector('text=Complete'); }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/thershold_indicator.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/thershold_indicator.tsx index 26ebe47e045fa..b1d82f16f3c35 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/thershold_indicator.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/thershold_indicator.tsx @@ -11,29 +11,37 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon, + EuiIconTip, EuiLoadingContent, + EuiStat, EuiText, EuiToolTip, } from '@elastic/eui'; -export const getDeltaPercent = (current: number, previous: number | null) => { - if (previous === 0 || previous === null) { +export const getDeltaPercent = (current: number, previous?: number | null) => { + if (previous === 0 || previous === null || previous === undefined) { return 0; } - return Number((((current - previous) / previous) * 100).toFixed(0)); }; export const ThresholdIndicator = ({ + description, + helpText, loading, current, previous, previousFormatted, currentFormatted, + asStat = false, }: { + description?: string; + helpText?: string; loading: boolean; current: number; - previous: number | null; + previous?: number | null; previousFormatted: string; currentFormatted: string; + asStat?: boolean; + setHasAnyDelta?: (hasDelta: boolean) => void; }) => { if (loading) { return ; @@ -71,6 +79,50 @@ export const ThresholdIndicator = ({ const hasDelta = Math.abs(delta) > 0; + const content = + previous === null ? ( + + ) : ( + + {hasDelta ? ( + 0 ? 'sortUp' : 'sortDown'} + size={asStat ? 'l' : 'm'} + color={getColor()} + /> + ) : ( + + )} + + ); + + if (asStat) { + return ( + + {description} {helpText && } + + } + title={ + <> + {currentFormatted} + {content} + + } + reverse={true} + /> + ); + } + return ( @@ -78,23 +130,7 @@ export const ThresholdIndicator = ({ {currentFormatted} - {previous !== null && ( - - - {hasDelta ? ( - 0 ? 'sortUp' : 'sortDown'} size="m" color={getColor()} /> - ) : ( - - )} - - - )} + {content} ); }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx index ec9a1217f8ea4..64ed7b366c245 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/browser_steps_list.tsx @@ -24,6 +24,7 @@ import { StepDetailsLinkIcon } from '../links/step_details_link'; import { parseBadgeStatus, getTextColorForMonitorStatus } from './status_badge'; import { StepDurationText } from './step_duration_text'; +import { ResultDetailsSuccessful } from './result_details_successful'; interface Props { steps: JourneyStep[]; @@ -64,6 +65,8 @@ export const BrowserStepsList = ({ setItemIdToExpandedRowMap(itemIdToExpandedRowMapValues); }; + const showLastSuccessful = true; + const columns: Array> = [ ...(showExpand ? [ @@ -146,17 +149,32 @@ export const BrowserStepsList = ({ /> ), }, - { - align: 'left', - name: STEP_DURATION, - render: (item: JourneyStep) => { - return ; - }, - mobileOptions: { - header: STEP_DURATION, - show: true, - }, - }, + ...(showLastSuccessful + ? [ + { + field: 'synthetics.step.status', + name: LAST_SUCCESSFUL, + render: (pingStatus: string, item: JourneyStep) => ( + + ), + }, + ] + : [ + { + align: 'left' as const, + name: STEP_DURATION, + render: (item: JourneyStep) => { + return ; + }, + mobileOptions: { + header: STEP_DURATION, + show: true, + }, + }, + ]), { align: 'right', field: 'timestamp', @@ -175,12 +193,13 @@ export const BrowserStepsList = ({ return ( <> ({ - style: { verticalAlign: 'initial' }, - })} - cellProps={() => ({ - style: { verticalAlign: 'initial' }, - })} + cellProps={(row) => { + if (itemIdToExpandedRowMap[row._id]) { + return { + style: { verticalAlign: 'top' }, + }; + } + }} compressed={compressed} loading={loading} columns={columns} @@ -232,6 +251,9 @@ const RESULT_LABEL = i18n.translate('xpack.synthetics.monitor.result.label', { defaultMessage: 'Result', }); +const LAST_SUCCESSFUL = i18n.translate('xpack.synthetics.monitor.result.lastSuccessful', { + defaultMessage: 'Last successful', +}); const SCREENSHOT_LABEL = i18n.translate('xpack.synthetics.monitor.screenshot.label', { defaultMessage: 'Screenshot', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details.tsx index 6f0c5453f920a..2021c0da1423e 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details.tsx @@ -6,7 +6,10 @@ */ import React from 'react'; -import { EuiDescriptionList, EuiSpacer } from '@elastic/eui'; +import { EuiDescriptionList, EuiSpacer, EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useStepMetrics } from '../../step_details_page/hooks/use_step_metrics'; +import { JourneyStepScreenshotContainer } from '../screenshot/journey_step_screenshot_container'; import { formatBytes } from '../../step_details_page/hooks/use_object_metrics'; import { ThresholdIndicator } from '../components/thershold_indicator'; import { useNetworkTimings } from '../../step_details_page/hooks/use_network_timings'; @@ -14,6 +17,7 @@ import { useNetworkTimingsPrevious24Hours } from '../../step_details_page/hooks/ import { formatMillisecond } from '../../step_details_page/common/network_data/data_formatting'; import { JourneyStep } from '../../../../../../common/runtime_types'; import { parseBadgeStatus, StatusBadge } from './status_badge'; +import { useStepPrevMetrics } from '../../step_details_page/hooks/use_step_prev_metrics'; export const ResultDetails = ({ pingStatus, @@ -26,16 +30,37 @@ export const ResultDetails = ({ }) => { return (
- + + {' '} + {i18n.translate('xpack.synthetics.step.duration.label', { + defaultMessage: 'after {value}', + values: { + value: formatMillisecond((step.synthetics?.step?.duration.us ?? 0) / 1000, {}), + }, + })} + + {isExpanded && ( <> + + + + )}
); }; + export const TimingDetails = ({ step }: { step: JourneyStep }) => { const { timingsWithLabels, transferSize } = useNetworkTimings( step.monitor.check_group, @@ -46,20 +71,24 @@ export const TimingDetails = ({ step }: { step: JourneyStep }) => { timingsWithLabels: prevTimingsWithLabels, loading, transferSizePrev, - } = useNetworkTimingsPrevious24Hours(step.synthetics.step?.index, step['@timestamp']); + } = useNetworkTimingsPrevious24Hours( + step.synthetics.step?.index, + step['@timestamp'], + step.monitor.check_group + ); const items = timingsWithLabels?.map((item) => { const prevValueItem = prevTimingsWithLabels?.find((prev) => prev.label === item.label); - const prevValue = prevValueItem?.value ?? 0; + const prevValue = prevValueItem?.value; return { title: item.label, description: ( ), }; @@ -84,7 +113,41 @@ export const TimingDetails = ({ step }: { step: JourneyStep }) => { gutterSize="s" type="column" listItems={items} - style={{ maxWidth: 250 }} + style={{ maxWidth: 265 }} + textStyle="reverse" + descriptionProps={{ style: { textAlign: 'right' } }} + /> + ); +}; + +export const StepMetrics = ({ step }: { step: JourneyStep }) => { + const { metrics: stepMetrics } = useStepMetrics(step); + const { metrics: prevMetrics, loading } = useStepPrevMetrics(step); + + const items = stepMetrics?.map((item) => { + const prevValueItem = prevMetrics?.find((prev) => prev.label === item.label); + const prevValue = prevValueItem?.value; + return { + title: item.label, + description: ( + + ), + }; + }); + + return ( + diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx new file mode 100644 index 0000000000000..05e6da0b2f8b1 --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx @@ -0,0 +1,70 @@ +/* + * 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 { EuiSpacer, EuiText, useEuiTheme } from '@elastic/eui'; +import { useFetcher } from '@kbn/observability-plugin/public'; +import { StepMetrics, TimingDetails } from './result_details'; +import { useJourneySteps } from '../../monitor_details/hooks/use_journey_steps'; +import { JourneyStepScreenshotContainer } from '../screenshot/journey_step_screenshot_container'; +import { formatMillisecond } from '../../step_details_page/common/network_data/data_formatting'; +import { JourneyStep } from '../../../../../../common/runtime_types'; +import { IMAGE_UN_AVAILABLE } from '../../step_details_page/step_screenshot/last_successful_screenshot'; +import { fetchLastSuccessfulCheck } from '../../../state'; + +export const ResultDetailsSuccessful = ({ + isExpanded, + step, +}: { + isExpanded: boolean; + step: JourneyStep; +}) => { + const { euiTheme } = useEuiTheme(); + + const { data, loading } = useFetcher(() => { + return fetchLastSuccessfulCheck({ + timestamp: step['@timestamp'], + monitorId: step.monitor.id, + stepIndex: Number(step.synthetics.step?.index), + location: step.observer?.geo?.name, + }); + }, [step._id, step['@timestamp']]); + + const { currentStep } = useJourneySteps( + data?.monitor.check_group, + 0, + Number(step.synthetics.step?.index) + ); + + return ( +
+ + {formatMillisecond((currentStep?.synthetics?.step?.duration.us ?? 0) / 1000, {})} + + + {isExpanded && ( + <> + + + + {currentStep && } + + {currentStep && } + + )} +
+ ); +}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.test.tsx deleted file mode 100644 index 0bade3c639a5e..0000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.test.tsx +++ /dev/null @@ -1,19 +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 from 'react'; -import { NotFoundPage } from './not_found'; -import { render } from '../../../utils/testing'; - -describe('NotFoundPage', () => { - it('render component', async () => { - const { findByText } = render(); - - expect(await findByText('Page not found')).toBeInTheDocument(); - expect(await findByText('Back to home')).toBeInTheDocument(); - }); -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.tsx deleted file mode 100644 index c94a7a7a06b6a..0000000000000 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/pages/not_found.tsx +++ /dev/null @@ -1,52 +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, - EuiPanel, - EuiTitle, - EuiFlexGroup, - EuiFlexItem, - EuiButton, -} from '@elastic/eui'; -import React from 'react'; -import { useHistory } from 'react-router-dom'; -import { FormattedMessage } from '@kbn/i18n-react'; - -export const NotFoundPage = () => { - const history = useHistory(); - return ( - - - - -

- -

- - } - body={ - - - - } - /> -
-
-
- ); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_journey_steps.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_journey_steps.tsx index bd3d45a0a59f0..5901711986419 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_journey_steps.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_journey_steps.tsx @@ -16,11 +16,18 @@ import { selectBrowserJourneyLoading, } from '../../../state'; -export const useJourneySteps = (checkGroup?: string, lastRefresh?: number) => { - const { stepIndex, checkGroupId: urlCheckGroup } = useParams<{ +export const useJourneySteps = ( + checkGroup?: string, + lastRefresh?: number, + stepIndexArg?: number +) => { + const { stepIndex: stepIndexUrl, checkGroupId: urlCheckGroup } = useParams<{ stepIndex: string; checkGroupId: string; }>(); + + const stepIndex = stepIndexArg ?? stepIndexUrl; + const checkGroupId = checkGroup ?? urlCheckGroup; const journeyData = useSelector(selectBrowserJourney(checkGroupId)); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx index c493f863d5bc5..fa279a4d64a4c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_details_page.tsx @@ -6,11 +6,21 @@ */ import React from 'react'; -import { useSelectedMonitor } from './hooks/use_selected_monitor'; +import { Redirect, useParams } from 'react-router-dom'; + +import { MONITOR_NOT_FOUND_ROUTE } from '../../../../../common/constants'; import { useMonitorListBreadcrumbs } from '../monitors_page/hooks/use_breadcrumbs'; +import { useSelectedMonitor } from './hooks/use_selected_monitor'; export const MonitorDetailsPage: React.FC<{ children: React.ReactElement }> = ({ children }) => { - const { monitor } = useSelectedMonitor(); + const { monitor, error } = useSelectedMonitor(); + + const { monitorId } = useParams<{ monitorId: string }>(); + useMonitorListBreadcrumbs(monitor ? [{ text: monitor?.name ?? '' }] : []); + + if (error?.body.statusCode === 404) { + return ; + } return children; }; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_not_found_page.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_not_found_page.tsx new file mode 100644 index 0000000000000..2d05f24d9d51d --- /dev/null +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_not_found_page.tsx @@ -0,0 +1,53 @@ +/* + * 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 { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; +import { EuiButtonEmpty } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { useParams } from 'react-router-dom'; +import { CreateMonitorButton } from '../monitors_page/create_monitor_button'; +import { PLUGIN } from '../../../../../common/constants/plugin'; +import { ClientPluginsStart } from '../../../../plugin'; + +export const MonitorNotFoundPage: React.FC = () => { + const { application } = useKibana().services; + const { monitorId } = useParams<{ monitorId: string }>(); + + return ( + {monitorId} }} + /> + } + actions={[ + , + { + application.navigateToApp(PLUGIN.SYNTHETICS_PLUGIN_ID); + }} + > + {i18n.translate('xpack.synthetics.routes.createNewMonitor', { + defaultMessage: 'Go to Home', + })} + , + ]} + /> + ); +}; + +const NOT_FOUND_TITLE = i18n.translate('xpack.synthetics.prompt.errors.notFound.title', { + defaultMessage: 'Monitor not found', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/last_test_run.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/last_test_run.tsx index 9c4249517b64f..48a8ec5962042 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/last_test_run.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_summary/last_test_run.tsx @@ -86,7 +86,7 @@ export const LastTestRunComponent = ({ return ( - {!loading && latestPing?.error ? ( + {!(loading && !latestPing) && latestPing?.error ? ( ) : ( @@ -163,7 +163,7 @@ const PanelHeader = ({ ); - if (loading) { + if (loading && !latestPing) { return ( <> diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/route_config.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/route_config.tsx index 8f2c7f36dfcb4..8acf81c10e778 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/route_config.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/monitor_details/route_config.tsx @@ -10,6 +10,7 @@ import React from 'react'; import { useHistory, useRouteMatch } from 'react-router-dom'; import { EuiIcon, EuiPageHeaderProps } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { MonitorNotFoundPage } from './monitor_not_found_page'; import { MonitorDetailsPageTitle } from './monitor_details_page_title'; import { EditMonitorLink } from '../common/links/edit_monitor'; import { RunTestManually } from './run_test_manually'; @@ -23,8 +24,9 @@ import { MonitorDetailsPage } from './monitor_details_page'; import { MONITOR_ERRORS_ROUTE, MONITOR_HISTORY_ROUTE, + MONITOR_NOT_FOUND_ROUTE, MONITOR_ROUTE, - OVERVIEW_ROUTE, + MONITORS_ROUTE, } from '../../../../../common/constants'; import { RouteProps } from '../../routes'; @@ -76,9 +78,36 @@ export const getMonitorDetailsRoute = ( dataTestSubj: 'syntheticsMonitorHistoryPage', pageHeader: getMonitorSummaryHeader(history, syntheticsPath, 'errors'), }, + { + title: i18n.translate('xpack.synthetics.monitorNotFound.title', { + defaultMessage: 'Synthetics Monitor Not Found | {baseTitle}', + values: { baseTitle }, + }), + path: MONITOR_NOT_FOUND_ROUTE, + component: () => , + dataTestSubj: 'syntheticsMonitorNotFoundPage', + pageHeader: { + breadcrumbs: [getMonitorsBreadcrumb(syntheticsPath)], + }, + }, ]; }; +const getMonitorsBreadcrumb = (syntheticsPath: string) => ({ + text: ( + <> + {' '} + + + ), + color: 'primary' as const, + 'aria-current': false, + href: `${syntheticsPath}${MONITORS_ROUTE}`, +}); + const getMonitorSummaryHeader = ( history: ReturnType, syntheticsPath: string, @@ -96,22 +125,7 @@ const getMonitorSummaryHeader = ( return { pageTitle: , - breadcrumbs: [ - { - text: ( - <> - {' '} - - - ), - color: 'primary', - 'aria-current': false, - href: `${syntheticsPath}${OVERVIEW_ROUTE}`, - }, - ], + breadcrumbs: [getMonitorsBreadcrumb(syntheticsPath)], rightSideItems: [ , , diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts index 4ca92c3390f1d..11f8a6ddbd43b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/common/network_data/data_formatting.ts @@ -495,6 +495,10 @@ export const formatMillisecond = ( ms: number, { maxMillis = 1000, digits }: { digits?: number; maxMillis?: number } ) => { + if (ms < 0) { + return '--'; + } + if (ms < maxMillis) { return `${ms.toFixed(digits ?? 0)} ms`; } diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts index 0962bf7aeebf3..79c852dddda7d 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings.ts @@ -82,7 +82,7 @@ export const useNetworkTimings = (checkGroupIdArg?: string, stepIndexArg?: numbe field: SYNTHETICS_DNS_TIMINGS, }, }, - ssl: { + tls: { sum: { field: SYNTHETICS_SSL_TIMINGS, }, @@ -138,7 +138,7 @@ export const useNetworkTimings = (checkGroupIdArg?: string, stepIndexArg?: numbe send: aggs?.send.value ?? 0, wait: aggs?.wait.value ?? 0, blocked: aggs?.blocked.value ?? 0, - ssl: aggs?.ssl.value ?? 0, + tls: aggs?.tls.value ?? 0, transferSize: aggs?.transferSize.value ?? 0, }; @@ -148,58 +148,62 @@ export const useNetworkTimings = (checkGroupIdArg?: string, stepIndexArg?: numbe value: timings.transferSize, label: CONTENT_SIZE_LABEL, }, - timingsWithLabels: [ - { - value: timings.dns, - label: SYNTHETICS_DNS_TIMINGS_LABEL, - }, - { - value: timings.ssl, - label: SYNTHETICS_SSL_TIMINGS_LABEL, - }, - { - value: timings.blocked, - label: SYNTHETICS_BLOCKED_TIMINGS_LABEL, - }, - { - value: timings.connect, - label: SYNTHETICS_CONNECT_TIMINGS_LABEL, - }, - { - value: timings.receive, - label: SYNTHETICS_RECEIVE_TIMINGS_LABEL, - }, - { - value: timings.send, - label: SYNTHETICS_SEND_TIMINGS_LABEL, - }, - { - value: timings.wait, - label: SYNTHETICS_WAIT_TIMINGS_LABEL, - }, - ].sort((a, b) => b.value - a.value), + timingsWithLabels: getTimingWithLabels(timings), }; }; -const SYNTHETICS_CONNECT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.connect.label', { +export const getTimingWithLabels = (timings: Record) => { + return [ + { + value: timings.blocked, + label: SYNTHETICS_BLOCKED_TIMINGS_LABEL, + }, + { + value: timings.dns, + label: SYNTHETICS_DNS_TIMINGS_LABEL, + }, + { + value: timings.connect, + label: SYNTHETICS_CONNECT_TIMINGS_LABEL, + }, + { + value: timings.tls, + label: SYNTHETICS_TLS_TIMINGS_LABEL, + }, + { + value: timings.wait, + label: SYNTHETICS_WAIT_TIMINGS_LABEL, + }, + { + value: timings.receive, + label: SYNTHETICS_RECEIVE_TIMINGS_LABEL, + }, + { + value: timings.send, + label: SYNTHETICS_SEND_TIMINGS_LABEL, + }, + ]; +}; + +export const SYNTHETICS_CONNECT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.connect.label', { defaultMessage: 'Connect', }); -const SYNTHETICS_DNS_TIMINGS_LABEL = i18n.translate('xpack.synthetics.dns', { +export const SYNTHETICS_DNS_TIMINGS_LABEL = i18n.translate('xpack.synthetics.dns', { defaultMessage: 'DNS', }); -const SYNTHETICS_WAIT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.wait', { +export const SYNTHETICS_WAIT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.wait', { defaultMessage: 'Wait', }); -const SYNTHETICS_SSL_TIMINGS_LABEL = i18n.translate('xpack.synthetics.ssl', { - defaultMessage: 'SSL', +export const SYNTHETICS_TLS_TIMINGS_LABEL = i18n.translate('xpack.synthetics.tls', { + defaultMessage: 'TLS', }); -const SYNTHETICS_BLOCKED_TIMINGS_LABEL = i18n.translate('xpack.synthetics.blocked', { +export const SYNTHETICS_BLOCKED_TIMINGS_LABEL = i18n.translate('xpack.synthetics.blocked', { defaultMessage: 'Blocked', }); -const SYNTHETICS_SEND_TIMINGS_LABEL = i18n.translate('xpack.synthetics.send', { +export const SYNTHETICS_SEND_TIMINGS_LABEL = i18n.translate('xpack.synthetics.send', { defaultMessage: 'Send', }); -const SYNTHETICS_RECEIVE_TIMINGS_LABEL = i18n.translate('xpack.synthetics.receive', { +export const SYNTHETICS_RECEIVE_TIMINGS_LABEL = i18n.translate('xpack.synthetics.receive', { defaultMessage: 'Receive', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings_prev.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings_prev.ts index d59a551e58767..b7e392759231f 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings_prev.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_network_timings_prev.ts @@ -22,6 +22,7 @@ import moment from 'moment'; import { useJourneySteps } from '../../monitor_details/hooks/use_journey_steps'; import { SYNTHETICS_INDEX_PATTERN } from '../../../../../../common/constants'; import { useReduxEsSearch } from '../../../hooks/use_redux_es_search'; +import { getTimingWithLabels } from './use_network_timings'; export const useStepFilters = (checkGroupId: string, stepIndex: number) => { return [ @@ -38,11 +39,15 @@ export const useStepFilters = (checkGroupId: string, stepIndex: number) => { ]; }; -export const useNetworkTimingsPrevious24Hours = (stepIndexArg?: number, timestampArg?: string) => { +export const useNetworkTimingsPrevious24Hours = ( + stepIndexArg?: number, + timestampArg?: string, + checkGroupIdArg?: string +) => { const params = useParams<{ checkGroupId: string; stepIndex: string; monitorId: string }>(); const configId = params.monitorId; - const checkGroupId = params.checkGroupId; + const checkGroupId = checkGroupIdArg ?? params.checkGroupId; const stepIndex = stepIndexArg ?? Number(params.stepIndex); const { currentStep } = useJourneySteps(); @@ -210,36 +215,7 @@ export const useNetworkTimingsPrevious24Hours = (stepIndexArg?: number, timestam value: timings.transferSize, label: CONTENT_SIZE_LABEL, }, - timingsWithLabels: [ - { - value: timings.dns, - label: SYNTHETICS_DNS_TIMINGS_LABEL, - }, - { - value: timings.ssl, - label: SYNTHETICS_SSL_TIMINGS_LABEL, - }, - { - value: timings.blocked, - label: SYNTHETICS_BLOCKED_TIMINGS_LABEL, - }, - { - value: timings.connect, - label: SYNTHETICS_CONNECT_TIMINGS_LABEL, - }, - { - value: timings.receive, - label: SYNTHETICS_RECEIVE_TIMINGS_LABEL, - }, - { - value: timings.send, - label: SYNTHETICS_SEND_TIMINGS_LABEL, - }, - { - value: timings.wait, - label: SYNTHETICS_WAIT_TIMINGS_LABEL, - }, - ].sort((a, b) => b.value - a.value), + timingsWithLabels: getTimingWithLabels(timings), }; }; @@ -250,29 +226,6 @@ const median = (arr: number[]): number => { return s.length % 2 === 0 ? (s[mid - 1] + s[mid]) / 2 : s[mid]; }; -const SYNTHETICS_CONNECT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.connect.label', { - defaultMessage: 'Connect', -}); -const SYNTHETICS_DNS_TIMINGS_LABEL = i18n.translate('xpack.synthetics.dns', { - defaultMessage: 'DNS', -}); -const SYNTHETICS_WAIT_TIMINGS_LABEL = i18n.translate('xpack.synthetics.wait', { - defaultMessage: 'Wait', -}); - -const SYNTHETICS_SSL_TIMINGS_LABEL = i18n.translate('xpack.synthetics.ssl', { - defaultMessage: 'SSL', -}); -const SYNTHETICS_BLOCKED_TIMINGS_LABEL = i18n.translate('xpack.synthetics.blocked', { - defaultMessage: 'Blocked', -}); -const SYNTHETICS_SEND_TIMINGS_LABEL = i18n.translate('xpack.synthetics.send', { - defaultMessage: 'Send', -}); -const SYNTHETICS_RECEIVE_TIMINGS_LABEL = i18n.translate('xpack.synthetics.receive', { - defaultMessage: 'Receive', -}); - export const CONTENT_SIZE_LABEL = i18n.translate('xpack.synthetics.contentSize', { defaultMessage: 'Content Size', }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_metrics.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_metrics.ts index 3db64c5113305..0f2342e34496b 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_metrics.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_metrics.ts @@ -6,8 +6,13 @@ */ import { useEsSearch } from '@kbn/observability-plugin/public'; -import { useStepFilters } from './use_step_filters'; +import { useParams } from 'react-router-dom'; +import { i18n } from '@kbn/i18n'; +import { formatBytes } from './use_object_metrics'; +import { formatMillisecond } from '../step_metrics/step_metrics'; +import { CLS_HELP_LABEL, DCL_TOOLTIP, FCP_TOOLTIP, LCP_HELP_LABEL } from '../step_metrics/labels'; import { SYNTHETICS_INDEX_PATTERN } from '../../../../../../common/constants'; +import { JourneyStep } from '../../../../../../common/runtime_types'; export const MONITOR_DURATION_US = 'monitor.duration.us'; export const SYNTHETICS_CLS = 'browser.experience.cls'; @@ -20,12 +25,14 @@ export const SYNTHETICS_STEP_DURATION = 'synthetics.step.duration.us'; export type StepMetrics = ReturnType; -export const useStepMetrics = (loadData = true, prevCheckGroupId?: string) => { - const esIndex = loadData ? SYNTHETICS_INDEX_PATTERN : ''; +export const useStepMetrics = (step?: JourneyStep) => { + const urlParams = useParams<{ checkGroupId: string; stepIndex: string }>(); + const checkGroupId = step?.monitor.check_group ?? urlParams.checkGroupId; + const stepIndex = step?.synthetics.step?.index ?? urlParams.stepIndex; const { data } = useEsSearch( { - index: esIndex, + index: SYNTHETICS_INDEX_PATTERN, body: { size: 0, query: { @@ -36,7 +43,16 @@ export const useStepMetrics = (loadData = true, prevCheckGroupId?: string) => { 'synthetics.type': ['step/metrics', 'step/end'], }, }, - ...useStepFilters(prevCheckGroupId), + { + term: { + 'monitor.check_group': checkGroupId, + }, + }, + { + term: { + 'synthetics.step.index': Number(stepIndex), + }, + }, ], }, }, @@ -69,13 +85,13 @@ export const useStepMetrics = (loadData = true, prevCheckGroupId?: string) => { }, }, }, - [esIndex], - { name: prevCheckGroupId ? 'previousStepMetrics' : 'stepMetrics' } + [stepIndex, checkGroupId], + { name: 'stepMetrics' } ); const { data: transferData } = useEsSearch( { - index: esIndex, + index: SYNTHETICS_INDEX_PATTERN, body: { size: 0, runtime_mappings: { @@ -94,7 +110,16 @@ export const useStepMetrics = (loadData = true, prevCheckGroupId?: string) => { 'synthetics.type': 'journey/network_info', }, }, - ...useStepFilters(prevCheckGroupId), + { + term: { + 'monitor.check_group': checkGroupId, + }, + }, + { + term: { + 'synthetics.step.index': Number(stepIndex), + }, + }, ], }, }, @@ -112,17 +137,80 @@ export const useStepMetrics = (loadData = true, prevCheckGroupId?: string) => { }, }, }, - [esIndex], + [stepIndex, checkGroupId], { - name: prevCheckGroupId - ? 'previousStepMetricsFromNetworkInfos' - : 'stepMetricsFromNetworkInfos', + name: 'stepMetricsFromNetworkInfos', } ); + const metrics = data?.aggregations; + const transferDataVal = transferData?.aggregations?.transferSize?.value ?? 0; + return { ...(data?.aggregations ?? {}), - transferData: ((transferData?.aggregations?.transferSize?.value ?? 0) / 1e6).toFixed(0), - resourceSize: ((transferData?.aggregations?.resourceSize?.value ?? 0) / 1e6).toFixed(0), + transferData: transferData?.aggregations?.transferSize?.value ?? 0, + resourceSize: transferData?.aggregations?.resourceSize?.value ?? 0, + + metrics: [ + { + label: STEP_DURATION_LABEL, + value: metrics?.totalDuration.value, + formatted: formatMillisecond((metrics?.totalDuration.value ?? 0) / 1000), + }, + { + value: metrics?.lcp.value, + label: LCP_LABEL, + helpText: LCP_HELP_LABEL, + formatted: formatMillisecond((metrics?.lcp.value ?? 0) / 1000), + }, + { + value: metrics?.fcp.value, + label: FCP_LABEL, + helpText: FCP_TOOLTIP, + formatted: formatMillisecond((metrics?.fcp.value ?? 0) / 1000), + }, + { + value: metrics?.cls.value, + label: CLS_LABEL, + helpText: CLS_HELP_LABEL, + formatted: formatMillisecond((metrics?.cls.value ?? 0) / 1000), + }, + { + value: metrics?.dcl.value, + label: DCL_LABEL, + helpText: DCL_TOOLTIP, + formatted: formatMillisecond((metrics?.dcl.value ?? 0) / 1000), + }, + { + value: transferDataVal, + label: TRANSFER_SIZE, + helpText: '', + formatted: formatBytes(transferDataVal ?? 0), + }, + ], }; }; + +export const LCP_LABEL = i18n.translate('xpack.synthetics.lcp.label', { + defaultMessage: 'LCP', +}); + +export const FCP_LABEL = i18n.translate('xpack.synthetics.fcp.label', { + defaultMessage: 'FCP', +}); + +export const CLS_LABEL = i18n.translate('xpack.synthetics.cls.label', { + defaultMessage: 'CLS', +}); + +export const DCL_LABEL = i18n.translate('xpack.synthetics.dcl.label', { + defaultMessage: 'DCL', +}); + +export const STEP_DURATION_LABEL = i18n.translate('xpack.synthetics.totalDuration.metrics', { + defaultMessage: 'Step duration', +}); + +export const TRANSFER_SIZE = i18n.translate('xpack.synthetics.totalDuration.transferSize', { + defaultMessage: 'Transfer size', +}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_prev_metrics.ts b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_prev_metrics.ts index bf8f1e14259de..db5475380f5eb 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_prev_metrics.ts +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/hooks/use_step_prev_metrics.ts @@ -6,8 +6,19 @@ */ import { useParams } from 'react-router-dom'; -import { useJourneySteps } from '../../monitor_details/hooks/use_journey_steps'; -import { StepMetrics, useStepMetrics } from './use_step_metrics'; +import { useEsSearch } from '@kbn/observability-plugin/public'; +import { formatBytes } from './use_object_metrics'; +import { formatMillisecond } from '../step_metrics/step_metrics'; +import { SYNTHETICS_INDEX_PATTERN } from '../../../../../../common/constants'; +import { + CLS_LABEL, + DCL_LABEL, + FCP_LABEL, + LCP_LABEL, + STEP_DURATION_LABEL, + TRANSFER_SIZE, +} from './use_step_metrics'; +import { JourneyStep } from '../../../../../../common/runtime_types'; export const MONITOR_DURATION_US = 'monitor.duration.us'; export const SYNTHETICS_CLS = 'browser.experience.cls'; @@ -18,33 +29,182 @@ export const SYNTHETICS_DCL = 'browser.experience.dcl.us'; export const SYNTHETICS_STEP_NAME = 'synthetics.step.name.keyword'; export const SYNTHETICS_STEP_DURATION = 'synthetics.step.duration.us'; -export const useStepPrevMetrics = (stepMetrics: StepMetrics) => { - const { checkGroupId } = useParams<{ checkGroupId: string; stepIndex: string }>(); +export const useStepPrevMetrics = (step?: JourneyStep) => { + const urlParams = useParams<{ + checkGroupId: string; + stepIndex: string; + monitorId: string; + }>(); - const { data } = useJourneySteps(checkGroupId); + const monitorId = urlParams.monitorId; + const checkGroupId = step?.monitor.check_group ?? urlParams.checkGroupId; + const stepIndex = step?.synthetics.step?.index ?? urlParams.stepIndex; - const prevCheckGroupId = data?.details?.previous?.checkGroup; - - const prevMetrics = useStepMetrics(Boolean(prevCheckGroupId), prevCheckGroupId); + const { data, loading } = useEsSearch( + { + index: SYNTHETICS_INDEX_PATTERN, + body: { + size: 0, + query: { + bool: { + filter: [ + { + terms: { + 'synthetics.type': ['step/metrics', 'step/end'], + }, + }, + { + term: { + 'synthetics.step.index': Number(stepIndex), + }, + }, + { + term: { + config_id: monitorId, + }, + }, + { + range: { + '@timestamp': { + lte: 'now', + gte: 'now-24h/h', + }, + }, + }, + ], + }, + }, + aggs: { + fcp: { + avg: { + field: SYNTHETICS_FCP, + }, + }, + lcp: { + avg: { + field: SYNTHETICS_LCP, + }, + }, + cls: { + avg: { + field: SYNTHETICS_CLS, + }, + }, + dcl: { + avg: { + field: SYNTHETICS_DCL, + }, + }, + totalDuration: { + avg: { + field: SYNTHETICS_STEP_DURATION, + }, + }, + }, + }, + }, + [monitorId, checkGroupId, stepIndex], + { name: 'previousStepMetrics' } + ); - const fcpThreshold = findThreshold(stepMetrics?.fcp?.value, prevMetrics?.fcp?.value); - const lcpThreshold = findThreshold(stepMetrics?.lcp?.value, prevMetrics?.lcp?.value); - const clsThreshold = findThreshold(stepMetrics?.cls?.value, prevMetrics?.cls?.value); - const dclThreshold = findThreshold(stepMetrics?.dcl?.value, prevMetrics?.dcl?.value); - const totalThreshold = findThreshold( - stepMetrics?.totalDuration?.value, - prevMetrics?.totalDuration?.value + const { data: transferData } = useEsSearch( + { + index: SYNTHETICS_INDEX_PATTERN, + body: { + size: 0, + runtime_mappings: { + 'synthetics.payload.transfer_size': { + type: 'double', + }, + 'synthetics.payload.resource_size': { + type: 'double', + }, + }, + query: { + bool: { + filter: [ + { + term: { + 'synthetics.type': 'journey/network_info', + }, + }, + { + term: { + 'synthetics.step.index': Number(stepIndex), + }, + }, + { + term: { + config_id: monitorId, + }, + }, + { + range: { + '@timestamp': { + lte: 'now', + gte: 'now-24h/h', + }, + }, + }, + ], + }, + }, + aggs: { + transferSize: { + avg: { + field: 'synthetics.payload.transfer_size', + }, + }, + resourceSize: { + avg: { + field: 'synthetics.payload.resource_size', + }, + }, + }, + }, + }, + [monitorId, checkGroupId, stepIndex], + { + name: 'previousStepMetricsFromNetworkInfos', + } ); + const metrics = data?.aggregations; + const transferDataVal = transferData?.aggregations?.transferSize?.value ?? 0; + return { - fcpThreshold, - lcpThreshold, - clsThreshold, - dclThreshold, - totalThreshold, + loading, + metrics: [ + { + label: STEP_DURATION_LABEL, + value: metrics?.totalDuration.value, + formatted: formatMillisecond((metrics?.totalDuration.value ?? 0) / 1000), + }, + { + value: metrics?.lcp.value, + label: LCP_LABEL, + formatted: formatMillisecond((metrics?.lcp.value ?? 0) / 1000), + }, + { + value: metrics?.fcp.value, + label: FCP_LABEL, + formatted: formatMillisecond((metrics?.fcp.value ?? 0) / 1000), + }, + { + value: metrics?.cls.value, + label: CLS_LABEL, + formatted: formatMillisecond((metrics?.cls.value ?? 0) / 1000), + }, + { + value: metrics?.dcl.value, + label: DCL_LABEL, + formatted: formatMillisecond((metrics?.dcl.value ?? 0) / 1000), + }, + { + value: transferDataVal, + label: TRANSFER_SIZE, + formatted: formatBytes(transferDataVal ?? 0), + }, + ], }; }; - -const findThreshold = (current?: number | null, prev?: number | null) => { - return -1 * (100 - ((current ?? 0) / (prev ?? 0)) * 100); -}; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx index 1539c98111c5f..bb508e9bea2f0 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_metrics/step_metrics.tsx @@ -6,23 +6,18 @@ */ import React from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiSpacer, - EuiStat, - EuiTitle, - EuiIcon, - EuiIconTip, - EuiFlexGrid, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle, EuiFlexGrid } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { CLS_HELP_LABEL, DCL_TOOLTIP, FCP_TOOLTIP, LCP_HELP_LABEL } from './labels'; +import { ThresholdIndicator } from '../../common/components/thershold_indicator'; import { DefinitionsPopover } from './definitions_popover'; import { useStepMetrics } from '../hooks/use_step_metrics'; import { useStepPrevMetrics } from '../hooks/use_step_prev_metrics'; export const formatMillisecond = (ms: number) => { + if (ms < 0) { + return '- ms'; + } + if (ms < 1000) { return `${ms.toFixed(0)} ms`; } @@ -30,10 +25,8 @@ export const formatMillisecond = (ms: number) => { }; export const StepMetrics = () => { - const stepMetrics = useStepMetrics(); - - const { fcpThreshold, lcpThreshold, clsThreshold, dclThreshold, totalThreshold } = - useStepPrevMetrics(stepMetrics); + const { metrics: stepMetrics } = useStepMetrics(); + const { metrics: prevMetrics, loading } = useStepPrevMetrics(); return ( <> @@ -50,108 +43,30 @@ export const StepMetrics = () => { - - - - - - - - - - - - - - - - - - - + {stepMetrics.map(({ label, value, helpText, formatted }) => { + const prevVal = prevMetrics.find((prev) => prev.label === label); + + if (label) + return ( + + + + ); + })} ); }; -const StatThreshold = ({ - title, - threshold, - description, - helpText, -}: { - threshold: number; - title: number | string; - description: string; - helpText?: string; -}) => { - const isUp = threshold >= 5; - const isDown = threshold < 5; - - const isSame = (!isUp && !isDown) || !isFinite(threshold); - return ( - - - - {description} {helpText && } - - } - title={ - <> - {title} - - {isSame ? ( - - ) : ( - - )} - - - } - reverse={true} - /> - - - ); -}; - const METRICS_LABEL = i18n.translate('xpack.synthetics.stepDetailsRoute.metrics', { defaultMessage: 'Metrics', }); - -const TOTAL_DURATION_LABEL = i18n.translate('xpack.synthetics.totalDuration.metrics', { - defaultMessage: 'Step duration', -}); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx index d2452a40f2426..d530b557fa356 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/routes.tsx @@ -7,15 +7,16 @@ import { EuiThemeComputed } from '@elastic/eui/src/services/theme/types'; import React, { FC, useEffect } from 'react'; -import { EuiLink, useEuiTheme } from '@elastic/eui'; +import { EuiButtonEmpty, EuiLink, useEuiTheme } from '@elastic/eui'; import { Route, Switch, useHistory } from 'react-router-dom'; import { OutPortal } from 'react-reverse-portal'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; +import { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; import { APP_WRAPPER_CLASS } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { useInspectorContext } from '@kbn/observability-plugin/public'; import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-plugin/public'; +import { useInspectorContext } from '@kbn/observability-plugin/public'; import { ClientPluginsStart } from '../../plugin'; import { getMonitorsRoute } from './components/monitors_page/route_config'; import { getMonitorDetailsRoute } from './components/monitor_details/route_config'; @@ -26,10 +27,9 @@ import { TestRunDetails } from './components/test_run_details/test_run_details'; import { MonitorAddPageWithServiceAllowed } from './components/monitor_add_edit/monitor_add_page'; import { MonitorEditPageWithServiceAllowed } from './components/monitor_add_edit/monitor_edit_page'; import { GettingStartedPage } from './components/getting_started/getting_started_page'; -import { NotFoundPage } from './components/common/pages/not_found'; import { - MonitorTypePortalNode, MonitorDetailsLinkPortalNode, + MonitorTypePortalNode, } from './components/monitor_add_edit/portals'; import { GETTING_STARTED_ROUTE, @@ -210,7 +210,27 @@ export const PageRouter: FC = () => { ) )} - + ( + + { + application.navigateToApp(PLUGIN.SYNTHETICS_PLUGIN_ID); + }} + > + {i18n.translate('xpack.synthetics.routes.goToSynthetics', { + defaultMessage: 'Go to Synthetics Home Page', + })} + , + ]} + /> + + )} + /> ); }; diff --git a/x-pack/plugins/synthetics/tsconfig.json b/x-pack/plugins/synthetics/tsconfig.json index e752376f4e908..384edfb5f7522 100644 --- a/x-pack/plugins/synthetics/tsconfig.json +++ b/x-pack/plugins/synthetics/tsconfig.json @@ -71,6 +71,7 @@ "@kbn/core-elasticsearch-server", "@kbn/core-saved-objects-api-server-mocks", "@kbn/core-saved-objects-server", + "@kbn/shared-ux-prompt-not-found", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/transform/common/types/date_picker.ts b/x-pack/plugins/transform/common/types/date_picker.ts new file mode 100644 index 0000000000000..09b5d0cba83be --- /dev/null +++ b/x-pack/plugins/transform/common/types/date_picker.ts @@ -0,0 +1,11 @@ +/* + * 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 interface TimeRangeMs { + from: number; + to: number; +} diff --git a/x-pack/plugins/transform/public/app/common/data_grid.test.ts b/x-pack/plugins/transform/public/app/common/data_grid.test.ts index 31f0a2bc688d8..0cb2ed18c58f7 100644 --- a/x-pack/plugins/transform/public/app/common/data_grid.test.ts +++ b/x-pack/plugins/transform/public/app/common/data_grid.test.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { getPreviewTransformRequestBody, SimpleQuery } from '.'; +import type { DataView } from '@kbn/data-views-plugin/common'; -import { getIndexDevConsoleStatement, getPivotPreviewDevConsoleStatement } from './data_grid'; +import { getPreviewTransformRequestBody, SimpleQuery } from '.'; +import { getIndexDevConsoleStatement, getTransformPreviewDevConsoleStatement } from './data_grid'; describe('Transform: Data Grid', () => { - test('getPivotPreviewDevConsoleStatement()', () => { + test('getTransformPreviewDevConsoleStatement()', () => { const query: SimpleQuery = { query_string: { query: '*', @@ -18,26 +19,30 @@ describe('Transform: Data Grid', () => { }, }; - const request = getPreviewTransformRequestBody('the-index-pattern-title', query, { - pivot: { - group_by: { - 'the-group-by-agg-name': { - terms: { - field: 'the-group-by-field', + const request = getPreviewTransformRequestBody( + { getIndexPattern: () => 'the-index-pattern-title' } as DataView, + query, + { + pivot: { + group_by: { + 'the-group-by-agg-name': { + terms: { + field: 'the-group-by-field', + }, }, }, - }, - aggregations: { - 'the-agg-agg-name': { - avg: { - field: 'the-agg-field', + aggregations: { + 'the-agg-agg-name': { + avg: { + field: 'the-agg-field', + }, }, }, }, - }, - }); + } + ); - const pivotPreviewDevConsoleStatement = getPivotPreviewDevConsoleStatement(request); + const pivotPreviewDevConsoleStatement = getTransformPreviewDevConsoleStatement(request); expect(pivotPreviewDevConsoleStatement).toBe(`POST _transform/_preview { diff --git a/x-pack/plugins/transform/public/app/common/data_grid.ts b/x-pack/plugins/transform/public/app/common/data_grid.ts index 43d2b27f13cf9..c6a740787e2b1 100644 --- a/x-pack/plugins/transform/public/app/common/data_grid.ts +++ b/x-pack/plugins/transform/public/app/common/data_grid.ts @@ -7,15 +7,17 @@ import type { PostTransformsPreviewRequestSchema } from '../../../common/api_schemas/transforms'; -import { PivotQuery } from './request'; +import { TransformConfigQuery } from './request'; export const INIT_MAX_COLUMNS = 20; -export const getPivotPreviewDevConsoleStatement = (request: PostTransformsPreviewRequestSchema) => { +export const getTransformPreviewDevConsoleStatement = ( + request: PostTransformsPreviewRequestSchema +) => { return `POST _transform/_preview\n${JSON.stringify(request, null, 2)}\n`; }; -export const getIndexDevConsoleStatement = (query: PivotQuery, dataViewTitle: string) => { +export const getIndexDevConsoleStatement = (query: TransformConfigQuery, dataViewTitle: string) => { return `GET ${dataViewTitle}/_search\n${JSON.stringify( { query, diff --git a/x-pack/plugins/transform/public/app/common/index.ts b/x-pack/plugins/transform/public/app/common/index.ts index 1f397ee4285ef..c7656974ec569 100644 --- a/x-pack/plugins/transform/public/app/common/index.ts +++ b/x-pack/plugins/transform/public/app/common/index.ts @@ -8,7 +8,7 @@ export { isAggName } from './aggregations'; export { getIndexDevConsoleStatement, - getPivotPreviewDevConsoleStatement, + getTransformPreviewDevConsoleStatement, INIT_MAX_COLUMNS, } from './data_grid'; export type { EsDoc, EsDocSource } from './fields'; @@ -64,12 +64,12 @@ export { pivotGroupByFieldSupport, PIVOT_SUPPORTED_GROUP_BY_AGGS, } from './pivot_group_by'; -export type { PivotQuery, SimpleQuery } from './request'; +export type { TransformConfigQuery, SimpleQuery } from './request'; export { defaultQuery, getPreviewTransformRequestBody, getCreateTransformRequestBody, - getPivotQuery, + getTransformConfigQuery, getRequestPayload, isDefaultQuery, isMatchAllQuery, diff --git a/x-pack/plugins/transform/public/app/common/request.test.ts b/x-pack/plugins/transform/public/app/common/request.test.ts index 2c4415c56c466..60ad397f6f30a 100644 --- a/x-pack/plugins/transform/public/app/common/request.test.ts +++ b/x-pack/plugins/transform/public/app/common/request.test.ts @@ -5,6 +5,8 @@ * 2.0. */ +import type { DataView } from '@kbn/data-views-plugin/common'; + import { PIVOT_SUPPORTED_AGGS } from '../../../common/types/pivot_aggs'; import { PivotGroupByConfig } from '.'; @@ -19,19 +21,19 @@ import { getPreviewTransformRequestBody, getCreateTransformRequestBody, getCreateTransformSettingsRequestBody, - getPivotQuery, + getTransformConfigQuery, getMissingBucketConfig, getRequestPayload, isDefaultQuery, isMatchAllQuery, isSimpleQuery, matchAllQuery, - PivotQuery, + type TransformConfigQuery, } from './request'; import { LatestFunctionConfigUI } from '../../../common/types/transform'; import type { RuntimeField } from '@kbn/data-views-plugin/common'; -const simpleQuery: PivotQuery = { query_string: { query: 'airline:AAL' } }; +const simpleQuery: TransformConfigQuery = { query_string: { query: 'airline:AAL' } }; const groupByTerms: PivotGroupByConfig = { agg: PIVOT_SUPPORTED_GROUP_BY_AGGS.TERMS, @@ -62,12 +64,12 @@ describe('Transform: Common', () => { test('isDefaultQuery()', () => { expect(isDefaultQuery(defaultQuery)).toBe(true); - expect(isDefaultQuery(matchAllQuery)).toBe(false); + expect(isDefaultQuery(matchAllQuery)).toBe(true); expect(isDefaultQuery(simpleQuery)).toBe(false); }); - test('getPivotQuery()', () => { - const query = getPivotQuery('the-query'); + test('getTransformConfigQuery()', () => { + const query = getTransformConfigQuery('the-query'); expect(query).toEqual({ query_string: { @@ -78,14 +80,18 @@ describe('Transform: Common', () => { }); test('getPreviewTransformRequestBody()', () => { - const query = getPivotQuery('the-query'); + const query = getTransformConfigQuery('the-query'); - const request = getPreviewTransformRequestBody('the-data-view-title', query, { - pivot: { - aggregations: { 'the-agg-agg-name': { avg: { field: 'the-agg-field' } } }, - group_by: { 'the-group-by-agg-name': { terms: { field: 'the-group-by-field' } } }, - }, - }); + const request = getPreviewTransformRequestBody( + { getIndexPattern: () => 'the-data-view-title' } as DataView, + query, + { + pivot: { + aggregations: { 'the-agg-agg-name': { avg: { field: 'the-agg-field' } } }, + group_by: { 'the-group-by-agg-name': { terms: { field: 'the-group-by-field' } } }, + }, + } + ); expect(request).toEqual({ pivot: { @@ -100,13 +106,17 @@ describe('Transform: Common', () => { }); test('getPreviewTransformRequestBody() with comma-separated index pattern', () => { - const query = getPivotQuery('the-query'); - const request = getPreviewTransformRequestBody('the-data-view-title,the-other-title', query, { - pivot: { - aggregations: { 'the-agg-agg-name': { avg: { field: 'the-agg-field' } } }, - group_by: { 'the-group-by-agg-name': { terms: { field: 'the-group-by-field' } } }, - }, - }); + const query = getTransformConfigQuery('the-query'); + const request = getPreviewTransformRequestBody( + { getIndexPattern: () => 'the-data-view-title,the-other-title' } as DataView, + query, + { + pivot: { + aggregations: { 'the-agg-agg-name': { avg: { field: 'the-agg-field' } } }, + group_by: { 'the-group-by-agg-name': { terms: { field: 'the-group-by-field' } } }, + }, + } + ); expect(request).toEqual({ pivot: { @@ -172,9 +182,9 @@ describe('Transform: Common', () => { }); test('getPreviewTransformRequestBody() with missing_buckets config', () => { - const query = getPivotQuery('the-query'); + const query = getTransformConfigQuery('the-query'); const request = getPreviewTransformRequestBody( - 'the-data-view-title', + { getIndexPattern: () => 'the-data-view-title' } as DataView, query, getRequestPayload([aggsAvg], [{ ...groupByTerms, ...{ missing_bucket: true } }]) ); @@ -194,11 +204,12 @@ describe('Transform: Common', () => { }); test('getCreateTransformRequestBody() skips default values', () => { - const pivotState: StepDefineExposedState = { + const transformConfigState: StepDefineExposedState = { aggList: { 'the-agg-name': aggsAvg }, groupByList: { 'the-group-by-name': groupByTerms }, isAdvancedPivotEditorEnabled: false, isAdvancedSourceEditorEnabled: false, + isDatePickerApplyEnabled: false, sourceConfigUpdated: false, searchLanguage: 'kuery', searchString: 'the-query', @@ -239,8 +250,8 @@ describe('Transform: Common', () => { }; const request = getCreateTransformRequestBody( - 'the-data-view-title', - pivotState, + { getIndexPattern: () => 'the-data-view-title' } as DataView, + transformConfigState, transformDetailsState ); @@ -278,6 +289,7 @@ describe('Transform: Common', () => { groupByList: { 'the-group-by-name': groupByTerms }, isAdvancedPivotEditorEnabled: false, isAdvancedSourceEditorEnabled: false, + isDatePickerApplyEnabled: false, sourceConfigUpdated: false, searchLanguage: 'kuery', searchString: 'the-query', @@ -319,7 +331,7 @@ describe('Transform: Common', () => { }; const request = getCreateTransformRequestBody( - 'the-data-view-title', + { getIndexPattern: () => 'the-data-view-title' } as DataView, pivotState, transformDetailsState ); diff --git a/x-pack/plugins/transform/public/app/common/request.ts b/x-pack/plugins/transform/public/app/common/request.ts index c66618df209f7..42162498f3f3c 100644 --- a/x-pack/plugins/transform/public/app/common/request.ts +++ b/x-pack/plugins/transform/public/app/common/request.ts @@ -8,6 +8,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { DataView } from '@kbn/data-views-plugin/public'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import { buildBaseFilterCriteria } from '@kbn/ml-query-utils'; import { DEFAULT_CONTINUOUS_MODE_DELAY, @@ -47,9 +48,15 @@ export interface SimpleQuery { }; } -export type PivotQuery = SimpleQuery | SavedSearchQuery; +export interface FilterBasedSimpleQuery { + bool: { + filter: [SimpleQuery]; + }; +} + +export type TransformConfigQuery = FilterBasedSimpleQuery | SimpleQuery | SavedSearchQuery; -export function getPivotQuery(search: string | SavedSearchQuery): PivotQuery { +export function getTransformConfigQuery(search: string | SavedSearchQuery): TransformConfigQuery { if (typeof search === 'string') { return { query_string: { @@ -66,6 +73,16 @@ export function isSimpleQuery(arg: unknown): arg is SimpleQuery { return isPopulatedObject(arg, ['query_string']); } +export function isFilterBasedSimpleQuery(arg: unknown): arg is FilterBasedSimpleQuery { + return ( + isPopulatedObject(arg, ['bool']) && + isPopulatedObject(arg.bool, ['filter']) && + Array.isArray(arg.bool.filter) && + arg.bool.filter.length === 1 && + isSimpleQuery(arg.bool.filter[0]) + ); +} + export const matchAllQuery = { match_all: {} }; export function isMatchAllQuery(query: unknown): boolean { return ( @@ -76,9 +93,14 @@ export function isMatchAllQuery(query: unknown): boolean { ); } -export const defaultQuery: PivotQuery = { query_string: { query: '*' } }; -export function isDefaultQuery(query: PivotQuery): boolean { - return isSimpleQuery(query) && query.query_string.query === '*'; +export const defaultQuery: TransformConfigQuery = { query_string: { query: '*' } }; +export function isDefaultQuery(query: TransformConfigQuery): boolean { + return ( + isMatchAllQuery(query) || + (isSimpleQuery(query) && query.query_string.query === '*') || + (isFilterBasedSimpleQuery(query) && + (query.bool.filter[0].query_string.query === '*' || isMatchAllQuery(query.bool.filter[0]))) + ); } export function getCombinedRuntimeMappings( @@ -171,17 +193,36 @@ export const getRequestPayload = ( }; export function getPreviewTransformRequestBody( - dataViewTitle: DataView['title'], - query: PivotQuery, - partialRequest?: StepDefineExposedState['previewRequest'] | undefined, - runtimeMappings?: StepDefineExposedState['runtimeMappings'] + dataView: DataView, + transformConfigQuery: TransformConfigQuery, + partialRequest?: StepDefineExposedState['previewRequest'], + runtimeMappings?: StepDefineExposedState['runtimeMappings'], + timeRangeMs?: StepDefineExposedState['timeRangeMs'] ): PostTransformsPreviewRequestSchema { + const dataViewTitle = dataView.getIndexPattern(); const index = dataViewTitle.split(',').map((name: string) => name.trim()); + const hasValidTimeField = dataView.timeFieldName !== undefined && dataView.timeFieldName !== ''; + + const baseFilterCriteria = buildBaseFilterCriteria( + dataView.timeFieldName, + timeRangeMs?.from, + timeRangeMs?.to, + isDefaultQuery(transformConfigQuery) ? undefined : transformConfigQuery + ); + + const queryWithBaseFilterCriteria = { + bool: { + filter: baseFilterCriteria, + }, + }; + + const query = hasValidTimeField ? queryWithBaseFilterCriteria : transformConfigQuery; + return { source: { index, - ...(!isDefaultQuery(query) && !isMatchAllQuery(query) ? { query } : {}), + ...(isDefaultQuery(query) ? {} : { query }), ...(isPopulatedObject(runtimeMappings) ? { runtime_mappings: runtimeMappings } : {}), }, ...(partialRequest ?? {}), @@ -212,15 +253,18 @@ export const getCreateTransformSettingsRequestBody = ( }; export const getCreateTransformRequestBody = ( - dataViewTitle: DataView['title'], - pivotState: StepDefineExposedState, + dataView: DataView, + transformConfigState: StepDefineExposedState, transformDetailsState: StepDetailsExposedState ): PutTransformsPivotRequestSchema | PutTransformsLatestRequestSchema => ({ ...getPreviewTransformRequestBody( - dataViewTitle, - getPivotQuery(pivotState.searchQuery), - pivotState.previewRequest, - pivotState.runtimeMappings + dataView, + getTransformConfigQuery(transformConfigState.searchQuery), + transformConfigState.previewRequest, + transformConfigState.runtimeMappings, + transformConfigState.isDatePickerApplyEnabled && transformConfigState.timeRangeMs + ? transformConfigState.timeRangeMs + : undefined ), // conditionally add optional description ...(transformDetailsState.transformDescription !== '' diff --git a/x-pack/plugins/transform/public/app/hooks/use_index_data.ts b/x-pack/plugins/transform/public/app/hooks/use_index_data.ts index 22c314c89850a..d4fbf1c77d054 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_index_data.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_index_data.ts @@ -10,6 +10,9 @@ import { useEffect, useMemo, useState } from 'react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { EuiDataGridColumn } from '@elastic/eui'; +import { buildBaseFilterCriteria } from '@kbn/ml-query-utils'; + +import type { TimeRangeMs } from '../../../common/types/date_picker'; import { isEsSearchResponse, isFieldHistogramsResponseSchema, @@ -19,21 +22,23 @@ import { isKeywordDuplicate, removeKeywordPostfix, } from '../../../common/utils/field_utils'; -import type { EsSorting, UseIndexDataReturnType } from '../../shared_imports'; - import { getErrorMessage } from '../../../common/utils/errors'; -import { isDefaultQuery, matchAllQuery, PivotQuery } from '../common'; -import { SearchItems } from './use_search_items'; -import { useApi } from './use_api'; +import { isRuntimeMappings } from '../../../common/shared_imports'; + +import type { EsSorting, UseIndexDataReturnType } from '../../shared_imports'; +import { isDefaultQuery, matchAllQuery, TransformConfigQuery } from '../common'; import { useAppDependencies, useToastNotifications } from '../app_dependencies'; import type { StepDefineExposedState } from '../sections/create_transform/components/step_define/common'; -import { isRuntimeMappings } from '../../../common/shared_imports'; + +import { SearchItems } from './use_search_items'; +import { useApi } from './use_api'; export const useIndexData = ( dataView: SearchItems['dataView'], - query: PivotQuery, - combinedRuntimeMappings?: StepDefineExposedState['runtimeMappings'] + query: TransformConfigQuery, + combinedRuntimeMappings?: StepDefineExposedState['runtimeMappings'], + timeRangeMs?: TimeRangeMs ): UseIndexDataReturnType => { const indexPattern = useMemo(() => dataView.getIndexPattern(), [dataView]); @@ -55,6 +60,24 @@ export const useIndexData = ( const [dataViewFields, setDataViewFields] = useState(); + const baseFilterCriteria = buildBaseFilterCriteria( + dataView.timeFieldName, + timeRangeMs?.from, + timeRangeMs?.to, + query + ); + + const defaultQuery = useMemo( + () => (timeRangeMs && dataView.timeFieldName ? baseFilterCriteria[0] : matchAllQuery), + [baseFilterCriteria, dataView, timeRangeMs] + ); + + const queryWithBaseFilterCriteria = { + bool: { + filter: baseFilterCriteria, + }, + }; + // Fetch 500 random documents to determine populated fields. // This is a workaround to avoid passing potentially thousands of unpopulated fields // (for example, as part of filebeat/metricbeat/ECS based indices) @@ -70,7 +93,7 @@ export const useIndexData = ( _source: false, query: { function_score: { - query: { match_all: {} }, + query: defaultQuery, random_score: {}, }, }, @@ -106,7 +129,7 @@ export const useIndexData = ( useEffect(() => { fetchDataGridSampleDocuments(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [timeRangeMs]); const columns: EuiDataGridColumn[] = useMemo(() => { if (typeof dataViewFields === 'undefined') { @@ -165,7 +188,7 @@ export const useIndexData = ( resetPagination(); // custom comparison // eslint-disable-next-line react-hooks/exhaustive-deps - }, [JSON.stringify(query)]); + }, [JSON.stringify([query, timeRangeMs])]); const fetchDataGridData = async function () { setErrorMessage(''); @@ -181,8 +204,7 @@ export const useIndexData = ( body: { fields: ['*'], _source: false, - // Instead of using the default query (`*`), fall back to a more efficient `match_all` query. - query: isDefaultQuery(query) ? matchAllQuery : query, + query: isDefaultQuery(query) ? defaultQuery : queryWithBaseFilterCriteria, from: pagination.pageIndex * pagination.pageSize, size: pagination.pageSize, ...(Object.keys(sort).length > 0 ? { sort } : {}), @@ -236,7 +258,7 @@ export const useIndexData = ( type: getFieldType(cT.schema), }; }), - isDefaultQuery(query) ? matchAllQuery : query, + isDefaultQuery(query) ? defaultQuery : queryWithBaseFilterCriteria, combinedRuntimeMappings ); @@ -263,7 +285,14 @@ export const useIndexData = ( }, [ indexPattern, // eslint-disable-next-line react-hooks/exhaustive-deps - JSON.stringify([query, pagination, sortingColumns, dataViewFields, combinedRuntimeMappings]), + JSON.stringify([ + query, + pagination, + sortingColumns, + dataViewFields, + combinedRuntimeMappings, + timeRangeMs, + ]), ]); useEffect(() => { @@ -276,7 +305,7 @@ export const useIndexData = ( chartsVisible, indexPattern, // eslint-disable-next-line react-hooks/exhaustive-deps - JSON.stringify([query, dataGrid.visibleColumns, combinedRuntimeMappings]), + JSON.stringify([query, dataGrid.visibleColumns, combinedRuntimeMappings, timeRangeMs]), ]); const renderCellValue = useRenderCellValue(dataView, pagination, tableItems); diff --git a/x-pack/plugins/transform/public/app/hooks/use_search_items/use_search_items.ts b/x-pack/plugins/transform/public/app/hooks/use_search_items/use_search_items.ts index cd24d092f754c..51e6fcaf469e7 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_search_items/use_search_items.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_search_items/use_search_items.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { useEffect, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { i18n } from '@kbn/i18n'; @@ -27,6 +27,13 @@ export const useSearchItems = (defaultSavedObjectId: string | undefined) => { const [searchItems, setSearchItems] = useState(undefined); + const isMounted = useRef(true); + useEffect(() => { + return () => { + isMounted.current = false; + }; + }, []); + async function fetchSavedObject(id: string) { let fetchedDataView; let fetchedSavedSearch; @@ -44,7 +51,7 @@ export const useSearchItems = (defaultSavedObjectId: string | undefined) => { spaces: appDeps.spaces, }); - if (fetchedSavedSearch?.sharingSavedObjectProps?.errorJSON) { + if (isMounted.current && fetchedSavedSearch?.sharingSavedObjectProps?.errorJSON) { setError(await getSavedSearchUrlConflictMessage(fetchedSavedSearch)); return; } @@ -52,17 +59,19 @@ export const useSearchItems = (defaultSavedObjectId: string | undefined) => { // Just let fetchedSavedSearch stay undefined in case it doesn't exist. } - if (!isDataView(fetchedDataView) && fetchedSavedSearch === undefined) { - setError( - i18n.translate('xpack.transform.searchItems.errorInitializationTitle', { - defaultMessage: `An error occurred initializing the Kibana data view or saved search.`, - }) - ); - return; - } + if (isMounted.current) { + if (!isDataView(fetchedDataView) && fetchedSavedSearch === undefined) { + setError( + i18n.translate('xpack.transform.searchItems.errorInitializationTitle', { + defaultMessage: `An error occurred initializing the Kibana data view or saved search.`, + }) + ); + return; + } - setSearchItems(createSearchItems(fetchedDataView, fetchedSavedSearch, uiSettings)); - setError(undefined); + setSearchItems(createSearchItems(fetchedDataView, fetchedSavedSearch, uiSettings)); + setError(undefined); + } } useEffect(() => { diff --git a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.test.ts b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.test.ts similarity index 95% rename from x-pack/plugins/transform/public/app/hooks/use_pivot_data.test.ts rename to x-pack/plugins/transform/public/app/hooks/use_transform_config_data.test.ts index 6c354c1ed953e..1ee68bdcb48fa 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.test.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getCombinedProperties } from './use_pivot_data'; +import { getCombinedProperties } from './use_transform_config_data'; import { ES_FIELD_TYPES } from '@kbn/field-types'; describe('getCombinedProperties', () => { diff --git a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts similarity index 95% rename from x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts rename to x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts index 79976eb6d6355..1baef3e7fe8d3 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_pivot_data.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts @@ -27,7 +27,7 @@ import { import { getErrorMessage } from '../../../common/utils/errors'; import { useAppDependencies } from '../app_dependencies'; -import { getPreviewTransformRequestBody, PivotQuery } from '../common'; +import { getPreviewTransformRequestBody, type TransformConfigQuery } from '../common'; import { SearchItems } from './use_search_items'; import { useApi } from './use_api'; @@ -95,12 +95,13 @@ export function getCombinedProperties( }; } -export const usePivotData = ( - dataViewTitle: SearchItems['dataView']['title'], - query: PivotQuery, +export const useTransformConfigData = ( + dataView: SearchItems['dataView'], + query: TransformConfigQuery, validationStatus: StepDefineExposedState['validationStatus'], requestPayload: StepDefineExposedState['previewRequest'], - combinedRuntimeMappings?: StepDefineExposedState['runtimeMappings'] + combinedRuntimeMappings?: StepDefineExposedState['runtimeMappings'], + timeRangeMs?: StepDefineExposedState['timeRangeMs'] ): UseIndexDataReturnType => { const [previewMappingsProperties, setPreviewMappingsProperties] = useState({}); @@ -166,10 +167,11 @@ export const usePivotData = ( setStatus(INDEX_STATUS.LOADING); const previewRequest = getPreviewTransformRequestBody( - dataViewTitle, + dataView, query, requestPayload, - combinedRuntimeMappings + combinedRuntimeMappings, + timeRangeMs ); const resp = await api.getTransformsPreview(previewRequest); @@ -238,7 +240,10 @@ export const usePivotData = ( getPreviewData(); // custom comparison /* eslint-disable react-hooks/exhaustive-deps */ - }, [dataViewTitle, JSON.stringify([requestPayload, query, combinedRuntimeMappings])]); + }, [ + dataView.getIndexPattern(), + JSON.stringify([requestPayload, query, combinedRuntimeMappings, timeRangeMs]), + ]); if (sortingColumns.length > 0) { const sortingColumnsWithTypes = sortingColumns.map((c) => ({ diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/date_picker_apply_switch.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/date_picker_apply_switch.tsx new file mode 100644 index 0000000000000..a57d83b75aa10 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/date_picker_apply_switch.tsx @@ -0,0 +1,34 @@ +/* + * 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, { FC } from 'react'; + +import { EuiSwitch } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { StepDefineFormHook } from '../step_define'; + +export const DatePickerApplySwitch: FC = ({ + datePicker: { + actions: { setDatePickerApplyEnabled }, + state: { isDatePickerApplyEnabled }, + }, +}) => { + return ( + { + setDatePickerApplyEnabled(!isDatePickerApplyEnabled); + }} + data-test-subj="transformDatePickerApplySwitch" + /> + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/index.ts new file mode 100644 index 0000000000000..cc1760017caf8 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/date_picker_apply_switch/index.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 { DatePickerApplySwitch } from './date_picker_apply_switch'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_step_define_state.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_step_define_state.ts index c75da651f79d0..7e6d336d57a4b 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_step_define_state.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/get_default_step_define_state.ts @@ -21,6 +21,7 @@ export function getDefaultStepDefineState(searchItems: SearchItems): StepDefineE groupByList: {} as PivotGroupByConfigDict, isAdvancedPivotEditorEnabled: false, isAdvancedSourceEditorEnabled: false, + isDatePickerApplyEnabled: false, searchLanguage: QUERY_LANGUAGE_KUERY, searchString: undefined, searchQuery: searchItems.savedSearch !== undefined ? searchItems.combinedQuery : defaultSearch, diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/types.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/types.ts index c8dc63cae1f9a..2e23cc0e9047f 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/types.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/types.ts @@ -24,8 +24,8 @@ import { PivotConfigDefinition, } from '../../../../../../../common/types/transform'; import { LatestFunctionConfig } from '../../../../../../../common/api_schemas/transforms'; - import { RUNTIME_FIELD_TYPES } from '../../../../../../../common/shared_imports'; +import type { TimeRangeMs } from '../../../../../../../common/types/date_picker'; export interface ErrorMessage { query: string; @@ -62,13 +62,15 @@ export interface StepDefineExposedState { sourceConfigUpdated: boolean; valid: boolean; validationStatus: { isValid: boolean; errorMessage?: string }; + runtimeMappings?: RuntimeMappings; + runtimeMappingsUpdated: boolean; + isRuntimeMappingsEditorEnabled: boolean; + timeRangeMs?: TimeRangeMs; + isDatePickerApplyEnabled: boolean; /** * Undefined when the form is incomplete or invalid */ previewRequest: { latest: LatestFunctionConfig } | { pivot: PivotConfigDefinition } | undefined; - runtimeMappings?: RuntimeMappings; - runtimeMappingsUpdated: boolean; - isRuntimeMappingsEditorEnabled: boolean; } export function isPivotPartialRequest(arg: unknown): arg is { pivot: PivotConfigDefinition } { diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_date_picker.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_date_picker.ts new file mode 100644 index 0000000000000..64a825e424220 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_date_picker.ts @@ -0,0 +1,82 @@ +/* + * 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 { useEffect, useMemo, useState } from 'react'; +import { merge } from 'rxjs'; + +import type { TimeRange } from '@kbn/es-query'; +import { mlTimefilterRefresh$, useTimefilter } from '@kbn/ml-date-picker'; + +import type { TimeRangeMs } from '../../../../../../../common/types/date_picker'; + +import { StepDefineExposedState } from '../common'; +import { StepDefineFormProps } from '../step_define_form'; + +export const useDatePicker = ( + defaults: StepDefineExposedState, + dataView: StepDefineFormProps['searchItems']['dataView'] +) => { + const hasValidTimeField = useMemo( + () => dataView.timeFieldName !== undefined && dataView.timeFieldName !== '', + [dataView.timeFieldName] + ); + + const timefilter = useTimefilter({ + timeRangeSelector: hasValidTimeField, + autoRefreshSelector: false, + }); + + // The internal state of the date picker apply button. + const [isDatePickerApplyEnabled, setDatePickerApplyEnabled] = useState( + defaults.isDatePickerApplyEnabled + ); + + // The time range selected via the date picker + const [timeRange, setTimeRange] = useState(); + + // Set up subscriptions to date picker updates + useEffect(() => { + const updateTimeRange = () => setTimeRange(timefilter.getTime()); + + const timefilterUpdateSubscription = merge( + timefilter.getAutoRefreshFetch$(), + timefilter.getTimeUpdate$(), + mlTimefilterRefresh$ + ).subscribe(updateTimeRange); + + const timefilterEnabledSubscription = timefilter + .getEnabledUpdated$() + .subscribe(updateTimeRange); + + return () => { + timefilterUpdateSubscription.unsubscribe(); + timefilterEnabledSubscription.unsubscribe(); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // Derive ms timestamps from timeRange updates. + const timeRangeMs: TimeRangeMs | undefined = useMemo(() => { + const timefilterActiveBounds = timefilter.getActiveBounds(); + if ( + timefilterActiveBounds !== undefined && + timefilterActiveBounds.min !== undefined && + timefilterActiveBounds.max !== undefined + ) { + return { + from: timefilterActiveBounds.min.valueOf(), + to: timefilterActiveBounds.max.valueOf(), + }; + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [timeRange]); + + return { + actions: { setDatePickerApplyEnabled }, + state: { isDatePickerApplyEnabled, hasValidTimeField, timeRange, timeRangeMs }, + }; +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_search_bar.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_search_bar.ts index 4ea56b557c7ee..e8d56fc002981 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_search_bar.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_search_bar.ts @@ -10,7 +10,7 @@ import { useState } from 'react'; import { toElasticsearchQuery, fromKueryExpression, luceneStringToDsl } from '@kbn/es-query'; import type { Query } from '@kbn/es-query'; -import { getPivotQuery } from '../../../../../common'; +import { getTransformConfigQuery } from '../../../../../common'; import { ErrorMessage, @@ -65,7 +65,7 @@ export const useSearchBar = ( } }; - const pivotQuery = getPivotQuery(searchQuery); + const transformConfigQuery = getTransformConfigQuery(searchQuery); return { actions: { @@ -79,7 +79,7 @@ export const useSearchBar = ( }, state: { errorMessage, - pivotQuery, + transformConfigQuery, searchInput, searchLanguage, searchQuery, diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts index 1cd0a154707b3..849883e6c3041 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts @@ -15,6 +15,7 @@ import { StepDefineFormProps } from '../step_define_form'; import { useAdvancedPivotEditor } from './use_advanced_pivot_editor'; import { useAdvancedSourceEditor } from './use_advanced_source_editor'; +import { useDatePicker } from './use_date_picker'; import { usePivotConfig } from './use_pivot_config'; import { useSearchBar } from './use_search_bar'; import { useLatestFunctionConfig } from './use_latest_function_config'; @@ -29,6 +30,7 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi const [transformFunction, setTransformFunction] = useState(defaults.transformFunction); + const datePicker = useDatePicker(defaults, dataView); const searchBar = useSearchBar(defaults, dataView); const pivotConfig = usePivotConfig(defaults, dataView); @@ -39,8 +41,8 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi ); const previewRequest = getPreviewTransformRequestBody( - dataView.getIndexPattern(), - searchBar.state.pivotQuery, + dataView, + searchBar.state.transformConfigQuery, pivotConfig.state.requestPayload, defaults?.runtimeMappings ); @@ -58,8 +60,8 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi const runtimeMappings = runtimeMappingsEditor.state.runtimeMappings; if (!advancedSourceEditor.state.isAdvancedSourceEditorEnabled) { const previewRequestUpdate = getPreviewTransformRequestBody( - dataView.getIndexPattern(), - searchBar.state.pivotQuery, + dataView, + searchBar.state.transformConfigQuery, pivotConfig.state.requestPayload, runtimeMappings ); @@ -79,6 +81,7 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi groupByList: pivotConfig.state.groupByList, isAdvancedPivotEditorEnabled: advancedPivotEditor.state.isAdvancedPivotEditorEnabled, isAdvancedSourceEditorEnabled: advancedSourceEditor.state.isAdvancedSourceEditorEnabled, + isDatePickerApplyEnabled: datePicker.state.isDatePickerApplyEnabled, searchLanguage: searchBar.state.searchLanguage, searchString: searchBar.state.searchString, searchQuery: searchBar.state.searchQuery, @@ -98,12 +101,14 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi runtimeMappings, runtimeMappingsUpdated: runtimeMappingsEditor.state.runtimeMappingsUpdated, isRuntimeMappingsEditorEnabled: runtimeMappingsEditor.state.isRuntimeMappingsEditorEnabled, + timeRangeMs: datePicker.state.timeRangeMs, }); // custom comparison /* eslint-disable react-hooks/exhaustive-deps */ }, [ JSON.stringify(advancedPivotEditor.state), JSON.stringify(advancedSourceEditor.state), + JSON.stringify(datePicker.state), pivotConfig.state, JSON.stringify(searchBar.state), JSON.stringify([ @@ -121,6 +126,7 @@ export const useStepDefineForm = ({ overrides, onChange, searchItems }: StepDefi advancedPivotEditor, advancedSourceEditor, runtimeMappingsEditor, + datePicker, pivotConfig, latestFunctionConfig, searchBar, diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_function_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_function_form.tsx new file mode 100644 index 0000000000000..efa28de596a18 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_function_form.tsx @@ -0,0 +1,120 @@ +/* + * 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, { FC } from 'react'; + +import { + EuiButton, + EuiButtonIcon, + EuiCopy, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiLink, + EuiSpacer, + EuiText, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { useDocumentationLinks } from '../../../../hooks/use_documentation_links'; + +import { AdvancedPivotEditor } from '../advanced_pivot_editor'; +import { AdvancedPivotEditorSwitch } from '../advanced_pivot_editor_switch'; +import { PivotConfiguration } from '../pivot_configuration'; + +import type { StepDefineFormHook } from './hooks/use_step_define_form'; + +const advancedEditorsSidebarWidth = '220px'; + +interface PivotFunctionFormProps { + applyPivotChangesHandler: () => void; + copyToClipboardPivot: string; + copyToClipboardPivotDescription: string; + stepDefineForm: StepDefineFormHook; +} + +export const PivotFunctionForm: FC = ({ + applyPivotChangesHandler, + copyToClipboardPivot, + copyToClipboardPivotDescription, + stepDefineForm, +}) => { + const { esTransformPivot } = useDocumentationLinks(); + + const { isAdvancedPivotEditorEnabled, isAdvancedPivotEditorApplyButtonEnabled } = + stepDefineForm.advancedPivotEditor.state; + + return ( + + {/* Flex Column #1: Pivot Config Form / Advanced Pivot Config Editor */} + + {!isAdvancedPivotEditorEnabled && } + {isAdvancedPivotEditorEnabled && ( + + )} + + + + + + + + + + + + {(copy: () => void) => ( + + )} + + + + + + {isAdvancedPivotEditorEnabled && ( + + + + <> + {i18n.translate('xpack.transform.stepDefineForm.advancedEditorHelpText', { + defaultMessage: + 'The advanced editor allows you to edit the pivot configuration of the transform.', + })}{' '} + + {i18n.translate('xpack.transform.stepDefineForm.advancedEditorHelpTextLink', { + defaultMessage: 'Learn more about available options.', + })} + + + + + + {i18n.translate('xpack.transform.stepDefineForm.advancedEditorApplyButtonText', { + defaultMessage: 'Apply changes', + })} + + + )} + + + + ); +}; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.test.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.test.tsx index 682d1bde11c32..beb4020378409 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.test.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.test.tsx @@ -9,12 +9,11 @@ import React from 'react'; import { render, waitFor } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; - +import { DatePickerContextProvider, type DatePickerDependencies } from '@kbn/ml-date-picker'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; - import { coreMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; -const startMock = coreMock.createStart(); +import { timefilterServiceMock } from '@kbn/data-plugin/public/query/timefilter/timefilter_service.mock'; import { PIVOT_SUPPORTED_AGGS } from '../../../../../../common/types/pivot_aggs'; @@ -28,11 +27,24 @@ import { SearchItems } from '../../../../hooks/use_search_items'; import { getAggNameConflictToastMessages } from './common'; import { StepDefineForm } from './step_define_form'; +import { MlSharedContext } from '../../../../__mocks__/shared_context'; +import { getMlSharedImports } from '../../../../../shared_imports'; + jest.mock('../../../../../shared_imports'); jest.mock('../../../../app_dependencies'); -import { MlSharedContext } from '../../../../__mocks__/shared_context'; -import { getMlSharedImports } from '../../../../../shared_imports'; +const startMock = coreMock.createStart(); + +const getMockedDatePickerDependencies = () => { + return { + data: { + query: { + timefilter: timefilterServiceMock.createStartContract(), + }, + }, + notifications: {}, + } as unknown as DatePickerDependencies; +}; const createMockWebStorage = () => ({ clear: jest.fn(), @@ -75,7 +87,9 @@ describe('Transform: ', () => { - + + + diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx index f86d693e605e2..c615e553b8984 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx @@ -5,9 +5,8 @@ * 2.0. */ -import React, { useMemo, FC } from 'react'; - -import { i18n } from '@kbn/i18n'; +import React, { useEffect, useMemo, FC } from 'react'; +import { merge } from 'rxjs'; import { EuiButton, @@ -17,20 +16,25 @@ import { EuiFlexItem, EuiForm, EuiFormRow, - EuiHorizontalRule, + EuiIconTip, EuiLink, EuiSpacer, EuiText, + EuiTitle, } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { mlTimefilterRefresh$, useTimefilter, DatePickerWrapper } from '@kbn/ml-date-picker'; +import { useUrlState } from '@kbn/ml-url-state'; + import { PivotAggDict } from '../../../../../../common/types/pivot_aggs'; import { PivotGroupByDict } from '../../../../../../common/types/pivot_group_by'; +import { TRANSFORM_FUNCTION } from '../../../../../../common/constants'; import { getIndexDevConsoleStatement, - getPivotPreviewDevConsoleStatement, + getTransformPreviewDevConsoleStatement, } from '../../../../common/data_grid'; - import { getPreviewTransformRequestBody, PivotAggsConfigDict, @@ -40,24 +44,36 @@ import { } from '../../../../common'; import { useDocumentationLinks } from '../../../../hooks/use_documentation_links'; import { useIndexData } from '../../../../hooks/use_index_data'; -import { usePivotData } from '../../../../hooks/use_pivot_data'; +import { useTransformConfigData } from '../../../../hooks/use_transform_config_data'; import { useAppDependencies, useToastNotifications } from '../../../../app_dependencies'; import { SearchItems } from '../../../../hooks/use_search_items'; +import { getAggConfigFromEsAgg } from '../../../../common/pivot_aggs'; -import { AdvancedPivotEditor } from '../advanced_pivot_editor'; -import { AdvancedPivotEditorSwitch } from '../advanced_pivot_editor_switch'; import { AdvancedQueryEditorSwitch } from '../advanced_query_editor_switch'; import { AdvancedSourceEditor } from '../advanced_source_editor'; -import { PivotConfiguration } from '../pivot_configuration'; +import { DatePickerApplySwitch } from '../date_picker_apply_switch'; import { SourceSearchBar } from '../source_search_bar'; +import { AdvancedRuntimeMappingsSettings } from '../advanced_runtime_mappings_settings'; import { StepDefineExposedState } from './common'; import { useStepDefineForm } from './hooks/use_step_define_form'; -import { getAggConfigFromEsAgg } from '../../../../common/pivot_aggs'; import { TransformFunctionSelector } from './transform_function_selector'; -import { TRANSFORM_FUNCTION } from '../../../../../../common/constants'; import { LatestFunctionForm } from './latest_function_form'; -import { AdvancedRuntimeMappingsSettings } from '../advanced_runtime_mappings_settings'; +import { PivotFunctionForm } from './pivot_function_form'; + +const ALLOW_TIME_RANGE_ON_TRANSFORM_CONFIG = false; + +const advancedEditorsSidebarWidth = '220px'; + +export const ConfigSectionTitle: FC<{ title: string }> = ({ title }) => ( + <> + + + {title} + + + +); export interface StepDefineFormProps { overrides?: StepDefineExposedState; @@ -66,6 +82,7 @@ export interface StepDefineFormProps { } export const StepDefineForm: FC = React.memo((props) => { + const [globalState, setGlobalState] = useUrlState('_g'); const { searchItems } = props; const { dataView } = searchItems; const indexPattern = useMemo(() => dataView.getIndexPattern(), [dataView]); @@ -75,24 +92,18 @@ export const StepDefineForm: FC = React.memo((props) => { const toastNotifications = useToastNotifications(); const stepDefineForm = useStepDefineForm(props); - const { - advancedEditorConfig, - isAdvancedPivotEditorEnabled, - isAdvancedPivotEditorApplyButtonEnabled, - } = stepDefineForm.advancedPivotEditor.state; + const { advancedEditorConfig } = stepDefineForm.advancedPivotEditor.state; const { advancedEditorSourceConfig, isAdvancedSourceEditorEnabled, isAdvancedSourceEditorApplyButtonEnabled, } = stepDefineForm.advancedSourceEditor.state; - const pivotQuery = stepDefineForm.searchBar.state.pivotQuery; + const { isDatePickerApplyEnabled, timeRangeMs } = stepDefineForm.datePicker.state; + const { transformConfigQuery } = stepDefineForm.searchBar.state; + const { runtimeMappings } = stepDefineForm.runtimeMappingsEditor.state; const indexPreviewProps = { - ...useIndexData( - dataView, - stepDefineForm.searchBar.state.pivotQuery, - stepDefineForm.runtimeMappingsEditor.state.runtimeMappings - ), + ...useIndexData(dataView, transformConfigQuery, runtimeMappings, timeRangeMs), dataTestSubj: 'transformIndexPreview', toastNotifications, }; @@ -101,16 +112,7 @@ export const StepDefineForm: FC = React.memo((props) => { ? stepDefineForm.pivotConfig.state : stepDefineForm.latestFunctionConfig; - const previewRequest = getPreviewTransformRequestBody( - indexPattern, - pivotQuery, - stepDefineForm.transformFunction === TRANSFORM_FUNCTION.PIVOT - ? stepDefineForm.pivotConfig.state.requestPayload - : stepDefineForm.latestFunctionConfig.requestPayload, - stepDefineForm.runtimeMappingsEditor.state.runtimeMappings - ); - - const copyToClipboardSource = getIndexDevConsoleStatement(pivotQuery, indexPattern); + const copyToClipboardSource = getIndexDevConsoleStatement(transformConfigQuery, indexPattern); const copyToClipboardSourceDescription = i18n.translate( 'xpack.transform.indexPreview.copyClipboardTooltip', { @@ -118,7 +120,17 @@ export const StepDefineForm: FC = React.memo((props) => { } ); - const copyToClipboardPivot = getPivotPreviewDevConsoleStatement(previewRequest); + const copyToClipboardPreviewRequest = getPreviewTransformRequestBody( + dataView, + transformConfigQuery, + requestPayload, + runtimeMappings, + isDatePickerApplyEnabled ? timeRangeMs : undefined + ); + + const copyToClipboardPivot = getTransformPreviewDevConsoleStatement( + copyToClipboardPreviewRequest + ); const copyToClipboardPivotDescription = i18n.translate( 'xpack.transform.pivotPreview.copyClipboardTooltip', { @@ -126,18 +138,16 @@ export const StepDefineForm: FC = React.memo((props) => { } ); - const pivotPreviewProps = { - ...usePivotData( - indexPattern, - pivotQuery, + const previewProps = { + ...useTransformConfigData( + dataView, + transformConfigQuery, validationStatus, requestPayload, - stepDefineForm.runtimeMappingsEditor.state.runtimeMappings + runtimeMappings, + timeRangeMs ), dataTestSubj: 'transformPivotPreview', - title: i18n.translate('xpack.transform.pivotPreview.transformPreviewTitle', { - defaultMessage: 'Transform preview', - }), toastNotifications, ...(stepDefineForm.transformFunction === TRANSFORM_FUNCTION.LATEST ? { @@ -192,9 +202,52 @@ export const StepDefineForm: FC = React.memo((props) => { stepDefineForm.advancedPivotEditor.actions.setAdvancedPivotEditorApplyButtonEnabled(false); }; - const { esQueryDsl, esTransformPivot } = useDocumentationLinks(); + const { esQueryDsl } = useDocumentationLinks(); + + const hasValidTimeField = useMemo( + () => dataView.timeFieldName !== undefined && dataView.timeFieldName !== '', + [dataView.timeFieldName] + ); + + const timefilter = useTimefilter({ + timeRangeSelector: dataView?.timeFieldName !== undefined, + autoRefreshSelector: false, + }); + + useEffect(() => { + if (globalState?.time !== undefined) { + timefilter.setTime({ + from: globalState.time.from, + to: globalState.time.to, + }); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [JSON.stringify(globalState?.time), timefilter]); + + useEffect(() => { + if (globalState?.refreshInterval !== undefined) { + timefilter.setRefreshInterval(globalState.refreshInterval); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [JSON.stringify(globalState?.refreshInterval), timefilter]); - const advancedEditorsSidebarWidth = '220px'; + useEffect(() => { + const timeUpdateSubscription = merge( + timefilter.getAutoRefreshFetch$(), + timefilter.getTimeUpdate$(), + mlTimefilterRefresh$ + ).subscribe(() => { + if (setGlobalState) { + setGlobalState({ + time: timefilter.getTime(), + refreshInterval: timefilter.getRefreshInterval(), + }); + } + }); + return () => { + timeUpdateSubscription.unsubscribe(); + }; + }); return (
@@ -206,6 +259,8 @@ export const StepDefineForm: FC = React.memo((props) => { /> + + {searchItems.savedSearch === undefined && ( = React.memo((props) => { )} + {hasValidTimeField && ( + + {i18n.translate('xpack.transform.stepDefineForm.datePickerLabel', { + defaultMessage: 'Time range', + })}{' '} + + + } + > + + {/* Flex Column #1: Date Picker */} + + + + {/* Flex Column #2: Apply-To-Config option */} + + {ALLOW_TIME_RANGE_ON_TRANSFORM_CONFIG && ( + + + {searchItems.savedSearch === undefined && ( + + )} + + + )} + + + + )} + <> @@ -314,87 +415,30 @@ export const StepDefineForm: FC = React.memo((props) => { - + + + - + + + {stepDefineForm.transformFunction === TRANSFORM_FUNCTION.PIVOT ? ( - - {/* Flex Column #1: Pivot Config Form / Advanced Pivot Config Editor */} - - {!isAdvancedPivotEditorEnabled && ( - - )} - {isAdvancedPivotEditorEnabled && ( - - )} - - - - - - - - - - - - {(copy: () => void) => ( - - )} - - - - - - {isAdvancedPivotEditorEnabled && ( - - - - <> - {i18n.translate('xpack.transform.stepDefineForm.advancedEditorHelpText', { - defaultMessage: - 'The advanced editor allows you to edit the pivot configuration of the transform.', - })}{' '} - - {i18n.translate( - 'xpack.transform.stepDefineForm.advancedEditorHelpTextLink', - { - defaultMessage: 'Learn more about available options.', - } - )} - - - - - - {i18n.translate( - 'xpack.transform.stepDefineForm.advancedEditorApplyButtonText', - { - defaultMessage: 'Apply changes', - } - )} - - - )} - - - + ) : null} {stepDefineForm.transformFunction === TRANSFORM_FUNCTION.LATEST ? ( = React.memo((props) => { {(stepDefineForm.transformFunction !== TRANSFORM_FUNCTION.LATEST || stepDefineForm.latestFunctionConfig.sortFieldOptions.length > 0) && ( - <> - - - + + <> + + + + )}
); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx index 140d58523b38a..630e6278dceba 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx @@ -14,13 +14,13 @@ import { EuiBadge, EuiCodeBlock, EuiForm, EuiFormRow, EuiSpacer, EuiText } from import { useAppDependencies, useToastNotifications } from '../../../../app_dependencies'; import { - getPivotQuery, - getPivotPreviewDevConsoleStatement, + getTransformConfigQuery, + getTransformPreviewDevConsoleStatement, getPreviewTransformRequestBody, isDefaultQuery, isMatchAllQuery, } from '../../../../common'; -import { usePivotData } from '../../../../hooks/use_pivot_data'; +import { useTransformConfigData } from '../../../../hooks/use_transform_config_data'; import { SearchItems } from '../../../../hooks/use_search_items'; import { AggListSummary } from '../aggregation_list'; @@ -37,6 +37,8 @@ interface Props { export const StepDefineSummary: FC = ({ formState: { + isDatePickerApplyEnabled, + timeRangeMs, runtimeMappings, searchString, searchQuery, @@ -49,31 +51,33 @@ export const StepDefineSummary: FC = ({ searchItems, }) => { const { - ml: { DataGrid }, + ml: { formatHumanReadableDateTimeSeconds, DataGrid }, } = useAppDependencies(); const toastNotifications = useToastNotifications(); - const pivotQuery = getPivotQuery(searchQuery); + const transformConfigQuery = getTransformConfigQuery(searchQuery); const previewRequest = getPreviewTransformRequestBody( - searchItems.dataView.getIndexPattern(), - pivotQuery, + searchItems.dataView, + transformConfigQuery, partialPreviewRequest, - runtimeMappings + runtimeMappings, + isDatePickerApplyEnabled ? timeRangeMs : undefined ); - const pivotPreviewProps = usePivotData( - searchItems.dataView.getIndexPattern(), - pivotQuery, + const pivotPreviewProps = useTransformConfigData( + searchItems.dataView, + transformConfigQuery, validationStatus, partialPreviewRequest, - runtimeMappings + runtimeMappings, + isDatePickerApplyEnabled ? timeRangeMs : undefined ); const isModifiedQuery = typeof searchString === 'undefined' && - !isDefaultQuery(pivotQuery) && - !isMatchAllQuery(pivotQuery); + !isDefaultQuery(transformConfigQuery) && + !isMatchAllQuery(transformConfigQuery); let uniqueKeys: string[] = []; let sortField = ''; @@ -94,6 +98,18 @@ export const StepDefineSummary: FC = ({ > {searchItems.dataView.getIndexPattern()} + {isDatePickerApplyEnabled && timeRangeMs && ( + + + {formatHumanReadableDateTimeSeconds(timeRangeMs.from)} -{' '} + {formatHumanReadableDateTimeSeconds(timeRangeMs.to)} + + + )} {typeof searchString === 'string' && ( = ({ overflowHeight={300} isCopyable > - {JSON.stringify(pivotQuery, null, 2)} + {JSON.stringify(transformConfigQuery, null, 2)} )} @@ -187,7 +203,7 @@ export const StepDefineSummary: FC = ({ = React.memo( // use an IIFE to avoid returning a Promise to useEffect. (async function () { const { searchQuery, previewRequest: partialPreviewRequest } = stepDefineState; - const pivotQuery = getPivotQuery(searchQuery); + const transformConfigQuery = getTransformConfigQuery(searchQuery); const previewRequest = getPreviewTransformRequestBody( - searchItems.dataView.getIndexPattern(), - pivotQuery, + searchItems.dataView, + transformConfigQuery, partialPreviewRequest, stepDefineState.runtimeMappings ); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/storage.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/storage.ts new file mode 100644 index 0000000000000..0bd126708fde8 --- /dev/null +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/storage.ts @@ -0,0 +1,21 @@ +/* + * 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 { type FrozenTierPreference } from '@kbn/ml-date-picker'; + +export const TRANSFORM_FROZEN_TIER_PREFERENCE = 'transform.frozenDataTierPreference'; + +export type Transform = Partial<{ + [TRANSFORM_FROZEN_TIER_PREFERENCE]: FrozenTierPreference; +}> | null; + +export type TransformKey = keyof Exclude; + +export type TransformStorageMapped = + T extends typeof TRANSFORM_FROZEN_TIER_PREFERENCE ? FrozenTierPreference | undefined : null; + +export const TRANSFORM_STORAGE_KEYS = [TRANSFORM_FROZEN_TIER_PREFERENCE] as const; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx index 0a221cf735395..f0ad9227ac672 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx @@ -6,16 +6,24 @@ */ import React, { type FC, useRef, useState, createContext, useMemo } from 'react'; - -import { i18n } from '@kbn/i18n'; +import { pick } from 'lodash'; import { EuiSteps, EuiStepStatus } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import { DataView } from '@kbn/data-views-plugin/public'; +import { DatePickerContextProvider } from '@kbn/ml-date-picker'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { StorageContextProvider } from '@kbn/ml-local-storage'; +import { UrlStateProvider } from '@kbn/ml-url-state'; +import { UI_SETTINGS } from '@kbn/data-plugin/common'; +import { toMountPoint, wrapWithTheme } from '@kbn/kibana-react-plugin/public'; + import type { TransformConfigUnion } from '../../../../../../common/types/transform'; import { getCreateTransformRequestBody } from '../../../../common'; import { SearchItems } from '../../../../hooks/use_search_items'; +import { useAppDependencies } from '../../../../app_dependencies'; import { applyTransformConfigToDefineState, @@ -34,6 +42,10 @@ import { import { WizardNav } from '../wizard_nav'; import type { RuntimeMappings } from '../step_define/common/types'; +import { TRANSFORM_STORAGE_KEYS } from './storage'; + +const localStorage = new Storage(window.localStorage); + enum WIZARD_STEPS { DEFINE, DETAILS, @@ -94,6 +106,7 @@ export const CreateTransformWizardContext = createContext<{ }); export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) => { + const appDependencies = useAppDependencies(); const { dataView } = searchItems; // The current WIZARD_STEP @@ -113,7 +126,7 @@ export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) const [stepCreateState, setStepCreateState] = useState(getDefaultStepCreateState); const transformConfig = getCreateTransformRequestBody( - dataView.getIndexPattern(), + dataView, stepDefineState, stepDetailsState ); @@ -206,11 +219,24 @@ export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) const stepsConfig = [stepDefine, stepDetails, stepCreate]; + const datePickerDeps = { + ...pick(appDependencies, ['data', 'http', 'notifications', 'theme', 'uiSettings']), + toMountPoint, + wrapWithTheme, + uiSettingsKeys: UI_SETTINGS, + }; + return ( - + + + + + + + ); }); diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_preview_pane.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_preview_pane.tsx index 51dfc449b89b2..bfc5d4f664b15 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_preview_pane.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_preview_pane.tsx @@ -7,11 +7,13 @@ import React, { useMemo, FC } from 'react'; +import type { DataView } from '@kbn/data-views-plugin/public'; + import { TransformConfigUnion } from '../../../../../../common/types/transform'; import { useAppDependencies, useToastNotifications } from '../../../../app_dependencies'; -import { getPivotQuery } from '../../../../common'; -import { usePivotData } from '../../../../hooks/use_pivot_data'; +import { getTransformConfigQuery } from '../../../../common'; +import { useTransformConfigData } from '../../../../hooks/use_transform_config_data'; import { SearchItems } from '../../../../hooks/use_search_items'; import { @@ -38,15 +40,15 @@ export const ExpandedRowPreviewPane: FC = ({ transf [transformConfig] ); - const pivotQuery = useMemo(() => getPivotQuery(searchQuery), [searchQuery]); + const transformConfigQuery = useMemo(() => getTransformConfigQuery(searchQuery), [searchQuery]); const dataViewTitle = Array.isArray(transformConfig.source.index) ? transformConfig.source.index.join(',') : transformConfig.source.index; - const pivotPreviewProps = usePivotData( - dataViewTitle, - pivotQuery, + const pivotPreviewProps = useTransformConfigData( + { getIndexPattern: () => dataViewTitle } as DataView, + transformConfigQuery, validationStatus, previewRequest, runtimeMappings diff --git a/x-pack/plugins/transform/tsconfig.json b/x-pack/plugins/transform/tsconfig.json index 8cb77da845d58..ca4191088a8b1 100644 --- a/x-pack/plugins/transform/tsconfig.json +++ b/x-pack/plugins/transform/tsconfig.json @@ -46,6 +46,10 @@ "@kbn/field-types", "@kbn/ml-nested-property", "@kbn/ml-is-defined", + "@kbn/ml-date-picker", + "@kbn/ml-url-state", + "@kbn/ml-local-storage", + "@kbn/ml-query-utils", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index e7f636b691568..b7950b56bcca5 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -13244,7 +13244,6 @@ "xpack.fileUpload.geoUploadWizard.creatingDataView": "Création de la vue de données : {indexName}", "xpack.fileUpload.geoUploadWizard.dataIndexingStarted": "Création de l'index : {indexName}", "xpack.fileUpload.geoUploadWizard.writingToIndex": "Écriture dans l'index : {progress} % terminé", - "xpack.fileUpload.importComplete.failedFeaturesMsg": "Impossible d'indexer {numFailures} fonctionnalités.", "xpack.fileUpload.importComplete.permissionFailureMsg": "Vous ne disposez pas d'autorisation pour créer ni importer des données dans l'index \"{indexName}\".", "xpack.fileUpload.importComplete.uploadFailureMsgErrorBlock": "Erreur : {reason}", "xpack.fileUpload.importComplete.uploadSuccessMsg": "{numFeatures} fonctionnalités indexées.", @@ -34060,7 +34059,6 @@ "xpack.synthetics.sourceConfiguration.heartbeatIndicesTitle": "Index Uptime", "xpack.synthetics.sourceConfiguration.indicesSectionTitle": "Index", "xpack.synthetics.sourceConfiguration.warningStateLabel": "Limite d'âge", - "xpack.synthetics.ssl": "SSL", "xpack.synthetics.stackManagement": "Gestion de la Suite", "xpack.synthetics.stepDetails.expected": "Attendus", "xpack.synthetics.stepDetails.objectCount": "Décompte de l'objet", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 249b8cc04d818..772e8ac9eaecf 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -13231,7 +13231,6 @@ "xpack.fileUpload.geoUploadWizard.creatingDataView": "データビュー{indexName}を作成しています", "xpack.fileUpload.geoUploadWizard.dataIndexingStarted": "インデックスを作成中:{indexName}", "xpack.fileUpload.geoUploadWizard.writingToIndex": "インデックスに書き込み中:{progress}%完了", - "xpack.fileUpload.importComplete.failedFeaturesMsg": "{numFailures}個の特長量にインデックスを作成できませんでした。", "xpack.fileUpload.importComplete.permissionFailureMsg": "インデックス\"{indexName}\"にデータを作成またはインポートするアクセス権がありません。", "xpack.fileUpload.importComplete.uploadFailureMsgErrorBlock": "エラー:{reason}", "xpack.fileUpload.importComplete.uploadSuccessMsg": "{numFeatures}個の特徴量にインデックスを作成しました。", @@ -34031,7 +34030,6 @@ "xpack.synthetics.sourceConfiguration.heartbeatIndicesTitle": "アップタイムインデックス", "xpack.synthetics.sourceConfiguration.indicesSectionTitle": "インデックス", "xpack.synthetics.sourceConfiguration.warningStateLabel": "使用期間上限", - "xpack.synthetics.ssl": "SSL", "xpack.synthetics.stackManagement": "スタック管理", "xpack.synthetics.stepDetails.expected": "期待値", "xpack.synthetics.stepDetails.objectCount": "オブジェクト数", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index ccd28eb8c63d5..f705f8d765a44 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -13248,7 +13248,6 @@ "xpack.fileUpload.geoUploadWizard.creatingDataView": "正在创建数据视图:{indexName}", "xpack.fileUpload.geoUploadWizard.dataIndexingStarted": "正在创建索引:{indexName}", "xpack.fileUpload.geoUploadWizard.writingToIndex": "正在写入索引:已完成 {progress}%", - "xpack.fileUpload.importComplete.failedFeaturesMsg": "无法索引 {numFailures} 个特征。", "xpack.fileUpload.importComplete.permissionFailureMsg": "您无权创建或将数据导入索引“{indexName}”。", "xpack.fileUpload.importComplete.uploadFailureMsgErrorBlock": "错误:{reason}", "xpack.fileUpload.importComplete.uploadSuccessMsg": "已索引 {numFeatures} 个特征。", @@ -34066,7 +34065,6 @@ "xpack.synthetics.sourceConfiguration.heartbeatIndicesTitle": "Uptime 索引", "xpack.synthetics.sourceConfiguration.indicesSectionTitle": "索引", "xpack.synthetics.sourceConfiguration.warningStateLabel": "使用时间限制", - "xpack.synthetics.ssl": "SSL", "xpack.synthetics.stackManagement": "Stack Management", "xpack.synthetics.stepDetails.expected": "预期", "xpack.synthetics.stepDetails.objectCount": "对象计数", diff --git a/x-pack/test/accessibility/apps/transform.ts b/x-pack/test/accessibility/apps/transform.ts index fa54ea4ad6766..417ab317218de 100644 --- a/x-pack/test/accessibility/apps/transform.ts +++ b/x-pack/test/accessibility/apps/transform.ts @@ -112,6 +112,17 @@ export default function ({ getService }: FtrProviderContext) { ); await transform.sourceSelection.selectSource(ecIndexPattern); + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '10 Years ago'`); + await transform.datePicker.quickSelect(); + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); await transform.testExecution.logTestStep('displays an empty transform preview'); @@ -191,6 +202,18 @@ export default function ({ getService }: FtrProviderContext) { 'selects the source data and loads the Transform wizard page' ); await transform.sourceSelection.selectSource(ecIndexPattern); + + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '10 Years ago'`); + await transform.datePicker.quickSelect(); + await transform.wizard.assertIndexPreviewLoaded(); await transform.wizard.assertTransformPreviewEmpty(); diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 6ee90026d9821..3081c6f0c7190 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -47,6 +47,7 @@ const enabledActionTypes = [ '.tines', '.webhook', '.xmatters', + '.torq', 'test.sub-action-connector', 'test.sub-action-connector-without-sub-actions', 'test.authorization', diff --git a/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/plugin.ts b/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/plugin.ts index e629b4f4a0309..a37588c7fb8de 100644 --- a/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/plugin.ts @@ -25,6 +25,7 @@ import { initPlugin as initSlack } from './slack_simulation'; import { initPlugin as initWebhook } from './webhook_simulation'; import { initPlugin as initMSExchange } from './ms_exchage_server_simulation'; import { initPlugin as initXmatters } from './xmatters_simulation'; +import { initPlugin as initTorq } from './torq_simulation'; import { initPlugin as initUnsecuredAction } from './unsecured_actions_simulation'; import { initPlugin as initTines } from './tines_simulation'; @@ -41,6 +42,7 @@ export enum ExternalServiceSimulator { WEBHOOK = 'webhook', MS_EXCHANGE = 'exchange', XMATTERS = 'xmatters', + TORQ = 'torq', TINES = 'tines', } @@ -137,6 +139,7 @@ export class FixturePlugin implements Plugin, + res: KibanaResponseFactory + ): Promise> { + if (!validateTorqToken(req)) { + return jsonErrorResponse(res, 401, new Error('unauthorised')); + } + const { body } = req; + const content = body?.msg; + switch (content) { + case 'respond-with-400': + return jsonErrorResponse(res, 400, new Error(content)); + case 'respond-with-404': + return jsonErrorResponse(res, 404, new Error(content)); + case 'respond-with-429': + return jsonErrorResponse(res, 429, new Error(content)); + case 'respond-with-405': + return jsonErrorResponse(res, 405, new Error(content)); + case 'respond-with-502': + return jsonErrorResponse(res, 502, new Error(content)); + } + return jsonResponse(res, 204, { + status: 'success', + }); + } + ); +} + +function validateTorqToken(req: KibanaRequest): boolean { + return req.headers['x-torq-token'] === 'someRandomToken'; +} + +function jsonResponse( + res: KibanaResponseFactory, + code: number, + object: Record = {} +) { + return res.custom>({ body: object, statusCode: code }); +} + +function jsonErrorResponse(res: KibanaResponseFactory, code: number, object: Error) { + return res.custom({ body: object, statusCode: code }); +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/torq.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/torq.ts new file mode 100644 index 0000000000000..cad9d65e71467 --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/torq.ts @@ -0,0 +1,245 @@ +/* + * 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 httpProxy from 'http-proxy'; +import expect from '@kbn/expect'; + +import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers/get_proxy_server'; +import { FtrProviderContext } from '../../../../../../common/ftr_provider_context'; +import { + getExternalServiceSimulatorPath, + ExternalServiceSimulator, +} from '../../../../../common/plugins/actions_simulators/server/plugin'; + +// eslint-disable-next-line import/no-default-export +export default function torqTest({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const kibanaServer = getService('kibanaServer'); + const configService = getService('config'); + + describe('Torq action', () => { + let simulatedActionId = ''; + let torqSimulatorURL: string = ''; + let proxyServer: httpProxy | undefined; + let proxyHaveBeenCalled = false; + + // need to wait for kibanaServer to settle ... + before(async () => { + torqSimulatorURL = kibanaServer.resolveUrl( + getExternalServiceSimulatorPath(ExternalServiceSimulator.TORQ) + ); + proxyServer = await getHttpProxyServer( + kibanaServer.resolveUrl('/'), + configService.get('kbnTestServer.serverArgs'), + () => { + proxyHaveBeenCalled = true; + } + ); + }); + + it('Torq connector invalid token', async () => { + const { body: createdAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'A Torq action', + connector_type_id: '.torq', + config: { + webhookIntegrationUrl: torqSimulatorURL, + }, + secrets: { + token: 'invalidToken', + }, + }) + .expect(200); + const { body: result } = await supertest + .post(`/api/actions/connector/${createdAction.id}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "test"}`, + }, + }) + .expect(200); + expect(result.status).to.eql('error'); + expect(result.message).to.match(/error triggering Torq workflow, unauthorised/); + }); + + it('Torq connector can be executed with token', async () => { + const { body: createdAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'A Torq action', + connector_type_id: '.torq', + config: { + webhookIntegrationUrl: torqSimulatorURL, + }, + secrets: { + token: 'someRandomToken', + }, + }) + .expect(200); + + expect(createdAction).to.eql({ + id: createdAction.id, + is_preconfigured: false, + is_deprecated: false, + name: 'A Torq action', + connector_type_id: '.torq', + is_missing_secrets: false, + config: { + webhookIntegrationUrl: torqSimulatorURL, + }, + }); + + expect(typeof createdAction.id).to.be('string'); + }); + + it('should return unsuccessfully when default Torq webhookIntegrationUrl is not present in allowedHosts', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'A Torq action', + connector_type_id: '.torq', + config: { + webhookIntegrationUrl: 'https://test.torq.io/v1/something', + }, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type config: error configuring send to Torq action: target url "https://test.torq.io/v1/something" is not added to the Kibana config xpack.actions.allowedHosts', + }); + }); + }); + + it('should create Torq simulator action successfully', async () => { + const { body: createdSimulatedAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name: 'A Torq simulator', + connector_type_id: '.torq', + config: { + webhookIntegrationUrl: torqSimulatorURL, + }, + secrets: { + token: 'someRandomToken', + }, + }) + .expect(200); + + simulatedActionId = createdSimulatedAction.id; + }); + + it('should handle executing with a simulated success', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "test"}`, + }, + }) + .expect(200); + + expect(proxyHaveBeenCalled).to.equal(true); + expect(result).to.eql({ + status: 'ok', + connector_id: simulatedActionId, + data: `{"msg": "test"}`, + }); + }); + + it('should handle a 400 Torq error', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "respond-with-400"}`, + }, + }) + .expect(200); + expect(result.status).to.equal('error'); + expect(result.message).to.match(/error triggering Torq workflow, invalid response/); + }); + + it('should handle a 404 Torq error', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "respond-with-404"}`, + }, + }) + .expect(200); + expect(result.status).to.equal('error'); + expect(result.message).to.match( + /error triggering Torq workflow, make sure the webhook URL is valid/ + ); + }); + + it('should handle a 429 Torq error', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "respond-with-429"}`, + }, + }) + .expect(200); + + expect(result.status).to.equal('error'); + expect(result.message).to.match(/error triggering Torq workflow, retry later/); + }); + + it('should handle a 500 Torq error', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "respond-with-502"}`, + }, + }) + .expect(200); + + expect(result.status).to.equal('error'); + expect(result.message).to.match(/error triggering Torq workflow, retry later/); + expect(result.retry).to.equal(true); + }); + + it('should handle a 405 Torq error', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + body: `{"msg": "respond-with-405"}`, + }, + }) + .expect(200); + + expect(result.status).to.equal('error'); + expect(result.message).to.match(/error triggering Torq workflow, method is not supported/); + }); + + after(() => { + if (proxyServer) { + proxyServer.close(); + } + }); + }); +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts index a96ff29767b0e..66f83daff0429 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts @@ -36,6 +36,7 @@ export default function connectorsTests({ loadTestFile, getService }: FtrProvide loadTestFile(require.resolve('./connector_types/webhook')); loadTestFile(require.resolve('./connector_types/xmatters')); loadTestFile(require.resolve('./connector_types/tines')); + loadTestFile(require.resolve('./connector_types/torq')); loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./execute')); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/event_log.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/event_log.ts index f16c04565872b..dd5f85dac298d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/event_log.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/event_log.ts @@ -16,8 +16,7 @@ export default function eventLogTests({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/147512 - describe.skip('eventLog', () => { + describe('eventLog', () => { const objectRemover = new ObjectRemover(supertest); after(() => objectRemover.removeAll()); @@ -65,13 +64,13 @@ export default function eventLogTests({ getService }: FtrProviderContext) { const errorEvents = someEvents.filter( (event) => event?.kibana?.alerting?.status === 'error' ); - if (errorEvents.length === 0) { - throw new Error('no execute/error events yet'); + if (errorEvents.length < 2) { + throw new Error('not enough execute/error events yet'); } return errorEvents; }); - const event = events[0]; + const event = events[1]; expect(event).to.be.ok(); validateEvent(event, { diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts index 3de2f5165d03e..830f5e6f8d96d 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts @@ -44,6 +44,7 @@ export default function createRegisteredConnectorTypeTests({ getService }: FtrPr '.resilient', '.teams', '.tines', + '.torq', '.opsgenie', ].sort() ); diff --git a/x-pack/test/cases_api_integration/common/lib/connectors.ts b/x-pack/test/cases_api_integration/common/lib/connectors.ts index 4948495ddf665..3d0d7b31bc7d1 100644 --- a/x-pack/test/cases_api_integration/common/lib/connectors.ts +++ b/x-pack/test/cases_api_integration/common/lib/connectors.ts @@ -9,10 +9,7 @@ import getPort from 'get-port'; import http from 'http'; import type SuperTest from 'supertest'; -import { - CASES_INTERNAL_URL, - CASE_CONFIGURE_CONNECTORS_URL, -} from '@kbn/cases-plugin/common/constants'; +import { CASE_CONFIGURE_CONNECTORS_URL } from '@kbn/cases-plugin/common/constants'; import { CasesConfigureResponse, CaseConnector, @@ -20,6 +17,7 @@ import { CasePostRequest, CaseResponse, GetCaseConnectorsResponse, + getCaseConnectorsUrl, } from '@kbn/cases-plugin/common/api'; import { ActionResult, FindActionResult } from '@kbn/actions-plugin/server/types'; import { User } from './authentication/types'; @@ -316,7 +314,7 @@ export const getConnectors = async ({ auth?: { user: User; space: string | null }; }): Promise => { const { body: connectors } = await supertest - .get(`${getSpaceUrlPrefix(auth.space)}${CASES_INTERNAL_URL}/${caseId}/_connectors`) + .get(`${getSpaceUrlPrefix(auth.space)}${getCaseConnectorsUrl(caseId)}`) .auth(auth.user.username, auth.user.password) .expect(expectedHttpCode); diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/internal/get_connectors.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/internal/get_connectors.ts index 3d1b59a2018ab..e5b8dac8d77e4 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/internal/get_connectors.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/internal/get_connectors.ts @@ -8,7 +8,12 @@ import http from 'http'; import expect from '@kbn/expect'; -import { ActionTypes, CaseSeverity, ConnectorTypes } from '@kbn/cases-plugin/common/api'; +import { + ActionTypes, + CaseSeverity, + CaseStatuses, + ConnectorTypes, +} from '@kbn/cases-plugin/common/api'; import { globalRead, noKibanaPrivileges, @@ -246,7 +251,7 @@ export default ({ getService }: FtrProviderContext): void => { connectorId: connector.id, }); - const pachedCase = await createComment({ + const patched = await createComment({ supertest, caseId: postedCase.id, params: postCommentUserReq, @@ -269,8 +274,8 @@ export default ({ getService }: FtrProviderContext): void => { params: { cases: [ { - id: pachedCase.id, - version: pachedCase.version, + id: patched.id, + version: patched.version, connector: { id: serviceNow2.id, name: 'ServiceNow 2 Connector', @@ -290,7 +295,7 @@ export default ({ getService }: FtrProviderContext): void => { await pushCase({ supertest, - caseId: pachedCase.id, + caseId: patched.id, connectorId: serviceNow2.id, }); @@ -315,11 +320,14 @@ export default ({ getService }: FtrProviderContext): void => { expect(connectors[serviceNow2.id].push.externalService?.connector_name).to.not.eql( connector.name ); + expect(connectors[serviceNow2.id].push.externalService?.connector_id).to.not.eql( + connector.id + ); }); }); - describe('latestPushDate', () => { - it('does not set latestPushDate or oldestPushDate when the connector has not been used to push', async () => { + describe('latestUserActionPushDate', () => { + it('does not set latestUserActionPushDate or oldestPushDate when the connector has not been used to push', async () => { const { postedCase, connector } = await createCaseWithConnector({ supertest, serviceNowSimulatorURL, @@ -334,7 +342,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(connectors[connector.id].push.oldestUserActionPushDate).to.be(undefined); }); - it('sets latestPushDate to the most recent push date and oldestPushDate to the first push date', async () => { + it('sets latestUserActionPushDate to the most recent push date and oldestPushDate to the first push date', async () => { const { postedCase, connector } = await createCaseWithConnector({ supertest, serviceNowSimulatorURL, @@ -506,6 +514,39 @@ export default ({ getService }: FtrProviderContext): void => { expect(connectors[connector.id].push.needsToBePushed).to.be(false); }); + it('sets needs to push to false when the status of a case was changed after the last push', async () => { + const { postedCase, connector } = await createCaseWithConnector({ + supertest, + serviceNowSimulatorURL, + actionsRemover, + }); + + const pushedCase = await pushCase({ + supertest, + caseId: postedCase.id, + connectorId: connector.id, + }); + + await updateCase({ + supertest, + params: { + cases: [ + { + id: pushedCase.id, + version: pushedCase.version, + status: CaseStatuses['in-progress'], + }, + ], + }, + }); + + const connectors = await getConnectors({ caseId: postedCase.id, supertest }); + + expect(Object.keys(connectors).length).to.be(1); + expect(connectors[connector.id].id).to.be(connector.id); + expect(connectors[connector.id].push.needsToBePushed).to.be(false); + }); + it('sets needs to push to false the service now connector and true for jira', async () => { const { postedCase, connector: serviceNowConnector } = await createCaseWithConnector({ supertest, diff --git a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts index 45d20b92c1e2b..7cc75446036e9 100644 --- a/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts +++ b/x-pack/test/functional/apps/dashboard/group1/feature_controls/dashboard_security.ts @@ -454,8 +454,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/116881 - describe.skip('no dashboard privileges', () => { + describe('no dashboard privileges', () => { before(async () => { await security.role.create('no_dashboard_privileges_role', { elasticsearch: { diff --git a/x-pack/test/functional/apps/lens/group2/share.ts b/x-pack/test/functional/apps/lens/group2/share.ts index e50eb20ee7c3c..c7cd22974b289 100644 --- a/x-pack/test/functional/apps/lens/group2/share.ts +++ b/x-pack/test/functional/apps/lens/group2/share.ts @@ -14,8 +14,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const filterBarService = getService('filterBar'); const queryBar = getService('queryBar'); - // Failing: See https://github.com/elastic/kibana/issues/149163 - describe.skip('lens share tests', () => { + describe('lens share tests', () => { before(async () => { await PageObjects.visualize.gotoVisualizationLandingPage(); }); @@ -73,7 +72,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.navigateTo(url); // check that it's the same configuration in the new URL when ready - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization('xyVisChart'); expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( 'Average of bytes' ); @@ -93,7 +92,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await filterBarService.addFilter({ field: 'bytes', operation: 'is', value: '1' }); await queryBar.setQuery('host.keyword www.elastic.co'); await queryBar.submitQuery(); - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization('xyVisChart'); const url = await PageObjects.lens.getUrl('snapshot'); await browser.openNewTab(); @@ -102,7 +101,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.navigateTo(url); // check that it's the same configuration in the new URL when ready - await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.lens.waitForVisualization('xyVisChart'); expect(await filterBarService.getFiltersLabel()).to.eql(['bytes: 1']); expect(await queryBar.getQueryString()).to.be('host.keyword www.elastic.co'); await browser.closeCurrentWindow(); diff --git a/x-pack/test/functional/apps/transform/creation/index_pattern/config.ts b/x-pack/test/functional/apps/transform/creation/index_pattern/config.ts new file mode 100644 index 0000000000000..40617c64ba398 --- /dev/null +++ b/x-pack/test/functional/apps/transform/creation/index_pattern/config.ts @@ -0,0 +1,20 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + reportName: 'Chrome X-Pack UI Functional Tests - transform - creation - index pattern', + }, + }; +} diff --git a/x-pack/test/functional/apps/transform/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts similarity index 96% rename from x-pack/test/functional/apps/transform/creation_index_pattern.ts rename to x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts index 5c240b2c0403c..1cb93ad03efe3 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts @@ -7,20 +7,20 @@ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; import { GroupByEntry, isLatestTransformTestData, isPivotTransformTestData, LatestTransformTestData, PivotTransformTestData, -} from '.'; +} from '../../helpers'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const canvasElement = getService('canvasElement'); const esArchiver = getService('esArchiver'); const transform = getService('transform'); - const PageObjects = getPageObjects(['discover']); + const pageObjects = getPageObjects(['discover']); describe('creation_index_pattern', function () { before(async () => { @@ -486,6 +486,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await transform.testExecution.logTestStep('has correct transform function selected'); await transform.wizard.assertSelectedTransformFunction('pivot'); + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '15 Years ago'`); + await transform.datePicker.quickSelect(); + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); @@ -699,16 +710,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await transform.testExecution.logTestStep('should navigate to discover'); await transform.table.clickTransformRowAction(testData.transformId, 'Discover'); - await PageObjects.discover.waitUntilSearchingHasFinished(); + await pageObjects.discover.waitUntilSearchingHasFinished(); if (testData.discoverAdjustSuperDatePicker) { + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); await transform.discover.assertNoResults(testData.destinationIndex); await transform.testExecution.logTestStep( 'should switch quick select lookback to years' ); - await transform.discover.assertSuperDatePickerToggleQuickMenuButtonExists(); - await transform.discover.openSuperDatePicker(); - await transform.discover.quickSelectYears(); + await transform.datePicker.quickSelect(); } await transform.discover.assertDiscoverQueryHits(testData.expected.discoverQueryHits); diff --git a/x-pack/test/functional/apps/transform/creation/index_pattern/index.ts b/x-pack/test/functional/apps/transform/creation/index_pattern/index.ts new file mode 100644 index 0000000000000..9e09c4e1c51fa --- /dev/null +++ b/x-pack/test/functional/apps/transform/creation/index_pattern/index.ts @@ -0,0 +1,37 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - creation - index pattern', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + + loadTestFile(require.resolve('./creation_index_pattern')); + }); +} diff --git a/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts new file mode 100644 index 0000000000000..0b51b78265c25 --- /dev/null +++ b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts @@ -0,0 +1,21 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + reportName: + 'Chrome X-Pack UI Functional Tests - transform - creation - runtime mappings & saved search', + }, + }; +} diff --git a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_runtime_mappings.ts similarity index 96% rename from x-pack/test/functional/apps/transform/creation_runtime_mappings.ts rename to x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_runtime_mappings.ts index 3e595695a3da5..3f0adc5783893 100644 --- a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts +++ b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_runtime_mappings.ts @@ -7,9 +7,9 @@ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; -import type { HistogramCharts } from '../../services/transform/wizard'; +import type { HistogramCharts } from '../../../../services/transform/wizard'; import { GroupByEntry, @@ -17,7 +17,7 @@ import { isPivotTransformTestData, LatestTransformTestData, PivotTransformTestData, -} from '.'; +} from '../../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); @@ -279,6 +279,11 @@ export default function ({ getService }: FtrProviderContext) { await transform.testExecution.logTestStep('has correct transform function selected'); await transform.wizard.assertSelectedTransformFunction('pivot'); + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + await transform.testExecution.logTestStep('has correct runtime mappings settings'); await transform.wizard.assertRuntimeMappingsEditorSwitchExists(); await transform.wizard.assertRuntimeMappingsEditorSwitchCheckState(false); @@ -291,6 +296,12 @@ export default function ({ getService }: FtrProviderContext) { await transform.wizard.setRuntimeMappingsEditorContent(JSON.stringify(runtimeMappings)); await transform.wizard.applyRuntimeMappings(); + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '15 Years ago'`); + await transform.datePicker.quickSelect(10, 'y'); + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); @@ -439,7 +450,7 @@ export default function ({ getService }: FtrProviderContext) { if (isLatestTransformTestData(testData)) { const fromTime = 'Feb 7, 2016 @ 00:00:00.000'; const toTime = 'Feb 11, 2016 @ 23:59:54.000'; - await transform.wizard.setDiscoverTimeRange(fromTime, toTime); + await transform.datePicker.setTimeRange(fromTime, toTime); } await transform.testExecution.logTestStep( diff --git a/x-pack/test/functional/apps/transform/creation_saved_search.ts b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_saved_search.ts similarity index 95% rename from x-pack/test/functional/apps/transform/creation_saved_search.ts rename to x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_saved_search.ts index ee1d0e02899cc..9f985a16da98d 100644 --- a/x-pack/test/functional/apps/transform/creation_saved_search.ts +++ b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/creation_saved_search.ts @@ -7,14 +7,14 @@ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; import { GroupByEntry, isLatestTransformTestData, isPivotTransformTestData, LatestTransformTestData, PivotTransformTestData, -} from '.'; +} from '../../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); @@ -144,6 +144,17 @@ export default function ({ getService }: FtrProviderContext) { await transform.testExecution.logTestStep('has correct transform function selected'); await transform.wizard.assertSelectedTransformFunction('pivot'); + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '15 Years ago'`); + await transform.datePicker.quickSelect(10, 'y'); + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); diff --git a/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/index.ts b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/index.ts new file mode 100644 index 0000000000000..943fb97200a7b --- /dev/null +++ b/x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/index.ts @@ -0,0 +1,38 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - creation - runtime mappings & saved search', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + + loadTestFile(require.resolve('./creation_saved_search')); + loadTestFile(require.resolve('./creation_runtime_mappings')); + }); +} diff --git a/x-pack/test/functional/apps/transform/cloning.ts b/x-pack/test/functional/apps/transform/edit_clone/cloning.ts similarity index 97% rename from x-pack/test/functional/apps/transform/cloning.ts rename to x-pack/test/functional/apps/transform/edit_clone/cloning.ts index 8b03c0b26ee65..6b3bbac3f7b3d 100644 --- a/x-pack/test/functional/apps/transform/cloning.ts +++ b/x-pack/test/functional/apps/transform/edit_clone/cloning.ts @@ -10,8 +10,8 @@ import { isPivotTransform, TransformPivotConfig, } from '@kbn/transform-plugin/common/types/transform'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { getLatestTransformConfig } from '.'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { getLatestTransformConfig } from '../helpers'; interface TestData { type: 'pivot' | 'latest'; @@ -418,6 +418,17 @@ export default function ({ getService }: FtrProviderContext) { ); } + await transform.testExecution.logTestStep( + `sets the date picker to the default '15 minutes ago'` + ); + await transform.datePicker.quickSelect(15, 'm'); + + await transform.testExecution.logTestStep('displays an empty index preview'); + await transform.wizard.assertIndexPreviewEmpty(); + + await transform.testExecution.logTestStep(`sets the date picker to '15 Years ago'`); + await transform.datePicker.quickSelect(); + await transform.testExecution.logTestStep('should load the index preview'); await transform.wizard.assertIndexPreviewLoaded(); diff --git a/x-pack/test/functional/apps/transform/edit_clone/config.ts b/x-pack/test/functional/apps/transform/edit_clone/config.ts new file mode 100644 index 0000000000000..9b3a878496a70 --- /dev/null +++ b/x-pack/test/functional/apps/transform/edit_clone/config.ts @@ -0,0 +1,20 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + reportName: 'Chrome X-Pack UI Functional Tests - transform - edit & clone', + }, + }; +} diff --git a/x-pack/test/functional/apps/transform/editing.ts b/x-pack/test/functional/apps/transform/edit_clone/editing.ts similarity index 99% rename from x-pack/test/functional/apps/transform/editing.ts rename to x-pack/test/functional/apps/transform/edit_clone/editing.ts index f96052ab28e18..5f767825c7c31 100644 --- a/x-pack/test/functional/apps/transform/editing.ts +++ b/x-pack/test/functional/apps/transform/edit_clone/editing.ts @@ -11,8 +11,8 @@ import type { TransformPivotConfig, } from '@kbn/transform-plugin/common/types/transform'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { getLatestTransformConfig, getPivotTransformConfig } from '.'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { getLatestTransformConfig, getPivotTransformConfig } from '../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional/apps/transform/edit_clone/index.ts b/x-pack/test/functional/apps/transform/edit_clone/index.ts new file mode 100644 index 0000000000000..93dbaa51c396e --- /dev/null +++ b/x-pack/test/functional/apps/transform/edit_clone/index.ts @@ -0,0 +1,38 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - edit & clone', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + + loadTestFile(require.resolve('./cloning')); + loadTestFile(require.resolve('./editing')); + }); +} diff --git a/x-pack/test/functional/apps/transform/feature_controls/config.ts b/x-pack/test/functional/apps/transform/feature_controls/config.ts new file mode 100644 index 0000000000000..f8ce309ed52e0 --- /dev/null +++ b/x-pack/test/functional/apps/transform/feature_controls/config.ts @@ -0,0 +1,20 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + reportName: 'Chrome X-Pack UI Functional Tests - transform - feature controls', + }, + }; +} diff --git a/x-pack/test/functional/apps/transform/feature_controls/index.ts b/x-pack/test/functional/apps/transform/feature_controls/index.ts index a00054c185438..987bd36172847 100644 --- a/x-pack/test/functional/apps/transform/feature_controls/index.ts +++ b/x-pack/test/functional/apps/transform/feature_controls/index.ts @@ -7,8 +7,31 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; -export default function ({ loadTestFile }: FtrProviderContext) { - describe('feature controls', function () { +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - feature controls', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + loadTestFile(require.resolve('./transform_security')); }); } diff --git a/x-pack/test/functional/apps/transform/feature_controls/transform_security.ts b/x-pack/test/functional/apps/transform/feature_controls/transform_security.ts index 5901ee60c7212..c630525d06cf6 100644 --- a/x-pack/test/functional/apps/transform/feature_controls/transform_security.ts +++ b/x-pack/test/functional/apps/transform/feature_controls/transform_security.ts @@ -11,15 +11,15 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const security = getService('security'); - const PageObjects = getPageObjects(['common', 'settings', 'security']); + const pageObjects = getPageObjects(['common', 'settings', 'security']); const appsMenu = getService('appsMenu'); const managementMenu = getService('managementMenu'); describe('security', () => { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); - await PageObjects.security.forceLogout(); - await PageObjects.common.navigateToApp('home'); + await pageObjects.security.forceLogout(); + await pageObjects.common.navigateToApp('home'); }); after(async () => { @@ -40,7 +40,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not render the "Stack" section', async () => { - await PageObjects.common.navigateToApp('management'); + await pageObjects.common.navigateToApp('management'); const sections = (await managementMenu.getSections()).map((section) => section.sectionId); expect(sections).to.eql(['insightsAndAlerting', 'kibana']); }); @@ -59,7 +59,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should render the "Data" section with Transform', async () => { - await PageObjects.common.navigateToApp('management'); + await pageObjects.common.navigateToApp('management'); const sections = await managementMenu.getSections(); expect(sections).to.have.length(1); expect(sections[0]).to.eql({ diff --git a/x-pack/test/functional/apps/transform/index.ts b/x-pack/test/functional/apps/transform/helpers.ts similarity index 65% rename from x-pack/test/functional/apps/transform/index.ts rename to x-pack/test/functional/apps/transform/helpers.ts index e87f72ed98880..c422ea6dfca0f 100644 --- a/x-pack/test/functional/apps/transform/index.ts +++ b/x-pack/test/functional/apps/transform/helpers.ts @@ -9,45 +9,7 @@ import { TransformLatestConfig, TransformPivotConfig, } from '@kbn/transform-plugin/common/types/transform'; -import { FtrProviderContext } from '../../ftr_provider_context'; -export default function ({ getService, loadTestFile }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const transform = getService('transform'); - - describe('transform', function () { - this.tags('transform'); - - before(async () => { - await transform.securityCommon.createTransformRoles(); - await transform.securityCommon.createTransformUsers(); - }); - - after(async () => { - // NOTE: Logout needs to happen before anything else to avoid flaky behavior - await transform.securityUI.logout(); - - await transform.securityCommon.cleanTransformUsers(); - await transform.securityCommon.cleanTransformRoles(); - - await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); - await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); - - await transform.testResources.resetKibanaTimeZone(); - }); - - loadTestFile(require.resolve('./permissions')); - loadTestFile(require.resolve('./creation_index_pattern')); - loadTestFile(require.resolve('./creation_saved_search')); - loadTestFile(require.resolve('./creation_runtime_mappings')); - loadTestFile(require.resolve('./cloning')); - loadTestFile(require.resolve('./editing')); - loadTestFile(require.resolve('./feature_controls')); - loadTestFile(require.resolve('./deleting')); - loadTestFile(require.resolve('./resetting')); - loadTestFile(require.resolve('./starting')); - }); -} export interface ComboboxOption { identifier: string; label: string; diff --git a/x-pack/test/functional/apps/transform/config.ts b/x-pack/test/functional/apps/transform/permissions/config.ts similarity index 83% rename from x-pack/test/functional/apps/transform/config.ts rename to x-pack/test/functional/apps/transform/permissions/config.ts index 17a471848867e..3771f59d47c61 100644 --- a/x-pack/test/functional/apps/transform/config.ts +++ b/x-pack/test/functional/apps/transform/permissions/config.ts @@ -8,13 +8,13 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); return { ...functionalConfig.getAll(), testFiles: [require.resolve('.')], junit: { - reportName: 'Chrome X-Pack UI Functional Tests - Transform', + reportName: 'Chrome X-Pack UI Functional Tests - transform - permissions', }, }; } diff --git a/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts b/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts index 59ad6d0d8dfa4..4969832b3600e 100644 --- a/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts +++ b/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getPivotTransformConfig } from '..'; +import { getPivotTransformConfig } from '../helpers'; import { FtrProviderContext } from '../../../ftr_provider_context'; diff --git a/x-pack/test/functional/apps/transform/permissions/index.ts b/x-pack/test/functional/apps/transform/permissions/index.ts index 08f4043a62dee..30936edc877ef 100644 --- a/x-pack/test/functional/apps/transform/permissions/index.ts +++ b/x-pack/test/functional/apps/transform/permissions/index.ts @@ -7,8 +7,31 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; -export default function ({ loadTestFile }: FtrProviderContext) { - describe('permissions', function () { +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - permissions', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + loadTestFile(require.resolve('./full_transform_access')); loadTestFile(require.resolve('./read_transform_access')); }); diff --git a/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts b/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts index be808d606fdd6..918cd5c144a84 100644 --- a/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts +++ b/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getPivotTransformConfig } from '..'; +import { getPivotTransformConfig } from '../helpers'; import { FtrProviderContext } from '../../../ftr_provider_context'; diff --git a/x-pack/test/functional/apps/transform/start_reset_delete/config.ts b/x-pack/test/functional/apps/transform/start_reset_delete/config.ts new file mode 100644 index 0000000000000..edf34d16785c4 --- /dev/null +++ b/x-pack/test/functional/apps/transform/start_reset_delete/config.ts @@ -0,0 +1,20 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + reportName: 'Chrome X-Pack UI Functional Tests - transform - start reset & delete', + }, + }; +} diff --git a/x-pack/test/functional/apps/transform/deleting.ts b/x-pack/test/functional/apps/transform/start_reset_delete/deleting.ts similarity index 98% rename from x-pack/test/functional/apps/transform/deleting.ts rename to x-pack/test/functional/apps/transform/start_reset_delete/deleting.ts index ba49a5c0ae7f9..e76ef118fde0d 100644 --- a/x-pack/test/functional/apps/transform/deleting.ts +++ b/x-pack/test/functional/apps/transform/start_reset_delete/deleting.ts @@ -7,8 +7,8 @@ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { getLatestTransformConfig, getPivotTransformConfig } from '.'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { getLatestTransformConfig, getPivotTransformConfig } from '../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional/apps/transform/start_reset_delete/index.ts b/x-pack/test/functional/apps/transform/start_reset_delete/index.ts new file mode 100644 index 0000000000000..1a606339eb82a --- /dev/null +++ b/x-pack/test/functional/apps/transform/start_reset_delete/index.ts @@ -0,0 +1,39 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const transform = getService('transform'); + + describe('transform - start reset & delete', function () { + this.tags('transform'); + + before(async () => { + await transform.securityCommon.createTransformRoles(); + await transform.securityCommon.createTransformUsers(); + }); + + after(async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await transform.securityUI.logout(); + + await transform.securityCommon.cleanTransformUsers(); + await transform.securityCommon.cleanTransformRoles(); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce'); + + await transform.testResources.resetKibanaTimeZone(); + }); + + loadTestFile(require.resolve('./deleting')); + loadTestFile(require.resolve('./resetting')); + loadTestFile(require.resolve('./starting')); + }); +} diff --git a/x-pack/test/functional/apps/transform/resetting.ts b/x-pack/test/functional/apps/transform/start_reset_delete/resetting.ts similarity index 98% rename from x-pack/test/functional/apps/transform/resetting.ts rename to x-pack/test/functional/apps/transform/start_reset_delete/resetting.ts index 471f8f7681a20..ef62d9986813d 100644 --- a/x-pack/test/functional/apps/transform/resetting.ts +++ b/x-pack/test/functional/apps/transform/start_reset_delete/resetting.ts @@ -7,8 +7,8 @@ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { getLatestTransformConfig, getPivotTransformConfig } from '.'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { getLatestTransformConfig, getPivotTransformConfig } from '../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional/apps/transform/starting.ts b/x-pack/test/functional/apps/transform/start_reset_delete/starting.ts similarity index 98% rename from x-pack/test/functional/apps/transform/starting.ts rename to x-pack/test/functional/apps/transform/start_reset_delete/starting.ts index c2940a95aaece..1fccec9a9192b 100644 --- a/x-pack/test/functional/apps/transform/starting.ts +++ b/x-pack/test/functional/apps/transform/start_reset_delete/starting.ts @@ -6,8 +6,8 @@ */ import { TRANSFORM_STATE } from '@kbn/transform-plugin/common/constants'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { getLatestTransformConfig, getPivotTransformConfig } from '.'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { getLatestTransformConfig, getPivotTransformConfig } from '../helpers'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional/services/transform/date_picker.ts b/x-pack/test/functional/services/transform/date_picker.ts new file mode 100644 index 0000000000000..941a506db6109 --- /dev/null +++ b/x-pack/test/functional/services/transform/date_picker.ts @@ -0,0 +1,49 @@ +/* + * 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 expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function TransformDatePickerProvider({ getService, getPageObjects }: FtrProviderContext) { + const find = getService('find'); + const testSubjects = getService('testSubjects'); + const pageObjects = getPageObjects(['timePicker']); + + return { + async assertSuperDatePickerToggleQuickMenuButtonExists() { + await testSubjects.existOrFail('superDatePickerToggleQuickMenuButton'); + }, + + async openSuperDatePicker() { + await this.assertSuperDatePickerToggleQuickMenuButtonExists(); + await testSubjects.click('superDatePickerToggleQuickMenuButton'); + await testSubjects.existOrFail('superDatePickerQuickMenu'); + }, + + async quickSelect(timeValue: number = 15, timeUnit: string = 'y') { + await this.openSuperDatePicker(); + const quickMenuElement = await testSubjects.find('superDatePickerQuickMenu'); + + // No test subject, defaults to select `"Years"` to look back 15 years instead of 15 minutes. + await find.selectValue(`[aria-label*="Time value"]`, timeValue.toString()); + await find.selectValue(`[aria-label*="Time unit"]`, timeUnit); + + // Apply + const applyButton = await quickMenuElement.findByClassName('euiQuickSelect__applyButton'); + const actualApplyButtonText = await applyButton.getVisibleText(); + expect(actualApplyButtonText).to.be('Apply'); + + await applyButton.click(); + await testSubjects.missingOrFail('superDatePickerQuickMenu'); + }, + + async setTimeRange(fromTime: string, toTime: string) { + await pageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + }, + }; +} diff --git a/x-pack/test/functional/services/transform/discover.ts b/x-pack/test/functional/services/transform/discover.ts index 944e65b73f6e2..303bc9b171f80 100644 --- a/x-pack/test/functional/services/transform/discover.ts +++ b/x-pack/test/functional/services/transform/discover.ts @@ -10,7 +10,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export function TransformDiscoverProvider({ getService }: FtrProviderContext) { - const find = getService('find'); const testSubjects = getService('testSubjects'); return { @@ -28,6 +27,8 @@ export function TransformDiscoverProvider({ getService }: FtrProviderContext) { }, async assertNoResults(expectedDestinationIndex: string) { + await testSubjects.missingOrFail('unifiedHistogramQueryHits'); + // Discover should use the destination index pattern const actualIndexPatternSwitchLinkText = await ( await testSubjects.find('discover-dataView-switch-link') @@ -39,29 +40,5 @@ export function TransformDiscoverProvider({ getService }: FtrProviderContext) { await testSubjects.existOrFail('discoverNoResults'); }, - - async assertSuperDatePickerToggleQuickMenuButtonExists() { - await testSubjects.existOrFail('superDatePickerToggleQuickMenuButton'); - }, - - async openSuperDatePicker() { - await testSubjects.click('superDatePickerToggleQuickMenuButton'); - await testSubjects.existOrFail('superDatePickerQuickMenu'); - }, - - async quickSelectYears() { - const quickMenuElement = await testSubjects.find('superDatePickerQuickMenu'); - - // No test subject, select "Years" to look back 15 years instead of 15 minutes. - await find.selectValue(`[aria-label*="Time unit"]`, 'y'); - - // Apply - const applyButton = await quickMenuElement.findByClassName('euiQuickSelect__applyButton'); - const actualApplyButtonText = await applyButton.getVisibleText(); - expect(actualApplyButtonText).to.be('Apply'); - - await applyButton.click(); - await testSubjects.existOrFail('unifiedHistogramQueryHits'); - }, }; } diff --git a/x-pack/test/functional/services/transform/index.ts b/x-pack/test/functional/services/transform/index.ts index 75f0df67f0919..61461bafe34b5 100644 --- a/x-pack/test/functional/services/transform/index.ts +++ b/x-pack/test/functional/services/transform/index.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../ftr_provider_context'; import { TransformAPIProvider } from './api'; import { TransformEditFlyoutProvider } from './edit_flyout'; +import { TransformDatePickerProvider } from './date_picker'; import { TransformDiscoverProvider } from './discover'; import { TransformManagementProvider } from './management'; import { TransformNavigationProvider } from './navigation'; @@ -25,6 +26,7 @@ import { MachineLearningTestResourcesProvider } from '../ml/test_resources'; export function TransformProvider(context: FtrProviderContext) { const api = TransformAPIProvider(context); const mlApi = MachineLearningAPIProvider(context); + const datePicker = TransformDatePickerProvider(context); const discover = TransformDiscoverProvider(context); const editFlyout = TransformEditFlyoutProvider(context); const management = TransformManagementProvider(context); @@ -39,6 +41,7 @@ export function TransformProvider(context: FtrProviderContext) { return { api, + datePicker, discover, editFlyout, management, diff --git a/x-pack/test/functional/services/transform/navigation.ts b/x-pack/test/functional/services/transform/navigation.ts index 396a99b1b6673..be579cdc0fb42 100644 --- a/x-pack/test/functional/services/transform/navigation.ts +++ b/x-pack/test/functional/services/transform/navigation.ts @@ -8,11 +8,11 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export function TransformNavigationProvider({ getPageObjects }: FtrProviderContext) { - const PageObjects = getPageObjects(['common']); + const pageObjects = getPageObjects(['common']); return { async navigateTo() { - return await PageObjects.common.navigateToApp('transform'); + return await pageObjects.common.navigateToApp('transform'); }, }; } diff --git a/x-pack/test/functional/services/transform/security_ui.ts b/x-pack/test/functional/services/transform/security_ui.ts index 07d3c2759f42c..365f2dfc2e7d4 100644 --- a/x-pack/test/functional/services/transform/security_ui.ts +++ b/x-pack/test/functional/services/transform/security_ui.ts @@ -12,15 +12,15 @@ export function TransformSecurityUIProvider( { getPageObjects }: FtrProviderContext, transformSecurityCommon: TransformSecurityCommon ) { - const PageObjects = getPageObjects(['security']); + const pageObjects = getPageObjects(['security']); return { async loginAs(user: USER) { const password = transformSecurityCommon.getPasswordForUser(user); - await PageObjects.security.forceLogout(); + await pageObjects.security.forceLogout(); - await PageObjects.security.login(user, password, { + await pageObjects.security.login(user, password, { expectSuccess: true, }); }, @@ -34,7 +34,7 @@ export function TransformSecurityUIProvider( }, async logout() { - await PageObjects.security.forceLogout(); + await pageObjects.security.forceLogout(); }, }; } diff --git a/x-pack/test/functional/services/transform/wizard.ts b/x-pack/test/functional/services/transform/wizard.ts index df65911cb4098..e1370706d2902 100644 --- a/x-pack/test/functional/services/transform/wizard.ts +++ b/x-pack/test/functional/services/transform/wizard.ts @@ -29,7 +29,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi const ml = getService('ml'); const toasts = getService('toasts'); - const PageObjects = getPageObjects(['discover', 'timePicker']); + const pageObjects = getPageObjects(['discover', 'timePicker']); return { async clickNextButton() { @@ -80,6 +80,10 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi await testSubjects.existOrFail(selector); }, + async assertIndexPreviewEmpty() { + await this.assertIndexPreviewExists('empty'); + }, + async assertIndexPreviewLoaded() { await this.assertIndexPreviewExists('loaded'); }, @@ -995,19 +999,14 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi async redirectToDiscover() { await retry.tryForTime(60 * 1000, async () => { await testSubjects.click('transformWizardCardDiscover'); - await PageObjects.discover.isDiscoverAppOnScreen(); + await pageObjects.discover.isDiscoverAppOnScreen(); }); }, - async setDiscoverTimeRange(fromTime: string, toTime: string) { - await PageObjects.discover.isDiscoverAppOnScreen(); - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - }, - async assertDiscoverContainField(field: string) { - await PageObjects.discover.isDiscoverAppOnScreen(); + await pageObjects.discover.isDiscoverAppOnScreen(); await retry.tryForTime(60 * 1000, async () => { - const allFields = await PageObjects.discover.getAllFieldNames(); + const allFields = await pageObjects.discover.getAllFieldNames(); if (Array.isArray(allFields)) { // For some reasons, Discover returns fields with dot (e.g '.avg') with extra space const fields = allFields.map((n) => n.replace('.​', '.')); diff --git a/x-pack/test/functional_basic/config.ts b/x-pack/test/functional_basic/apps/ml/config.base.ts similarity index 90% rename from x-pack/test/functional_basic/config.ts rename to x-pack/test/functional_basic/apps/ml/config.base.ts index f35ece0ce5d16..fc431b27ea457 100644 --- a/x-pack/test/functional_basic/config.ts +++ b/x-pack/test/functional_basic/apps/ml/config.base.ts @@ -9,7 +9,7 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const xpackFunctionalConfig = await readConfigFile( - require.resolve('../functional/config.base.js') + require.resolve('../../../functional/config.base.js') ); return { @@ -24,10 +24,9 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { 'xpack.security.authc.api_key.enabled=true', ], }, - testFiles: [require.resolve('./apps')], junit: { ...xpackFunctionalConfig.get('junit'), - reportName: 'Chrome X-Pack UI Functional Tests Basic License', + reportName: 'Chrome X-Pack UI Functional Tests Basic License - ml', }, }; } diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts new file mode 100644 index 0000000000000..4f6a1ca9ba3dc --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseConfig = await readConfigFile(require.resolve('../../config.base.ts')); + + return { + // default to the ml/config.base.ts + ...baseConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...baseConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - ml - data visualizer - group1', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/ml/index.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group1/index.ts similarity index 76% rename from x-pack/test/functional_basic/apps/ml/index.ts rename to x-pack/test/functional_basic/apps/ml/data_visualizer/group1/index.ts index dbdab2cc0a4b2..37295dda128ad 100644 --- a/x-pack/test/functional_basic/apps/ml/index.ts +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group1/index.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService, loadTestFile }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); - describe('machine learning basic license', function () { + describe('machine learning basic license - data visualizer - group 1', function () { this.tags(['skipFirefox', 'ml']); before(async () => { @@ -34,7 +34,9 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { await ml.testResources.resetKibanaTimeZone(); }); - loadTestFile(require.resolve('./permissions')); - loadTestFile(require.resolve('./data_visualizer')); + // The file data visualizer should work the same as with a trial license + loadTestFile( + require.resolve('../../../../../functional/apps/ml/data_visualizer/file_data_visualizer') + ); }); } diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts new file mode 100644 index 0000000000000..0e16eaddb3b3f --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseConfig = await readConfigFile(require.resolve('../../config.base.ts')); + + return { + // default to the ml/config.base.ts + ...baseConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...baseConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - ml - data visualizer - group2', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/index.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/index.ts new file mode 100644 index 0000000000000..e1ed6d554a398 --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group2/index.ts @@ -0,0 +1,43 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + + describe('machine learning basic license - data visualizer - group 2', function () { + this.tags(['skipFirefox', 'ml']); + + before(async () => { + await ml.securityCommon.createMlRoles(); + await ml.securityCommon.createMlUsers(); + }); + + after(async () => { + await ml.securityCommon.cleanMlUsers(); + await ml.securityCommon.cleanMlRoles(); + + await ml.testResources.deleteSavedSearches(); + + await ml.testResources.deleteIndexPatternByTitle('ft_farequote'); + await ml.testResources.deleteIndexPatternByTitle('ft_module_sample_ecommerce'); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_sample_ecommerce'); + + await ml.testResources.resetKibanaTimeZone(); + }); + + // The data visualizer should work the same as with a trial license, except the missing create actions + // That's why the 'basic' version of 'index_data_visualizer_actions_panel' is loaded here + loadTestFile( + require.resolve('../../../../../functional/apps/ml/data_visualizer/index_data_visualizer') + ); + }); +} diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts new file mode 100644 index 0000000000000..eb81a95799000 --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseConfig = await readConfigFile(require.resolve('../../config.base.ts')); + + return { + // default to the ml/config.base.ts + ...baseConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...baseConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - ml - data visualizer - group3', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index.ts new file mode 100644 index 0000000000000..18a5dfaec2d60 --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index.ts @@ -0,0 +1,46 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + + describe('machine learning basic license - data visualizer - group 3', function () { + this.tags(['skipFirefox', 'ml']); + + before(async () => { + await ml.securityCommon.createMlRoles(); + await ml.securityCommon.createMlUsers(); + }); + + after(async () => { + await ml.securityCommon.cleanMlUsers(); + await ml.securityCommon.cleanMlRoles(); + + await ml.testResources.deleteSavedSearches(); + + await ml.testResources.deleteIndexPatternByTitle('ft_farequote'); + await ml.testResources.deleteIndexPatternByTitle('ft_module_sample_ecommerce'); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_sample_ecommerce'); + + await ml.testResources.resetKibanaTimeZone(); + }); + + // The data visualizer should work the same as with a trial license, except the missing create actions + // That's why the 'basic' version of 'index_data_visualizer_actions_panel' is loaded here + loadTestFile( + require.resolve( + '../../../../../functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_discover' + ) + ); + loadTestFile(require.resolve('./index_data_visualizer_actions_panel')); + }); +} diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index_data_visualizer_actions_panel.ts similarity index 97% rename from x-pack/test/functional_basic/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts rename to x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index_data_visualizer_actions_panel.ts index 2fcdf957f8909..f8e2c83a1afd7 100644 --- a/x-pack/test/functional_basic/apps/ml/data_visualizer/index_data_visualizer_actions_panel.ts +++ b/x-pack/test/functional_basic/apps/ml/data_visualizer/group3/index_data_visualizer_actions_panel.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrProviderContext } from '../../../ftr_provider_context'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional_basic/apps/ml/data_visualizer/index.ts b/x-pack/test/functional_basic/apps/ml/data_visualizer/index.ts deleted file mode 100644 index 4d38e6a144a78..0000000000000 --- a/x-pack/test/functional_basic/apps/ml/data_visualizer/index.ts +++ /dev/null @@ -1,29 +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 { FtrProviderContext } from '../../../ftr_provider_context'; - -export default function ({ loadTestFile }: FtrProviderContext) { - describe('data visualizer', function () { - // The file data visualizer should work the same as with a trial license - loadTestFile( - require.resolve('../../../../functional/apps/ml/data_visualizer/file_data_visualizer') - ); - - // The data visualizer should work the same as with a trial license, except the missing create actions - // That's why the 'basic' version of 'index_data_visualizer_actions_panel' is loaded here - loadTestFile( - require.resolve('../../../../functional/apps/ml/data_visualizer/index_data_visualizer') - ); - loadTestFile( - require.resolve( - '../../../../functional/apps/ml/data_visualizer/index_data_visualizer_grid_in_discover' - ) - ); - loadTestFile(require.resolve('./index_data_visualizer_actions_panel')); - }); -} diff --git a/x-pack/test/functional_basic/apps/ml/permissions/config.ts b/x-pack/test/functional_basic/apps/ml/permissions/config.ts new file mode 100644 index 0000000000000..048bbc8f0d1f3 --- /dev/null +++ b/x-pack/test/functional_basic/apps/ml/permissions/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseConfig = await readConfigFile(require.resolve('../config.base.ts')); + + return { + // default to the ml/config.base.ts + ...baseConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...baseConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - ml - permissions', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/ml/permissions/index.ts b/x-pack/test/functional_basic/apps/ml/permissions/index.ts index b8d57bc4a9525..53e78b4d08c15 100644 --- a/x-pack/test/functional_basic/apps/ml/permissions/index.ts +++ b/x-pack/test/functional_basic/apps/ml/permissions/index.ts @@ -7,8 +7,33 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; -export default function ({ loadTestFile }: FtrProviderContext) { - describe('permissions', function () { +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + + describe('machine learning basic license - permissions', function () { + this.tags(['skipFirefox', 'ml']); + + before(async () => { + await ml.securityCommon.createMlRoles(); + await ml.securityCommon.createMlUsers(); + }); + + after(async () => { + await ml.securityCommon.cleanMlUsers(); + await ml.securityCommon.cleanMlRoles(); + + await ml.testResources.deleteSavedSearches(); + + await ml.testResources.deleteIndexPatternByTitle('ft_farequote'); + await ml.testResources.deleteIndexPatternByTitle('ft_module_sample_ecommerce'); + + await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote'); + await esArchiver.unload('x-pack/test/functional/es_archives/ml/module_sample_ecommerce'); + + await ml.testResources.resetKibanaTimeZone(); + }); + loadTestFile(require.resolve('./full_ml_access')); loadTestFile(require.resolve('./read_ml_access')); loadTestFile(require.resolve('./no_ml_access')); diff --git a/x-pack/test/functional_basic/apps/transform/config.base.ts b/x-pack/test/functional_basic/apps/transform/config.base.ts new file mode 100644 index 0000000000000..776fdb2c18900 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/config.base.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const xpackFunctionalConfig = await readConfigFile( + require.resolve('../../../functional/config.base.js') + ); + + return { + // default to the xpack functional config + ...xpackFunctionalConfig.getAll(), + esTestCluster: { + ...xpackFunctionalConfig.get('esTestCluster'), + license: 'basic', + serverArgs: [ + 'xpack.license.self_generated.type=basic', + 'xpack.security.enabled=true', + 'xpack.security.authc.api_key.enabled=true', + ], + }, + junit: { + ...xpackFunctionalConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - transform', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/creation/index_pattern/config.ts b/x-pack/test/functional_basic/apps/transform/creation/index_pattern/config.ts new file mode 100644 index 0000000000000..469555d84b78d --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/creation/index_pattern/config.ts @@ -0,0 +1,23 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: + 'Chrome X-Pack UI Functional Tests Basic License - transform - creation - index_pattern', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/creation/index_pattern/index.ts b/x-pack/test/functional_basic/apps/transform/creation/index_pattern/index.ts new file mode 100644 index 0000000000000..d78248e6e72b3 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/creation/index_pattern/index.ts @@ -0,0 +1,19 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('transform basic license', function () { + this.tags(['skipFirefox', 'transform']); + + // The transform UI should work the same as with a trial license + loadTestFile( + require.resolve('../../../../../functional/apps/transform/creation/index_pattern') + ); + }); +} diff --git a/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/config.ts b/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/config.ts new file mode 100644 index 0000000000000..91daf3d099007 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/config.ts @@ -0,0 +1,23 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: + 'Chrome X-Pack UI Functional Tests Basic License - transform - creation - runtime mappings & saved search', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/index.ts b/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/index.ts new file mode 100644 index 0000000000000..13978e3703e34 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/creation/runtime_mappings_saved_search/index.ts @@ -0,0 +1,21 @@ +/* + * 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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('transform basic license', function () { + this.tags(['skipFirefox', 'transform']); + + // The transform UI should work the same as with a trial license + loadTestFile( + require.resolve( + '../../../../../functional/apps/transform/creation/runtime_mappings_saved_search' + ) + ); + }); +} diff --git a/x-pack/test/functional_basic/apps/transform/edit_clone/config.ts b/x-pack/test/functional_basic/apps/transform/edit_clone/config.ts new file mode 100644 index 0000000000000..35650196f37e5 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/edit_clone/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - transform - edit & clone', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/index.ts b/x-pack/test/functional_basic/apps/transform/edit_clone/index.ts similarity index 76% rename from x-pack/test/functional_basic/apps/transform/index.ts rename to x-pack/test/functional_basic/apps/transform/edit_clone/index.ts index f21d0674dcd24..7c55473b49eb5 100644 --- a/x-pack/test/functional_basic/apps/transform/index.ts +++ b/x-pack/test/functional_basic/apps/transform/edit_clone/index.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { FtrProviderContext } from '../../ftr_provider_context'; +import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('transform basic license', function () { this.tags(['skipFirefox', 'transform']); // The transform UI should work the same as with a trial license - loadTestFile(require.resolve('../../../functional/apps/transform')); + loadTestFile(require.resolve('../../../../functional/apps/transform/edit_clone')); }); } diff --git a/x-pack/test/functional_basic/apps/transform/feature_controls/config.ts b/x-pack/test/functional_basic/apps/transform/feature_controls/config.ts new file mode 100644 index 0000000000000..29f57e3be1dbc --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/feature_controls/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - transform - feature controls', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/feature_controls/index.ts b/x-pack/test/functional_basic/apps/transform/feature_controls/index.ts new file mode 100644 index 0000000000000..e3790ac777de2 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/feature_controls/index.ts @@ -0,0 +1,17 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('transform basic license', function () { + this.tags(['skipFirefox', 'transform']); + + // The transform UI should work the same as with a trial license + loadTestFile(require.resolve('../../../../functional/apps/transform/feature_controls')); + }); +} diff --git a/x-pack/test/functional_basic/apps/transform/permissions/config.ts b/x-pack/test/functional_basic/apps/transform/permissions/config.ts new file mode 100644 index 0000000000000..0babb10724110 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/permissions/config.ts @@ -0,0 +1,22 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: 'Chrome X-Pack UI Functional Tests Basic License - transform - permissions', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/index.ts b/x-pack/test/functional_basic/apps/transform/permissions/index.ts similarity index 50% rename from x-pack/test/functional_basic/apps/index.ts rename to x-pack/test/functional_basic/apps/transform/permissions/index.ts index d765aeaa9e6ef..c0bf1ec9e3dc6 100644 --- a/x-pack/test/functional_basic/apps/index.ts +++ b/x-pack/test/functional_basic/apps/transform/permissions/index.ts @@ -5,11 +5,13 @@ * 2.0. */ -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { - describe('apps', function () { - loadTestFile(require.resolve('./ml')); - loadTestFile(require.resolve('./transform')); + describe('transform basic license', function () { + this.tags(['skipFirefox', 'transform']); + + // The transform UI should work the same as with a trial license + loadTestFile(require.resolve('../../../../functional/apps/transform/permissions')); }); } diff --git a/x-pack/test/functional_basic/apps/transform/start_reset_delete/config.ts b/x-pack/test/functional_basic/apps/transform/start_reset_delete/config.ts new file mode 100644 index 0000000000000..6922e0f70c5a5 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/start_reset_delete/config.ts @@ -0,0 +1,23 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const transformConfig = await readConfigFile(require.resolve('../config.base.ts')); + + return { + // default to the transform/config.base.ts + ...transformConfig.getAll(), + testFiles: [require.resolve('.')], + junit: { + ...transformConfig.get('junit'), + reportName: + 'Chrome X-Pack UI Functional Tests Basic License - transform - start reset & delete', + }, + }; +} diff --git a/x-pack/test/functional_basic/apps/transform/start_reset_delete/index.ts b/x-pack/test/functional_basic/apps/transform/start_reset_delete/index.ts new file mode 100644 index 0000000000000..14a9bcbc099c8 --- /dev/null +++ b/x-pack/test/functional_basic/apps/transform/start_reset_delete/index.ts @@ -0,0 +1,17 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('transform basic license', function () { + this.tags(['skipFirefox', 'transform']); + + // The transform UI should work the same as with a trial license + loadTestFile(require.resolve('../../../../functional/apps/transform/start_reset_delete')); + }); +} diff --git a/x-pack/test/localization/tests/index.ts b/x-pack/test/localization/tests/index.ts index a5c844ed24843..812d8d546b614 100644 --- a/x-pack/test/localization/tests/index.ts +++ b/x-pack/test/localization/tests/index.ts @@ -10,5 +10,6 @@ import type { FtrProviderContext } from '../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Sanity checks', () => { loadTestFile(require.resolve('./login_page')); + loadTestFile(require.resolve('./lens')); }); } diff --git a/x-pack/test/localization/tests/lens/formula.ts b/x-pack/test/localization/tests/lens/formula.ts new file mode 100644 index 0000000000000..3a260e1becbe1 --- /dev/null +++ b/x-pack/test/localization/tests/lens/formula.ts @@ -0,0 +1,33 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['visualize', 'lens']); + const elasticChart = getService('elasticChart'); + + describe('lens formula tests', () => { + it('should allow creation of a lens chart via formula', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await elasticChart.setNewChartUiDebugFlag(true); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'formula', + formula: `count() + average(bytes)`, + }); + + expect(await PageObjects.lens.getWorkspaceErrorCount()).to.eql(0); + const data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data).to.be.ok(); + }); + }); +} diff --git a/x-pack/test/localization/tests/lens/index.ts b/x-pack/test/localization/tests/lens/index.ts new file mode 100644 index 0000000000000..0f4c210357833 --- /dev/null +++ b/x-pack/test/localization/tests/lens/index.ts @@ -0,0 +1,77 @@ +/* + * 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 { EsArchiver } from '@kbn/es-archiver'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) { + const PageObjects = getPageObjects(['timePicker']); + const browser = getService('browser'); + const config = getService('config'); + const log = getService('log'); + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + let remoteEsArchiver; + + describe('lens app', () => { + const esArchive = 'x-pack/test/functional/es_archives/logstash_functional'; + const localIndexPatternString = 'logstash-*'; + const remoteIndexPatternString = 'ftr-remote:logstash-*'; + const localFixtures = { + lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json', + lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/default', + }; + + const remoteFixtures = { + lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/lens_basic.json', + lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/default', + }; + let esNode: EsArchiver; + let fixtureDirs: { + lensBasic: string; + lensDefault: string; + }; + let indexPatternString: string; + before(async () => { + log.debug('Starting lens before method'); + await browser.setWindowSize(1280, 1200); + await kibanaServer.savedObjects.cleanStandardList(); + try { + config.get('esTestCluster.ccs'); + remoteEsArchiver = getService('remoteEsArchiver' as 'esArchiver'); + esNode = remoteEsArchiver; + fixtureDirs = remoteFixtures; + indexPatternString = remoteIndexPatternString; + } catch (error) { + esNode = esArchiver; + fixtureDirs = localFixtures; + indexPatternString = localIndexPatternString; + } + + await esNode.load(esArchive); + // changing the timepicker default here saves us from having to set it in Discover (~8s) + await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); + await kibanaServer.uiSettings.update({ + defaultIndex: indexPatternString, + 'dateFormat:tz': 'UTC', + }); + await kibanaServer.importExport.load(fixtureDirs.lensBasic); + await kibanaServer.importExport.load(fixtureDirs.lensDefault); + }); + + after(async () => { + await esArchiver.unload(esArchive); + await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings(); + await kibanaServer.importExport.unload(fixtureDirs.lensBasic); + await kibanaServer.importExport.unload(fixtureDirs.lensDefault); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + loadTestFile(require.resolve('./smokescreen')); + loadTestFile(require.resolve('./formula')); + }); +} diff --git a/x-pack/test/localization/tests/lens/smokescreen.ts b/x-pack/test/localization/tests/lens/smokescreen.ts new file mode 100644 index 0000000000000..3414cc89bba65 --- /dev/null +++ b/x-pack/test/localization/tests/lens/smokescreen.ts @@ -0,0 +1,881 @@ +/* + * 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 expect from '@kbn/expect'; +import { range } from 'lodash'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { getI18nLocaleFromServerArgs } from '../utils'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']); + const find = getService('find'); + const listingTable = getService('listingTable'); + const testSubjects = getService('testSubjects'); + const elasticChart = getService('elasticChart'); + const filterBar = getService('filterBar'); + const retry = getService('retry'); + const config = getService('config'); + + function getTranslationFr(term: string) { + switch (term) { + case 'legacyMetric': + return 'Ancien indicateur'; + case 'datatable': + return 'Tableau'; + case 'bar': + return 'Vertical à barres'; + case 'bar_stacked': + return 'Vertical à barres empilées'; + case 'line': + return 'Ligne'; + case 'donut': + return 'Graphique en anneau'; + case 'pie': + return 'Camembert'; + case 'treemap': + return 'Compartimentage'; + case 'heatmap': + return 'Carte thermique'; + case 'Percent': + return 'Pourcent'; + case 'Number': + return 'Nombre'; + case 'Linear': + return 'Linéaire'; + case 'Records': + return 'Enregistrements'; + case 'records': + return 'enregistrements'; + case 'moving_average': + return 'Moyenne mobile de'; + case 'sum': + return 'somme'; + default: + return term; + } + } + + function getTranslationJa(term: string) { + switch (term) { + case 'legacyMetric': + return 'レガシーメトリック'; + case 'datatable': + return '表'; + case 'bar': + return '縦棒'; + case 'bar_stacked': + return '積み上げ縦棒'; + case 'line': + return '折れ線'; + case 'donut': + return 'ドーナッツ'; + case 'pie': + return '円'; + case 'treemap': + return 'ツリーマップ'; + case 'heatmap': + return 'ヒートマップ'; + case 'Number': + return '数字'; + case 'Percent': + return '割合(%)'; + case 'Linear': + return '線形'; + case 'Records': + case 'records': + return '記録'; + case 'moving_average': + return 'の移動平均'; + case 'sum': + return '合計'; + default: + return term; + } + } + + function getTranslationZh(term: string) { + switch (term) { + case 'legacyMetric': + return '旧版指标'; + case 'datatable': + return '表'; + case 'bar': + return '垂直条形图'; + case 'bar_stacked': + return '垂直堆积条形图'; + case 'line': + return '折线图'; + case 'donut': + return '圆环图'; + case 'pie': + return '饼图'; + case 'treemap': + return '树状图'; + case 'heatmap': + return '热图'; + case 'Number': + return '数字'; + case 'Percent': + return '百分比'; + case 'Linear': + return '线性'; + case 'Records': + case 'records': + return '记录'; + case 'moving_average': + return '的移动平均值'; + case 'sum': + return '求和'; + default: + return term; + } + } + + function getExpectedI18nTranslator(locale: string): (chartType: string) => string { + switch (locale) { + case 'ja-JP': + return getTranslationJa; + case 'zh-CN': + return getTranslationZh; + case 'fr-FR': + return getTranslationFr; + default: + return (v: string) => v; + } + } + + describe('lens smokescreen tests', () => { + let termTranslator: (chartType: string) => string; + + before(async () => { + const serverArgs: string[] = config.get('kbnTestServer.serverArgs'); + const kbnServerLocale = getI18nLocaleFromServerArgs(serverArgs); + termTranslator = getExpectedI18nTranslator(kbnServerLocale); + }); + + it('should allow creation of lens xy chart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_splitDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: '@message.raw', + }); + + await PageObjects.lens.switchToVisualization('lnsDatatable', termTranslator('datatable')); + await PageObjects.lens.removeDimension('lnsDatatable_rows'); + await PageObjects.lens.switchToVisualization('bar_stacked', termTranslator('bar_stacked')); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_splitDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'ip', + }); + + await PageObjects.lens.save('Afancilenstest'); + + // Ensure the visualization shows up in the visualize list, and takes + // us back to the visualization as we configured it. + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('Afancilenstest'); + await PageObjects.lens.clickVisualizeListItemTitle('Afancilenstest'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.waitForVisualization('xyVisChart'); + + expect(await PageObjects.lens.getTitle()).to.eql('Afancilenstest'); + + // .echLegendItem__title is the only viable way of getting the xy chart's + // legend item(s), so we're using a class selector here. + // 4th item is the other bucket + expect(await find.allByCssSelector('.echLegendItem')).to.have.length(4); + }); + + it('should create an xy visualization with filters aggregation', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsXYvis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); + await PageObjects.lens.goToTimeRange(); + // Change the IP field to filters + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_splitDimensionPanel > lns-dimensionTrigger', + operation: 'filters', + keepOpen: true, + }); + await PageObjects.lens.addFilterToAgg(`geo.src : CN`); + await PageObjects.lens.waitForVisualization('xyVisChart'); + + // Verify that the field was persisted from the transition + expect(await PageObjects.lens.getFiltersAggLabels()).to.eql([`ip : *`, `geo.src : CN`]); + expect(await find.allByCssSelector('.echLegendItem')).to.have.length(2); + }); + + it('should transition from metric to table to metric', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('Artistpreviouslyknownaslens'); + await PageObjects.lens.clickVisualizeListItemTitle('Artistpreviouslyknownaslens'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.assertLegacyMetric('Maximum of bytes', '19,986'); + await PageObjects.lens.switchToVisualization('lnsDatatable', termTranslator('datatable')); + expect(await PageObjects.lens.getDatatableHeaderText()).to.eql('Maximum of bytes'); + expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('19,986'); + await PageObjects.lens.switchToVisualization( + 'lnsLegacyMetric', + termTranslator('legacyMetric') + ); + await PageObjects.lens.assertLegacyMetric('Maximum of bytes', '19,986'); + }); + + it('should transition from a multi-layer stacked bar to a multi-layer line chart and correctly remove all layers', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + await PageObjects.lens.createLayer(); + + expect(await PageObjects.lens.hasChartSwitchWarning('line', termTranslator('line'))).to.eql( + false + ); + + await PageObjects.lens.switchToVisualization('line', termTranslator('line')); + await PageObjects.lens.configureDimension({ + dimension: 'lns-layerPanel-1 > lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'geo.src', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lns-layerPanel-1 > lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'median', + field: 'bytes', + }); + + expect(await PageObjects.lens.getLayerCount()).to.eql(2); + await PageObjects.lens.removeLayer(); + await PageObjects.lens.removeLayer(); + await testSubjects.existOrFail('workspace-drag-drop-prompt'); + }); + + it('should edit settings of xy line chart', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsXYvis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); + await PageObjects.lens.goToTimeRange(); + await testSubjects.click('lnsXY_splitDimensionPanel > indexPattern-dimension-remove'); + await PageObjects.lens.switchToVisualization('line', termTranslator('line')); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'max', + field: 'memory', + keepOpen: true, + }); + await PageObjects.lens.editDimensionLabel('Test of label'); + await PageObjects.lens.editDimensionFormat(termTranslator('Percent')); + await PageObjects.lens.editDimensionColor('#ff0000'); + await PageObjects.lens.openVisualOptions(); + + await PageObjects.lens.useCurvedLines(); + await PageObjects.lens.editMissingValues('Linear'); + + await PageObjects.lens.assertMissingValues(termTranslator('Linear')); + + await PageObjects.lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger'); + await PageObjects.lens.assertColor('#ff0000'); + + await testSubjects.existOrFail('indexPattern-dimension-formatDecimals'); + + await PageObjects.lens.closeDimensionEditor(); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + 'Test of label' + ); + }); + + it('should not show static value tab for data layers', async () => { + await PageObjects.lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger'); + // Quick functions and Formula tabs should be visible + expect(await testSubjects.exists('lens-dimensionTabs-quickFunctions')).to.eql(true); + expect(await testSubjects.exists('lens-dimensionTabs-formula')).to.eql(true); + // Static value tab should not be visible + expect(await testSubjects.exists('lens-dimensionTabs-static_value')).to.eql(false); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should be able to add very long labels and still be able to remove a dimension', async () => { + await PageObjects.lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger'); + const longLabel = + 'Veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryvery long label wrapping multiple lines'; + await PageObjects.lens.editDimensionLabel(longLabel); + await PageObjects.lens.waitForVisualization('xyVisChart'); + await PageObjects.lens.closeDimensionEditor(); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + longLabel + ); + expect( + await testSubjects.isDisplayed('lnsXY_yDimensionPanel > indexPattern-dimension-remove') + ).to.equal(true); + await PageObjects.lens.removeDimension('lnsXY_yDimensionPanel'); + await testSubjects.missingOrFail('lnsXY_yDimensionPanel > lns-dimensionTrigger'); + }); + + it('should allow creation of a multi-axis chart and switching multiple times', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await elasticChart.setNewChartUiDebugFlag(true); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('bar', termTranslator('bar')); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'geo.dest', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'unique_count', + field: 'bytes', + keepOpen: true, + }); + + await PageObjects.lens.changeAxisSide('right'); + let data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.axes?.y.length).to.eql(2); + expect(data?.axes?.y.some(({ position }) => position === 'right')).to.eql(true); + + await PageObjects.lens.changeAxisSide('left'); + data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.axes?.y.length).to.eql(1); + expect(data?.axes?.y.some(({ position }) => position === 'right')).to.eql(false); + + await PageObjects.lens.changeAxisSide('right'); + await PageObjects.lens.waitForVisualization('xyVisChart'); + + await PageObjects.lens.closeDimensionEditor(); + }); + + it('should show value labels on bar charts when enabled', async () => { + // enable value labels + await PageObjects.lens.openVisualOptions(); + await testSubjects.click('lns_valueLabels_inside'); + + // check for value labels + let data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.bars?.[0].labels).not.to.eql(0); + + // switch to stacked bar chart + await PageObjects.lens.switchToVisualization('bar_stacked', termTranslator('bar_stacked')); + + // check for value labels + data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.bars?.[0].labels).not.to.eql(0); + }); + + it('should override axis title', async () => { + const axisTitle = 'overridden axis'; + await PageObjects.lens.toggleToolbarPopover('lnsLeftAxisButton'); + await testSubjects.setValue('lnsyLeftAxisTitle', axisTitle, { + clearWithKeyboard: true, + }); + + let data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.axes?.y?.[1].title).to.eql(axisTitle); + + // hide the gridlines + await testSubjects.click('lnsshowyLeftAxisGridlines'); + + data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); + expect(data?.axes?.y?.[1].gridlines.length).to.eql(0); + }); + + it('should transition from line chart to donut chart and to bar chart', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsXYvis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); + await PageObjects.lens.goToTimeRange(); + expect(await PageObjects.lens.hasChartSwitchWarning('donut', termTranslator('donut'))).to.eql( + true + ); + await PageObjects.lens.switchToVisualization('donut', termTranslator('donut')); + + expect(await PageObjects.lens.getTitle()).to.eql('lnsXYvis'); + expect(await PageObjects.lens.getDimensionTriggerText('lnsPie_sliceByDimensionPanel')).to.eql( + 'Top values of ip' + ); + expect(await PageObjects.lens.getDimensionTriggerText('lnsPie_sizeByDimensionPanel')).to.eql( + 'Average of bytes' + ); + + expect(await PageObjects.lens.hasChartSwitchWarning('bar', termTranslator('bar'))).to.eql( + false + ); + await PageObjects.lens.switchToVisualization('bar', termTranslator('bar')); + expect(await PageObjects.lens.getTitle()).to.eql('lnsXYvis'); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_xDimensionPanel')).to.eql( + 'Top values of ip' + ); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + 'Average of bytes' + ); + }); + + it('should transition from bar chart to line chart using layer chart switch', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsXYvis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsXYvis'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchLayerSeriesType('line'); + expect(await PageObjects.lens.getTitle()).to.eql('lnsXYvis'); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_xDimensionPanel')).to.eql( + '@timestamp' + ); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + 'Average of bytes' + ); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_splitDimensionPanel')).to.eql( + 'Top values of ip' + ); + }); + + it('should transition from pie chart to treemap chart', async () => { + await PageObjects.visualize.gotoVisualizationLandingPage(); + await listingTable.searchForItemWithName('lnsPieVis'); + await PageObjects.lens.clickVisualizeListItemTitle('lnsPieVis'); + await PageObjects.lens.goToTimeRange(); + expect( + await PageObjects.lens.hasChartSwitchWarning('treemap', termTranslator('treemap')) + ).to.eql(false); + await PageObjects.lens.switchToVisualization('treemap', termTranslator('treemap')); + expect( + await PageObjects.lens.getDimensionTriggersTexts('lnsPie_groupByDimensionPanel') + ).to.eql(['Top values of geo.dest', 'Top values of geo.src']); + expect(await PageObjects.lens.getDimensionTriggerText('lnsPie_sizeByDimensionPanel')).to.eql( + 'Average of bytes' + ); + }); + + it('should create a pie chart and switch to datatable', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('pie', termTranslator('pie')); + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sliceByDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + disableEmptyRows: true, + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sizeByDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + expect( + await PageObjects.lens.hasChartSwitchWarning('lnsDatatable', termTranslator('datatable')) + ).to.eql(false); + await PageObjects.lens.switchToVisualization('lnsDatatable', termTranslator('datatable')); + + // Need to provide a fn for these + // expect(await PageObjects.lens.getDatatableHeaderText()).to.eql('@timestamp per 3 hours'); + // expect(await PageObjects.lens.getDatatableHeaderText(1)).to.eql('Average of bytes'); + expect(await PageObjects.lens.getDatatableCellText(0, 0)).to.eql('2015-09-20 00:00'); + expect(await PageObjects.lens.getDatatableCellText(0, 1)).to.eql('6,011.351'); + }); + + it('should create a heatmap chart and transition to barchart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('heatmap', termTranslator('heatmap')); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsHeatmap_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsHeatmap_yDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'geo.dest', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsHeatmap_cellPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + expect(await PageObjects.lens.hasChartSwitchWarning('bar', termTranslator('bar'))).to.eql( + false + ); + await PageObjects.lens.switchToVisualization('bar', termTranslator('bar')); + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_xDimensionPanel')).to.eql( + '@timestamp' + ); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.contain( + 'bytes' + ); + }); + + it('should create a valid XY chart with references', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'moving_average', + keepOpen: true, + }); + await PageObjects.lens.configureReference({ + operation: termTranslator('sum'), + field: 'bytes', + }); + await PageObjects.lens.closeDimensionEditor(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'cumulative_sum', + keepOpen: true, + }); + await PageObjects.lens.configureReference({ + field: termTranslator('Records'), + }); + await PageObjects.lens.closeDimensionEditor(); + + // Two Y axes that are both valid + expect(await find.allByCssSelector('.echLegendItem')).to.have.length(2); + }); + + it('should allow formatting on references', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('lnsDatatable', termTranslator('datatable')); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsDatatable_rows > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + disableEmptyRows: true, + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsDatatable_metrics > lns-empty-dimension', + operation: 'moving_average', + keepOpen: true, + }); + await PageObjects.lens.configureReference({ + operation: termTranslator('sum'), + field: 'bytes', + }); + await PageObjects.lens.editDimensionFormat(termTranslator('Number')); + await PageObjects.lens.closeDimensionEditor(); + + await PageObjects.lens.waitForVisualization(); + + const values = await Promise.all( + range(0, 6).map((index) => PageObjects.lens.getDatatableCellText(index, 1)) + ); + expect(values).to.eql([ + '-', + '222,420.00', + '702,050.00', + '1,879,613.33', + '3,482,256.25', + '4,359,953.00', + ]); + }); + + /** + * The edge cases are: + * + * 1. Showing errors when creating a partial configuration + * 2. Being able to drag in a new field while in partial config + * 3. Being able to switch charts while in partial config + */ + it('should handle edge cases in reference-based operations', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'cumulative_sum', + }); + expect(await PageObjects.lens.getWorkspaceErrorCount()).to.eql(1); + + await PageObjects.lens.removeDimension('lnsXY_xDimensionPanel'); + expect(await PageObjects.lens.getWorkspaceErrorCount()).to.eql(2); + + await PageObjects.lens.dragFieldToDimensionTrigger( + '@timestamp', + 'lnsXY_xDimensionPanel > lns-empty-dimension' + ); + expect(await PageObjects.lens.getWorkspaceErrorCount()).to.eql(1); + + expect( + await PageObjects.lens.hasChartSwitchWarning('lnsDatatable', termTranslator('datatable')) + ).to.eql(false); + await PageObjects.lens.switchToVisualization('lnsDatatable', termTranslator('datatable')); + + // TODO: fix this later on + // expect(await PageObjects.lens.getDimensionTriggerText('lnsDatatable_metrics')).to.eql( + // 'Cumulative sum of (incomplete)' + // ); + }); + + it('should keep the field selection while transitioning to every reference-based operation', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'counter_rate', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'cumulative_sum', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'differences', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'moving_average', + }); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.contain( + 'bytes' + ); + }); + + it('should not leave an incomplete column in the visualization config with field-based operation', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'min', + }); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + undefined + ); + }); + + it('should revert to previous configuration and not leave an incomplete column in the visualization config with reference-based operations', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'moving_average', + field: termTranslator('Records'), + }); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.contain( + termTranslator('moving_average') + ); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'median', + isPreviousIncompatible: true, + keepOpen: true, + }); + + expect(await PageObjects.lens.isDimensionEditorOpen()).to.eql(true); + + await PageObjects.lens.closeDimensionEditor(); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.contain( + termTranslator('moving_average') + ); + }); + + it('should transition from unique count to last value', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'unique_count', + field: 'ip', + }); + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-dimensionTrigger', + operation: 'last_value', + field: 'bytes', + isPreviousIncompatible: true, + }); + + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.contain( + 'bytes' + ); + }); + + it('should allow to change index pattern', async () => { + let indexPatternString; + if (config.get('esTestCluster.ccs')) { + indexPatternString = 'ftr-remote:log*'; + } else { + indexPatternString = 'log*'; + } + await PageObjects.lens.switchFirstLayerIndexPattern(indexPatternString); + expect(await PageObjects.lens.getFirstLayerIndexPattern()).to.equal(indexPatternString); + }); + + it('should allow filtering by legend on an xy chart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', + operation: 'date_histogram', + field: '@timestamp', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsXY_splitDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'extension.raw', + }); + + await PageObjects.lens.filterLegend('jpg'); + const hasExtensionFilter = await filterBar.hasFilter('extension.raw', 'jpg'); + expect(hasExtensionFilter).to.be(true); + + await filterBar.removeFilter('extension.raw'); + }); + + it('should allow filtering by legend on a pie chart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.goToTimeRange(); + await PageObjects.lens.switchToVisualization('pie', termTranslator('pie')); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sliceByDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'extension.raw', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sliceByDimensionPanel > lns-empty-dimension', + operation: 'terms', + field: 'agent.raw', + }); + + await PageObjects.lens.configureDimension({ + dimension: 'lnsPie_sizeByDimensionPanel > lns-empty-dimension', + operation: 'average', + field: 'bytes', + }); + + await PageObjects.lens.filterLegend('jpg'); + const hasExtensionFilter = await filterBar.hasFilter('extension.raw', 'jpg'); + expect(hasExtensionFilter).to.be(true); + + await filterBar.removeFilter('extension.raw'); + }); + + it('should show visual options button group for a donut chart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.switchToVisualization('donut', termTranslator('donut')); + + const hasVisualOptionsButton = await PageObjects.lens.hasVisualOptionsButton(); + expect(hasVisualOptionsButton).to.be(true); + + await PageObjects.lens.openVisualOptions(); + await retry.try(async () => { + expect(await PageObjects.lens.hasEmptySizeRatioButtonGroup()).to.be(true); + }); + }); + + it('should not show visual options button group for a pie chart', async () => { + await PageObjects.visualize.navigateToNewVisualization(); + await PageObjects.visualize.clickVisType('lens'); + await PageObjects.lens.switchToVisualization('pie', termTranslator('pie')); + + const hasVisualOptionsButton = await PageObjects.lens.hasVisualOptionsButton(); + expect(hasVisualOptionsButton).to.be(false); + }); + }); +} diff --git a/x-pack/test/localization/tests/login_page.ts b/x-pack/test/localization/tests/login_page.ts index 6ff2b3a9b4757..613720601d243 100644 --- a/x-pack/test/localization/tests/login_page.ts +++ b/x-pack/test/localization/tests/login_page.ts @@ -7,6 +7,7 @@ import expect from '@kbn/expect'; import type { FtrProviderContext } from '../ftr_provider_context'; +import { getI18nLocaleFromServerArgs } from './utils'; /** * Strings Needs to be hardcoded since getting it from the i18n.translate @@ -28,19 +29,6 @@ function getExpectedI18nTranslation(locale: string): string | undefined { } } -function getI18nLocaleFromServerArgs(kbnServerArgs: string[]): string { - const re = /--i18n\.locale=(?.*)/; - for (const serverArg of kbnServerArgs) { - const match = re.exec(serverArg); - const locale = match?.groups?.locale; - if (locale) { - return locale; - } - } - - throw Error('i18n.locale is not set in the server arguments'); -} - export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const config = getService('config'); diff --git a/x-pack/test/localization/tests/utils.ts b/x-pack/test/localization/tests/utils.ts new file mode 100644 index 0000000000000..4ac2a970ef02c --- /dev/null +++ b/x-pack/test/localization/tests/utils.ts @@ -0,0 +1,19 @@ +/* + * 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 function getI18nLocaleFromServerArgs(kbnServerArgs: string[]): string { + const re = /--i18n\.locale=(?.*)/; + for (const serverArg of kbnServerArgs) { + const match = re.exec(serverArg); + const locale = match?.groups?.locale; + if (locale) { + return locale; + } + } + + throw Error('i18n.locale is not set in the server arguments'); +} diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts index f730e58ef136e..94173300eeef5 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts @@ -60,6 +60,7 @@ export default function ({ getService }: FtrProviderContext) { 'actions:.swimlane', 'actions:.teams', 'actions:.tines', + 'actions:.torq', 'actions:.webhook', 'actions:.xmatters', 'actions_telemetry', diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/connector_types.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/connector_types.ts new file mode 100644 index 0000000000000..16eb4f7d7a21c --- /dev/null +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/connector_types.ts @@ -0,0 +1,36 @@ +/* + * 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 { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const commonScreenshots = getService('commonScreenshots'); + const screenshotDirectories = ['response_ops_docs', 'stack_alerting']; + const pageObjects = getPageObjects(['common', 'header']); + const actions = getService('actions'); + const testSubjects = getService('testSubjects'); + + describe('connector types', function () { + beforeEach(async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + }); + + it('serverlog connector screenshot', async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + await actions.common.openNewConnectorForm('server-log'); + await testSubjects.setValue('nameInput', 'Server log test connector'); + await commonScreenshots.takeScreenshot('serverlog-connector', screenshotDirectories); + const saveTestButton = await testSubjects.find('create-connector-flyout-save-test-btn'); + await saveTestButton.click(); + await commonScreenshots.takeScreenshot('serverlog-params-test', screenshotDirectories); + const flyOutCancelButton = await testSubjects.find('euiFlyoutCloseButton'); + await flyOutCancelButton.click(); + }); + }); +} diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index.ts index 200a3ae1e8793..85e118756c4b7 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/index.ts @@ -7,8 +7,26 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; -export default function ({ loadTestFile }: FtrProviderContext) { +export default function ({ loadTestFile, getService }: FtrProviderContext) { + const browser = getService('browser'); + const actions = getService('actions'); + describe('stack alerting', function () { + before(async () => { + await browser.setWindowSize(1920, 1080); + await actions.api.createConnector({ + name: 'server-log-connector', + config: {}, + secrets: {}, + connectorTypeId: '.server-log', + }); + }); + + after(async () => { + await actions.api.deleteAllConnectors(); + }); + loadTestFile(require.resolve('./list_view')); + loadTestFile(require.resolve('./connector_types')); }); } diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/list_view.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/list_view.ts index cdad076a62ba3..2b7df0bfd6e48 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/list_view.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_alerting/list_view.ts @@ -11,12 +11,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const commonScreenshots = getService('commonScreenshots'); const screenshotDirectories = ['response_ops_docs', 'stack_alerting']; const pageObjects = getPageObjects(['common', 'header']); - const actions = getService('actions'); const rules = getService('rules'); const testSubjects = getService('testSubjects'); describe('list view', function () { - let serverLogConnectorId: string; let ruleId: string; const indexThresholdRule = { consumer: 'alerts', @@ -38,13 +36,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; before(async () => { - const connectorName = `server-log-connector`; - ({ id: serverLogConnectorId } = await createServerLogConnector(connectorName)); ({ id: ruleId } = await rules.api.createRule(indexThresholdRule)); }); after(async () => { - await actions.api.deleteConnector(serverLogConnectorId); await rules.api.deleteRule(ruleId); }); @@ -87,13 +82,4 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await commonScreenshots.takeScreenshot('snooze-panel', screenshotDirectories, 1400, 1024); }); }); - - const createServerLogConnector = async (name: string) => { - return actions.api.createConnector({ - name, - config: {}, - secrets: {}, - connectorTypeId: '.server-log', - }); - }; } diff --git a/x-pack/test/search_sessions_integration/tests/apps/dashboard/async_search/index.ts b/x-pack/test/search_sessions_integration/tests/apps/dashboard/async_search/index.ts index 1c947c3852446..deb4a53190ff6 100644 --- a/x-pack/test/search_sessions_integration/tests/apps/dashboard/async_search/index.ts +++ b/x-pack/test/search_sessions_integration/tests/apps/dashboard/async_search/index.ts @@ -13,8 +13,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid const PageObjects = getPageObjects(['common']); const searchSessions = getService('searchSessions'); - // FLAKY: https://github.com/elastic/kibana/issues/103043 - describe.skip('Dashboard', function () { + describe('Dashboard', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); await kibanaServer.savedObjects.cleanStandardList();