diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml
index 616f32285c99a..8f1546099d539 100644
--- a/.buildkite/ftr_configs.yml
+++ b/.buildkite/ftr_configs.yml
@@ -81,12 +81,18 @@ disabled:
# Serverless configs, currently only for manual tests runs, CI integration planned
- x-pack/test_serverless/api_integration/test_suites/common/config.ts
- x-pack/test_serverless/api_integration/test_suites/observability/config.ts
+ - x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts
- x-pack/test_serverless/api_integration/test_suites/search/config.ts
+ - x-pack/test_serverless/api_integration/test_suites/search/config.feature_flags.ts
- x-pack/test_serverless/api_integration/test_suites/security/config.ts
+ - x-pack/test_serverless/api_integration/test_suites/security/config.feature_flags.ts
- x-pack/test_serverless/functional/test_suites/common/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
+ - x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
+ - x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
+ - x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts
defaultQueue: 'n2-4-spot'
enabled:
@@ -347,7 +353,6 @@ enabled:
- x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts
- x-pack/test/reporting_functional/reporting_and_security.config.ts
- x-pack/test/reporting_functional/reporting_without_security.config.ts
- - x-pack/test/reporting_functional/reporting_and_timeout.config.ts
- x-pack/test/rule_registry/security_and_spaces/config_basic.ts
- x-pack/test/rule_registry/security_and_spaces/config_trial.ts
- x-pack/test/rule_registry/spaces_only/config_basic.ts
diff --git a/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml b/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml
new file mode 100644
index 0000000000000..27e55dfced9d7
--- /dev/null
+++ b/.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml
@@ -0,0 +1,10 @@
+env:
+ ENVIRONMENT: ${ENVIRONMENT?}
+
+steps:
+ - label: ":pipeline::grey_question::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
+ env:
+ QG_PIPELINE_LOCATION: ".buildkite/pipelines/quality-gates"
+ command: "make -C /agent run-environment-tests"
+ agents:
+ image: "docker.elastic.co/ci-agent-images/quality-gate-seedling:0.0.2"
diff --git a/.buildkite/pipelines/quality-gates/pipeline.tests-production.yaml b/.buildkite/pipelines/quality-gates/pipeline.tests-production.yaml
new file mode 100644
index 0000000000000..483532b9c7435
--- /dev/null
+++ b/.buildkite/pipelines/quality-gates/pipeline.tests-production.yaml
@@ -0,0 +1,15 @@
+steps:
+ - label: ":pipeline::kibana::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Kibana specific tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::fleet::seedling: Trigger Fleet Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Fleet specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Security specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
diff --git a/.buildkite/pipelines/quality-gates/pipeline.tests-qa.yaml b/.buildkite/pipelines/quality-gates/pipeline.tests-qa.yaml
new file mode 100644
index 0000000000000..483532b9c7435
--- /dev/null
+++ b/.buildkite/pipelines/quality-gates/pipeline.tests-qa.yaml
@@ -0,0 +1,15 @@
+steps:
+ - label: ":pipeline::kibana::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Kibana specific tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::fleet::seedling: Trigger Fleet Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Fleet specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Security specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
diff --git a/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml b/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml
new file mode 100644
index 0000000000000..483532b9c7435
--- /dev/null
+++ b/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml
@@ -0,0 +1,15 @@
+steps:
+ - label: ":pipeline::kibana::seedling: Trigger Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Kibana specific tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::fleet::seedling: Trigger Fleet Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Fleet specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
+
+ - label: ":pipeline::lock::seedling: Trigger Security Kibana Tests for ${ENVIRONMENT}"
+ command: echo "replace me with Security specific Kibana tests"
+ agent:
+ image: "docker.elastic.co/ci-agent-images/basic-buildkite-agent:1688566364"
diff --git a/.buildkite/scripts/steps/functional/serverless_ftr.sh b/.buildkite/scripts/steps/functional/serverless_ftr.sh
index 51eee3307e0b3..ba75fe6034cae 100755
--- a/.buildkite/scripts/steps/functional/serverless_ftr.sh
+++ b/.buildkite/scripts/steps/functional/serverless_ftr.sh
@@ -9,17 +9,20 @@ export JOB="kibana-serverless-$SERVERLESS_ENVIRONMENT"
if [[ "$SERVERLESS_ENVIRONMENT" == "search" ]]; then
SERVERLESS_CONFIGS=(
"x-pack/test_serverless/api_integration/test_suites/search/config.ts"
+ "x-pack/test_serverless/api_integration/test_suites/search/config.feature_flags.ts"
"x-pack/test_serverless/functional/test_suites/search/config.ts"
)
elif [[ "$SERVERLESS_ENVIRONMENT" == "observability" ]]; then
SERVERLESS_CONFIGS=(
"x-pack/test_serverless/api_integration/test_suites/observability/config.ts"
+ "x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts"
"x-pack/test_serverless/functional/test_suites/observability/config.ts"
"x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts"
)
elif [[ "$SERVERLESS_ENVIRONMENT" == "security" ]]; then
SERVERLESS_CONFIGS=(
"x-pack/test_serverless/api_integration/test_suites/security/config.ts"
+ "x-pack/test_serverless/api_integration/test_suites/security/config.feature_flags.ts"
"x-pack/test_serverless/functional/test_suites/security/config.ts"
)
fi
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 650c71e26c93b..eecffc061f483 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -988,6 +988,7 @@ x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability
/.buildkite/ @elastic/kibana-operations
/kbn_pm/ @elastic/kibana-operations
/x-pack/dev-tools @elastic/kibana-operations
+catalog-info.yaml @elastic/kibana-operations @elastic/kibana-tech-leads
# Appex QA
/src/dev/code_coverage @elastic/appex-qa
diff --git a/catalog-info.yaml b/catalog-info.yaml
new file mode 100644
index 0000000000000..534e34ba27008
--- /dev/null
+++ b/catalog-info.yaml
@@ -0,0 +1,70 @@
+---
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: kibana
+ description: Kibana is a user interface that lets you visualize your Elasticsearch data and navigate the Elastic Stack.
+
+ annotations:
+ backstage.io/source-location: url:https://github.com/elastic/kibana/tree/main
+ github.com/project-slug: elastic/kibana
+ github.com/team-slug: elastic/kibana-tech-leads
+ buildkite.com/project-slug: elastic/kibana
+
+ tags:
+ - typescript
+ - javascript
+ - dashboards
+ - metrics
+ - visualizations
+ - observability
+
+ links:
+ - title: Documentation
+ url: https://www.elastic.co/guide/en/kibana/current/index.html
+
+spec:
+ type: monorepo
+ owner: group:kibana-tech-leads
+ lifecycle: production
+
+---
+
+apiVersion: backstage.io/v1alpha1
+kind: Resource
+metadata:
+ name: kibana-tests-pipeline
+ description: Definition of the kibana pipeline
+ links:
+ - title: Pipeline
+ url: https://buildkite.com/elastic/kibana-tests
+spec:
+ type: buildkite-pipeline
+ owner: group:kibana-tech-leads
+ system: buildkite
+ implementation:
+ apiVersion: buildkite.elastic.dev/v1
+ kind: Pipeline
+ metadata:
+ name: kibana-tests
+ description: Pipeline that tests the service integration in various environments
+ spec:
+ repository: elastic/kibana
+ pipeline_file: ./.buildkite/pipelines/pipeline.kibana-tests.yaml
+ provider_settings:
+ trigger_mode: none
+ teams:
+ kibana-operations:
+ access_level: MANAGE_BUILD_AND_READ
+ security-engineering-productivity:
+ access_level: BUILD_AND_READ
+ fleet:
+ access_level: BUILD_AND_READ
+ kibana-tech-leads:
+ access_level: BUILD_AND_READ
+ kibana-core:
+ access_level: BUILD_AND_READ
+ cloud-tooling:
+ access_level: BUILD_AND_READ
+ everyone:
+ access_level: READ_ONLY
diff --git a/docs/api-generated/connectors/connector-apis-passthru.asciidoc b/docs/api-generated/connectors/connector-apis-passthru.asciidoc
index 64bf78a2b66ed..08a7d8d9638b0 100644
--- a/docs/api-generated/connectors/connector-apis-passthru.asciidoc
+++ b/docs/api-generated/connectors/connector-apis-passthru.asciidoc
@@ -1010,6 +1010,7 @@ Any modifications made to this file will be overwritten.
diff --git a/docs/management/connectors/action-types/webhook.asciidoc b/docs/management/connectors/action-types/webhook.asciidoc
index 5424eb87c3ae4..89c7a618ecbc7 100644
--- a/docs/management/connectors/action-types/webhook.asciidoc
+++ b/docs/management/connectors/action-types/webhook.asciidoc
@@ -3,6 +3,10 @@
++++
Webhook
++++
+:frontmatter-description: Add a connector that can send requests to a web service.
+:frontmatter-tags-products: [alerting]
+:frontmatter-tags-content-type: [how-to]
+:frontmatter-tags-user-goals: [configure]
The Webhook connector uses https://github.com/axios/axios[axios] to send a POST or PUT request to a web service.
@@ -15,6 +19,7 @@ or as needed when you're creating a rule. For example:
[role="screenshot"]
image::management/connectors/images/webhook-connector.png[Webhook connector]
+// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[float]
[[webhook-connector-configuration]]
@@ -75,6 +80,7 @@ as you're creating or editing the connector in {kib}. For example:
[role="screenshot"]
image::management/connectors/images/webhook-params-test.png[Webhook params test]
+// NOTE: This is an autogenerated screenshot. Do not edit it directly.
Webhook actions have the following properties.
diff --git a/docs/management/connectors/images/webhook-connector.png b/docs/management/connectors/images/webhook-connector.png
index 6046572734afd..276fca05cee57 100644
Binary files a/docs/management/connectors/images/webhook-connector.png and b/docs/management/connectors/images/webhook-connector.png differ
diff --git a/docs/management/connectors/images/webhook-params-test.png b/docs/management/connectors/images/webhook-params-test.png
index 7b7007a72a0b6..4ae6660b85e26 100644
Binary files a/docs/management/connectors/images/webhook-params-test.png and b/docs/management/connectors/images/webhook-params-test.png differ
diff --git a/packages/kbn-i18n/src/core/i18n.ts b/packages/kbn-i18n/src/core/i18n.ts
index cde5506383dd6..1fa0ceb997410 100644
--- a/packages/kbn-i18n/src/core/i18n.ts
+++ b/packages/kbn-i18n/src/core/i18n.ts
@@ -165,7 +165,7 @@ export interface TranslateArguments {
* @param [options.values] - values to pass into translation
* @param [options.defaultMessage] - will be used unless translation was successful
*/
-export function translate(id: string, { values = {}, defaultMessage }: TranslateArguments) {
+export function translate(id: string, { values = {}, defaultMessage }: TranslateArguments): string {
const shouldUsePseudoLocale = isPseudoLocale(currentLocale);
if (!id || !isString(id)) {
diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js
index c3b1a27491e67..93eba1bb171b2 100644
--- a/src/dev/precommit_hook/casing_check_config.js
+++ b/src/dev/precommit_hook/casing_check_config.js
@@ -50,6 +50,9 @@ export const IGNORE_FILE_GLOBS = [
// Required to match the name in the docs.elastic.dev repo.
'nav-kibana-dev.docnav.json',
+ // Match elastic wide naming convention for catalog-info.yaml
+ 'catalog-info.yaml',
+
// filename must match language code which requires capital letters
'**/translations/*.json',
diff --git a/src/plugins/es_ui_shared/public/components/code_editor/code_editor.test.tsx b/src/plugins/es_ui_shared/public/components/code_editor/code_editor.test.tsx
index b5e23bfc3f95b..9092d94936ffe 100644
--- a/src/plugins/es_ui_shared/public/components/code_editor/code_editor.test.tsx
+++ b/src/plugins/es_ui_shared/public/components/code_editor/code_editor.test.tsx
@@ -9,8 +9,7 @@
import React from 'react';
import { mount, ReactWrapper } from 'enzyme';
import EuiCodeEditor from './code_editor';
-// @ts-ignore
-import { keys } from '@elastic/eui/lib/services';
+import { keys } from '@elastic/eui';
import { findTestSubject, requiredProps, takeMountedSnapshot } from '@elastic/eui/lib/test';
describe('EuiCodeEditor', () => {
diff --git a/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/_point_series.js b/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/_point_series.js
index dddfde75dbb82..4756c9bf32704 100644
--- a/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/_point_series.js
+++ b/src/plugins/vis_types/vislib/public/vislib/visualizations/point_series/_point_series.js
@@ -7,7 +7,7 @@
*/
import _ from 'lodash';
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
const thresholdLineDefaults = {
show: false,
diff --git a/src/plugins/vis_types/xy/public/vis_types/area.ts b/src/plugins/vis_types/xy/public/vis_types/area.ts
index 34afc54720e9b..610d6280343c5 100644
--- a/src/plugins/vis_types/xy/public/vis_types/area.ts
+++ b/src/plugins/vis_types/xy/public/vis_types/area.ts
@@ -7,8 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
import { Fit, Position } from '@elastic/charts';
import { AggGroupNames } from '@kbn/data-plugin/public';
diff --git a/src/plugins/vis_types/xy/public/vis_types/histogram.ts b/src/plugins/vis_types/xy/public/vis_types/histogram.ts
index 0a898f62ef227..df910de2f3808 100644
--- a/src/plugins/vis_types/xy/public/vis_types/histogram.ts
+++ b/src/plugins/vis_types/xy/public/vis_types/histogram.ts
@@ -7,8 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
import { Position } from '@elastic/charts';
import { AggGroupNames } from '@kbn/data-plugin/public';
diff --git a/src/plugins/vis_types/xy/public/vis_types/horizontal_bar.ts b/src/plugins/vis_types/xy/public/vis_types/horizontal_bar.ts
index dfbf51aa6d684..ba578ab916e81 100644
--- a/src/plugins/vis_types/xy/public/vis_types/horizontal_bar.ts
+++ b/src/plugins/vis_types/xy/public/vis_types/horizontal_bar.ts
@@ -7,8 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
import { Position } from '@elastic/charts';
import { AggGroupNames } from '@kbn/data-plugin/public';
diff --git a/src/plugins/vis_types/xy/public/vis_types/line.ts b/src/plugins/vis_types/xy/public/vis_types/line.ts
index 49113e2a21b27..272d38e982045 100644
--- a/src/plugins/vis_types/xy/public/vis_types/line.ts
+++ b/src/plugins/vis_types/xy/public/vis_types/line.ts
@@ -7,8 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
import { Position, Fit } from '@elastic/charts';
import { AggGroupNames } from '@kbn/data-plugin/public';
diff --git a/x-pack/packages/ml/aiops_components/src/document_count_chart/brush_badge.tsx b/x-pack/packages/ml/aiops_components/src/document_count_chart/brush_badge.tsx
index 53563a721026b..15bccea10c8a1 100644
--- a/x-pack/packages/ml/aiops_components/src/document_count_chart/brush_badge.tsx
+++ b/x-pack/packages/ml/aiops_components/src/document_count_chart/brush_badge.tsx
@@ -8,8 +8,7 @@
import React, { FC } from 'react';
import { EuiBadge, EuiText, EuiToolTip } from '@elastic/eui';
-// @ts-ignore
-import { formatDate } from '@elastic/eui/lib/services/format';
+import { formatDate } from '@elastic/eui';
const DATE_FORMAT = 'YYYY-MM-DD';
const TIME_FORMAT = 'HH:mm:ss';
diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json
index 59ca423963caf..a42bc290c753f 100644
--- a/x-pack/plugins/actions/docs/openapi/bundled.json
+++ b/x-pack/plugins/actions/docs/openapi/bundled.json
@@ -122,6 +122,9 @@
"examples": {
"createIndexConnectorRequest": {
"$ref": "#/components/examples/create_index_connector_request"
+ },
+ "createWebhookConnectorRequest": {
+ "$ref": "#/components/examples/create_webhook_connector_request"
}
}
}
@@ -138,6 +141,9 @@
"examples": {
"createIndexConnectorResponse": {
"$ref": "#/components/examples/create_index_connector_response"
+ },
+ "createWebhookConnectorResponse": {
+ "$ref": "#/components/examples/create_webhook_connector_response"
}
}
}
@@ -2603,13 +2609,88 @@
"title": "Connector request properties for a Webhook connector",
"description": "Defines properties for connectors when type is `.webhook`.",
"type": "object",
- "additionalProperties": true
+ "properties": {
+ "authType": {
+ "type": "string",
+ "enum": [
+ "webhook-authentication-basic",
+ "webhook-authentication-ssl",
+ "null"
+ ],
+ "description": "The type of authentication to use: basic, SSL, or none.\n"
+ },
+ "ca": {
+ "type": "string",
+ "description": "A base64 encoded version of the certificate authority file, which is used to sign and validate certificates."
+ },
+ "certType": {
+ "type": "string",
+ "description": "If the `authType` is `webhook-authentication-ssl`, specifies whether the certificate authentication data is in a CRT and key file format or a PFX file format.\n",
+ "enum": [
+ "ssl-crt-key",
+ "ssl-pfx"
+ ]
+ },
+ "hasAuth": {
+ "type": "boolean",
+ "description": "If `true`, a user name and password must be provided for login type authentication.\n"
+ },
+ "headers": {
+ "type": "object",
+ "nullable": true,
+ "description": "A set of key-value pairs sent as headers with the request."
+ },
+ "method": {
+ "type": "string",
+ "default": "post",
+ "enum": [
+ "post",
+ "put"
+ ],
+ "description": "The HTTP request method, either `post` or `put`.\n"
+ },
+ "url": {
+ "type": "string",
+ "description": "The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n"
+ },
+ "verificationMode": {
+ "type": "string",
+ "enum": [
+ "certificate",
+ "full",
+ "none"
+ ],
+ "default": "full",
+ "description": "Controls the verification of certificates. Use `full` to validate that the provided certificate has an issue date that is within the `not_before` and `not_after` dates, chains to a trusted certificate authority (CA), and has a hostname or IP address that matches the names within the certificate. Use `certificate` to validate the provided certificate and verifies that it is signed by a trusted authority; this option does not check the certificate hostname. Use `none` to skip certificate validation.\n"
+ }
+ }
},
"secrets_properties_webhook": {
"title": "Connector secrets properties for a Webhook connector",
"description": "Defines secrets for connectors when type is `.webhook`.",
"type": "object",
- "additionalProperties": true
+ "properties": {
+ "crt": {
+ "type": "string",
+ "description": "If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT file."
+ },
+ "key": {
+ "type": "string",
+ "description": "If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file."
+ },
+ "pfx": {
+ "type": "string",
+ "description": "If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file."
+ },
+ "password": {
+ "type": "string",
+ "description": "The password for HTTP basic authentication or the passphrase for the SSL certificate files. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"
+ },
+ "user": {
+ "type": "string",
+ "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n"
+ }
+ }
},
"create_connector_request_webhook": {
"title": "Create Webhook connector request",
@@ -4524,6 +4605,24 @@
}
}
},
+ "create_webhook_connector_request": {
+ "summary": "Create a webhook connector with SSL authentication.",
+ "value": {
+ "name": "my-webhook-connector",
+ "connector_type_id": ".webhook",
+ "config": {
+ "method": "post",
+ "url": "https://example.com",
+ "authType": "webhook-authentication-ssl",
+ "certType": "ssl-crt-key"
+ },
+ "secrets": {
+ "crt": "QmFnIEF0dH...",
+ "key": "LS0tLS1CRUdJ...",
+ "password": "my-passphrase"
+ }
+ }
+ },
"create_index_connector_response": {
"summary": "A new index connector.",
"value": {
@@ -4541,6 +4640,27 @@
"is_system_action": false
}
},
+ "create_webhook_connector_response": {
+ "summary": "A new webhook connector.",
+ "value": {
+ "id": "900eb010-3b9d-11ee-a642-8ffbb94e38bd",
+ "name": "my-webhook-connector",
+ "config": {
+ "method": "post",
+ "url": "https://example.com",
+ "authType": "webhook-authentication-ssl",
+ "certType": "ssl-crt-key",
+ "verificationMode": "full",
+ "headers": null,
+ "hasAuth": true
+ },
+ "connector_type_id": ".webhook",
+ "is_preconfigured": false,
+ "is_deprecated": false,
+ "is_missing_secrets": false,
+ "is_system_action": false
+ }
+ },
"get_connector_response": {
"summary": "A list of connector types",
"value": {
diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml
index b090dba90a87a..24d7b2ac6fe7c 100644
--- a/x-pack/plugins/actions/docs/openapi/bundled.yaml
+++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml
@@ -61,6 +61,8 @@ paths:
examples:
createIndexConnectorRequest:
$ref: '#/components/examples/create_index_connector_request'
+ createWebhookConnectorRequest:
+ $ref: '#/components/examples/create_webhook_connector_request'
responses:
'200':
description: Indicates a successful call.
@@ -71,6 +73,8 @@ paths:
examples:
createIndexConnectorResponse:
$ref: '#/components/examples/create_index_connector_response'
+ createWebhookConnectorResponse:
+ $ref: '#/components/examples/create_webhook_connector_response'
'401':
$ref: '#/components/responses/401'
servers:
@@ -1753,12 +1757,76 @@ components:
title: Connector request properties for a Webhook connector
description: Defines properties for connectors when type is `.webhook`.
type: object
- additionalProperties: true
+ properties:
+ authType:
+ type: string
+ enum:
+ - webhook-authentication-basic
+ - webhook-authentication-ssl
+ - 'null'
+ description: |
+ The type of authentication to use: basic, SSL, or none.
+ ca:
+ type: string
+ description: A base64 encoded version of the certificate authority file, which is used to sign and validate certificates.
+ certType:
+ type: string
+ description: |
+ If the `authType` is `webhook-authentication-ssl`, specifies whether the certificate authentication data is in a CRT and key file format or a PFX file format.
+ enum:
+ - ssl-crt-key
+ - ssl-pfx
+ hasAuth:
+ type: boolean
+ description: |
+ If `true`, a user name and password must be provided for login type authentication.
+ headers:
+ type: object
+ nullable: true
+ description: A set of key-value pairs sent as headers with the request.
+ method:
+ type: string
+ default: post
+ enum:
+ - post
+ - put
+ description: |
+ The HTTP request method, either `post` or `put`.
+ url:
+ type: string
+ description: |
+ The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.
+ verificationMode:
+ type: string
+ enum:
+ - certificate
+ - full
+ - none
+ default: full
+ description: |
+ Controls the verification of certificates. Use `full` to validate that the provided certificate has an issue date that is within the `not_before` and `not_after` dates, chains to a trusted certificate authority (CA), and has a hostname or IP address that matches the names within the certificate. Use `certificate` to validate the provided certificate and verifies that it is signed by a trusted authority; this option does not check the certificate hostname. Use `none` to skip certificate validation.
secrets_properties_webhook:
title: Connector secrets properties for a Webhook connector
description: Defines secrets for connectors when type is `.webhook`.
type: object
- additionalProperties: true
+ properties:
+ crt:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT file.
+ key:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file.
+ pfx:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file.
+ password:
+ type: string
+ description: |
+ The password for HTTP basic authentication or the passphrase for the SSL certificate files. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.
+ user:
+ type: string
+ description: |
+ The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.
create_connector_request_webhook:
title: Create Webhook connector request
description: |
@@ -3130,6 +3198,20 @@ components:
connector_type_id: .index
config:
index: test-index
+ create_webhook_connector_request:
+ summary: Create a webhook connector with SSL authentication.
+ value:
+ name: my-webhook-connector
+ connector_type_id: .webhook
+ config:
+ method: post
+ url: https://example.com
+ authType: webhook-authentication-ssl
+ certType: ssl-crt-key
+ secrets:
+ crt: QmFnIEF0dH...
+ key: LS0tLS1CRUdJ...
+ password: my-passphrase
create_index_connector_response:
summary: A new index connector.
value:
@@ -3144,6 +3226,24 @@ components:
is_deprecated: false
is_missing_secrets: false
is_system_action: false
+ create_webhook_connector_response:
+ summary: A new webhook connector.
+ value:
+ id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd
+ name: my-webhook-connector
+ config:
+ method: post
+ url: https://example.com
+ authType: webhook-authentication-ssl
+ certType: ssl-crt-key
+ verificationMode: full
+ headers: null
+ hasAuth: true
+ connector_type_id: .webhook
+ is_preconfigured: false
+ is_deprecated: false
+ is_missing_secrets: false
+ is_system_action: false
get_connector_response:
summary: A list of connector types
value:
diff --git a/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_request.yaml b/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_request.yaml
new file mode 100644
index 0000000000000..e01baea299a80
--- /dev/null
+++ b/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_request.yaml
@@ -0,0 +1,13 @@
+summary: Create a webhook connector with SSL authentication.
+value:
+ name: my-webhook-connector
+ connector_type_id: .webhook
+ config:
+ method: post
+ url: https://example.com
+ authType: webhook-authentication-ssl
+ certType: ssl-crt-key
+ secrets:
+ crt: QmFnIEF0dH...
+ key: LS0tLS1CRUdJ...
+ password: my-passphrase
\ No newline at end of file
diff --git a/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_response.yaml b/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_response.yaml
new file mode 100644
index 0000000000000..613895b01dac6
--- /dev/null
+++ b/x-pack/plugins/actions/docs/openapi/components/examples/create_webhook_connector_response.yaml
@@ -0,0 +1,17 @@
+summary: A new webhook connector.
+value:
+ id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd
+ name: my-webhook-connector
+ config:
+ method: post
+ url: https://example.com
+ authType: webhook-authentication-ssl
+ certType: ssl-crt-key
+ verificationMode: full
+ headers: null
+ hasAuth: true
+ connector_type_id: .webhook
+ is_preconfigured: false
+ is_deprecated: false
+ is_missing_secrets: false
+ is_system_action: false
\ No newline at end of file
diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/config_properties_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/config_properties_webhook.yaml
index 6fffd356527af..8047f963352b9 100644
--- a/x-pack/plugins/actions/docs/openapi/components/schemas/config_properties_webhook.yaml
+++ b/x-pack/plugins/actions/docs/openapi/components/schemas/config_properties_webhook.yaml
@@ -1,5 +1,55 @@
title: Connector request properties for a Webhook connector
description: Defines properties for connectors when type is `.webhook`.
type: object
-additionalProperties: true
-# TO-DO: Add the properties for this connector.
\ No newline at end of file
+properties:
+ authType:
+ type: string
+ enum:
+ - webhook-authentication-basic
+ - webhook-authentication-ssl
+ - "null"
+ description: >
+ The type of authentication to use: basic, SSL, or none.
+ ca:
+ type: string
+ description: A base64 encoded version of the certificate authority file, which is used to sign and validate certificates.
+ certType:
+ type: string
+ description: >
+ If the `authType` is `webhook-authentication-ssl`, specifies whether the certificate authentication data is in a CRT and key file format or a PFX file format.
+ enum:
+ - ssl-crt-key
+ - ssl-pfx
+ hasAuth:
+ type: boolean
+ description: >
+ If `true`, a user name and password must be provided for login type authentication.
+ headers:
+ type: object
+ nullable: true
+ description: A set of key-value pairs sent as headers with the request.
+ method:
+ type: string
+ default: post
+ enum:
+ - post
+ - put
+ description: >
+ The HTTP request method, either `post` or `put`.
+ url:
+ type: string
+ description: >
+ The request URL.
+ If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.
+ verificationMode:
+ type: string
+ enum:
+ - certificate
+ - full
+ - none
+ default: full
+ description: >
+ Controls the verification of certificates.
+ Use `full` to validate that the provided certificate has an issue date that is within the `not_before` and `not_after` dates, chains to a trusted certificate authority (CA), and has a hostname or IP address that matches the names within the certificate.
+ Use `certificate` to validate the provided certificate and verifies that it is signed by a trusted authority; this option does not check the certificate hostname.
+ Use `none` to skip certificate validation.
diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_webhook.yaml
index 5a465932fb898..199e53971f56c 100644
--- a/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_webhook.yaml
+++ b/x-pack/plugins/actions/docs/openapi/components/schemas/secrets_properties_webhook.yaml
@@ -1,5 +1,23 @@
title: Connector secrets properties for a Webhook connector
description: Defines secrets for connectors when type is `.webhook`.
type: object
-additionalProperties: true
-# TO-DO: Add the properties for this connector.
\ No newline at end of file
+properties:
+ crt:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT file.
+ key:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file.
+ pfx:
+ type: string
+ description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file.
+ password:
+ type: string
+ description: >
+ The password for HTTP basic authentication or the passphrase for the SSL certificate files.
+ If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.
+ user:
+ type: string
+ description: >
+ The username for HTTP basic authentication.
+ If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.
\ No newline at end of file
diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml
index 31336f3487d53..d8d8735db82d8 100644
--- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml
+++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml
@@ -40,6 +40,8 @@ post:
examples:
createIndexConnectorRequest:
$ref: '../components/examples/create_index_connector_request.yaml'
+ createWebhookConnectorRequest:
+ $ref: '../components/examples/create_webhook_connector_request.yaml'
responses:
'200':
description: Indicates a successful call.
@@ -50,6 +52,8 @@ post:
examples:
createIndexConnectorResponse:
$ref: '../components/examples/create_index_connector_response.yaml'
+ createWebhookConnectorResponse:
+ $ref: '../components/examples/create_webhook_connector_response.yaml'
'401':
$ref: '../components/responses/401.yaml'
servers:
diff --git a/x-pack/plugins/cases/public/components/all_cases/use_cases_columns.tsx b/x-pack/plugins/cases/public/components/all_cases/use_cases_columns.tsx
index ffcc58b531693..0863e51daef5c 100644
--- a/x-pack/plugins/cases/public/components/all_cases/use_cases_columns.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/use_cases_columns.tsx
@@ -19,8 +19,8 @@ import {
EuiIcon,
EuiHealth,
EuiToolTip,
+ RIGHT_ALIGNMENT,
} from '@elastic/eui';
-import { RIGHT_ALIGNMENT } from '@elastic/eui/lib/services';
import styled from 'styled-components';
import { Status } from '@kbn/cases-components/src/status/status';
import type { UserProfileWithAvatar } from '@kbn/user-profile-components';
diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/date_content.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/date_content.tsx
index 98370dabb1f0a..6345412e1651e 100644
--- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/date_content.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/date_content.tsx
@@ -7,8 +7,7 @@
import React, { FC, ReactNode } from 'react';
import { EuiBasicTable, HorizontalAlignment, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from '@elastic/eui';
-// @ts-ignore
-import { formatDate } from '@elastic/eui/lib/services/format';
+import { formatDate } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.test.tsx
index a1ee2410128c1..1ef7480b25c81 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.test.tsx
@@ -11,8 +11,6 @@ import React from 'react';
import { shallow } from 'enzyme';
-import { HttpError } from '../../../../../../../common/types/api';
-
import { DeployModel } from './deploy_model';
import { ModelDeployed } from './model_deployed';
import { ModelDeploymentInProgress } from './model_deployment_in_progress';
@@ -31,7 +29,6 @@ jest.mock('./text_expansion_callout_data', () => ({
}));
const DEFAULT_VALUES = {
- startTextExpansionModelError: undefined,
isCreateButtonDisabled: false,
isModelDownloadInProgress: false,
isModelDownloaded: false,
@@ -47,13 +44,10 @@ describe('TextExpansionCallOut', () => {
it('renders error panel instead of normal panel if there are some errors', () => {
setMockValues({
...DEFAULT_VALUES,
- startTextExpansionModelError: {
- body: {
- error: 'some-error',
- message: 'some-error-message',
- statusCode: 500,
- },
- } as HttpError,
+ textExpansionError: {
+ title: 'Error with ELSER deployment',
+ message: 'Mocked error message',
+ },
});
const wrapper = shallow(
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.tsx
index 7ded5c3e9035d..310f8f273a2cb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout.tsx
@@ -20,7 +20,7 @@ import { ModelDeployed } from './model_deployed';
import { ModelDeploymentInProgress } from './model_deployment_in_progress';
import { ModelStarted } from './model_started';
import { useTextExpansionCallOutData } from './text_expansion_callout_data';
-import { getTextExpansionError, TextExpansionCalloutLogic } from './text_expansion_callout_logic';
+import { TextExpansionCalloutLogic } from './text_expansion_callout_logic';
import { TextExpansionErrors } from './text_expansion_errors';
import { TRAINED_MODELS_PATH } from './utils';
@@ -78,24 +78,16 @@ export const TextExpansionCallOut: React.FC
= (props)
const { dismiss, isCompact, isDismissable, show } = useTextExpansionCallOutData(props);
const { ingestionMethod } = useValues(IndexViewLogic);
const {
- createTextExpansionModelError,
- fetchTextExpansionModelError,
isCreateButtonDisabled,
isModelDownloadInProgress,
isModelDownloaded,
isModelRunningSingleThreaded,
isModelStarted,
+ textExpansionError,
isStartButtonDisabled,
- startTextExpansionModelError,
} = useValues(TextExpansionCalloutLogic);
- // In case of an error, show the error callout only
- const error = getTextExpansionError(
- createTextExpansionModelError,
- fetchTextExpansionModelError,
- startTextExpansionModelError
- );
- if (error) return ;
+ if (textExpansionError) return ;
if (!show) return null;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.test.ts
index 744eb9af56042..0227f52b0c041 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.test.ts
@@ -13,6 +13,7 @@ import { ErrorResponse, HttpError, Status } from '../../../../../../../common/ty
import { MlModelDeploymentState } from '../../../../../../../common/types/ml';
import { CreateTextExpansionModelApiLogic } from '../../../../api/ml_models/text_expansion/create_text_expansion_model_api_logic';
import { FetchTextExpansionModelApiLogic } from '../../../../api/ml_models/text_expansion/fetch_text_expansion_model_api_logic';
+import { StartTextExpansionModelApiLogic } from '../../../../api/ml_models/text_expansion/start_text_expansion_model_api_logic';
import {
getTextExpansionError,
@@ -36,6 +37,7 @@ const DEFAULT_VALUES: TextExpansionCalloutValues = {
startTextExpansionModelStatus: Status.IDLE,
textExpansionModel: undefined,
textExpansionModelPollTimeoutId: null,
+ textExpansionError: null,
};
jest.useFakeTimers();
@@ -48,11 +50,15 @@ describe('TextExpansionCalloutLogic', () => {
const { mount: mountFetchTextExpansionModelApiLogic } = new LogicMounter(
FetchTextExpansionModelApiLogic
);
+ const { mount: mountStartTextExpansionModelApiLogic } = new LogicMounter(
+ StartTextExpansionModelApiLogic
+ );
beforeEach(() => {
jest.clearAllMocks();
mountCreateTextExpansionModelApiLogic();
mountFetchTextExpansionModelApiLogic();
+ mountStartTextExpansionModelApiLogic();
mount();
});
@@ -293,6 +299,44 @@ describe('TextExpansionCalloutLogic', () => {
});
});
+ describe('textExpansionError', () => {
+ const error = {
+ body: {
+ error: 'Error with ELSER deployment',
+ message: 'Mocked error message',
+ statusCode: 500,
+ },
+ } as HttpError;
+
+ it('returns null when there are no errors', () => {
+ CreateTextExpansionModelApiLogic.actions.apiReset();
+ FetchTextExpansionModelApiLogic.actions.apiReset();
+ StartTextExpansionModelApiLogic.actions.apiReset();
+ expect(TextExpansionCalloutLogic.values.textExpansionError).toBe(null);
+ });
+ it('returns extracted error for create', () => {
+ CreateTextExpansionModelApiLogic.actions.apiError(error);
+ expect(TextExpansionCalloutLogic.values.textExpansionError).toStrictEqual({
+ title: 'Error with ELSER deployment',
+ message: 'Mocked error message',
+ });
+ });
+ it('returns extracted error for fetch', () => {
+ FetchTextExpansionModelApiLogic.actions.apiError(error);
+ expect(TextExpansionCalloutLogic.values.textExpansionError).toStrictEqual({
+ title: 'Error fetching ELSER model',
+ message: 'Mocked error message',
+ });
+ });
+ it('returns extracted error for start', () => {
+ StartTextExpansionModelApiLogic.actions.apiError(error);
+ expect(TextExpansionCalloutLogic.values.textExpansionError).toStrictEqual({
+ title: 'Error starting ELSER deployment',
+ message: 'Mocked error message',
+ });
+ });
+ });
+
describe('isModelDownloadInProgress', () => {
it('is set to true if the model is downloading', () => {
FetchTextExpansionModelApiLogic.actions.apiSuccess({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.ts
index a775ad3f05b89..86721c7808f14 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout_logic.ts
@@ -48,6 +48,11 @@ interface TextExpansionCalloutActions {
textExpansionModel: FetchTextExpansionModelApiLogicActions['apiSuccess'];
}
+export interface TextExpansionCalloutError {
+ title: string;
+ message: string;
+}
+
export interface TextExpansionCalloutValues {
createTextExpansionModelError: HttpError | undefined;
createTextExpansionModelStatus: Status;
@@ -64,6 +69,7 @@ export interface TextExpansionCalloutValues {
startTextExpansionModelStatus: Status;
textExpansionModel: FetchTextExpansionModelResponse | undefined;
textExpansionModelPollTimeoutId: null | ReturnType;
+ textExpansionError: TextExpansionCalloutError | null;
}
/**
@@ -257,6 +263,23 @@ export const TextExpansionCalloutLogic = kea<
(pollingTimeoutId: TextExpansionCalloutValues['textExpansionModelPollTimeoutId']) =>
pollingTimeoutId !== null,
],
+ textExpansionError: [
+ () => [
+ selectors.createTextExpansionModelError,
+ selectors.fetchTextExpansionModelError,
+ selectors.startTextExpansionModelError,
+ ],
+ (
+ createTextExpansionError: TextExpansionCalloutValues['createTextExpansionModelError'],
+ fetchTextExpansionError: TextExpansionCalloutValues['fetchTextExpansionModelError'],
+ startTextExpansionError: TextExpansionCalloutValues['startTextExpansionModelError']
+ ) =>
+ getTextExpansionError(
+ createTextExpansionError,
+ fetchTextExpansionError,
+ startTextExpansionError
+ ),
+ ],
isStartButtonDisabled: [
() => [selectors.startTextExpansionModelStatus],
(status: Status) => status !== Status.IDLE && status !== Status.ERROR,
diff --git a/x-pack/plugins/fleet/cypress/e2e/fleet_settings_outputs.cy.ts b/x-pack/plugins/fleet/cypress/e2e/fleet_settings_outputs.cy.ts
index 2d9f33d8e1efa..c5cf05bc1edd3 100644
--- a/x-pack/plugins/fleet/cypress/e2e/fleet_settings_outputs.cy.ts
+++ b/x-pack/plugins/fleet/cypress/e2e/fleet_settings_outputs.cy.ts
@@ -184,8 +184,6 @@ describe('Outputs', () => {
// Compression
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_CODEC_INPUT).should('not.exist');
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_SWITCH).click();
- cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_LEVEL_INPUT).should('not.exist');
- cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_CODEC_INPUT).select('gzip');
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_LEVEL_INPUT).should('exist');
cy.getBySel(SETTINGS_OUTPUTS_KAFKA.COMPRESSION_LEVEL_INPUT).select('1');
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_compression.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_compression.tsx
index 704fdfa893603..b11ef116920b8 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_compression.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_compression.tsx
@@ -21,12 +21,12 @@ export const OutputFormKafkaCompression: React.FunctionComponent<{
const kafkaCompressionTypeOptions = useMemo(
() =>
- (Object.keys(kafkaCompressionType) as Array).map(
- (key) => ({
+ (Object.keys(kafkaCompressionType) as Array)
+ .filter((c) => c !== 'None')
+ .map((key) => ({
text: kafkaCompressionType[key],
label: kafkaCompressionType[key],
- })
- ),
+ })),
[]
);
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/use_output_form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/use_output_form.tsx
index bd1891f3ebc12..6c22ec05b6ece 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/use_output_form.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/use_output_form.tsx
@@ -391,7 +391,9 @@ export function useOutputForm(onSucess: () => void, output?: Output) {
isDisabled('compression_level')
);
const kafkaCompressionCodecInput = useInput(
- kafkaOutput?.compression ?? kafkaCompressionType.None,
+ kafkaOutput?.compression && kafkaOutput.compression !== kafkaCompressionType.None
+ ? kafkaOutput.compression
+ : kafkaCompressionType.Gzip,
undefined,
isDisabled('compression')
);
@@ -642,8 +644,11 @@ export function useOutputForm(onSucess: () => void, output?: Output) {
client_id: kafkaClientIdInput.value || undefined,
version: kafkaVersionInput.value,
...(kafkaKeyInput.value ? { key: kafkaKeyInput.value } : {}),
- compression: kafkaCompressionCodecInput.value,
- ...(kafkaCompressionCodecInput.value === kafkaCompressionType.Gzip
+ compression: kafkaCompressionInput.value
+ ? kafkaCompressionCodecInput.value
+ : kafkaCompressionType.None,
+ ...(kafkaCompressionInput.value &&
+ kafkaCompressionCodecInput.value === kafkaCompressionType.Gzip
? {
compression_level: parseIntegerIfStringDefined(
kafkaCompressionLevelInput.value
@@ -785,6 +790,7 @@ export function useOutputForm(onSucess: () => void, output?: Output) {
loadBalanceEnabledInput.value,
typeInput.value,
kafkaSslCertificateAuthoritiesInput.value,
+ kafkaCompressionInput.value,
nameInput.value,
kafkaHostsInput.value,
defaultOutputInput.value,
diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts
index 0a05d178ac745..9107a334dad83 100644
--- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts
+++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts
@@ -20,7 +20,7 @@ import type {
} from '../../types';
import type { FullAgentPolicyOutputPermissions, PackageInfo } from '../../../common/types';
import { agentPolicyService } from '../agent_policy';
-import { dataTypes, outputType } from '../../../common/constants';
+import { dataTypes, kafkaCompressionType, outputType } from '../../../common/constants';
import { DEFAULT_OUTPUT } from '../../constants';
import { getPackageInfo } from '../epm/packages';
@@ -344,7 +344,7 @@ export function transformOutputToFullPolicyOutput(
version,
key,
compression,
- compression_level,
+ ...(compression === kafkaCompressionType.Gzip ? { compression_level } : {}),
...(username ? { username } : {}),
...(password ? { password } : {}),
...(sasl ? { sasl } : {}),
diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
index ec0cbab539bcd..fdeb75480ea79 100644
--- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
+++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
@@ -101,13 +101,12 @@ export function createSavedObjectKibanaAsset(asset: ArchiveAsset): SavedObjectTo
if (asset.migrationVersion) {
so.migrationVersion = asset.migrationVersion;
- } else {
- if (asset.coreMigrationVersion) {
- so.coreMigrationVersion = asset.coreMigrationVersion;
- }
- if (asset.typeMigrationVersion) {
- so.typeMigrationVersion = asset.typeMigrationVersion;
- }
+ }
+ if (asset.coreMigrationVersion) {
+ so.coreMigrationVersion = asset.coreMigrationVersion;
+ }
+ if (asset.typeMigrationVersion) {
+ so.typeMigrationVersion = asset.typeMigrationVersion;
}
return so as SavedObjectToBe;
}
diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts
index 1637bf19d8df4..91e603e80aee2 100644
--- a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts
+++ b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts
@@ -18,6 +18,8 @@ export function getIndexPatternSavedObjects() {
return indexPatternTypes.map((indexPatternType) => ({
id: `${indexPatternType}-*`,
type: INDEX_PATTERN_SAVED_OBJECT_TYPE,
+ // workaround until https://github.com/elastic/kibana/issues/164454 is fixed
+ typeMigrationVersion: '8.0.0',
attributes: {
title: `${indexPatternType}-*`,
timeFieldName: '@timestamp',
diff --git a/x-pack/plugins/fleet/server/services/output.ts b/x-pack/plugins/fleet/server/services/output.ts
index f190fc7d2315f..15b256fc84207 100644
--- a/x-pack/plugins/fleet/server/services/output.ts
+++ b/x-pack/plugins/fleet/server/services/output.ts
@@ -764,6 +764,11 @@ class OutputService {
) {
updateData.compression_level = 4;
}
+ if (data.compression && data.compression !== kafkaCompressionType.Gzip) {
+ // Clear compression level if compression is not gzip
+ updateData.compression_level = null;
+ }
+
if (!data.client_id) {
updateData.client_id = 'Elastic';
}
diff --git a/x-pack/plugins/graph/public/helpers/style_choices.ts b/x-pack/plugins/graph/public/helpers/style_choices.ts
index 0030c91c5aadf..b64abb27fbe25 100644
--- a/x-pack/plugins/graph/public/helpers/style_choices.ts
+++ b/x-pack/plugins/graph/public/helpers/style_choices.ts
@@ -6,8 +6,7 @@
*/
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import { euiPaletteColorBlind } from '@elastic/eui/lib/services';
+import { euiPaletteColorBlind } from '@elastic/eui';
export interface GenericIcon {
label: string;
diff --git a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/policy_table.test.tsx.snap b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/policy_table.test.tsx.snap
index 6c991799a115b..aeae7b28f0b88 100644
--- a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/policy_table.test.tsx.snap
+++ b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/policy_table.test.tsx.snap
@@ -37,68 +37,71 @@ Array [
`;
exports[`policy table shows empty state when there are no policies 1`] = `
-
-
-
-
-
- Create your first index lifecycle policy
-
-
+
+
-
- An index lifecycle policy helps you manage your indices as they age.
-
-
-
-
-
+ Create your first index lifecycle policy
+
+
+
+
+ An index lifecycle policy helps you manage your indices as they age.
+
+
+
+
- Create policy
-
-
+ class="emotion-euiButtonDisplayContent"
+ >
+
+ Create policy
+
+
+
-
+
`;
exports[`policy table sorts when linked index templates header is clicked 1`] = `
diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.container.tsx b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.container.tsx
index 1290304ef6165..2bad87b149e0f 100644
--- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.container.tsx
+++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.container.tsx
@@ -7,12 +7,7 @@
import React, { useEffect } from 'react';
import { RouteComponentProps } from 'react-router-dom';
-import {
- EuiButton,
- EuiEmptyPrompt,
- EuiLoadingSpinner,
- EuiPageContent_Deprecated as EuiPageContent,
-} from '@elastic/eui';
+import { EuiButton, EuiLoadingSpinner, EuiPageTemplate } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { MIN_SEARCHABLE_SNAPSHOT_LICENSE } from '../../../../common/constants';
@@ -45,47 +40,44 @@ export const EditPolicy: React.FunctionComponent