diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index e641ed08bf34f..77ae40971a282 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -56,8 +56,8 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless.sh - label: 'Serverless Security Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh + label: 'Serverless Entity Analytics - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: queue: n2-4-spot diff --git a/.buildkite/pipelines/flaky_tests/groups.json b/.buildkite/pipelines/flaky_tests/groups.json index 992efad798b8d..292c5fe33397c 100644 --- a/.buildkite/pipelines/flaky_tests/groups.json +++ b/.buildkite/pipelines/flaky_tests/groups.json @@ -1,12 +1,12 @@ { "groups": [ { - "key": "cypress/security_solution", - "name": "Security Solution - Cypress" + "key": "cypress/security_solution_entity_analytics", + "name": "Security Solution Entity Analytics - Cypress" }, { - "key": "cypress/security_serverless", - "name": "[Serverless] Security Solution - Cypress" + "key": "cypress/security_serverless_entity_analytics", + "name": "[Serverless] Security Solution Entity Analytics - Cypress" }, { "key": "cypress/security_solution_investigations", @@ -32,7 +32,6 @@ "key": "cypress/security_serverless_rule_management", "name": "[Serverless] Security Solution Rule Management - Cypress" }, - { "key": "cypress/security_solution_rule_management_prebuilt_rules", "name": "Security Solution Rule Management - Prebuilt Rules - Cypress" diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index ed464e2a184f4..aa7a96bc8b4a8 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -79,8 +79,8 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless.sh - label: 'Serverless Security Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh + label: 'Serverless Entity Analytics - Security Cypress Tests' agents: queue: n2-4-spot depends_on: build @@ -235,13 +235,13 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution.sh - label: 'Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_entity_analytics.sh + label: 'Entity Analytics - Security Solution Cypress Tests' agents: queue: n2-4-spot depends_on: build timeout_in_minutes: 60 - parallelism: 8 + parallelism: 2 retry: automatic: - exit_status: '*' diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 0040767d5b3d1..223acd9220046 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -57,8 +57,8 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless.sh - label: 'Serverless Security Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh + label: 'Serverless Entity Analytics - Security Cypress Tests' agents: queue: n2-4-spot depends_on: build @@ -153,13 +153,13 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution.sh - label: 'Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_entity_analytics.sh + label: 'Entity Analytics - Security Solution Cypress Tests' agents: queue: n2-4-spot depends_on: build timeout_in_minutes: 60 - parallelism: 8 + parallelism: 2 retry: automatic: - exit_status: '*' diff --git a/.buildkite/pipelines/security_solution/security_solution_cypress.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml index 3fdd8c16a9b76..58e505927b95c 100644 --- a/.buildkite/pipelines/security_solution/security_solution_cypress.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -93,4 +93,16 @@ steps: retry: automatic: - exit_status: '*' - limit: 1 \ No newline at end of file + limit: 1 + + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:entity_analytics + label: 'Serverless MKI QA Entity Analytics - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. + timeout_in_minutes: 300 + parallelism: 2 + retry: + automatic: + - exit_status: '*' + limit: 1 \ No newline at end of file diff --git a/.buildkite/scripts/steps/functional/security_serverless.sh b/.buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh similarity index 67% rename from .buildkite/scripts/steps/functional/security_serverless.sh rename to .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh index 9903f44da0373..0c3822e149d53 100644 --- a/.buildkite/scripts/steps/functional/security_serverless.sh +++ b/.buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh @@ -8,9 +8,9 @@ source .buildkite/scripts/steps/functional/common_cypress.sh export JOB=kibana-serverless-security-cypress export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Security Serverless Cypress Tests" +echo "--- Entity Analytics Cypress Tests on Serverless" cd x-pack/test/security_solution_cypress set +e -yarn cypress:run:serverless; status=$?; yarn junit:merge || :; exit $status +yarn cypress:entity_analytics:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution.sh b/.buildkite/scripts/steps/functional/security_solution_entity_analytics.sh similarity index 66% rename from .buildkite/scripts/steps/functional/security_solution.sh rename to .buildkite/scripts/steps/functional/security_solution_entity_analytics.sh index fdba86f4dee4e..09f44d4c6b7ab 100755 --- a/.buildkite/scripts/steps/functional/security_solution.sh +++ b/.buildkite/scripts/steps/functional/security_solution_entity_analytics.sh @@ -8,9 +8,9 @@ source .buildkite/scripts/steps/functional/common_cypress.sh export JOB=kibana-security-solution-chrome export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Security Solution Cypress tests (Chrome)" +echo "--- Entity Analytics - Security Solution Cypress Tests" cd x-pack/test/security_solution_cypress set +e -yarn cypress:run:ess; status=$?; yarn junit:merge || :; exit $status +yarn cypress:entity_analytics:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bcb0e966b81cf..86d597b88c20c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -854,6 +854,7 @@ src/plugins/vis_types/vega @elastic/kibana-visualizations src/plugins/vis_types/vislib @elastic/kibana-visualizations src/plugins/vis_types/xy @elastic/kibana-visualizations packages/kbn-visualization-ui-components @elastic/kibana-visualizations +packages/kbn-visualization-utils @elastic/kibana-visualizations src/plugins/visualizations @elastic/kibana-visualizations x-pack/plugins/watcher @elastic/platform-deployment-management packages/kbn-web-worker-stub @elastic/kibana-operations @@ -1471,7 +1472,7 @@ x-pack/plugins/security_solution/public/threat_intelligence @elastic/protections x-pack/test/threat_intelligence_cypress @elastic/protections-experience ## Security Solution sub teams - Entity Analytics -x-pack/plugins/security_solution/common/risk_engine @elastic/security-entity-analytics @elastic/security-entity-analytics +x-pack/plugins/security_solution/common/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score @elastic/security-entity-analytics x-pack/plugins/security_solution/public/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/public/explore/components/risk_score @elastic/security-entity-analytics @@ -1480,6 +1481,7 @@ x-pack/plugins/security_solution/public/overview/components/entity_analytics x-pack/plugins/security_solution/server/lib/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/server/lib/risk_score @elastic/security-entity-analytics x-pack/test/security_solution_api_integration/test_suites/entity_analytics @elastic/security-entity-analytics +x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/public/flyout/entity_details @elastic/security-entity-analytics x-pack/plugins/security_solution/common/api/entity_analytics @elastic/security-entity-analytics /x-pack/plugins/security_solution/public/entity_analytics @elastic/security-entity-analytics diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index e4206da79f28b..0e55af13ae05e 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-12-09 +date: 2023-12-12 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 d0d6cdeb252d4..ccc49e7614e82 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_observability.mdx b/api_docs/ai_assistant_management_observability.mdx index 7794ce3658da5..7d0f7d4627a2a 100644 --- a/api_docs/ai_assistant_management_observability.mdx +++ b/api_docs/ai_assistant_management_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementObservability title: "aiAssistantManagementObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementObservability plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementObservability'] --- import aiAssistantManagementObservabilityObj from './ai_assistant_management_observability.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 71247472bc9af..2336a371fe8ab 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index cccda5e3a3e82..c393fad5df666 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 106f1e26f709a..b18468b7545fc 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -3489,6 +3489,10 @@ "plugin": "observability", "path": "x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts" }, + { + "plugin": "observability", + "path": "x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts" + }, { "plugin": "observability", "path": "x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts" diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 5fe5163f53a84..3843d60dae5ab 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 6f64a5e3f8033..3d35e4f55c5bb 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index df053a0e622b1..6d8e7bcd38c10 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index 86dd705ffe0e9..f48389fde277b 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index e5f0f61a61a3b..3251ac065dc5e 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-12-09 +date: 2023-12-12 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 3698bf7e41ea3..56fa553d48183 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-12-09 +date: 2023-12-12 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 8f6e6876079d9..fe16ef4ee210b 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-12-09 +date: 2023-12-12 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 14d09d6b032e9..55eeb1fe1123e 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.devdocs.json b/api_docs/charts.devdocs.json index 613f12198c69b..08ffd55cf4e6c 100644 --- a/api_docs/charts.devdocs.json +++ b/api_docs/charts.devdocs.json @@ -3575,14 +3575,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/charts/common/expressions/palette/types.ts", diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 894e2d5aef2c2..7b76b154fef37 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-12-09 +date: 2023-12-12 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 6fc91ba7be53e..9d38665c852fd 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index bf31cf32cb709..4c3de01c6261c 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-12-09 +date: 2023-12-12 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 d4c2b48cbd87d..06d187931aa8e 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-12-09 +date: 2023-12-12 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 dba89aef90d1d..e57392b6305c5 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-12-09 +date: 2023-12-12 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 2f23978dc2851..15df1889fd1d4 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-12-09 +date: 2023-12-12 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 3a1a2f9c4dc2a..00950ad1fe233 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 2aa32d1708c86..df2412db9acbd 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 5cbcb5cc531ac..1a98bdcb6a151 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 53668a2935844..3411924fe3f7e 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-12-09 +date: 2023-12-12 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 a13d764c333c6..b8ef5e53bdbb3 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-12-09 +date: 2023-12-12 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 70d321195da3a..5a6a9cfe1168c 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-12-09 +date: 2023-12-12 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 0e999dd6572d4..a1bb897ebee3a 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -5214,14 +5214,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5267,14 +5259,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5320,14 +5304,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5373,14 +5349,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5426,14 +5394,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5479,14 +5439,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5532,14 +5484,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5585,14 +5529,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5638,14 +5574,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5691,14 +5619,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5744,14 +5664,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5797,14 +5709,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5850,14 +5754,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5903,14 +5799,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -5956,14 +5844,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6009,14 +5889,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6062,14 +5934,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6115,14 +5979,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6168,14 +6024,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6221,14 +6069,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6274,14 +6114,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6327,14 +6159,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6380,14 +6204,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6433,14 +6249,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6486,14 +6294,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6539,14 +6339,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6592,14 +6384,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6645,14 +6429,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6698,14 +6474,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6751,14 +6519,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6804,14 +6564,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6857,14 +6609,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6910,14 +6654,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -6963,14 +6699,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7016,14 +6744,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7069,14 +6789,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7122,14 +6834,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7175,14 +6879,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7228,14 +6924,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -7281,14 +6969,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -9799,14 +9479,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts", @@ -9853,53 +9525,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-public.ExecutionContextSearch", - "type": "Type", - "tags": [], - "label": "ExecutionContextSearch", - "description": [], - "signature": [ - "{ filters?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; query?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - "[] | undefined; timeRange?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; disableWarningToasts?: boolean | undefined; }" - ], - "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-public.ExpressionFunctionKibana", @@ -9947,14 +9572,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kibana.ts", @@ -10009,14 +9626,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kibana_context.ts", @@ -10063,14 +9672,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kql.ts", @@ -10117,14 +9718,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/lucene.ts", @@ -10142,9 +9735,9 @@ "signature": [ "{ type: \"kibana_context\"; } & ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.ExecutionContextSearch", "text": "ExecutionContextSearch" } @@ -10332,14 +9925,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", @@ -10705,9 +10290,9 @@ "signature": [ "{ type: \"kibana_context\"; } & ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.ExecutionContextSearch", "text": "ExecutionContextSearch" } @@ -25479,14 +25064,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 83274a119100d..a52bae56c01f6 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3190 | 31 | 2539 | 22 | +| 3188 | 31 | 2537 | 22 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 069a1185dffd8..a4be15aa20150 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3190 | 31 | 2539 | 22 | +| 3188 | 31 | 2537 | 22 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 788e55e908cbf..632c5c0c65c92 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -12879,14 +12879,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">) => any" ], "path": "src/plugins/data/common/search/expressions/utils/function_wrapper.ts", @@ -17274,14 +17266,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17327,14 +17311,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17380,14 +17356,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17433,14 +17401,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17486,14 +17446,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17539,14 +17491,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17592,14 +17536,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17645,14 +17581,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17698,14 +17626,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17751,14 +17671,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17804,14 +17716,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17857,14 +17761,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17910,14 +17806,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -17963,14 +17851,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18016,14 +17896,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18069,14 +17941,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18122,14 +17986,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18175,14 +18031,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18228,14 +18076,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18281,14 +18121,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18334,14 +18166,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18387,14 +18211,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18440,14 +18256,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18493,14 +18301,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18546,14 +18346,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18599,14 +18391,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18652,14 +18436,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18705,14 +18481,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18758,14 +18526,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18811,14 +18571,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18864,14 +18616,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18917,14 +18661,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -18970,14 +18706,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19023,14 +18751,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19076,14 +18796,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19129,14 +18841,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19182,14 +18886,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19235,14 +18931,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19288,14 +18976,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -19341,14 +19021,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -31811,18 +31483,10 @@ "<", { "pluginId": "inspector", - "scope": "common", - "docId": "kibInspectorPluginApi", - "section": "def-common.Adapters", - "text": "Adapters" - }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Adapters", + "text": "Adapters" }, ">>" ], @@ -31952,14 +31616,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/esaggs/esaggs_fn.ts", @@ -31998,14 +31654,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/esdsl.ts", @@ -32105,53 +31753,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.ExecutionContextSearch", - "type": "Type", - "tags": [], - "label": "ExecutionContextSearch", - "description": [], - "signature": [ - "{ filters?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; query?: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - "[] | undefined; timeRange?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; disableWarningToasts?: boolean | undefined; }" - ], - "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.ExpressionFunctionCidr", @@ -32199,14 +31800,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/cidr.ts", @@ -32261,14 +31854,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/date_range.ts", @@ -32315,14 +31900,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/exists_filter.ts", @@ -32377,14 +31954,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/extended_bounds.ts", @@ -32431,14 +32000,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/field.ts", @@ -32485,14 +32046,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/geo_bounding_box.ts", @@ -32539,14 +32092,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/geo_point.ts", @@ -32601,14 +32146,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/ip_range.ts", @@ -32663,14 +32200,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kibana.ts", @@ -32725,14 +32254,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kibana_context.ts", @@ -32779,14 +32300,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kibana_filter.ts", @@ -32841,14 +32354,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/timerange.ts", @@ -32895,14 +32400,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/kql.ts", @@ -32949,14 +32446,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/lucene.ts", @@ -33011,14 +32500,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/numerical_range.ts", @@ -33065,14 +32546,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/phrase_filter.ts", @@ -33119,14 +32592,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/query_filter.ts", @@ -33173,14 +32638,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/range.ts", @@ -33227,14 +32684,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/range_filter.ts", @@ -33289,14 +32738,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/remove_filter.ts", @@ -33351,14 +32792,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data/common/search/expressions/select_filter.ts", @@ -33376,9 +32809,9 @@ "signature": [ "{ type: \"kibana_context\"; } & ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.ExecutionContextSearch", "text": "ExecutionContextSearch" } @@ -34374,9 +33807,9 @@ "signature": [ "{ type: \"kibana_context\"; } & ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.ExecutionContextSearch", "text": "ExecutionContextSearch" } @@ -37429,14 +36862,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">) => ", { "pluginId": "data", @@ -37510,14 +36935,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ExecutionContextSearch", - "text": "ExecutionContextSearch" - }, ">" ], "path": "src/plugins/data/common/search/expressions/kibana.ts", @@ -40439,9 +39856,9 @@ }, "[] | undefined; timeRange?: ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataQueryPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.TimeRange", "text": "TimeRange" }, @@ -40782,9 +40199,9 @@ }, "[] | undefined; timeRange?: ", { - "pluginId": "data", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibDataQueryPluginApi", + "docId": "kibKbnEsQueryPluginApi", "section": "def-common.TimeRange", "text": "TimeRange" }, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index e7fb9092d8d82..2ba1f5e9b77ca 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3190 | 31 | 2539 | 22 | +| 3188 | 31 | 2537 | 22 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index a55972188c32b..65973b007863b 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-12-09 +date: 2023-12-12 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 60a5fb1185018..aeb31d7bf11a9 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-12-09 +date: 2023-12-12 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 6626a1b5f1fb5..b2e1d21935e85 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-12-09 +date: 2023-12-12 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 1f7e5f674a006..d3ccdff224917 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -20722,14 +20722,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 321f8429a3aad..8206ab38fa583 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-12-09 +date: 2023-12-12 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 794a0e619decd..8d0eba8c72ba8 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.devdocs.json b/api_docs/dataset_quality.devdocs.json index a31a46b97abb8..5aa8c615ce8b0 100644 --- a/api_docs/dataset_quality.devdocs.json +++ b/api_docs/dataset_quality.devdocs.json @@ -100,7 +100,7 @@ "label": "APIClientRequestParamsOf", "description": [], "signature": [ - "{ \"GET /internal/dataset_quality/data_streams/malformed_docs\": { endpoint: \"GET /internal/dataset_quality/data_streams/malformed_docs\"; params?: ", + "{ \"GET /internal/dataset_quality/data_streams/degraded_docs\": { endpoint: \"GET /internal/dataset_quality/data_streams/degraded_docs\"; params?: ", "TypeC", "<{ query: ", "IntersectionC", @@ -130,7 +130,7 @@ "StringC", "; }>]>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { query: { start: number; end: number; } & { type?: \"metrics\" | \"synthetics\" | \"profiling\" | \"traces\" | \"logs\" | undefined; } & { datasetQuery?: string | undefined; }; }; }) => Promise<{ malformedDocs: { dataset: string; percentage: number; }[]; }>; } & ", + " & { params: { query: { start: number; end: number; } & { type?: \"metrics\" | \"synthetics\" | \"profiling\" | \"traces\" | \"logs\" | undefined; } & { datasetQuery?: string | undefined; }; }; }) => Promise<{ degradedDocs: { dataset: string; percentage: number; }[]; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/stats\": { endpoint: \"GET /internal/dataset_quality/data_streams/stats\"; params?: ", "TypeC", @@ -187,7 +187,7 @@ "label": "APIReturnType", "description": [], "signature": [ - "{ \"GET /internal/dataset_quality/data_streams/malformed_docs\": { endpoint: \"GET /internal/dataset_quality/data_streams/malformed_docs\"; params?: ", + "{ \"GET /internal/dataset_quality/data_streams/degraded_docs\": { endpoint: \"GET /internal/dataset_quality/data_streams/degraded_docs\"; params?: ", "TypeC", "<{ query: ", "IntersectionC", @@ -217,7 +217,7 @@ "StringC", "; }>]>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { query: { start: number; end: number; } & { type?: \"metrics\" | \"synthetics\" | \"profiling\" | \"traces\" | \"logs\" | undefined; } & { datasetQuery?: string | undefined; }; }; }) => Promise<{ malformedDocs: { dataset: string; percentage: number; }[]; }>; } & ", + " & { params: { query: { start: number; end: number; } & { type?: \"metrics\" | \"synthetics\" | \"profiling\" | \"traces\" | \"logs\" | undefined; } & { datasetQuery?: string | undefined; }; }; }) => Promise<{ degradedDocs: { dataset: string; percentage: number; }[]; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/stats\": { endpoint: \"GET /internal/dataset_quality/data_streams/stats\"; params?: ", "TypeC", diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 8349c6efe26aa..7bb79b57d38cb 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index a8c6a529a3b77..725967e8463a7 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 476bbfab6deca..895006b1e19f8 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -1134,7 +1134,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [custom_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts#:~:text=alertFactory), [executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts#:~:text=alertFactory), [executor.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.test.ts#:~:text=alertFactory) | - | +| | [custom_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts#:~:text=alertFactory), [custom_threshold_executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts#:~:text=alertFactory), [executor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts#:~:text=alertFactory), [executor.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.test.ts#:~:text=alertFactory) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/plugin.ts#:~:text=license%24) | 8.8.0 | | | [render_cell_value.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/alerts_table/slo/render_cell_value.tsx#:~:text=DeprecatedCellValueElementProps), [render_cell_value.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/alerts_table/slo/render_cell_value.tsx#:~:text=DeprecatedCellValueElementProps) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index f84624fd22c80..d1782f2e74ad0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 608e25536bd75..15db951498e46 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 9df15292c2bc5..e1cc13f2bb13d 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -1526,7 +1526,15 @@ "section": "def-public.CustomizationCallback", "text": "CustomizationCallback" }, - "[]; }" + "[]; stateStorageContainer?: ", + { + "pluginId": "kibanaUtils", + "scope": "public", + "docId": "kibKibanaUtilsPluginApi", + "section": "def-public.IKbnUrlStateStorage", + "text": "IKbnUrlStateStorage" + }, + " | undefined; }" ], "path": "src/plugins/discover/public/components/discover_container/index.ts", "deprecated": false, diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index ebb510f74e79c..e6aa4ddb0745e 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-12-09 +date: 2023-12-12 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 64b132f281790..e1583c8297dfc 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 4b7b8b2f93088..c9b7e96ef7dee 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 786041ef7844d..20b3c1d11c5a1 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 0424c23376cea..e47cbdd483c88 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-12-09 +date: 2023-12-12 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 79ec8585277f2..c3310258888da 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-12-09 +date: 2023-12-12 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 4a3f4fcf5aa65..e105222244738 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-12-09 +date: 2023-12-12 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 dcd174112f276..cda16a38aecdb 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-12-09 +date: 2023-12-12 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 48e6709deb0de..dafda6cb910ca 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.devdocs.json b/api_docs/event_annotation.devdocs.json index c4f90f98b9a1a..1f5334176836c 100644 --- a/api_docs/event_annotation.devdocs.json +++ b/api_docs/event_annotation.devdocs.json @@ -804,14 +804,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/event_annotation/common/event_annotation_group/index.ts", diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index b959ef8398a63..a28dd01697ec5 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index f9d8d982a0ad6..87d44eeb75bbd 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 9f20eb3c4c3a2..6da2224f16b00 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 3aae215d85426..5f4bfacac2878 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index dd33daa40e9c6..9d768382a753a 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.devdocs.json b/api_docs/expression_gauge.devdocs.json index 4ffb246b88599..77364b73eed1f 100644 --- a/api_docs/expression_gauge.devdocs.json +++ b/api_docs/expression_gauge.devdocs.json @@ -1132,14 +1132,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts", diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 3ae4d69b05a66..22e781abe7951 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.devdocs.json b/api_docs/expression_heatmap.devdocs.json index d131c0eec50a3..d11837f817ccd 100644 --- a/api_docs/expression_heatmap.devdocs.json +++ b/api_docs/expression_heatmap.devdocs.json @@ -687,14 +687,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts", @@ -759,14 +751,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts", @@ -831,14 +815,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts", diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 99f7f594df2b2..4c7255040887a 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.devdocs.json b/api_docs/expression_image.devdocs.json index 9d01073c26d1f..e51a1a08b9d44 100644 --- a/api_docs/expression_image.devdocs.json +++ b/api_docs/expression_image.devdocs.json @@ -406,14 +406,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_image/common/types/expression_functions.ts", diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index c57540229b4c3..6b50d51965fda 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.devdocs.json b/api_docs/expression_legacy_metric_vis.devdocs.json index e75f85673b794..59c68ce444a54 100644 --- a/api_docs/expression_legacy_metric_vis.devdocs.json +++ b/api_docs/expression_legacy_metric_vis.devdocs.json @@ -872,14 +872,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 547adc9838bf7..7715127de8052 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.devdocs.json b/api_docs/expression_metric.devdocs.json index 5c1c8610709fa..674dd738fe29d 100644 --- a/api_docs/expression_metric.devdocs.json +++ b/api_docs/expression_metric.devdocs.json @@ -529,14 +529,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_metric/common/types/expression_functions.ts", diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 0b3fd3496cd18..7e9c5a4108543 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.devdocs.json b/api_docs/expression_metric_vis.devdocs.json index 02dbf6469ed48..f8dd939d5f389 100644 --- a/api_docs/expression_metric_vis.devdocs.json +++ b/api_docs/expression_metric_vis.devdocs.json @@ -1135,14 +1135,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", @@ -1223,14 +1215,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index f5478e7507d6b..ca7e829c0b7b7 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.devdocs.json b/api_docs/expression_partition_vis.devdocs.json index 908097245f11f..7079babb4610f 100644 --- a/api_docs/expression_partition_vis.devdocs.json +++ b/api_docs/expression_partition_vis.devdocs.json @@ -140,14 +140,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/partition_labels_function.ts", @@ -1196,14 +1188,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_functions.ts", @@ -1290,14 +1274,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_functions.ts", @@ -1377,14 +1353,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_functions.ts", @@ -1494,14 +1462,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_functions.ts", @@ -1581,14 +1541,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_partition_vis/common/types/expression_functions.ts", diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index e273ad174e988..c3f0b22bb618a 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.devdocs.json b/api_docs/expression_repeat_image.devdocs.json index dcd0d54c1296c..4cab6fe3a0829 100644 --- a/api_docs/expression_repeat_image.devdocs.json +++ b/api_docs/expression_repeat_image.devdocs.json @@ -453,14 +453,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_repeat_image/common/types/expression_functions.ts", diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 6d0dc4e7e20f8..2f8c1e48a7145 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-12-09 +date: 2023-12-12 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 59e7405e4cd86..62787996c2674 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.devdocs.json b/api_docs/expression_shape.devdocs.json index 3c6d97d7ce0f4..63d5a0c2ce2f2 100644 --- a/api_docs/expression_shape.devdocs.json +++ b/api_docs/expression_shape.devdocs.json @@ -1517,14 +1517,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_shape/common/types/expression_functions.ts", @@ -1574,14 +1566,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_shape/common/types/expression_functions.ts", @@ -2521,14 +2505,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_shape/common/types/expression_functions.ts", @@ -2578,14 +2554,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expression_shape/common/types/expression_functions.ts", diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 4a78fb4ac0601..a804579b74835 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.devdocs.json b/api_docs/expression_tagcloud.devdocs.json index 0c7cd3c404232..8c6b4a77e81c1 100644 --- a/api_docs/expression_tagcloud.devdocs.json +++ b/api_docs/expression_tagcloud.devdocs.json @@ -104,14 +104,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_tagcloud/common/types/expression_functions.ts", diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index de4739ecaa738..836c9081c1b30 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index ef1d580422e20..da16d0b24133a 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -2522,14 +2522,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -2688,14 +2680,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -2766,14 +2750,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -2863,14 +2839,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -2972,14 +2940,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -3049,14 +3009,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -3178,14 +3130,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -3331,14 +3275,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -3423,14 +3359,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", @@ -3599,14 +3527,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 1b1a3b7c2ec24..926b2937aa75d 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index 147e417c0ce6d..d3440d35400cd 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -127,15 +127,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/execution.ts", "deprecated": false, @@ -7068,7 +7060,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -7084,7 +7076,14 @@ "\nGet search context of the expression." ], "signature": [ - "() => ExecutionContextSearch" + "() => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.ExecutionContextSearch", + "text": "ExecutionContextSearch" + } ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -8608,14 +8607,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8669,14 +8660,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8714,14 +8697,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8759,14 +8734,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8804,14 +8771,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8873,14 +8832,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -8942,14 +8893,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -9011,14 +8954,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -9080,14 +9015,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -10655,11 +10582,11 @@ "description": [], "signature": [ { - "pluginId": "@kbn/utility-types", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.ExecutionContextSearch", + "text": "ExecutionContextSearch" }, " | undefined" ], @@ -11861,14 +11788,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -13647,15 +13566,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/execution.ts", "deprecated": false, @@ -18475,7 +18386,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -18491,7 +18402,14 @@ "\nGet search context of the expression." ], "signature": [ - "() => ExecutionContextSearch" + "() => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.ExecutionContextSearch", + "text": "ExecutionContextSearch" + } ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -19984,14 +19902,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20045,14 +19955,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20090,14 +19992,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20135,14 +20029,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20180,14 +20066,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20249,14 +20127,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20318,14 +20188,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20387,14 +20249,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -20456,14 +20310,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -21769,14 +21615,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -22814,15 +22652,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/execution.ts", "deprecated": false, @@ -28967,14 +28797,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">" ], "path": "src/plugins/expressions/common/util/test_utils.ts", @@ -30542,7 +30364,7 @@ "section": "def-common.ExecutionContext", "text": "ExecutionContext" }, - "" + "" ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -30558,7 +30380,14 @@ "\nGet search context of the expression." ], "signature": [ - "() => ExecutionContextSearch" + "() => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.ExecutionContextSearch", + "text": "ExecutionContextSearch" + } ], "path": "src/plugins/expressions/common/execution/types.ts", "deprecated": false, @@ -32269,11 +32098,11 @@ "description": [], "signature": [ { - "pluginId": "@kbn/utility-types", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.ExecutionContextSearch", + "text": "ExecutionContextSearch" }, " | undefined" ], @@ -32872,14 +32701,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -32933,14 +32754,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -32978,14 +32791,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33023,14 +32828,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33068,14 +32865,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33137,14 +32926,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33206,14 +32987,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33275,14 +33048,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -33344,14 +33109,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -36454,14 +36211,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/types.ts", @@ -36853,14 +36602,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/clog.ts", @@ -36923,14 +36664,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/cumulative_sum.ts", @@ -36993,14 +36726,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/derivative.ts", @@ -37055,14 +36780,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/font.ts", @@ -37125,14 +36842,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/moving_average.ts", @@ -37195,14 +36904,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/overall_metric.ts", @@ -37241,14 +36942,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/theme.ts", @@ -37303,14 +36996,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/ui_setting.ts", @@ -37349,14 +37034,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/var.ts", @@ -37395,14 +37072,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/expressions/common/expression_functions/specs/var_set.ts", @@ -42551,14 +42220,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">) => Promise<", { "pluginId": "expressions", @@ -42638,14 +42299,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">" ], "path": "src/plugins/expressions/common/expression_functions/specs/math_column.ts", @@ -45399,14 +45052,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">) => any" ], "path": "src/plugins/expressions/common/expression_functions/specs/theme.ts", @@ -45466,14 +45111,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">" ], "path": "src/plugins/expressions/common/expression_functions/specs/theme.ts", @@ -45912,14 +45549,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">) => unknown" ], "path": "src/plugins/expressions/common/expression_functions/specs/var.ts", @@ -45979,14 +45608,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">" ], "path": "src/plugins/expressions/common/expression_functions/specs/var.ts", @@ -46205,14 +45826,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">) => unknown" ], "path": "src/plugins/expressions/common/expression_functions/specs/var_set.ts", @@ -46272,14 +45885,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">" ], "path": "src/plugins/expressions/common/expression_functions/specs/var_set.ts", diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 08c676b64aba8..cfe4ea58f381e 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-12-09 +date: 2023-12-12 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 4c9c85ac483b9..566cc96d781f7 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-12-09 +date: 2023-12-12 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 86c7842383dcd..100c572fe8c8f 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-12-09 +date: 2023-12-12 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 de8c1b0a3bc11..08260099b3b86 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-12-09 +date: 2023-12-12 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 9eda516a05ff0..4731b3ad0b821 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-12-09 +date: 2023-12-12 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 a728408cea079..db2167254ffa0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index d25052dd1d9cd..2f4faa6e4e17f 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 46a82357114ab..33bf8e4673759 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-12-09 +date: 2023-12-12 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 bd8cbe8b4a359..0292e236f5398 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-12-09 +date: 2023-12-12 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 ee6854e4fa295..b746d6eed7f71 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-12-09 +date: 2023-12-12 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 38f734012f2e6..71d1b7bd10e93 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-12-09 +date: 2023-12-12 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 fdb98cb81f615..d107d4cfb5f3e 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-12-09 +date: 2023-12-12 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 019fb4a12cff9..3a5090647ab44 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-12-09 +date: 2023-12-12 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 56cc0fea64c14..3f10ac8bd3649 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-12-09 +date: 2023-12-12 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 24b662a70e809..1544e8d654d6d 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-12-09 +date: 2023-12-12 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 82f8384a0b6e8..6887887dc9058 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-12-09 +date: 2023-12-12 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 eba38cdf12716..2302207aca0e6 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index fad75463b14d0..354873e153dbf 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index c9151c7891467..a87a4e5a6c028 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-12-09 +date: 2023-12-12 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 06bdfadc70869..8cb3a590718ec 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 2b9a680ccaf7a..05b3830248bdc 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index eb7fbff8784fd..1952240755837 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 41742baad9737..c071dfac3c9fd 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 0f262d332e3c1..df52eed6c876a 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 59483525195ca..ddac85173c245 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 7dff5d0b7ad60..5f1e403d497d7 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-12-09 +date: 2023-12-12 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 e625adb464da3..3b82c6ff13123 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index fb0c3b3a8a857..2d3689c149365 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.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 80ce522f8d2e3..421b17ca183c9 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-12-09 +date: 2023-12-12 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 9de7e68884608..3e0f22c5dca2c 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-12-09 +date: 2023-12-12 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 7a130d7ade709..59679f1d85775 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-12-09 +date: 2023-12-12 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 d31d592c966e9..65db88c49f863 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-12-09 +date: 2023-12-12 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 5e993d67c583f..1d15a66d96b2b 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-12-09 +date: 2023-12-12 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 609df4882eb4e..0932763d11762 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-12-09 +date: 2023-12-12 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 0649db8a1c28d..240ee46e9d2fd 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index eeb394592d9de..97c9f01f502da 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-12-09 +date: 2023-12-12 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 fde62de4c8b11..cd469aa6f45ff 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-12-09 +date: 2023-12-12 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 5d93143d86212..d01fa8d0ea71e 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 8a79a96e05a4d..8907001aa4341 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index e48bfbb903f09..494e496bf5e63 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 60e4a246062cc..f02e1f3db646c 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 8f497ef7f6367..28f1aa3b00e09 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-12-09 +date: 2023-12-12 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 ddfbb199001d3..ecb78e12e9ab7 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 7e46f74793038..ddb3fd93325ce 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 981c34232bdf9..fb16a11cda9fb 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-12-09 +date: 2023-12-12 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 10d0d514f9525..1dc2df9ab446f 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-12-09 +date: 2023-12-12 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 a8c3a0ad94ba3..d8dfe9a617e02 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-12-09 +date: 2023-12-12 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 475d6b472ca62..1221b264e4d36 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-12-09 +date: 2023-12-12 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 c6daa6bf3b1af..e344405f4c7fd 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_code_editor.mdx index 99483cc9d1ca4..2ec55cde02446 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 8cfff28388500..d09ae4f83d753 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-12-09 +date: 2023-12-12 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 9914ba9c610b3..91bc2597527ba 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-12-09 +date: 2023-12-12 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 c10fedcd08697..41a3f194a0dc0 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-12-09 +date: 2023-12-12 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 8195d2e3cb302..23ad2faa3f71c 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-12-09 +date: 2023-12-12 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 4065037583cc9..1c5f0fc953da7 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-12-09 +date: 2023-12-12 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_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index fd1a374d1148f..b37bfde10dd52 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 839fcb39eff2a..059126a20f4e0 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index c55a4366414f8..9289efd15b499 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 1eef7a4810c8b..eab99828a72f9 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index d1ba380de894e..6fdb7c03c5b7a 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index a3d2375c8f692..95b6475fd6249 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-12-09 +date: 2023-12-12 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 98fbf10d9a996..15c220d39354a 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-12-09 +date: 2023-12-12 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 9153ba3fe7bc9..a23d5b7486b84 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-12-09 +date: 2023-12-12 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 8943145c3ff7f..2180bf1a04e63 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-12-09 +date: 2023-12-12 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 3b43e63cd6086..622fcd98cdc63 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-12-09 +date: 2023-12-12 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 5c43a6569f0c0..910092c052e41 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-12-09 +date: 2023-12-12 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 f350ef1c2978d..54b6ebdd529cc 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-12-09 +date: 2023-12-12 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 b7093c2571204..b5b74fd1e7746 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-12-09 +date: 2023-12-12 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 0347922c17a91..2af634ccc5b09 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-12-09 +date: 2023-12-12 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 21018518a19da..e74708a0db06a 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-12-09 +date: 2023-12-12 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 c3000f8e45aa7..ee660f2d2c6cd 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-12-09 +date: 2023-12-12 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 b13c992ed0373..adf94918bdf22 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-12-09 +date: 2023-12-12 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 5cb4f5a34c218..f3e5483a5f8cb 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-12-09 +date: 2023-12-12 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 45ab0f9b9be75..ae91936d4c4f2 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-12-09 +date: 2023-12-12 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 9e131c79c243c..47a271f85fe3a 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-12-09 +date: 2023-12-12 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 b42828da8c016..a1082ca9ee9b6 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-12-09 +date: 2023-12-12 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 125fa01245b0e..23704f9f4a0db 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-12-09 +date: 2023-12-12 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 dd1540e0d6c3b..a68c168caea9b 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-12-09 +date: 2023-12-12 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 c8e9a3158b9d9..de18699194e4d 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-12-09 +date: 2023-12-12 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 f49d0db0b36ff..55a4d45a82567 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-12-09 +date: 2023-12-12 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 0249cb36d4fbc..34434d47124ac 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-12-09 +date: 2023-12-12 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 a4e2a28bfc60e..e98f82e46cf82 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-12-09 +date: 2023-12-12 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 e84a390653339..79775682bdc5e 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-12-09 +date: 2023-12-12 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 e3fecfbc92a1a..5cbe440550582 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-12-09 +date: 2023-12-12 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 90568aba49ace..452004538837b 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-12-09 +date: 2023-12-12 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 7be608857c75f..70b08c45b89e7 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-12-09 +date: 2023-12-12 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 b74da9fef2933..20228ce57709d 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-12-09 +date: 2023-12-12 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 dc81c57050678..f67ba2e727d6a 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_core_custom_branding_server.mdx index bd0c140c92ec9..2b7a02a138966 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index d3818d7f38d0e..e01d2b85cc939 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-12-09 +date: 2023-12-12 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 868dfd6145fcf..d1ec987d75643 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-12-09 +date: 2023-12-12 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 e06aa97efa7f1..3d06e307f6f71 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-12-09 +date: 2023-12-12 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 dc9bfdc8bb425..12224995c9a08 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-12-09 +date: 2023-12-12 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 cab053982f33e..ebca0cc1ba88e 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-12-09 +date: 2023-12-12 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 d0538e003b351..30496e0525a39 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-12-09 +date: 2023-12-12 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 733d1541e83cb..5116f70c3184d 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-12-09 +date: 2023-12-12 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 a49134973fcb1..453f29d8ffd1a 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-12-09 +date: 2023-12-12 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 f08fd28f40699..fe14f185bd386 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-12-09 +date: 2023-12-12 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 0aa97e69705dc..5a61ea45dc345 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-12-09 +date: 2023-12-12 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 4b45b729e34ab..5bb5b43ba3510 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-12-09 +date: 2023-12-12 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 e602f2ace060e..a86d2a17c7e59 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-12-09 +date: 2023-12-12 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 d217f0e540d40..fa6d91f3b87ab 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-12-09 +date: 2023-12-12 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 45439e316f2b9..e51c8f622c655 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-12-09 +date: 2023-12-12 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 4e3134f055c2b..15d502ad1879c 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-12-09 +date: 2023-12-12 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 2f354a7c226a8..0a04a66241d2b 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-12-09 +date: 2023-12-12 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 1d50dd1e9afe3..56cdad74fe198 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-12-09 +date: 2023-12-12 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 211aced465a7f..3c8e095e994dc 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-12-09 +date: 2023-12-12 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 a1cb6cf08ab74..a95aa3748509d 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-12-09 +date: 2023-12-12 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 1a9bb04bb1f09..6e150f2098d86 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-12-09 +date: 2023-12-12 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 9556b34df92bd..181b74fb963ba 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-12-09 +date: 2023-12-12 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 f7fadd31ee738..0ecad616046de 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-12-09 +date: 2023-12-12 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 aa68429389309..053e34e0fcfd6 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-12-09 +date: 2023-12-12 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 61416d0701a81..1b5bf42d6543b 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-12-09 +date: 2023-12-12 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 72111f789d024..e8bddc790df20 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-12-09 +date: 2023-12-12 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 1f2f46a5e1da4..01c1facc7ff90 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-12-09 +date: 2023-12-12 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 86d7bb84c92b6..7363f60077358 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-12-09 +date: 2023-12-12 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 51bd55c943baf..036977a374338 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-12-09 +date: 2023-12-12 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 cb438bee7379c..b0174331fc87d 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-12-09 +date: 2023-12-12 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 cce81d96654ce..fe0bb2d0bd114 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-12-09 +date: 2023-12-12 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 74fe410d75d3b..eab7db70afd34 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-12-09 +date: 2023-12-12 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 f894fb18cdaa1..de0af8d622748 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-12-09 +date: 2023-12-12 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 69f8fc9a8a2a2..7041c5cf40a86 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-12-09 +date: 2023-12-12 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 3f9d57cd12252..52de9292f6fcc 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-12-09 +date: 2023-12-12 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 78a29f62c9ca3..a8643bc8d3c59 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-12-09 +date: 2023-12-12 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 a60a29a6d2376..4f01352ac7e60 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-12-09 +date: 2023-12-12 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 35ddbea43e186..090235f33cf44 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-12-09 +date: 2023-12-12 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 7513497266de0..aa010260afc3c 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-12-09 +date: 2023-12-12 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 84f244a37a85a..40712f23f295e 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-12-09 +date: 2023-12-12 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 c90eb97dd08f8..6f7e6d755261b 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-12-09 +date: 2023-12-12 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.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 958d073075f2f..975a532fe4dcb 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -4420,6 +4420,10 @@ "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/connectors_routes.ts" }, + { + "plugin": "serverlessSearch", + "path": "x-pack/plugins/serverless_search/server/routes/mapping_routes.ts" + }, { "plugin": "snapshotRestore", "path": "x-pack/plugins/snapshot_restore/server/routes/api/app.ts" @@ -6818,6 +6822,10 @@ "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/api_key_routes.ts" }, + { + "plugin": "serverlessSearch", + "path": "x-pack/plugins/serverless_search/server/routes/indices_routes.ts" + }, { "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/connectors_routes.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 417e1f74228e4..3939ed264c7eb 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-12-09 +date: 2023-12-12 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 0fb23fd615379..5ae32c0d2843a 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-12-09 +date: 2023-12-12 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 dba0e3c909f8d..7d54b959e348b 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-12-09 +date: 2023-12-12 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 f5c8561d7cf46..b98097af10a24 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-12-09 +date: 2023-12-12 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 e500cdf641c5e..b355d45e7284c 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-12-09 +date: 2023-12-12 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 b0165aaf28ebe..38e3e3e471e71 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-12-09 +date: 2023-12-12 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 d6fb2a3e60c4b..2507294ff8960 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-12-09 +date: 2023-12-12 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 e43ae26618b6a..33376294f27db 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-12-09 +date: 2023-12-12 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 2512da9eeab37..4f43c9bc77da6 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-12-09 +date: 2023-12-12 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 4571f2d670526..9c6eedaf65619 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-12-09 +date: 2023-12-12 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 fc129305b986a..6e3b858524cd3 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 110e373883380..b2bda15dc61d7 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-12-09 +date: 2023-12-12 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 0c9cf73dce145..783f165a389ed 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-12-09 +date: 2023-12-12 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 562688b4b5717..83b578128cbf4 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-12-09 +date: 2023-12-12 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 9186e6fd04e0d..1ab10da1125f0 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-12-09 +date: 2023-12-12 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 714e086fd5cec..bb89b591b8ffb 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-12-09 +date: 2023-12-12 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 ada40a632ff1c..7822fbebcba21 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-12-09 +date: 2023-12-12 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 580f8da2b8dcd..edc29346cbb91 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-12-09 +date: 2023-12-12 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 2dd35a5e69944..eac674232d4f4 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-12-09 +date: 2023-12-12 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 1a6d21e4e5623..df0d40acf008a 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-12-09 +date: 2023-12-12 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 dac705bb973cf..f63656487b1a1 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-12-09 +date: 2023-12-12 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 23053a01462c0..9989ebf99a4d9 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-12-09 +date: 2023-12-12 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 d7b3fc5563b10..f6006a6643d7e 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-12-09 +date: 2023-12-12 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 5ae8200b88392..7bbe75d26d8a3 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-12-09 +date: 2023-12-12 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 e76a3ffcef2ac..ddd58c41ad3df 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-12-09 +date: 2023-12-12 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 eb8a8c8aed47e..b336db0c52286 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-12-09 +date: 2023-12-12 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 2b5f6b2c5e921..6bc75e053d647 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-12-09 +date: 2023-12-12 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 27ed7d731fa9c..9373c7d7a9c51 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-12-09 +date: 2023-12-12 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 2c82b9522546c..16d3e1ca8dada 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-12-09 +date: 2023-12-12 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 899cf0abd718c..889aa5c78592b 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-12-09 +date: 2023-12-12 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 6ce073c6cfdf1..ff73e061d1f4e 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-12-09 +date: 2023-12-12 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 78ee30c5e96ad..4539da21f8468 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-12-09 +date: 2023-12-12 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 42583b758d5e1..042b70779720c 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-12-09 +date: 2023-12-12 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 a91496b3e598c..31841fd4e2d38 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-12-09 +date: 2023-12-12 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 6b30aa08d3ef1..55b09641b483b 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-12-09 +date: 2023-12-12 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 0098c6c650d78..acacbd7698bec 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-12-09 +date: 2023-12-12 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 6a150c618e65b..6e1c9297339ae 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-12-09 +date: 2023-12-12 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_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 96d5ac4f79fa9..90e922ec0c857 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 66161344742ed..ac979502f9ed4 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 956c4db00b78a..eda4def4ae150 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-12-09 +date: 2023-12-12 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 1c1cf0bbb5960..501c2577572e9 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-12-09 +date: 2023-12-12 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 9a5c1a2afa66b..8d73b28faa90a 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-12-09 +date: 2023-12-12 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 db213f648e3a0..1f610d886afce 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-12-09 +date: 2023-12-12 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 2c2719ac83e38..0527400b7a0cf 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-12-09 +date: 2023-12-12 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 260f1ed0d149a..bb121f7dee855 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-12-09 +date: 2023-12-12 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 558d20b09839a..47a863e38ad17 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-12-09 +date: 2023-12-12 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 f2c22e0004501..4869d67e79510 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 235cda33e99a4..4c62522a49a7c 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-12-09 +date: 2023-12-12 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 04c23a08855c4..99ee67df558e1 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-12-09 +date: 2023-12-12 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_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index a2a1dfcfa730d..57b84ecfd7e82 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-12-09 +date: 2023-12-12 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 5e6a9a9680b8c..64e7d2094613f 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-12-09 +date: 2023-12-12 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 a6111fd8fc9e7..f097039de4bad 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-12-09 +date: 2023-12-12 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 f0fb061a9877a..9b75ac9281c96 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-12-09 +date: 2023-12-12 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 5afb544f7a929..78c4ee07fec82 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-12-09 +date: 2023-12-12 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 80b6cd027642c..ff4acf367e1ee 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 7b50ab9a0b575..9c78d5a55ec3c 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-12-09 +date: 2023-12-12 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 0f58d56a21e83..9f9ffce5d3643 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-12-09 +date: 2023-12-12 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 04e696fbf5a41..d8a10178e496f 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-12-09 +date: 2023-12-12 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 9478fd81a6794..5ffa36b3709ff 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-12-09 +date: 2023-12-12 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 13c047fadeaf9..d1142e62dd8bb 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-12-09 +date: 2023-12-12 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 41ef4e8d6f5ca..f14c9b0375626 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-12-09 +date: 2023-12-12 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 9f46914f52a51..dc8d80c20955f 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-12-09 +date: 2023-12-12 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 c7e6fe53552c7..04d639700db3f 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-12-09 +date: 2023-12-12 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 870ee9efd8aec..d5c766190401f 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-12-09 +date: 2023-12-12 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 0181088aa9cf2..fc74f20c5775f 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-12-09 +date: 2023-12-12 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 8a3b64a3ba92c..1f6de8bbdda75 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-12-09 +date: 2023-12-12 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 684b196273f81..4d20d4d4d59be 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-12-09 +date: 2023-12-12 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 502e7b06ab56b..b90bb3d1ee4e5 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-12-09 +date: 2023-12-12 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 cf95765b1976a..2471aa7e06b2e 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-12-09 +date: 2023-12-12 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 4672104167591..280afa3ebb6a2 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-12-09 +date: 2023-12-12 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 d7c68ae84afd1..2a450bb5512fa 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-12-09 +date: 2023-12-12 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 d5c9fdd3ad40f..76f195d054ec8 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-12-09 +date: 2023-12-12 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_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 20e045af99339..07c02b0544cff 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.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 1b3e431ed50ca..65f8ed63bb5af 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-12-09 +date: 2023-12-12 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 8311cb3c972d6..9dff6305fda52 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-12-09 +date: 2023-12-12 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 a6be85704ef58..765af9ba87ae9 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-12-09 +date: 2023-12-12 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_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 0798315e44680..516b52f17fbd3 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-12-09 +date: 2023-12-12 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 f9d345889a562..9cef0b6ba62d8 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-12-09 +date: 2023-12-12 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 c1e5bbb810325..0e0567261ec1b 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-12-09 +date: 2023-12-12 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 db909bbfa2bd3..f04395675b823 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-12-09 +date: 2023-12-12 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 f201795d9c9d6..d341cca07d19c 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-12-09 +date: 2023-12-12 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 f169fccdcbc97..8c6cf6ad663cf 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-12-09 +date: 2023-12-12 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 53fa743fb359b..b0061ed042ffb 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-12-09 +date: 2023-12-12 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 1bcce18f94b5d..56969835894ac 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-12-09 +date: 2023-12-12 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 1698127641e51..646334e44b84a 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-12-09 +date: 2023-12-12 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 704ea45071718..e107187634ae3 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-12-09 +date: 2023-12-12 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 c0292a2d820b3..99409be574dcf 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-12-09 +date: 2023-12-12 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_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 4cc9cbd769f62..820bfec20c564 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index d7dfe7be2ec8b..d478db5e1a8a7 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 0e55a5eac4e78..4692846f8ef0d 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index ebcc001f175f5..4f53ca8deef74 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-12-09 +date: 2023-12-12 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 3755751b135be..93e8bab29aeaf 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index f8ef7f6093e0c..d15abdb08d49c 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 938455be3cdc8..d4e7e288f079e 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 82f531433b517..81b0ab3f4918b 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index f521f9e4b360f..c4e8d3456ac8a 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 084b8cf562e5e..a78411ff912a9 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index 591c8763c5929..0c779e45809ac 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 392e5e80ecec1..995b538722cf7 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 57c1d3e9254e5..720d15b49a454 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index f5f359b12eb45..cb7f344b942f6 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.devdocs.json b/api_docs/kbn_deeplinks_observability.devdocs.json index ad8191373165a..c1148395fe4d8 100644 --- a/api_docs/kbn_deeplinks_observability.devdocs.json +++ b/api_docs/kbn_deeplinks_observability.devdocs.json @@ -190,15 +190,22 @@ }, { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.LogExplorerNavigationParams.sort", + "id": "def-common.LogExplorerNavigationParams.filters", "type": "Array", "tags": [], - "label": "sort", + "label": "filters", "description": [ - "\nArray of the used sorting [[field,direction],...]" + "\nOptionally apply free-form filters." ], "signature": [ - "string[][] | undefined" + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined" ], "path": "packages/deeplinks/observability/locators/log_explorer.ts", "deprecated": false, @@ -206,22 +213,22 @@ }, { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.LogExplorerNavigationParams.filters", - "type": "Array", + "id": "def-common.LogExplorerNavigationParams.filterControls", + "type": "Object", "tags": [], - "label": "filters", + "label": "filterControls", "description": [ - "\nOptionally apply filters." + "\nOptionally apply curated filter controls" ], "signature": [ { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/deeplinks-observability", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.FilterControls", + "text": "FilterControls" }, - "[] | undefined" + " | undefined" ], "path": "packages/deeplinks/observability/locators/log_explorer.ts", "deprecated": false, @@ -495,6 +502,44 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.FilterControls", + "type": "Type", + "tags": [], + "label": "FilterControls", + "description": [], + "signature": [ + "{ namespace?: ", + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.ListFilterControl", + "text": "ListFilterControl" + }, + " | undefined; }" + ], + "path": "packages/deeplinks/observability/locators/log_explorer.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.ListFilterControl", + "type": "Type", + "tags": [], + "label": "ListFilterControl", + "description": [], + "signature": [ + "{ mode: \"include\"; values: string[]; }" + ], + "path": "packages/deeplinks/observability/locators/log_explorer.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/deeplinks-observability", "id": "def-common.LOG_EXPLORER_LOCATOR_ID", @@ -527,10 +572,10 @@ }, { "parentPluginId": "@kbn/deeplinks-observability", - "id": "def-common.OBSERVABILITY_LOG_EXPLORER", + "id": "def-common.OBSERVABILITY_LOG_EXPLORER_APP_ID", "type": "string", "tags": [], - "label": "OBSERVABILITY_LOG_EXPLORER", + "label": "OBSERVABILITY_LOG_EXPLORER_APP_ID", "description": [], "signature": [ "\"observability-log-explorer\"" diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 949343d979df0..613b2cb08e6e4 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 29 | 0 | 19 | 0 | +| 31 | 0 | 21 | 0 | ## Common diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index a1493cb5c19a4..22e1f696ae6f8 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 321f891399430..6ebf7d7df07d0 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 34a9e9354ee36..2df90e25f2c80 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 591a1421328a6..c3f30817b61c7 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 2c98bff4a5da7..d1a5d70524ced 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 146ecd3c9b478..63c3f7277445b 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-12-09 +date: 2023-12-12 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 2ef3417424cfa..fbce5ed30e184 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-12-09 +date: 2023-12-12 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 e3bc7c6790016..d4aa20c562b71 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-12-09 +date: 2023-12-12 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 2a5c6df904ff6..8da298f082846 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 1ddcf59e2a33e..5b0bb30cca0f5 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 9f708ea071c4f..831beab59eed5 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-12-09 +date: 2023-12-12 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 3420b462aeafc..b5adca53677c2 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 4082a490c1b29..de041a3889ea4 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 2e48b9bfe79ee..711754d3fcaff 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-12-09 +date: 2023-12-12 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 5c6e008bfd7ff..018bfc79a70a7 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 6c01fe2e91f10..ebca836b058bb 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.devdocs.json b/api_docs/kbn_elastic_agent_utils.devdocs.json index 66197d89c54ba..9814a2afd0fa3 100644 --- a/api_docs/kbn_elastic_agent_utils.devdocs.json +++ b/api_docs/kbn_elastic_agent_utils.devdocs.json @@ -431,7 +431,7 @@ "label": "AgentName", "description": [], "signature": [ - "\"java\" | \"ruby\" | \"go\" | \"dotnet\" | \"php\" | \"otlp\" | \"android/java\" | \"iOS/swift\" | \"rum-js\" | \"js-base\" | \"opentelemetry/webjs\" | \"opentelemetry/java\" | \"nodejs\" | \"python\" | \"opentelemetry/cpp\" | \"opentelemetry/dotnet\" | \"opentelemetry/erlang\" | \"opentelemetry/go\" | \"opentelemetry/nodejs\" | \"opentelemetry/php\" | \"opentelemetry/python\" | \"opentelemetry/ruby\" | \"opentelemetry/rust\" | \"opentelemetry/swift\"" + "\"java\" | \"ruby\" | \"go\" | \"dotnet\" | \"php\" | \"otlp\" | \"android/java\" | \"iOS/swift\" | \"rum-js\" | \"js-base\" | \"opentelemetry/webjs\" | \"opentelemetry/java\" | \"nodejs\" | \"python\" | \"opentelemetry/cpp\" | \"opentelemetry/dotnet\" | \"opentelemetry/erlang\" | \"opentelemetry/go\" | \"opentelemetry/nodejs\" | \"opentelemetry/php\" | \"opentelemetry/python\" | \"opentelemetry/ruby\" | \"opentelemetry/rust\" | \"opentelemetry/swift\" | \"opentelemetry/android\"" ], "path": "packages/kbn-elastic-agent-utils/src/agent_names.ts", "deprecated": false, @@ -544,7 +544,7 @@ "label": "OpenTelemetryAgentName", "description": [], "signature": [ - "\"otlp\" | \"opentelemetry/webjs\" | \"opentelemetry/java\" | \"opentelemetry/cpp\" | \"opentelemetry/dotnet\" | \"opentelemetry/erlang\" | \"opentelemetry/go\" | \"opentelemetry/nodejs\" | \"opentelemetry/php\" | \"opentelemetry/python\" | \"opentelemetry/ruby\" | \"opentelemetry/rust\" | \"opentelemetry/swift\"" + "\"otlp\" | \"opentelemetry/webjs\" | \"opentelemetry/java\" | \"opentelemetry/cpp\" | \"opentelemetry/dotnet\" | \"opentelemetry/erlang\" | \"opentelemetry/go\" | \"opentelemetry/nodejs\" | \"opentelemetry/php\" | \"opentelemetry/python\" | \"opentelemetry/ruby\" | \"opentelemetry/rust\" | \"opentelemetry/swift\" | \"opentelemetry/android\"" ], "path": "packages/kbn-elastic-agent-utils/src/agent_names.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index 1d20a7c498153..629be0fb7db7f 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 36e3860f7a2bb..f475233b39807 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 69f3755f985f7..2a74de23d651f 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index a3c96957aa08f..83f3b088265f2 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-12-09 +date: 2023-12-12 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 834cd174ad417..80be29420365d 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-12-09 +date: 2023-12-12 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 c6487c0967cae..c379b92c68f84 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.devdocs.json b/api_docs/kbn_es_query.devdocs.json index 2ae012946a9ce..60ee58badf7ce 100644 --- a/api_docs/kbn_es_query.devdocs.json +++ b/api_docs/kbn_es_query.devdocs.json @@ -5394,6 +5394,105 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.ExecutionContextSearch", + "type": "Interface", + "tags": [], + "label": "ExecutionContextSearch", + "description": [], + "path": "packages/kbn-es-query/src/expressions/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.ExecutionContextSearch.filters", + "type": "Array", + "tags": [], + "label": "filters", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined" + ], + "path": "packages/kbn-es-query/src/expressions/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.ExecutionContextSearch.query", + "type": "CompoundType", + "tags": [], + "label": "query", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + "[] | undefined" + ], + "path": "packages/kbn-es-query/src/expressions/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.ExecutionContextSearch.timeRange", + "type": "Object", + "tags": [], + "label": "timeRange", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined" + ], + "path": "packages/kbn-es-query/src/expressions/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/es-query", + "id": "def-common.ExecutionContextSearch.disableWarningToasts", + "type": "CompoundType", + "tags": [], + "label": "disableWarningToasts", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-es-query/src/expressions/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/es-query", "id": "def-common.FilterCompareOptions", diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 8f685a79f7cb3..36b99ac40f238 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 261 | 1 | 201 | 15 | +| 266 | 1 | 206 | 15 | ## Common diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 7fc19dad65ed8..8e6a87f19d053 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-12-09 +date: 2023-12-12 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 8ceff35760c05..2c3402784fc96 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 299315ec995e0..5571bbc6770ea 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 96c66d362e3f5..b68e03536e519 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index ff59656d8b3ea..8c1a0d47b5c27 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 8b1021355d5ee..74c60fb08b8f2 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 19a321d6b8c6c..235632b0e615a 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 715d3b8802cac..bbde227274f15 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-12-09 +date: 2023-12-12 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 979725139ff22..ba9f6674753fd 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-12-09 +date: 2023-12-12 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 1020e7bc385d6..095d5427e2fc6 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index f0363bbc20d12..64ab54508c402 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 51ac4651a2f88..f355fe37a6879 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 3c257e54f5f3e..cdbf44da5ffaa 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 91311b8985aaf..7b41e1fafbb45 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-12-09 +date: 2023-12-12 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 e245f25db1a3c..4f06d19fceb75 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-12-09 +date: 2023-12-12 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 76b514df36e08..1f5d24c46a899 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-12-09 +date: 2023-12-12 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 7b3c335bca302..db2a016772a3d 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-12-09 +date: 2023-12-12 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 7d799f1021220..32e3b36072e36 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-12-09 +date: 2023-12-12 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 568e0c0675f3e..daa40cad1fa48 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-12-09 +date: 2023-12-12 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 1f6d3d2ffc811..89c6c67cce414 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-12-09 +date: 2023-12-12 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 4ff653d7cb700..407589284b77b 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 50ad2c489c47d..5b292fb6a6b1f 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 34a4cca721852..ff4b2789f5bf7 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-12-09 +date: 2023-12-12 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 c9404171a700e..fc144dd777e80 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-12-09 +date: 2023-12-12 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 85ba01bb23d72..eda882b378b54 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-12-09 +date: 2023-12-12 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 ca3b1f6693cf6..e514993254875 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-12-09 +date: 2023-12-12 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 c32c3e9fd3d61..8c0657447be3a 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 86bb447b22edb..5049441112588 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 130b152937c67..ff6284a945286 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index d33e17e7d0a8e..58a2a61450d35 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index f6f7dc530e350..fba9c7e9895cf 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-12-09 +date: 2023-12-12 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 ecda9266270c0..5451dd3e3b537 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-12-09 +date: 2023-12-12 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 240b97dca5d83..eeaa474c776f5 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index e42e6a16c4107..b229b43999fa4 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index b1699b8b29978..bb7d536da6ea2 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index ce42f14732ece..b18ff0a36a0af 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index cf70d442529b2..c967837542ccd 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 34640024b6e6b..500648b0618b6 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index a94533afef4c3..3530184d03bab 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 1c6ac709bb1bd..80f17d46e34e7 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index a2fe5295c7ce9..a2c1856580b5c 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index b5262cff41496..c97a250a3529c 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index e0a234c13f85a..014bfdf7569d9 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index ab8e20e327dad..df781997049dd 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index ecc63f6ec04c1..bd1a04bea2cdb 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.devdocs.json b/api_docs/kbn_mapbox_gl.devdocs.json index 838e1f65579ce..b3517dd00c74b 100644 --- a/api_docs/kbn_mapbox_gl.devdocs.json +++ b/api_docs/kbn_mapbox_gl.devdocs.json @@ -9592,7 +9592,7 @@ "label": "MapEvent", "description": [], "signature": [ - "\"error\" | \"remove\" | \"data\" | \"render\" | \"rotate\" | \"resize\" | \"zoom\" | \"load\" | \"move\" | \"idle\" | \"mousedown\" | \"mouseup\" | \"mouseover\" | \"mousemove\" | \"click\" | \"dblclick\" | \"mouseenter\" | \"mouseleave\" | \"mouseout\" | \"contextmenu\" | \"wheel\" | \"touchstart\" | \"touchend\" | \"touchmove\" | \"touchcancel\" | \"movestart\" | \"moveend\" | \"dragstart\" | \"drag\" | \"dragend\" | \"zoomstart\" | \"zoomend\" | \"rotatestart\" | \"rotateend\" | \"pitchstart\" | \"pitch\" | \"pitchend\" | \"boxzoomstart\" | \"boxzoomend\" | \"boxzoomcancel\" | \"webglcontextlost\" | \"webglcontextrestored\" | \"styledata\" | \"sourcedata\" | \"dataloading\" | \"styledataloading\" | \"sourcedataloading\" | \"styleimagemissing\" | \"style.load\" | \"terrain\" | \"dataabort\" | \"sourcedataabort\"" + "\"error\" | \"remove\" | \"data\" | \"render\" | \"rotate\" | \"resize\" | \"idle\" | \"zoom\" | \"load\" | \"move\" | \"mousedown\" | \"mouseup\" | \"mouseover\" | \"mousemove\" | \"click\" | \"dblclick\" | \"mouseenter\" | \"mouseleave\" | \"mouseout\" | \"contextmenu\" | \"wheel\" | \"touchstart\" | \"touchend\" | \"touchmove\" | \"touchcancel\" | \"movestart\" | \"moveend\" | \"dragstart\" | \"drag\" | \"dragend\" | \"zoomstart\" | \"zoomend\" | \"rotatestart\" | \"rotateend\" | \"pitchstart\" | \"pitch\" | \"pitchend\" | \"boxzoomstart\" | \"boxzoomend\" | \"boxzoomcancel\" | \"webglcontextlost\" | \"webglcontextrestored\" | \"styledata\" | \"sourcedata\" | \"dataloading\" | \"styledataloading\" | \"sourcedataloading\" | \"styleimagemissing\" | \"style.load\" | \"terrain\" | \"dataabort\" | \"sourcedataabort\"" ], "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", "deprecated": false, diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index cf38737acb8d2..15b832bf028cb 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 439a2ba50030b..13bb2fdc2fc51 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 2c6b52ede8b7d..57ebaa4d4ed60 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-12-09 +date: 2023-12-12 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_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index ba1b18e90ffc6..2eab090e4f105 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index c1ab45b1aa596..2132f936d47f6 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 1070c50f34210..8814b0a9108f3 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index df42bb14559d8..73e20f921c20e 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index f2c9b3639772c..f3233e19805f1 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index a0869acce6e3b..fe13d266e779a 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-12-09 +date: 2023-12-12 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_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 1cec7f267f974..5c619a5171fdf 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 25e2623383b80..7410c198da7db 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index d4a1a518d5857..98b5b92dcd45a 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 201e327a3b3c2..fe76c0aad1432 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-12-09 +date: 2023-12-12 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 b2487855bbe29..8a32c3ac83226 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-12-09 +date: 2023-12-12 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_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 370d96a7aa125..c84ed03ca16f7 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index d13effe26282c..77c3cad274d5a 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-12-09 +date: 2023-12-12 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 2241ef428effd..69d01d31adfa0 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-12-09 +date: 2023-12-12 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_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index 68f33f07de6b3..b62882f7664d6 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 665cb59d1bbfe..631caf0120627 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-12-09 +date: 2023-12-12 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_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 323f096e4c605..f8137bf131b00 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 83884bfaf2204..879b7f13dd17d 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 8287fe6d2852a..c9f1503079aec 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 63d066603496b..f384d3477cdbc 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-12-09 +date: 2023-12-12 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_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index e0c4dee14429f..45961ad07fb1a 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index c7b1c82fed8d5..05ed9b2c8277d 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 26ad4a88881a4..bf153aead8730 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-12-09 +date: 2023-12-12 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 e8170e6744ee5..f5611cdcc4f74 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index b75a68fc74668..1ffdb777bf0c8 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 29ce823780090..b9f5574570022 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index c79b0281cc030..8f96452eddd9c 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index 34b74aa1518b0..babe1a375e61b 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index aab684deeb94b..2b8e8e3295602 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index dcc9f54d5edd9..3adf8d5efa186 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 30fcad3d821f5..6072302aa3e00 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-12-09 +date: 2023-12-12 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 ca7411b2df614..363b55ef385cc 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-12-09 +date: 2023-12-12 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 0421f896cdfe6..5490aab1c4a10 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-12-09 +date: 2023-12-12 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_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index f0f2c4bf6261f..e6e208c8992eb 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 789d9a31fd9a6..f5ad1c54d790a 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-12-09 +date: 2023-12-12 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 b9ab5cba9f412..7a2439de0a668 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-12-09 +date: 2023-12-12 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 4cf328c66616c..cb8258a2eff47 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 38cf1be64bee9..3a4baac3be23a 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index a153c8d167f6a..7d7289ec9349f 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index b02ac31d36322..302bc7262e4ee 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index b15c568cc1207..7a6e2d918c7aa 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 9e3a03633195e..ef9f7304e9eb6 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index 3972f2f180a81..5594040e720b8 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 66988da84cd7e..04595eec266f7 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index fd2f5076a9e23..0cabfec07ab6e 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 9193046d7a9e1..16f6752760485 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 94396e7442b86..54b50624473a7 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-12-09 +date: 2023-12-12 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 87ff20fa48ad3..317169cdb0c91 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-12-09 +date: 2023-12-12 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 081cbe5b9612e..ab16d0fb5f6e2 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-12-09 +date: 2023-12-12 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 0efbea9bdf66f..fa14117a0cfc0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 15ae4323ea9f1..56de2afd5b321 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 3a9b64e5ca409..3252395821c03 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index d76dfd165245b..d5330fb160b06 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 049cc6c377ac0..9eb19d7cbb62f 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 9ea9a76d81bf4..b9a033adb2abe 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index e6d31a36a64a6..2607053e6efc1 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index d7c6392e5459e..1bd8e06a601e8 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index ecf9fc45867f3..fc76787e83f59 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index cae01d32c91d0..5410480ac95b8 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index d3b3b6bdb30df..9d741aa43a8e3 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index baf1913cf7609..aa51ddcc3f7a3 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 7d4aa593cc6ef..c1440fb9b7aa4 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index f6aaa5972b36a..ade560d4e4afa 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 4b817d2bb56f4..fa0def76edd80 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 6a34c78cd9928..1114435462551 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 6cb4c808cb9b7..51f17012abb6f 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.devdocs.json b/api_docs/kbn_search_connectors.devdocs.json index 13dd7f3406959..a6acd12d30d6a 100644 --- a/api_docs/kbn_search_connectors.devdocs.json +++ b/api_docs/kbn_search_connectors.devdocs.json @@ -4922,7 +4922,7 @@ "section": "def-common.ConnectorStatus", "text": "ConnectorStatus" }, - "; language: string | null; index_name: string | null; configuration: ", + "; language: string | null; configuration: ", { "pluginId": "@kbn/search-connectors", "scope": "common", @@ -4930,7 +4930,7 @@ "section": "def-common.ConnectorConfiguration", "text": "ConnectorConfiguration" }, - "; pipeline?: ", + "; index_name: string | null; pipeline?: ", { "pluginId": "@kbn/search-connectors", "scope": "common", diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 6275096497a14..592a3446f3e60 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index a51e3465a838f..2b87383ad22b0 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.devdocs.json b/api_docs/kbn_search_index_documents.devdocs.json index a19264cf15a01..a68dcae8b5ffd 100644 --- a/api_docs/kbn_search_index_documents.devdocs.json +++ b/api_docs/kbn_search_index_documents.devdocs.json @@ -98,8 +98,8 @@ "pluginId": "@kbn/core-elasticsearch-server", "scope": "common", "docId": "kibKbnCoreElasticsearchServerPluginApi", - "section": "def-common.IScopedClusterClient", - "text": "IScopedClusterClient" + "section": "def-common.ElasticsearchClient", + "text": "ElasticsearchClient" }, ", indexName: string, query?: string | undefined, from?: number, size?: number) => Promise<", { @@ -129,8 +129,8 @@ "pluginId": "@kbn/core-elasticsearch-server", "scope": "common", "docId": "kibKbnCoreElasticsearchServerPluginApi", - "section": "def-common.IScopedClusterClient", - "text": "IScopedClusterClient" + "section": "def-common.ElasticsearchClient", + "text": "ElasticsearchClient" } ], "path": "packages/kbn-search-index-documents/lib/fetch_search_results.ts", diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index eb9b3343ddb68..8168c3857cd63 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 3b6947041b478..fa2f234524ef7 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index c057dd8794ce8..a82d7127ec570 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index da3d740218062..6b84cbe4f733d 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index c43778260b391..bdf75e5adc772 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index d1736f80b8424..e78eb9abc1fa5 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 1dfd02b869e7c..ab324ca0c2aa1 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index e164291b07e19..58b4cd095c019 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 4c31e3e6fd7be..b44a7dafe277b 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index cb445d6036435..663fb1e743c15 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index e2cef2ceb3c27..87de4f7c4bff9 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 912ff3834e864..31fb371d1cecb 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-12-09 +date: 2023-12-12 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 4c9a4a96c268c..6e5e00b346e5b 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-12-09 +date: 2023-12-12 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 80707df132c2e..f1bfdabb7672f 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-12-09 +date: 2023-12-12 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_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index f1e35407906fc..51bec1c044d9f 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 3118b6979d919..028b9a969ca85 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-12-09 +date: 2023-12-12 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 8a71904391728..27cf0a02b695c 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-12-09 +date: 2023-12-12 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 daee6180ecba8..d34861dc9512b 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-12-09 +date: 2023-12-12 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 a437d9b8550a0..04bbfdbf960f2 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-12-09 +date: 2023-12-12 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 f1846cea01695..419ab3de1cdc0 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-12-09 +date: 2023-12-12 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 a12615a8d6a98..95a65588992ac 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-12-09 +date: 2023-12-12 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 55249b39f6c26..56c25428bb123 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-12-09 +date: 2023-12-12 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 74fe0e184a4c0..21d5709c35b87 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-12-09 +date: 2023-12-12 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 67e093a01d00f..0d5e44689388c 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-12-09 +date: 2023-12-12 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 2047f96ff88bf..ad23af11d2655 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-12-09 +date: 2023-12-12 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 33f6ef8db51f6..9f10828932051 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-12-09 +date: 2023-12-12 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 016d248103ae9..6258145d26aa5 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-12-09 +date: 2023-12-12 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 64f6af11b0e91..04831bfdbe87b 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-12-09 +date: 2023-12-12 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 9dfeba90e41ca..b6ee499b097cf 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index b50282857ce6d..027a8c1411c2e 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index d1e7859758107..e15062918c614 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index c5d9fa64c7449..abf2c96bfc646 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 8c65354379ba4..b8a7faf1523fe 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index dae4a08ed1c5b..82a92bb0360f5 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 5b2d1ee4e30b7..910a5bdb256d2 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index b2d597e522a38..00bc76f5c1935 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-12-09 +date: 2023-12-12 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 56202ba45eb31..7faffbe3b587d 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-12-09 +date: 2023-12-12 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_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 5c258e2185b0e..2d66ba8139b44 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-12-09 +date: 2023-12-12 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_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 8d7d8bfc343dd..433955c8dafca 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-12-09 +date: 2023-12-12 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 f2d87b8370f84..4230e1a453c5e 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-12-09 +date: 2023-12-12 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 8b50553c54a05..66d3f762c605f 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-12-09 +date: 2023-12-12 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_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 33f0746957827..bb466928188f8 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 6d9e9655bc122..21da8a53e7f3f 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index dbd10012e4b82..83a742dee023d 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-12-09 +date: 2023-12-12 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 83c6996869eb7..30be098172f8d 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-12-09 +date: 2023-12-12 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 d021a91f8a53d..5c169d98f57b7 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-12-09 +date: 2023-12-12 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 c7ae5af5cec78..ff2549cc08e55 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-12-09 +date: 2023-12-12 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 ef8396c932b9c..5707fae06e12c 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-12-09 +date: 2023-12-12 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_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 15c63cbf93c81..061ae07a73c40 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index affbcb1fb9b32..a821fa2600199 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-12-09 +date: 2023-12-12 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 9bf76d8671343..f439d53184e50 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-12-09 +date: 2023-12-12 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 1b28942530601..80416b4f2fa19 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-12-09 +date: 2023-12-12 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 66cdc17eb04f9..1c741e25b054e 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-12-09 +date: 2023-12-12 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 37c72b91b7313..e3ada17b9faf9 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-12-09 +date: 2023-12-12 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 ce241ecb64864..70c10679d7f4d 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index af083c8f91fa3..a050a361c31dd 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index cd6c8dd32ba29..db5c9b210d1e6 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-12-09 +date: 2023-12-12 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'; 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 5b2c69a296148..c920fac4ce6ec 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index cf675c83dac74..5c53bf3060813 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-12-09 +date: 2023-12-12 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 4fb4b4a885f61..45b5ace79cddc 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-12-09 +date: 2023-12-12 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 c9587b46c7122..22ff3d61a11e1 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-12-09 +date: 2023-12-12 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 b7df81a148e7d..b5e512eb00002 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-12-09 +date: 2023-12-12 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 89b2e73cfa46b..81c863c81c313 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-12-09 +date: 2023-12-12 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 1ebe6c8d47dcd..2f628f017168f 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-12-09 +date: 2023-12-12 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 7514ed872194d..36e87fb69e44b 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-12-09 +date: 2023-12-12 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 90759dafc8b24..765e3e4f8ba58 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-12-09 +date: 2023-12-12 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 3e06f54566d3b..e1edf806d8504 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-12-09 +date: 2023-12-12 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 c70f33e583411..f6bce04207438 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 48d5c1eedf50f..2b2c1ad421b07 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-12-09 +date: 2023-12-12 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 b4ad71d7b6b25..3a6e25deab0e4 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-12-09 +date: 2023-12-12 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 481459997bee0..90419cba88a13 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-12-09 +date: 2023-12-12 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 89b673c62d5a0..58d3f2425d64f 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-12-09 +date: 2023-12-12 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 bd947e645da26..dd2e1c4f0dc79 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-12-09 +date: 2023-12-12 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 ad012ef7d35ac..ed8654c772edc 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-12-09 +date: 2023-12-12 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.mdx b/api_docs/kbn_slo_schema.mdx index 46091c9b159c4..a666afe7756aa 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 525b093d0765a..7dfbd608767b9 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-12-09 +date: 2023-12-12 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 2777de057dcbd..50ab43038968a 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-12-09 +date: 2023-12-12 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 a595268e87e06..318204cc768ed 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-12-09 +date: 2023-12-12 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 a289b0ed2907e..40ca34678f0b4 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-12-09 +date: 2023-12-12 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 5000d15768550..409f823c47a37 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-12-09 +date: 2023-12-12 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 a51064838411d..d63e79947ae92 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-12-09 +date: 2023-12-12 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 3e047c879a0ac..e0325f0c9d856 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-12-09 +date: 2023-12-12 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 70825616e62fc..067615b56f9aa 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index b55fde3b37d63..ac5b89d415e90 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 4147cf3c7b8d5..b9d99725ba8ee 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 7ce8ca67dc956..1b22e9b042b3b 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index a166e632402da..8c11f46dd6e85 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-12-09 +date: 2023-12-12 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 e3517a3cef948..1b5845f1a04d1 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-12-09 +date: 2023-12-12 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 de8e33850fc73..82dc69b8f75d5 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-12-09 +date: 2023-12-12 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 dea70a8c98edd..fad8af204ec27 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-12-09 +date: 2023-12-12 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 89c500e5ffa89..fc994e9da81ff 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index fda1d6ec66a6d..e45bdecb5b8a0 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 1f3cd53ce97bf..fe025ffef0a79 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 79d7ebd3830a7..9bee99774af9b 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index 33f9453c6ee27..dee42ac47be25 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_url_state.mdx b/api_docs/kbn_url_state.mdx index d286f47d081dd..a99a08e76ebfe 100644 --- a/api_docs/kbn_url_state.mdx +++ b/api_docs/kbn_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-url-state title: "@kbn/url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/url-state plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/url-state'] --- import kbnUrlStateObj from './kbn_url_state.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index b1890daa40ff5..979863ab2821e 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 4697f57981255..4bc9dac01ba2e 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-12-09 +date: 2023-12-12 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 31a0cbd6e613b..fc220462e9d19 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-12-09 +date: 2023-12-12 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 db4d9854d6313..8d6a2f9d19164 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-12-09 +date: 2023-12-12 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 86bac8ba677bc..33bb2f0ced1c0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 360faa6f5233c..130a2da8b93aa 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.devdocs.json b/api_docs/kbn_visualization_utils.devdocs.json new file mode 100644 index 0000000000000..d76530afc1e28 --- /dev/null +++ b/api_docs/kbn_visualization_utils.devdocs.json @@ -0,0 +1,77 @@ +{ + "id": "@kbn/visualization-utils", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/visualization-utils", + "id": "def-common.getTimeZone", + "type": "Function", + "tags": [], + "label": "getTimeZone", + "description": [ + "\nGet timeZone from uiSettings" + ], + "signature": [ + "(uiSettings: ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + ") => string" + ], + "path": "packages/kbn-visualization-utils/src/get_timezone.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/visualization-utils", + "id": "def-common.getTimeZone.$1", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/kbn-visualization-utils/src/get_timezone.ts", + "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_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx new file mode 100644 index 0000000000000..b894706a15c26 --- /dev/null +++ b/api_docs/kbn_visualization_utils.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: kibKbnVisualizationUtilsPluginApi +slug: /kibana-dev-docs/api/kbn-visualization-utils +title: "@kbn/visualization-utils" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/visualization-utils plugin +date: 2023-12-12 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] +--- +import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; + + + +Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 2 | 0 | 1 | 0 | + +## Common + +### Functions + + diff --git a/api_docs/kbn_xstate_utils.devdocs.json b/api_docs/kbn_xstate_utils.devdocs.json index b67854e217961..7c3dbf7d10fdc 100644 --- a/api_docs/kbn_xstate_utils.devdocs.json +++ b/api_docs/kbn_xstate_utils.devdocs.json @@ -62,6 +62,23 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/xstate-utils", + "id": "def-common.getDevToolsOptions", + "type": "Function", + "tags": [], + "label": "getDevToolsOptions", + "description": [], + "signature": [ + "() => boolean | object" + ], + "path": "packages/kbn-xstate-utils/src/dev_tools.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/xstate-utils", "id": "def-common.isDevMode", diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 6e39da5a61c15..ac12938557568 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 0 | 12 | 0 | +| 13 | 0 | 13 | 0 | ## Common diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index de83004bc0934..5ce6e7b48fea5 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index bcf0761e0cca6..9c3cb95e66949 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 6b30dbe5cc63b..fb6a6bf2d9758 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-12-09 +date: 2023-12-12 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 2662da705d37b..2bd874705659f 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-12-09 +date: 2023-12-12 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 3f3ddeef0d13b..5323c75df5963 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-12-09 +date: 2023-12-12 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 9e722c90c498a..7bbce351704eb 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-12-09 +date: 2023-12-12 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 784df4578afda..f0645cfff0727 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-12-09 +date: 2023-12-12 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 7322c9c0db3d1..20cc4ded379fc 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-12-09 +date: 2023-12-12 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 30784529f4b79..1f6bd63c44379 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-12-09 +date: 2023-12-12 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 702c1d46ac2e2..4b9f4ed0531f0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index c70531df36d3f..84e45ad7b56d1 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 03c86f5dbcd3c..980da84e620b5 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/log_explorer.devdocs.json b/api_docs/log_explorer.devdocs.json index 783b558b4505e..3ee4d7802eefa 100644 --- a/api_docs/log_explorer.devdocs.json +++ b/api_docs/log_explorer.devdocs.json @@ -2,494 +2,1975 @@ "id": "logExplorer", "client": { "classes": [], - "functions": [], - "interfaces": [ + "functions": [ { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerCustomizations", - "type": "Interface", + "id": "def-public.getDiscoverColumnsFromDisplayOptions", + "type": "Function", "tags": [], - "label": "LogExplorerCustomizations", + "label": "getDiscoverColumnsFromDisplayOptions", "description": [], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "signature": [ + "(displayOptions: ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + ") => string[] | undefined" + ], + "path": "x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerCustomizations.flyout", + "id": "def-public.getDiscoverColumnsFromDisplayOptions.$1", "type": "Object", "tags": [], - "label": "flyout", + "label": "displayOptions", "description": [], "signature": [ - "{ renderContent?: ", - "FlyoutRenderContent", - " | undefined; } | undefined" + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + } ], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "path": "x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true } ], + "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerFlyoutContentProps", - "type": "Interface", + "id": "def-public.getDiscoverGridFromDisplayOptions", + "type": "Function", "tags": [], - "label": "LogExplorerFlyoutContentProps", + "label": "getDiscoverGridFromDisplayOptions", "description": [], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "signature": [ + "(displayOptions: ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + ") => ", + { + "pluginId": "@kbn/unified-data-table", + "scope": "common", + "docId": "kibKbnUnifiedDataTablePluginApi", + "section": "def-common.UnifiedDataTableSettings", + "text": "UnifiedDataTableSettings" + }, + " | undefined" + ], + "path": "x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerFlyoutContentProps.doc", + "id": "def-public.getDiscoverGridFromDisplayOptions.$1", "type": "Object", "tags": [], - "label": "doc", + "label": "displayOptions", "description": [], "signature": [ - "DataTableRecord" + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + } ], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "path": "x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": true } ], + "returnComment": [], "initialIsOpen": false - }, + } + ], + "interfaces": [ { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerStateContainer", + "id": "def-public.LogExplorerController", "type": "Interface", "tags": [], - "label": "LogExplorerStateContainer", + "label": "LogExplorerController", "description": [], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerStateContainer.appState", + "id": "def-public.LogExplorerController.actions", "type": "Object", "tags": [], - "label": "appState", + "label": "actions", "description": [], "signature": [ - { - "pluginId": "discover", - "scope": "public", - "docId": "kibDiscoverPluginApi", - "section": "def-public.DiscoverAppState", - "text": "DiscoverAppState" - }, - " | undefined" + "{}" ], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerStateContainer.logExplorerState", - "type": "CompoundType", + "id": "def-public.LogExplorerController.customizations", + "type": "Object", "tags": [], - "label": "logExplorerState", + "label": "customizations", "description": [], "signature": [ - "Partial<", - "WithDatasetSelection", - " | (", - "WithDatasetSelection", - " & ", - "WithControlPanels", - ") | (", - "WithDatasetSelection", - " & ", - "WithControlPanelGroupAPI", - " & ", - "WithControlPanels", - ")> | undefined" + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerCustomizations", + "text": "LogExplorerCustomizations" + } ], - "path": "x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [], - "objects": [], - "setup": { - "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerPluginSetup", - "type": "Interface", - "tags": [], - "label": "LogExplorerPluginSetup", - "description": [], - "path": "x-pack/plugins/log_explorer/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerPluginSetup.locators", - "type": "Object", - "tags": [], - "label": "locators", - "description": [], - "signature": [ - "LogExplorerLocators" - ], - "path": "x-pack/plugins/log_explorer/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerPluginStart", - "type": "Interface", - "tags": [], - "label": "LogExplorerPluginStart", - "description": [], - "path": "x-pack/plugins/log_explorer/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "logExplorer", - "id": "def-public.LogExplorerPluginStart.LogExplorer", - "type": "CompoundType", - "tags": [], - "label": "LogExplorer", - "description": [], - "signature": [ - "React.ComponentClass<", - "LogExplorerProps", - ", any> | React.FunctionComponent<", - "LogExplorerProps", - ">" - ], - "path": "x-pack/plugins/log_explorer/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "lifecycle": "start", - "initialIsOpen": true - } - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [ - { - "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection", - "type": "Class", - "tags": [], - "label": "AllDatasetSelection", - "description": [], - "signature": [ - { - "pluginId": "logExplorer", - "scope": "common", - "docId": "kibLogExplorerPluginApi", - "section": "def-common.AllDatasetSelection", - "text": "AllDatasetSelection" }, - " implements ", - "DatasetSelectionStrategy" - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ { "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection.selectionType", - "type": "string", + "id": "def-public.LogExplorerController.datasetsClient", + "type": "Object", "tags": [], - "label": "selectionType", + "label": "datasetsClient", "description": [], "signature": [ - "\"all\"" + "IDatasetsClient" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection.selection", - "type": "Object", + "id": "def-public.LogExplorerController.discoverServices", + "type": "CompoundType", "tags": [], - "label": "selection", + "label": "discoverServices", "description": [], "signature": [ - "{ dataset: ", - "Dataset", + "Pick>, \"data\" | \"history\" | \"uiSettings\" | \"timefilter\" | \"filterManager\"> & { urlStateStorage: ", + { + "pluginId": "kibanaUtils", + "scope": "public", + "docId": "kibKibanaUtilsPluginApi", + "section": "def-public.IKbnUrlStateStorage", + "text": "IKbnUrlStateStorage" + }, "; }" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection.toDataviewSpec", - "type": "Function", + "id": "def-public.LogExplorerController.event$", + "type": "Object", "tags": [], - "label": "toDataviewSpec", + "label": "event$", "description": [], "signature": [ - "() => { id: string; name: string | undefined; title: string | undefined; }" + "Observable", + "" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection.toURLSelectionId", - "type": "Function", + "id": "def-public.LogExplorerController.service", + "type": "Object", "tags": [], - "label": "toURLSelectionId", + "label": "service", "description": [], "signature": [ - "() => string" + "Interpreter", + "<(", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanelGroupAPI", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + "), any, ", + "LogExplorerControllerEvent", + ", ", + "LogExplorerControllerTypeState", + ", ", + "ResolveTypegenMeta", + "<", + "TypegenDisabled", + ", ", + "LogExplorerControllerEvent", + ", ", + "BaseActionObject", + ", ", + "ServiceMap", + ">>" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-common.AllDatasetSelection.create", - "type": "Function", + "id": "def-public.LogExplorerController.state$", + "type": "Object", "tags": [], - "label": "create", + "label": "state$", "description": [], "signature": [ - "() => ", + "Observable", + "<", { "pluginId": "logExplorer", - "scope": "common", + "scope": "public", "docId": "kibLogExplorerPluginApi", - "section": "def-common.AllDatasetSelection", - "text": "AllDatasetSelection" - } + "section": "def-public.LogExplorerPublicState", + "text": "LogExplorerPublicState" + }, + ">" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerController.stateMachine", + "type": "Object", + "tags": [], + "label": "stateMachine", + "description": [], + "signature": [ + "StateMachine", + "<(", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanelGroupAPI", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + "), any, ", + "LogExplorerControllerEvent", + ", ", + "LogExplorerControllerTypeState", + ", ", + "BaseActionObject", + ", ", + "ServiceMap", + ", ", + "ResolveTypegenMeta", + "<", + "TypegenDisabled", + ", ", + "LogExplorerControllerEvent", + ", ", + "BaseActionObject", + ", ", + "ServiceMap", + ">>" + ], + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection", - "type": "Class", + "id": "def-public.LogExplorerCustomizations", + "type": "Interface", "tags": [], - "label": "UnresolvedDatasetSelection", + "label": "LogExplorerCustomizations", "description": [], - "signature": [ - { - "pluginId": "logExplorer", - "scope": "common", - "docId": "kibLogExplorerPluginApi", - "section": "def-common.UnresolvedDatasetSelection", - "text": "UnresolvedDatasetSelection" - }, - " implements ", - "DatasetSelectionStrategy" - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/controller_customizations.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.selectionType", - "type": "string", + "id": "def-public.LogExplorerCustomizations.flyout", + "type": "Object", "tags": [], - "label": "selectionType", + "label": "flyout", "description": [], "signature": [ - "\"unresolved\"" + "{ renderContent?: ", + "RenderContentCustomization", + "<", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerFlyoutContentProps", + "text": "LogExplorerFlyoutContentProps" + }, + "> | undefined; } | undefined" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/controller_customizations.ts", "deprecated": false, "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerFlyoutContentProps", + "type": "Interface", + "tags": [], + "label": "LogExplorerFlyoutContentProps", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerFlyoutContentProps", + "text": "LogExplorerFlyoutContentProps" }, + " extends ", + { + "pluginId": "discover", + "scope": "public", + "docId": "kibDiscoverPluginApi", + "section": "def-public.FlyoutContentProps", + "text": "FlyoutContentProps" + } + ], + "path": "x-pack/plugins/log_explorer/public/controller/controller_customizations.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.selection", + "id": "def-public.LogExplorerFlyoutContentProps.dataView", "type": "Object", "tags": [], - "label": "selection", + "label": "dataView", "description": [], "signature": [ - "{ name?: string | undefined; dataset: ", - "Dataset", - "; }" + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + } ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/controller_customizations.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.toDataviewSpec", - "type": "Function", + "id": "def-public.LogExplorerFlyoutContentProps.doc", + "type": "Object", "tags": [], - "label": "toDataviewSpec", + "label": "doc", "description": [], "signature": [ - "() => { id: string; name: string | undefined; title: string | undefined; }" + "LogDocument" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/controller_customizations.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.CreateLogExplorerController", + "type": "Type", + "tags": [], + "label": "CreateLogExplorerController", + "description": [], + "signature": [ + "({ customizations, initialState, }: { customizations?: ", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerCustomizations", + "text": "LogExplorerCustomizations" }, + " | undefined; initialState?: ", { - "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.toURLSelectionId", - "type": "Function", - "tags": [], - "label": "toURLSelectionId", - "description": [], - "signature": [ - "() => string" - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerPublicStateUpdate", + "text": "LogExplorerPublicStateUpdate" + }, + " | undefined; }) => Promise<", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerController", + "text": "LogExplorerController" }, + ">" + ], + "path": "x-pack/plugins/log_explorer/public/controller/create_controller.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ { "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.fromSelection", - "type": "Function", + "id": "def-public.CreateLogExplorerController.$1", + "type": "Object", "tags": [], - "label": "fromSelection", + "label": "__0", "description": [], "signature": [ - "(selection: { name?: string | undefined; } & { dataset: { name: ", - "Branded", - "; } & { title?: string | undefined; }; }) => ", + "{ customizations?: ", { "pluginId": "logExplorer", - "scope": "common", + "scope": "public", "docId": "kibLogExplorerPluginApi", - "section": "def-common.UnresolvedDatasetSelection", - "text": "UnresolvedDatasetSelection" - } - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.fromSelection.$1", - "type": "CompoundType", - "tags": [], - "label": "selection", - "description": [], - "signature": [ - "{ name?: string | undefined; } & { dataset: { name: ", - "Branded", - "; } & { title?: string | undefined; }; }" - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.create", - "type": "Function", - "tags": [], - "label": "create", - "description": [], - "signature": [ - "(dataset: ", - "Dataset", - ") => ", + "section": "def-public.LogExplorerCustomizations", + "text": "LogExplorerCustomizations" + }, + " | undefined; initialState?: ", { "pluginId": "logExplorer", - "scope": "common", + "scope": "public", "docId": "kibLogExplorerPluginApi", - "section": "def-common.UnresolvedDatasetSelection", - "text": "UnresolvedDatasetSelection" - } + "section": "def-public.LogExplorerPublicStateUpdate", + "text": "LogExplorerPublicStateUpdate" + }, + " | undefined; }" ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "path": "x-pack/plugins/log_explorer/public/controller/create_controller.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "logExplorer", - "id": "def-common.UnresolvedDatasetSelection.create.$1", - "type": "Object", - "tags": [], - "label": "dataset", - "description": [], - "signature": [ - "Dataset" - ], - "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false - } - ], - "functions": [], - "interfaces": [], - "enums": [], + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerControllerContext", + "type": "Type", + "tags": [], + "label": "LogExplorerControllerContext", + "description": [], + "signature": [ + "(", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + ") | (", + "WithDatasetSelection", + " & ", + "WithControlPanelGroupAPI", + " & ", + "WithControlPanels", + " & ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & ", + "WithDiscoverStateContainer", + ")" + ], + "path": "x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPublicState", + "type": "Type", + "tags": [], + "label": "LogExplorerPublicState", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.DisplayOptions", + "text": "DisplayOptions" + }, + " & { controls: ", + "ControlOptions", + "; datasetSelection: { selectionType: \"all\"; } | { selectionType: \"single\"; selection: { name?: string | undefined; } & { title?: string | undefined; } & { version?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | { selectionType: \"unresolved\"; selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; }; }" + ], + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPublicStateUpdate", + "type": "Type", + "tags": [], + "label": "LogExplorerPublicStateUpdate", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.QueryState", + "text": "QueryState" + }, + " & ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.PartialDisplayOptions", + "text": "PartialDisplayOptions" + }, + " & { controls?: ", + "ControlOptions", + " | undefined; datasetSelection?: { selectionType: \"all\"; } | { selectionType: \"single\"; selection: { name?: string | undefined; } & { title?: string | undefined; } & { version?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | { selectionType: \"unresolved\"; selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | undefined; }" + ], + "path": "x-pack/plugins/log_explorer/public/controller/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginSetup", + "type": "Interface", + "tags": [], + "label": "LogExplorerPluginSetup", + "description": [], + "path": "x-pack/plugins/log_explorer/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginSetup.locators", + "type": "Object", + "tags": [], + "label": "locators", + "description": [], + "signature": [ + "LogExplorerLocators" + ], + "path": "x-pack/plugins/log_explorer/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginStart", + "type": "Interface", + "tags": [], + "label": "LogExplorerPluginStart", + "description": [], + "path": "x-pack/plugins/log_explorer/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginStart.LogExplorer", + "type": "CompoundType", + "tags": [], + "label": "LogExplorer", + "description": [], + "signature": [ + "React.ComponentClass<", + "LogExplorerProps", + ", any> | React.FunctionComponent<", + "LogExplorerProps", + ">" + ], + "path": "x-pack/plugins/log_explorer/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginStart.createLogExplorerController", + "type": "Function", + "tags": [], + "label": "createLogExplorerController", + "description": [], + "signature": [ + "({ customizations, initialState, }: { customizations?: ", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerCustomizations", + "text": "LogExplorerCustomizations" + }, + " | undefined; initialState?: ", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerPublicStateUpdate", + "text": "LogExplorerPublicStateUpdate" + }, + " | undefined; }) => Promise<", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerController", + "text": "LogExplorerController" + }, + ">" + ], + "path": "x-pack/plugins/log_explorer/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerPluginStart.createLogExplorerController.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ customizations?: ", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerCustomizations", + "text": "LogExplorerCustomizations" + }, + " | undefined; initialState?: ", + { + "pluginId": "logExplorer", + "scope": "public", + "docId": "kibLogExplorerPluginApi", + "section": "def-public.LogExplorerPublicStateUpdate", + "text": "LogExplorerPublicStateUpdate" + }, + " | undefined; }" + ], + "path": "x-pack/plugins/log_explorer/public/controller/create_controller.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], "misc": [], "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection", + "type": "Class", + "tags": [], + "label": "AllDatasetSelection", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.AllDatasetSelection", + "text": "AllDatasetSelection" + }, + " implements ", + "DatasetSelectionStrategy" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection.selectionType", + "type": "string", + "tags": [], + "label": "selectionType", + "description": [], + "signature": [ + "\"all\"" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection.selection", + "type": "Object", + "tags": [], + "label": "selection", + "description": [], + "signature": [ + "{ dataset: ", + "Dataset", + "; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection.toDataviewSpec", + "type": "Function", + "tags": [], + "label": "toDataviewSpec", + "description": [], + "signature": [ + "() => ", + "DataViewSpecWithId" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection.toPlainSelection", + "type": "Function", + "tags": [], + "label": "toPlainSelection", + "description": [], + "signature": [ + "() => { selectionType: \"all\"; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.AllDatasetSelection.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.AllDatasetSelection", + "text": "AllDatasetSelection" + } + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection", + "type": "Class", + "tags": [], + "label": "UnresolvedDatasetSelection", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.UnresolvedDatasetSelection", + "text": "UnresolvedDatasetSelection" + }, + " implements ", + "DatasetSelectionStrategy" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.selectionType", + "type": "string", + "tags": [], + "label": "selectionType", + "description": [], + "signature": [ + "\"unresolved\"" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.selection", + "type": "Object", + "tags": [], + "label": "selection", + "description": [], + "signature": [ + "{ name?: string | undefined; dataset: ", + "Dataset", + "; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.toDataviewSpec", + "type": "Function", + "tags": [], + "label": "toDataviewSpec", + "description": [], + "signature": [ + "() => ", + "DataViewSpecWithId" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.toPlainSelection", + "type": "Function", + "tags": [], + "label": "toPlainSelection", + "description": [], + "signature": [ + "() => { selectionType: \"unresolved\"; selection: { name: string | undefined; dataset: { name: ", + "Branded", + "; title: string; }; }; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.fromSelection", + "type": "Function", + "tags": [], + "label": "fromSelection", + "description": [], + "signature": [ + "(selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }) => ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.UnresolvedDatasetSelection", + "text": "UnresolvedDatasetSelection" + } + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.fromSelection.$1", + "type": "CompoundType", + "tags": [], + "label": "selection", + "description": [], + "signature": [ + "{ name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "(dataset: ", + "Dataset", + ") => ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.UnresolvedDatasetSelection", + "text": "UnresolvedDatasetSelection" + } + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.UnresolvedDatasetSelection.create.$1", + "type": "Object", + "tags": [], + "label": "dataset", + "description": [], + "signature": [ + "Dataset" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.hydrateDatasetSelection", + "type": "Function", + "tags": [], + "label": "hydrateDatasetSelection", + "description": [], + "signature": [ + "(datasetSelection: { selectionType: \"all\"; } | { selectionType: \"single\"; selection: { name?: string | undefined; } & { title?: string | undefined; } & { version?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | { selectionType: \"unresolved\"; selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; }) => ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.AllDatasetSelection", + "text": "AllDatasetSelection" + }, + " | ", + "SingleDatasetSelection", + " | ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.UnresolvedDatasetSelection", + "text": "UnresolvedDatasetSelection" + } + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.hydrateDatasetSelection.$1", + "type": "CompoundType", + "tags": [], + "label": "datasetSelection", + "description": [], + "signature": [ + "{ selectionType: \"all\"; } | { selectionType: \"single\"; selection: { name?: string | undefined; } & { title?: string | undefined; } & { version?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | { selectionType: \"unresolved\"; selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.ChartDisplayOptions", + "type": "Interface", + "tags": [], + "label": "ChartDisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.ChartDisplayOptions.breakdownField", + "type": "CompoundType", + "tags": [], + "label": "breakdownField", + "description": [], + "signature": [ + "string | null" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.DisplayOptions", + "type": "Interface", + "tags": [], + "label": "DisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.DisplayOptions.grid", + "type": "Object", + "tags": [], + "label": "grid", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridDisplayOptions", + "text": "GridDisplayOptions" + } + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.DisplayOptions.chart", + "type": "Object", + "tags": [], + "label": "chart", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.ChartDisplayOptions", + "text": "ChartDisplayOptions" + } + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridColumnDisplayOptions", + "type": "Interface", + "tags": [], + "label": "GridColumnDisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.GridColumnDisplayOptions.field", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridColumnDisplayOptions.width", + "type": "number", + "tags": [], + "label": "width", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridDisplayOptions", + "type": "Interface", + "tags": [], + "label": "GridDisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.GridDisplayOptions.columns", + "type": "Array", + "tags": [], + "label": "columns", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridColumnDisplayOptions", + "text": "GridColumnDisplayOptions" + }, + "[]" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridDisplayOptions.rows", + "type": "Object", + "tags": [], + "label": "rows", + "description": [], + "signature": [ + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridRowsDisplayOptions", + "text": "GridRowsDisplayOptions" + } + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridRowsDisplayOptions", + "type": "Interface", + "tags": [], + "label": "GridRowsDisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.GridRowsDisplayOptions.rowHeight", + "type": "number", + "tags": [], + "label": "rowHeight", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.GridRowsDisplayOptions.rowsPerPage", + "type": "number", + "tags": [], + "label": "rowsPerPage", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialDisplayOptions", + "type": "Interface", + "tags": [], + "label": "PartialDisplayOptions", + "description": [], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialDisplayOptions.grid", + "type": "Object", + "tags": [], + "label": "grid", + "description": [], + "signature": [ + "Partial & { rows?: Partial<", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridRowsDisplayOptions", + "text": "GridRowsDisplayOptions" + }, + "> | undefined; }> | undefined" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialDisplayOptions.chart", + "type": "Object", + "tags": [], + "label": "chart", + "description": [], + "signature": [ + "Partial<", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.ChartDisplayOptions", + "text": "ChartDisplayOptions" + }, + "> | undefined" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.availableControlPanelFields", + "type": "Array", + "tags": [], + "label": "availableControlPanelFields", + "description": [], + "signature": [ + "\"data_stream.namespace\"[]" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.AvailableControlPanels", + "type": "Type", + "tags": [], + "label": "AvailableControlPanels", + "description": [], + "signature": [ + "{ readonly NAMESPACE: \"data_stream.namespace\"; }" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.ControlPanels", + "type": "Type", + "tags": [], + "label": "ControlPanels", + "description": [], + "signature": [ + "{ [x: string]: { order: number; width: \"small\" | \"medium\" | \"large\"; grow: boolean; type: string; explicitInput: { id: string; } & { dataViewId?: string | undefined; exclude?: boolean | undefined; existsSelected?: boolean | undefined; fieldName?: string | undefined; selectedOptions?: string[] | undefined; title?: string | undefined; }; }; }" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.DatasetSelectionPlain", + "type": "Type", + "tags": [], + "label": "DatasetSelectionPlain", + "description": [], + "signature": [ + "{ selectionType: \"all\"; } | { selectionType: \"single\"; selection: { name?: string | undefined; } & { title?: string | undefined; } & { version?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; } | { selectionType: \"unresolved\"; selection: { name?: string | undefined; } & { dataset: { name: ", + "Branded", + "; } & { title?: string | undefined; }; }; }" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialChartDisplayOptions", + "type": "Type", + "tags": [], + "label": "PartialChartDisplayOptions", + "description": [], + "signature": [ + "{ breakdownField?: string | null | undefined; }" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialGridDisplayOptions", + "type": "Type", + "tags": [], + "label": "PartialGridDisplayOptions", + "description": [], + "signature": [ + "{ columns?: ", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridColumnDisplayOptions", + "text": "GridColumnDisplayOptions" + }, + "[] | undefined; rows?: Partial<", + { + "pluginId": "logExplorer", + "scope": "common", + "docId": "kibLogExplorerPluginApi", + "section": "def-common.GridRowsDisplayOptions", + "text": "GridRowsDisplayOptions" + }, + "> | undefined; }" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.PartialGridRowsDisplayOptions", + "type": "Type", + "tags": [], + "label": "PartialGridRowsDisplayOptions", + "description": [], + "signature": [ + "{ rowHeight?: number | undefined; rowsPerPage?: number | undefined; }" + ], + "path": "x-pack/plugins/log_explorer/common/display_options/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.availableControlsPanels", + "type": "Object", + "tags": [], + "label": "availableControlsPanels", + "description": [], + "signature": [ + "{ readonly NAMESPACE: \"data_stream.namespace\"; }" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs", + "type": "Object", + "tags": [], + "label": "controlPanelConfigs", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE", + "type": "Object", + "tags": [], + "label": "[availableControlsPanels.NAMESPACE]", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.order", + "type": "number", + "tags": [], + "label": "order", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.width", + "type": "string", + "tags": [], + "label": "width", + "description": [], + "signature": [ + "\"medium\"" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.grow", + "type": "boolean", + "tags": [], + "label": "grow", + "description": [], + "signature": [ + "false" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.explicitInput", + "type": "Object", + "tags": [], + "label": "explicitInput", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.explicitInput.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "\"data_stream.namespace\"" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.explicitInput.fieldName", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "signature": [ + "\"data_stream.namespace\"" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.controlPanelConfigs.availableControlsPanels.NAMESPACE.explicitInput.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "x-pack/plugins/log_explorer/common/control_panels/available_control_panels.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.ControlPanelRT", + "type": "Object", + "tags": [], + "label": "ControlPanelRT", + "description": [], + "signature": [ + "RecordC", + "<", + "StringC", + ", ", + "TypeC", + "<{ order: ", + "NumberC", + "; width: ", + "UnionC", + "<[", + "LiteralC", + "<\"medium\">, ", + "LiteralC", + "<\"small\">, ", + "LiteralC", + "<\"large\">]>; grow: ", + "BooleanC", + "; type: ", + "StringC", + "; explicitInput: ", + "IntersectionC", + "<[", + "TypeC", + "<{ id: ", + "StringC", + "; }>, ", + "PartialC", + "<{ dataViewId: ", + "StringC", + "; exclude: ", + "BooleanC", + "; existsSelected: ", + "BooleanC", + "; fieldName: ", + "StringC", + "; selectedOptions: ", + "ArrayC", + "<", + "StringC", + ">; title: ", + "UnionC", + "<[", + "StringC", + ", ", + "UndefinedC", + "]>; }>]>; }>>" + ], + "path": "x-pack/plugins/log_explorer/common/control_panels/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-common.datasetSelectionPlainRT", + "type": "Object", + "tags": [], + "label": "datasetSelectionPlainRT", + "description": [], + "signature": [ + "UnionC", + "<[", + "TypeC", + "<{ selectionType: ", + "LiteralC", + "<\"all\">; }>, ", + "TypeC", + "<{ selectionType: ", + "LiteralC", + "<\"single\">; selection: ", + "IntersectionC", + "<[", + "PartialC", + "<{ name: ", + "StringC", + "; }>, ", + "PartialC", + "<{ title: ", + "StringC", + "; }>, ", + "PartialC", + "<{ version: ", + "StringC", + "; }>, ", + "TypeC", + "<{ dataset: ", + "ExactC", + "<", + "IntersectionC", + "<[", + "TypeC", + "<{ name: ", + "BrandC", + "<", + "StringC", + ", ", + "IndexPatternBrand", + ">; }>, ", + "PartialC", + "<{ title: ", + "StringC", + "; }>]>>; }>]>; }>, ", + "TypeC", + "<{ selectionType: ", + "LiteralC", + "<\"unresolved\">; selection: ", + "IntersectionC", + "<[", + "PartialC", + "<{ name: ", + "StringC", + "; }>, ", + "TypeC", + "<{ dataset: ", + "ExactC", + "<", + "IntersectionC", + "<[", + "TypeC", + "<{ name: ", + "BrandC", + "<", + "StringC", + ", ", + "IndexPatternBrand", + ">; }>, ", + "PartialC", + "<{ title: ", + "StringC", + "; }>]>>; }>]>; }>]>" + ], + "path": "x-pack/plugins/log_explorer/common/dataset_selection/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/log_explorer.mdx b/api_docs/log_explorer.mdx index fba0ccb9d0ba7..feb63b78cca66 100644 --- a/api_docs/log_explorer.mdx +++ b/api_docs/log_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logExplorer title: "logExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logExplorer plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logExplorer'] --- import logExplorerObj from './log_explorer.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 26 | 0 | 26 | 8 | +| 83 | 0 | 83 | 16 | ## Client @@ -31,11 +31,29 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux ### Start +### Functions + + ### Interfaces +### Consts, variables and types + + ## Common +### Objects + + +### Functions + + ### Classes +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 912f372abd23f..4331309050423 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 4565719b504c5..64c9199c5fcad 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-12-09 +date: 2023-12-12 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 23f4d97df9eb5..388eba40bb42b 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-12-09 +date: 2023-12-12 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 68616c5cd907b..b1cad805c2640 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 320fa37b4d601..82f3d077905ba 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 6236450f0b719..3a40b68ca787a 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 222edbcb1b345..f4ab1a345e083 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 82b022ae336a9..022fbfcb957e7 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-12-09 +date: 2023-12-12 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 c991837ecffbf..243e03eee0d85 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-12-09 +date: 2023-12-12 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 9e398d80c2128..17338b007aaa3 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-12-09 +date: 2023-12-12 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 8f018cf770160..55339d01f3324 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 217f92cde9d47..88400e8460137 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 468c5852c2191..eb369dd29489d 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 7bb2bdf2d447e..baf5a08612c64 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 6cd6b71542d37..aa71136564b9f 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_log_explorer.devdocs.json b/api_docs/observability_log_explorer.devdocs.json index cbf4d68df4200..d53269feabf30 100644 --- a/api_docs/observability_log_explorer.devdocs.json +++ b/api_docs/observability_log_explorer.devdocs.json @@ -283,7 +283,41 @@ "initialIsOpen": false } ], - "functions": [], + "functions": [ + { + "parentPluginId": "observabilityLogExplorer", + "id": "def-common.deepCompactObject", + "type": "Function", + "tags": [], + "label": "deepCompactObject", + "description": [], + "signature": [ + ">(obj: Value) => Value" + ], + "path": "x-pack/plugins/observability_log_explorer/common/utils/deep_compact_object.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observabilityLogExplorer", + "id": "def-common.deepCompactObject.$1", + "type": "Uncategorized", + "tags": [], + "label": "obj", + "description": [], + "signature": [ + "Value" + ], + "path": "x-pack/plugins/observability_log_explorer/common/utils/deep_compact_object.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [ { "parentPluginId": "observabilityLogExplorer", @@ -359,7 +393,23 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "observabilityLogExplorer", + "id": "def-common.OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY", + "type": "string", + "tags": [], + "label": "OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY", + "description": [], + "signature": [ + "\"pageState\"" + ], + "path": "x-pack/plugins/observability_log_explorer/common/url_schema/common.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], "objects": [] } } \ No newline at end of file diff --git a/api_docs/observability_log_explorer.mdx b/api_docs/observability_log_explorer.mdx index 7d8a0ca3036cd..0a083e1df4dff 100644 --- a/api_docs/observability_log_explorer.mdx +++ b/api_docs/observability_log_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogExplorer title: "observabilityLogExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogExplorer plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogExplorer'] --- import observabilityLogExplorerObj from './observability_log_explorer.devdocs.json'; @@ -21,13 +21,19 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 15 | 0 | 15 | 1 | +| 18 | 0 | 18 | 1 | ## Common +### Functions + + ### Classes ### Interfaces +### Consts, variables and types + + diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 16d855df483fb..e092153ffaa9a 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index cd31dabbbfb5f..67f86e79f8b59 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 4b812f7d2754d..8726d34530569 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 3643e88ec5f6a..1ffafc171a826 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 0cc948bd40d2f..dc96c61bd5286 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-12-09 +date: 2023-12-12 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 | |--------------|----------|------------------------| -| 734 | 624 | 40 | +| 735 | 625 | 40 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 77577 | 235 | 66303 | 1624 | +| 77645 | 235 | 66370 | 1632 | ## Plugin Directory @@ -58,7 +58,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 268 | 0 | 249 | 1 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 109 | 0 | 106 | 11 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 54 | 0 | 51 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3190 | 31 | 2539 | 22 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3188 | 31 | 2537 | 22 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 35 | 0 | 25 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Reusable data view field editor across Kibana | 72 | 0 | 33 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data view management app | 2 | 0 | 2 | 0 | @@ -126,7 +126,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | A dashboard panel for creating links to dashboards or external links. | 57 | 0 | 57 | 6 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 224 | 0 | 96 | 51 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 26 | 0 | 26 | 8 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 83 | 0 | 83 | 16 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 289 | 11 | 274 | 27 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 45 | 0 | 45 | 7 | @@ -143,7 +143,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 599 | 2 | 590 | 17 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 91 | 0 | 86 | 12 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 15 | 0 | 15 | 1 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 18 | 0 | 18 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 14 | 0 | 14 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 307 | 1 | 303 | 15 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 24 | 0 | 24 | 7 | @@ -435,7 +435,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 5 | 0 | 5 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 29 | 0 | 19 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 31 | 0 | 21 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 8 | 0 | 8 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 8 | 0 | @@ -458,7 +458,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 48 | 0 | 33 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 27 | 0 | 14 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 261 | 1 | 201 | 15 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 266 | 1 | 206 | 15 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 19 | 0 | 19 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | @@ -677,7 +677,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 24 | 0 | 14 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 154 | 0 | 151 | 3 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 12 | 0 | 12 | 0 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 2 | 0 | 1 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 13 | 0 | 13 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 2 | 0 | | | [@elastic/security-detection-rule-management](https://github.com/orgs/elastic/teams/security-detection-rule-management) | - | 18 | 0 | 9 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 277517663f2dc..b87a4261273b0 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-12-09 +date: 2023-12-12 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 e531f71f8b4f9..38e0290ab3d53 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index f5f8f2d93a2eb..b967b28840ff6 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index e87c3b5692b5a..270da85d20152 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-12-09 +date: 2023-12-12 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 01034eefcd92e..a253ab3c4f5d3 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-12-09 +date: 2023-12-12 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 6777623d8a34b..a5692455eb0da 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index bba305adab65d..27a07ef1a1bde 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index cb7c9c2c3ac45..e4ab448202ea7 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-12-09 +date: 2023-12-12 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 42392acbaf394..31f02f28e964d 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-12-09 +date: 2023-12-12 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 ebee088611ca4..ae850aa22f7b4 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-12-09 +date: 2023-12-12 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 acc620dee995e..1e161cf113e76 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-12-09 +date: 2023-12-12 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 0361bfbed1016..05c27d6b4ec69 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-12-09 +date: 2023-12-12 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 2d623ba5fa178..f8fb4cbb94228 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-12-09 +date: 2023-12-12 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 6a2e617d16529..9e4b5009cdb04 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-12-09 +date: 2023-12-12 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 0bc657f3be552..0967766e1373b 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-12-09 +date: 2023-12-12 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 f9e8db0ad8463..78d682dded423 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-12-09 +date: 2023-12-12 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 430dfdaed4292..19c5aed49e868 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 3bf005921e3e0..adc5cbf7a813e 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 5a44853844838..cb06973b86516 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index 2bd0521f48594..25f0cb0540462 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 9eb213c295713..c617f6b7995d9 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 774fc8fe45e89..abdd7bd77e71a 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 2fcff1992c425..588c0695d512a 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 3575d5e40352a..c2a43855d4a90 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-12-09 +date: 2023-12-12 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 293a17979b8dd..9705679dcc486 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-12-09 +date: 2023-12-12 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 50a913a0b3233..2f7ec94ad9ae8 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index c314aa20ff469..d940ab171c7cb 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 0cda3a7c0f881..0f9dff40f0535 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-12-09 +date: 2023-12-12 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 408a8afffea80..c1a11e161c61b 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-12-09 +date: 2023-12-12 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 834de65bcf4f4..9998f4168ffaa 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-12-09 +date: 2023-12-12 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 f687abb87dcc1..f525144a06e31 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-12-09 +date: 2023-12-12 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 438abab1e3264..d581904745312 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-12-09 +date: 2023-12-12 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 0a67d947bcc5f..583ccd42f2f10 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-12-09 +date: 2023-12-12 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 e864f47016934..9835cac4f487f 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index aa2acaa5b75f4..a3dba771e1c0f 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index ae093eea63dd1..a62d7936ee287 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 2231ebb494fb2..15e0d1e44b1f5 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-12-09 +date: 2023-12-12 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 7e0aad86ceb59..4022dd9cac77c 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index d48b38c065e1a..1d0bb9d20abb0 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 23c89958cd3b0..8f969282e3b87 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-12-09 +date: 2023-12-12 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 a41fc3a48590e..58cea0ec01e3f 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index 90f479eabb643..7fb4f2d099c2d 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index e8fa4edbb1e85..b847573385d24 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-12-09 +date: 2023-12-12 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 c25ec0db354be..2ffc63097eed0 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-12-09 +date: 2023-12-12 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 b51167ebc8196..822281e69b874 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index cc4124f200931..9793e67790295 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2023-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 642dd264d0fc4..28c70be8b2d5e 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-12-09 +date: 2023-12-12 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 145d0cc6a37e9..9c6e6f5ccd920 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-12-09 +date: 2023-12-12 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 0ae7433bc054a..7bd6280c4f677 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-12-09 +date: 2023-12-12 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 9299c4828680a..2f711a2750005 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-12-09 +date: 2023-12-12 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 6d760a8496d6f..23cd7ac542130 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-12-09 +date: 2023-12-12 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 5593249395e8e..c52738a68c773 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-12-09 +date: 2023-12-12 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 4e1f15c02a03d..1d6ce54d0762b 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-12-09 +date: 2023-12-12 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 bc4862c32ae16..da2009b3d06d8 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-12-09 +date: 2023-12-12 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 e278de193090f..b8993f1e2abad 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-12-09 +date: 2023-12-12 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 ec848b880be39..24ab468403b68 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-12-09 +date: 2023-12-12 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 0112869eb9484..7fac6e9964c34 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-12-09 +date: 2023-12-12 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 b10e349195573..cfd6e62dde05b 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-12-09 +date: 2023-12-12 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 305220c91ee0e..37771240973ff 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index afb31e9580446..a3d45a2b139d9 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -6718,49 +6718,7 @@ "section": "def-common.OverlayRef", "text": "OverlayRef" }, - " | undefined; render: (domNode: HTMLElement) => Promise; getFilters: () => Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]>; reportsEmbeddableLoad: () => boolean; getVis: () => ", - { - "pluginId": "visualizations", - "scope": "public", - "docId": "kibVisualizationsPluginApi", - "section": "def-public.Vis", - "text": "Vis" - }, - "<", - { - "pluginId": "visualizations", - "scope": "common", - "docId": "kibVisualizationsPluginApi", - "section": "def-common.VisParams", - "text": "VisParams" - }, - ">; getInspectorAdapters: () => ", - { - "pluginId": "inspector", - "scope": "common", - "docId": "kibInspectorPluginApi", - "section": "def-common.Adapters", - "text": "Adapters" - }, - " | undefined; transferCustomizationsToUiState: () => void; hasInspector: () => boolean; onContainerLoading: () => void; onContainerData: () => void; onContainerRender: () => void; onContainerError: (error: ", - { - "pluginId": "expressions", - "scope": "public", - "docId": "kibExpressionsPluginApi", - "section": "def-public.ExpressionRenderError", - "text": "ExpressionRenderError" - }, - ") => void; reload: () => Promise; supportedTriggers: () => string[]; getExpressionVariables$: () => ", - "Observable", - " | undefined>; getExpressionVariables: () => Record | undefined; inputIsRefType: (input: ", + " | undefined; render: (domNode: HTMLElement) => Promise; readonly isContainer: boolean; reload: () => Promise; getExplicitInputIsEqual: (lastExplicitInput: Partial<", { "pluginId": "visualizations", "scope": "public", @@ -6768,13 +6726,7 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - ") => input is ", - "VisualizeByReferenceInput", - "; getInputAsValueType: () => Promise<", - "VisualizeByValueInput", - ">; getInputAsRefType: () => Promise<", - "VisualizeByReferenceInput", - ">; readonly runtimeId: number; readonly isContainer: boolean; readonly deferEmbeddableLoad: boolean; catchError?: ((error: ", + ">) => Promise; readonly runtimeId: number; readonly deferEmbeddableLoad: boolean; catchError?: ((error: ", { "pluginId": "expressions", "scope": "common", @@ -6790,7 +6742,7 @@ "section": "def-public.EmbeddableAppContext", "text": "EmbeddableAppContext" }, - " | undefined; refreshInputFromParent: () => void; getIsContainer: () => this is ", + " | undefined; reportsEmbeddableLoad: () => boolean; refreshInputFromParent: () => void; getIsContainer: () => this is ", { "pluginId": "embeddable", "scope": "public", @@ -6842,15 +6794,7 @@ "VisualizeOutput", ">>; getOutput: () => Readonly<", "VisualizeOutput", - ">; getExplicitInputIsEqual: (lastExplicitInput: Partial<", - { - "pluginId": "visualizations", - "scope": "public", - "docId": "kibVisualizationsPluginApi", - "section": "def-public.VisualizeInput", - "text": "VisualizeInput" - }, - ">) => Promise; getPersistableInput: () => ", + ">; getPersistableInput: () => ", { "pluginId": "visualizations", "scope": "public", @@ -6922,9 +6866,65 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - ">) => void; updateOutput: (outputChanges: Partial<", + ">) => void; getInspectorAdapters: () => ", + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Adapters", + "text": "Adapters" + }, + " | undefined; updateOutput: (outputChanges: Partial<", "VisualizeOutput", - ">) => void; }" + ">) => void; supportedTriggers: () => string[]; getFilters: () => Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]>; getVis: () => ", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.Vis", + "text": "Vis" + }, + "<", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.VisParams", + "text": "VisParams" + }, + ">; transferCustomizationsToUiState: () => void; hasInspector: () => boolean; onContainerLoading: () => void; onContainerData: () => void; onContainerRender: () => void; onContainerError: (error: ", + { + "pluginId": "expressions", + "scope": "public", + "docId": "kibExpressionsPluginApi", + "section": "def-public.ExpressionRenderError", + "text": "ExpressionRenderError" + }, + ") => void; getExpressionVariables$: () => ", + "Observable", + " | undefined>; getExpressionVariables: () => Record | undefined; inputIsRefType: (input: ", + { + "pluginId": "visualizations", + "scope": "public", + "docId": "kibVisualizationsPluginApi", + "section": "def-public.VisualizeInput", + "text": "VisualizeInput" + }, + ") => input is ", + "VisualizeByReferenceInput", + "; getInputAsValueType: () => Promise<", + "VisualizeByValueInput", + ">; getInputAsRefType: () => Promise<", + "VisualizeByReferenceInput", + ">; }" ], "path": "src/plugins/visualizations/public/index.ts", "deprecated": false, @@ -8585,14 +8585,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/visualizations/common/expression_functions/range.ts", @@ -14644,14 +14636,6 @@ "section": "def-common.Adapters", "text": "Adapters" }, - ", ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.SerializableRecord", - "text": "SerializableRecord" - }, ">>" ], "path": "src/plugins/visualizations/common/expression_functions/vis_dimension.ts", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 0d0b626299d02..e155644ee2e1e 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-12-09 +date: 2023-12-12 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/dev_docs/shared_ux/shared_ux_landing.mdx b/dev_docs/shared_ux/shared_ux_landing.mdx new file mode 100644 index 0000000000000..2b6bc7661dedd --- /dev/null +++ b/dev_docs/shared_ux/shared_ux_landing.mdx @@ -0,0 +1,70 @@ +--- +id: kibDevDocsSharedUxOverview +slug: /kibana-dev-docs/shared-ux +title: Shared UX Team +description: Links to all the documentation maintained by the Shared UX team. +tags: ['kibana', 'dev', 'shared-ux'] +layout: landing +--- + + + + + + diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index edff2531ab96f..6ff5cef8300e6 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -10,6 +10,7 @@ Review important information about the {kib} 8.x releases. +* <> * <> * <> * <> @@ -55,6 +56,25 @@ Review important information about the {kib} 8.x releases. * <> -- +[[release-notes-8.11.3]] +== {kib} 8.11.3 + +The 8.11.3 release includes the following bug fixes. + +[float] +[[fixes-v8.11.3]] +=== Bug Fixes +Elastic Security:: +For the Elastic Security 8.11.3 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_]. +Fleet:: +* Fixes a 500 error in the Fleet API when a request for the product versions endpoint throws `ECONNREFUSED` ({kibana-pull}172850[#172850]). +* Fixes agent policy timeout to accept only integers ({kibana-pull}172222[#172222]). +Machine Learning:: +* Fixes data drift numeric fields not displaying correctly ({kibana-pull}172504[#172504]). +* Fixes Data visualizer, ML field stats, and Data Frame Analytics so the `_tier` field can be excluded ({kibana-pull}172223[#172223]). +Operations:: +* Fixes an issue where running `kibana-keystore` commands required `kibana.yml` to exist ({kibana-pull}172943[#172943]). + [[release-notes-8.11.2]] == {kib} 8.11.2 @@ -105,7 +125,7 @@ SharedUX:: * Fixes the custom threshold document link ({kibana-pull}171125[#171125]). Uptime:: * Fixes advanced fields broken for ICMP monitors ({kibana-pull}171161[#171161]). - +Ê [[release-notes-8.11.1]] == {kib} 8.11.1 diff --git a/docs/canvas/canvas-tutorial.asciidoc b/docs/canvas/canvas-tutorial.asciidoc index f8d2297df18b9..5016dbec88aac 100644 --- a/docs/canvas/canvas-tutorial.asciidoc +++ b/docs/canvas/canvas-tutorial.asciidoc @@ -121,7 +121,7 @@ To focus your data on a specific time range, add the time filter. . To use the date time field from the sample data, enter `order_date` in the *Column* field, then click *Set*. [role="screenshot"] -image::images/canvas_tutorialCustomTimeFilter_7.17.0.png[Custom time filter added to the workpad] +image::../setup/images/canvas_tutorialCustomTimeFilter_7.17.0.png[Custom time filter added to the workpad] To see how the data changes, set the time filter to *Last 7 days*. As you change the time filter options, the elements automatically update. diff --git a/docs/canvas/images/canvas_tutorialCustomTimeFilter_7.17.0.png b/docs/canvas/images/canvas_tutorialCustomTimeFilter_7.17.0.png deleted file mode 100644 index 7eb78efa5f591..0000000000000 Binary files a/docs/canvas/images/canvas_tutorialCustomTimeFilter_7.17.0.png and /dev/null differ diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index b724286d5bac3..d4eb3aaba6dd9 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -25,15 +25,6 @@ } ] }, - { - "label": "Operations", - "items": [ - { - "id": "kibDevDocsOpsOverview", - "label": "Overview" - } - ] - }, { "label": "Contributing", "items": [ @@ -149,9 +140,6 @@ { "id": "kibDevTutorialExpressions" }, - { - "id": "kibDevDocsKPTTutorial" - }, { "id": "kibDevTutorialDataSearchAndSessions", "label": "data.search" @@ -178,15 +166,21 @@ }, { "id": "kibDevTutorialAdvancedSettings" - }, + } + ] + }, + { + "label": "Serverless", + "pageId": "ktServerlessReleaseOverview", + "items": [ { - "id": "kibDevSharePluginReadme" + "id": "ktServerlessReleaseOverview" }, { - "id": "kibDevTutorialScreenshotting" + "id": "ktServerlessEmergencyReleases" }, { - "id": "kibDevTutorialsContentManagementOnboarding" + "id": "ktCustomServerlessImage" }, { "id": "kibDevTutorialsServerlessProjectNavigation" @@ -194,16 +188,54 @@ ] }, { - "label": "Serverless", + "label": "Operations", "items": [ { - "id": "ktServerlessReleaseOverview" + "id": "kibDevDocsOpsOverview", + "label": "Overview" + } + ] + }, + { + "label": "Shared UX", + "pageId": "kibDevDocsSharedUxOverview", + "items": [ + { + "label": "Serverless Project Navigation", + "id": "kibDevTutorialsServerlessProjectNavigation" }, { - "id": "ktServerlessEmergencyReleases" + "id": "kibDevTutorialFileService", + "label": "File service" }, { - "id": "ktCustomServerlessImage" + "id": "kibDevSharePluginReadme", + "label": "Sharing" + }, + { + "label": "Content Management", + "id": "kibContentManagement", + "items": [ + { + "id": "kibDevTutorialsContentManagementOnboarding" + } + ] + }, + { + "id": "kibDevTutorialScreenshotting", + "label": "Screenshotting" + }, + { + "id": "kibDevTutorialAdvancedSettings", + "label": "Advanced Settings" + }, + { + "id": "kibDevDocsKPTTutorial", + "label": "Kibana Page Template" + }, + { + "id": "kibDevReactKibanaContext", + "label": "Kibana React Contexts" } ] }, diff --git a/package.json b/package.json index 0dc43e5caa617..fb2a1d3dcf794 100644 --- a/package.json +++ b/package.json @@ -842,6 +842,7 @@ "@kbn/vis-type-vislib-plugin": "link:src/plugins/vis_types/vislib", "@kbn/vis-type-xy-plugin": "link:src/plugins/vis_types/xy", "@kbn/visualization-ui-components": "link:packages/kbn-visualization-ui-components", + "@kbn/visualization-utils": "link:packages/kbn-visualization-utils", "@kbn/visualizations-plugin": "link:src/plugins/visualizations", "@kbn/watcher-plugin": "link:x-pack/plugins/watcher", "@kbn/xstate-utils": "link:packages/kbn-xstate-utils", diff --git a/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.test.ts b/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.test.ts index b30082e62c653..30e8188dd6af9 100644 --- a/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.test.ts +++ b/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.test.ts @@ -7,11 +7,13 @@ */ import { getDocLinksMock, getDocLinksMetaMock } from './doc_links_service.test.mocks'; +import { coreContextMock } from '@kbn/core-base-browser-mocks'; import { DocLinksService } from './doc_links_service'; import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks'; describe('DocLinksService', () => { let injectedMetadata: ReturnType; + let coreContext: ReturnType; let service: DocLinksService; beforeEach(() => { @@ -26,7 +28,8 @@ describe('DocLinksService', () => { settings: 'http://settings.test.url', }); - service = new DocLinksService(); + coreContext = coreContextMock.create(); + service = new DocLinksService(coreContext); }); afterEach(() => { @@ -43,6 +46,7 @@ describe('DocLinksService', () => { expect(getDocLinksMetaMock).toHaveBeenCalledTimes(1); expect(getDocLinksMetaMock).toHaveBeenCalledWith({ kibanaBranch: 'test-branch', + buildFlavor: coreContext.env.packageInfo.buildFlavor, }); }); @@ -64,6 +68,7 @@ describe('DocLinksService', () => { expect(getDocLinksMock).toHaveBeenCalledTimes(1); expect(getDocLinksMock).toHaveBeenCalledWith({ kibanaBranch: 'test-branch', + buildFlavor: coreContext.env.packageInfo.buildFlavor, }); }); diff --git a/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.ts b/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.ts index 115d41e1ee930..a5d6fe17ddf63 100644 --- a/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.ts +++ b/packages/core/doc-links/core-doc-links-browser-internal/src/doc_links_service.ts @@ -7,6 +7,7 @@ */ import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links'; +import type { CoreContext } from '@kbn/core-base-browser-internal'; import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; @@ -17,12 +18,15 @@ export interface DocLinksServiceStartDeps { /** @internal */ export class DocLinksService { + constructor(private readonly coreContext: CoreContext) {} + public setup() {} public start({ injectedMetadata }: DocLinksServiceStartDeps): DocLinksStart { const kibanaBranch = injectedMetadata.getKibanaBranch(); - const docMeta = getDocLinksMeta({ kibanaBranch }); - const docLinks = getDocLinks({ kibanaBranch }); + const buildFlavor = this.coreContext.env.packageInfo.buildFlavor; + const docMeta = getDocLinksMeta({ kibanaBranch, buildFlavor }); + const docLinks = getDocLinks({ kibanaBranch, buildFlavor }); return { DOC_LINK_VERSION: docMeta.version, diff --git a/packages/core/doc-links/core-doc-links-browser-internal/tsconfig.json b/packages/core/doc-links/core-doc-links-browser-internal/tsconfig.json index dda4c975120d7..45980da56c3da 100644 --- a/packages/core/doc-links/core-doc-links-browser-internal/tsconfig.json +++ b/packages/core/doc-links/core-doc-links-browser-internal/tsconfig.json @@ -15,6 +15,8 @@ "@kbn/core-injected-metadata-browser-internal", "@kbn/core-doc-links-browser", "@kbn/core-injected-metadata-browser-mocks", + "@kbn/core-base-browser-mocks", + "@kbn/core-base-browser-internal", ], "exclude": [ "target/**/*", diff --git a/packages/core/doc-links/core-doc-links-browser-mocks/src/doc_links_service.mock.ts b/packages/core/doc-links/core-doc-links-browser-mocks/src/doc_links_service.mock.ts index 03c394aa926e8..ef62bd97eca19 100644 --- a/packages/core/doc-links/core-doc-links-browser-mocks/src/doc_links_service.mock.ts +++ b/packages/core/doc-links/core-doc-links-browser-mocks/src/doc_links_service.mock.ts @@ -7,6 +7,7 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; +import { coreContextMock } from '@kbn/core-base-browser-mocks'; import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import { DocLinksService } from '@kbn/core-doc-links-browser-internal'; @@ -15,7 +16,7 @@ const createStartContractMock = (): DocLinksStart => { // This service is so simple that we actually use the real implementation const injectedMetadata = injectedMetadataServiceMock.createStartContract(); injectedMetadata.getKibanaBranch.mockReturnValue('mocked-test-branch'); - return new DocLinksService().start({ injectedMetadata }); + return new DocLinksService(coreContextMock.create()).start({ injectedMetadata }); }; type DocLinksServiceContract = PublicMethodsOf; diff --git a/packages/core/doc-links/core-doc-links-browser-mocks/tsconfig.json b/packages/core/doc-links/core-doc-links-browser-mocks/tsconfig.json index 473ae750e67ee..e60609b94a11b 100644 --- a/packages/core/doc-links/core-doc-links-browser-mocks/tsconfig.json +++ b/packages/core/doc-links/core-doc-links-browser-mocks/tsconfig.json @@ -14,7 +14,8 @@ "@kbn/utility-types", "@kbn/core-injected-metadata-browser-mocks", "@kbn/core-doc-links-browser", - "@kbn/core-doc-links-browser-internal" + "@kbn/core-doc-links-browser-internal", + "@kbn/core-base-browser-mocks" ], "exclude": [ "target/**/*", diff --git a/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.test.ts b/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.test.ts index 6b7c7d3b33f3a..13c75fa0f6d25 100644 --- a/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.test.ts +++ b/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.test.ts @@ -41,6 +41,7 @@ describe('DocLinksService', () => { expect(getDocLinksMetaMock).toHaveBeenCalledTimes(1); expect(getDocLinksMetaMock).toHaveBeenCalledWith({ kibanaBranch: coreContext.env.packageInfo.branch, + buildFlavor: coreContext.env.packageInfo.buildFlavor, }); }); @@ -62,6 +63,7 @@ describe('DocLinksService', () => { expect(getDocLinksMock).toHaveBeenCalledTimes(1); expect(getDocLinksMock).toHaveBeenCalledWith({ kibanaBranch: coreContext.env.packageInfo.branch, + buildFlavor: coreContext.env.packageInfo.buildFlavor, }); }); diff --git a/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.ts b/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.ts index 3201bcd0256a4..ae11657666864 100644 --- a/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.ts +++ b/packages/core/doc-links/core-doc-links-server-internal/src/doc_links_service.ts @@ -12,16 +12,16 @@ import type { DocLinksServiceSetup, DocLinksServiceStart } from '@kbn/core-doc-l /** @internal */ export class DocLinksService { - private readonly kibanaBranch: string; private docLinks?: DocLinksServiceSetup; - constructor(core: CoreContext) { - this.kibanaBranch = core.env.packageInfo.branch; - } + constructor(private readonly coreContext: CoreContext) {} public setup(): DocLinksServiceSetup { - const docMeta = getDocLinksMeta({ kibanaBranch: this.kibanaBranch }); - const docLinks = getDocLinks({ kibanaBranch: this.kibanaBranch }); + const kibanaBranch = this.coreContext.env.packageInfo.branch; + const buildFlavor = this.coreContext.env.packageInfo.buildFlavor; + + const docMeta = getDocLinksMeta({ kibanaBranch, buildFlavor }); + const docLinks = getDocLinks({ kibanaBranch, buildFlavor }); this.docLinks = { ...docMeta, links: docLinks, diff --git a/packages/core/doc-links/core-doc-links-server-mocks/src/doc_links_service.mock.ts b/packages/core/doc-links/core-doc-links-server-mocks/src/doc_links_service.mock.ts index d43c14c7fe8c3..b0ed04298dd1c 100644 --- a/packages/core/doc-links/core-doc-links-server-mocks/src/doc_links_service.mock.ts +++ b/packages/core/doc-links/core-doc-links-server-mocks/src/doc_links_service.mock.ts @@ -15,9 +15,10 @@ type DocLinksServiceContract = PublicMethodsOf; const createSetupMock = (): DocLinksServiceSetup => { const branch = 'test-branch'; + const buildFlavor = 'traditional'; return { - ...getDocLinksMeta({ kibanaBranch: branch }), - links: getDocLinks({ kibanaBranch: branch }), + ...getDocLinksMeta({ kibanaBranch: branch, buildFlavor }), + links: getDocLinks({ kibanaBranch: branch, buildFlavor }), }; }; diff --git a/packages/core/root/core-root-browser-internal/src/core_system.ts b/packages/core/root/core-root-browser-internal/src/core_system.ts index 3dcef6e3858cd..4c50aaf640e2a 100644 --- a/packages/core/root/core-root-browser-internal/src/core_system.ts +++ b/packages/core/root/core-root-browser-internal/src/core_system.ts @@ -141,7 +141,7 @@ export class CoreSystem { browserSupportsCsp, kibanaVersion: injectedMetadata.version, }); - this.docLinks = new DocLinksService(); + this.docLinks = new DocLinksService(this.coreContext); this.rendering = new RenderingService(); this.application = new ApplicationService(); this.integrations = new IntegrationsService(); diff --git a/packages/core/test-helpers/core-test-helpers-model-versions/src/test_bed/test_kit.ts b/packages/core/test-helpers/core-test-helpers-model-versions/src/test_bed/test_kit.ts index 93517ea3b33a6..ee33208d793c2 100644 --- a/packages/core/test-helpers/core-test-helpers-model-versions/src/test_bed/test_kit.ts +++ b/packages/core/test-helpers/core-test-helpers-model-versions/src/test_bed/test_kit.ts @@ -9,7 +9,7 @@ import fs from 'fs/promises'; import { defaultsDeep } from 'lodash'; import { BehaviorSubject, firstValueFrom, map } from 'rxjs'; -import { ConfigService, Env } from '@kbn/config'; +import { ConfigService, Env, BuildFlavor } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; import { REPO_ROOT } from '@kbn/repo-info'; import { KibanaMigrator } from '@kbn/core-saved-objects-migration-server-internal'; @@ -216,6 +216,7 @@ const getMigrator = async ({ loggerFactory, kibanaVersion, kibanaBranch, + buildFlavor = 'traditional', nodeRoles, }: { configService: ConfigService; @@ -226,6 +227,7 @@ const getMigrator = async ({ loggerFactory: LoggerFactory; kibanaVersion: string; kibanaBranch: string; + buildFlavor?: BuildFlavor; nodeRoles: NodeRoles; }) => { const savedObjectsConf = await firstValueFrom( @@ -237,8 +239,8 @@ const getMigrator = async ({ const soConfig = new SavedObjectConfig(savedObjectsConf, savedObjectsMigrationConf); const docLinks: DocLinksServiceStart = { - ...getDocLinksMeta({ kibanaBranch }), - links: getDocLinks({ kibanaBranch }), + ...getDocLinksMeta({ kibanaBranch, buildFlavor }), + links: getDocLinks({ kibanaBranch, buildFlavor }), }; const esCapabilities = await getCapabilitiesFromClient(client); diff --git a/packages/deeplinks/observability/constants.ts b/packages/deeplinks/observability/constants.ts index a28c9e4aaff21..9f2a28fcef971 100644 --- a/packages/deeplinks/observability/constants.ts +++ b/packages/deeplinks/observability/constants.ts @@ -8,7 +8,7 @@ export const LOGS_APP_ID = 'logs'; -export const OBSERVABILITY_LOG_EXPLORER = 'observability-log-explorer'; +export const OBSERVABILITY_LOG_EXPLORER_APP_ID = 'observability-log-explorer'; export const OBSERVABILITY_OVERVIEW_APP_ID = 'observability-overview'; diff --git a/packages/deeplinks/observability/deep_links.ts b/packages/deeplinks/observability/deep_links.ts index 844d68fdb27cc..831976bcc37ea 100644 --- a/packages/deeplinks/observability/deep_links.ts +++ b/packages/deeplinks/observability/deep_links.ts @@ -7,16 +7,16 @@ */ import { + APM_APP_ID, LOGS_APP_ID, - OBSERVABILITY_LOG_EXPLORER, - OBSERVABILITY_OVERVIEW_APP_ID, METRICS_APP_ID, - APM_APP_ID, + OBSERVABILITY_LOG_EXPLORER_APP_ID, OBSERVABILITY_ONBOARDING_APP_ID, + OBSERVABILITY_OVERVIEW_APP_ID, } from './constants'; type LogsApp = typeof LOGS_APP_ID; -type ObservabilityLogExplorerApp = typeof OBSERVABILITY_LOG_EXPLORER; +type ObservabilityLogExplorerApp = typeof OBSERVABILITY_LOG_EXPLORER_APP_ID; type ObservabilityOverviewApp = typeof OBSERVABILITY_OVERVIEW_APP_ID; type MetricsApp = typeof METRICS_APP_ID; type ApmApp = typeof APM_APP_ID; diff --git a/packages/deeplinks/observability/index.ts b/packages/deeplinks/observability/index.ts index 81dac13f6b6a0..3d816db884765 100644 --- a/packages/deeplinks/observability/index.ts +++ b/packages/deeplinks/observability/index.ts @@ -7,12 +7,10 @@ */ export { - OBSERVABILITY_ONBOARDING_APP_ID, LOGS_APP_ID, - OBSERVABILITY_LOG_EXPLORER, + OBSERVABILITY_LOG_EXPLORER_APP_ID, + OBSERVABILITY_ONBOARDING_APP_ID, OBSERVABILITY_OVERVIEW_APP_ID, } from './constants'; - export type { AppId, DeepLinkId } from './deep_links'; - export * from './locators'; diff --git a/packages/deeplinks/observability/locators/log_explorer.ts b/packages/deeplinks/observability/locators/log_explorer.ts index 752ae3d79bee8..d20c36e73917d 100644 --- a/packages/deeplinks/observability/locators/log_explorer.ts +++ b/packages/deeplinks/observability/locators/log_explorer.ts @@ -14,6 +14,17 @@ export type RefreshInterval = { value: number; }; +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +export type FilterControls = { + namespace?: ListFilterControl; +}; + +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +export type ListFilterControl = { + mode: 'include'; + values: string[]; +}; + export const LOG_EXPLORER_LOCATOR_ID = 'LOG_EXPLORER_LOCATOR'; export interface LogExplorerNavigationParams extends SerializableRecord { @@ -34,13 +45,13 @@ export interface LogExplorerNavigationParams extends SerializableRecord { */ columns?: string[]; /** - * Array of the used sorting [[field,direction],...] + * Optionally apply free-form filters. */ - sort?: string[][]; + filters?: Filter[]; /** - * Optionally apply filters. + * Optionally apply curated filter controls */ - filters?: Filter[]; + filterControls?: FilterControls; } export interface LogExplorerLocatorParams extends LogExplorerNavigationParams { diff --git a/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts b/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts index d9e3a371e0e87..c57b15e3dace0 100644 --- a/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts +++ b/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts @@ -31,6 +31,7 @@ type OpenTelemetryAgentName = | 'opentelemetry/python' | 'opentelemetry/ruby' | 'opentelemetry/swift' + | 'opentelemetry/android' | 'opentelemetry/webjs'; // Unable to reference AgentName from '@kbn/apm-plugin/typings/es_schemas/ui/fields/agent' due to circular reference diff --git a/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts b/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts index 08fab85b04c0d..61b2995a03bc7 100644 --- a/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts +++ b/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts @@ -8,17 +8,25 @@ import datemath from '@kbn/datemath'; import { Argv } from 'yargs'; import yargs from 'yargs/yargs'; +import { readdirSync } from 'fs'; +import path from 'path'; import { intervalToMs } from './utils/interval_to_ms'; import { parseRunCliFlags } from './utils/parse_run_cli_flags'; import { startHistoricalDataUpload } from './utils/start_historical_data_upload'; import { startLiveDataUpload } from './utils/start_live_data_upload'; +function getBuiltinScenarios() { + return readdirSync(path.resolve(__dirname, '../scenarios')).map((s) => s.replace(/\.ts$/, '')); +} + function options(y: Argv) { return y + .usage('$0 ') .positional('file', { - describe: 'File that contains the trace scenario', + describe: 'Name of scenario', demandOption: true, string: true, + choices: getBuiltinScenarios(), }) .option('target', { describe: 'Elasticsearch target', @@ -54,6 +62,7 @@ function options(y: Argv) { }) .option('logLevel', { describe: 'Log level', + choices: ['trace', 'debug', 'info', 'error'], default: 'info', }) .option('scenarioOpts', { @@ -66,7 +75,14 @@ function options(y: Argv) { describe: 'Assumes passed package version to avoid calling Fleet API to install', string: true, }) - .showHelpOnFail(false); + .example( + '$0 simple_logs --target=http://admin:changeme@localhost:9200', + 'Ingest data to specific Elasticsearch cluster' + ) + .example('$0 simple_logs --live', 'Continuously ingest data to local development cluster') + .example('$0 simple_logs --from=now-24h --to=now', 'Ingest data for a fixed time window') + .showHelpOnFail(false) + .wrap(null); } async function run(argv: RunCliFlags) { diff --git a/packages/kbn-apm-synthtrace/src/scenarios/malformed_logs.ts b/packages/kbn-apm-synthtrace/src/scenarios/degraded_logs.ts similarity index 94% rename from packages/kbn-apm-synthtrace/src/scenarios/malformed_logs.ts rename to packages/kbn-apm-synthtrace/src/scenarios/degraded_logs.ts index 55b32e592d62c..cb5313ac70795 100644 --- a/packages/kbn-apm-synthtrace/src/scenarios/malformed_logs.ts +++ b/packages/kbn-apm-synthtrace/src/scenarios/degraded_logs.ts @@ -29,12 +29,6 @@ const scenario: Scenario = async (runOptions) => { const CLOUD_PROVIDERS = ['gcp', 'aws', 'azure']; const CLOUD_REGION = ['eu-central-1', 'us-east-1', 'area-51']; - // "ignore_above": 1024 in mapping - const MALFORMED_LOG_LEVEL = MORE_THAN_1024_CHARS; - - // "ignore_above": 1024 in mapping - const MALFORMED_CLOUD_REGION = MORE_THAN_1024_CHARS; - const CLUSTER = [ { clusterId: generateShortId(), clusterName: 'synth-cluster-1' }, { clusterId: generateShortId(), clusterName: 'synth-cluster-2' }, @@ -76,7 +70,7 @@ const scenario: Scenario = async (runOptions) => { .create() .dataset('synth.2') .message(MESSAGE_LOG_LEVELS[index].message as string) - .logLevel(isMalformed ? MALFORMED_LOG_LEVEL : MESSAGE_LOG_LEVELS[index].level) + .logLevel(isMalformed ? MORE_THAN_1024_CHARS : MESSAGE_LOG_LEVELS[index].level) // "ignore_above": 1024 in mapping .service(SERVICE_NAMES[index]) .defaults({ 'trace.id': generateShortId(), @@ -101,7 +95,7 @@ const scenario: Scenario = async (runOptions) => { .create() .dataset('synth.3') .message(MESSAGE_LOG_LEVELS[index].message as string) - .logLevel(isMalformed ? MALFORMED_LOG_LEVEL : MESSAGE_LOG_LEVELS[index].level) + .logLevel(isMalformed ? MORE_THAN_1024_CHARS : MESSAGE_LOG_LEVELS[index].level) // "ignore_above": 1024 in mapping .service(SERVICE_NAMES[index]) .defaults({ 'trace.id': generateShortId(), @@ -112,7 +106,7 @@ const scenario: Scenario = async (runOptions) => { 'cloud.provider': CLOUD_PROVIDERS[Math.floor(Math.random() * 3)], 'cloud.region': CLOUD_REGION[index], 'cloud.availability_zone': isMalformed - ? MALFORMED_CLOUD_REGION + ? MORE_THAN_1024_CHARS // "ignore_above": 1024 in mapping : `${CLOUD_REGION[index]}a`, 'cloud.project.id': generateShortId(), 'cloud.instance.id': generateShortId(), diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index e2f6f916b3dda..7f7c317f7f63a 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -721,7 +721,8 @@ "indicator.params", "indicator.type", "name", - "tags" + "tags", + "version" ], "threshold-explorer-view": [], "observability-onboarding-state": [ diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 8cedbf8722772..fe4b3dba0940d 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -2379,6 +2379,9 @@ }, "tags": { "type": "keyword" + }, + "version": { + "type": "long" } } }, diff --git a/packages/kbn-config/index.ts b/packages/kbn-config/index.ts index 4950e3f68beed..1b4c66702d9e8 100644 --- a/packages/kbn-config/index.ts +++ b/packages/kbn-config/index.ts @@ -30,4 +30,4 @@ export { isConfigPath, hasConfigPathIntersection } from './src/config'; export { ObjectToConfigAdapter } from './src/object_to_config_adapter'; export type { CliArgs, RawPackageInfo, EnvOptions } from './src/env'; export { Env } from './src/env'; -export type { EnvironmentMode, PackageInfo } from './src/types'; +export type { EnvironmentMode, PackageInfo, BuildFlavor } from './src/types'; diff --git a/packages/kbn-config/src/config_service.ts b/packages/kbn-config/src/config_service.ts index e1c4ccfb55fbe..56b6f1b7887cf 100644 --- a/packages/kbn-config/src/config_service.ts +++ b/packages/kbn-config/src/config_service.ts @@ -73,7 +73,10 @@ export class ConfigService { ) { this.log = logger.get('config'); this.deprecationLog = logger.get('config', 'deprecation'); - this.docLinks = getDocLinks({ kibanaBranch: env.packageInfo.branch }); + this.docLinks = getDocLinks({ + kibanaBranch: env.packageInfo.branch, + buildFlavor: env.packageInfo.buildFlavor, + }); this.config$ = combineLatest([ this.rawConfigProvider.getConfig$(), diff --git a/packages/kbn-doc-links/src/get_doc_links.test.ts b/packages/kbn-doc-links/src/get_doc_links.test.ts index 0fff33ebd3fe4..60ce89266afc4 100644 --- a/packages/kbn-doc-links/src/get_doc_links.test.ts +++ b/packages/kbn-doc-links/src/get_doc_links.test.ts @@ -10,7 +10,7 @@ import { getDocLinks } from './get_doc_links'; describe('getDocLinks', () => { it('returns an immutable object', () => { - const links = getDocLinks({ kibanaBranch: 'test.branch' }); + const links = getDocLinks({ kibanaBranch: 'test.branch', buildFlavor: 'traditional' }); expect(() => { (links as unknown as Record).settings = 'override'; diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index a55fcde870efe..c5c253af7717a 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -7,15 +7,16 @@ */ import { deepFreeze } from '@kbn/std'; -import type { DocLinks } from './types'; +import type { DocLinks, BuildFlavor } from './types'; import { getDocLinksMeta } from './get_doc_meta'; export interface GetDocLinkOptions { kibanaBranch: string; + buildFlavor: BuildFlavor; } -export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { - const meta = getDocLinksMeta({ kibanaBranch }); +export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): DocLinks => { + const meta = getDocLinksMeta({ kibanaBranch, buildFlavor }); const DOC_LINK_VERSION = meta.version; const ELASTIC_WEBSITE_URL = meta.elasticWebsiteUrl; diff --git a/packages/kbn-doc-links/src/get_doc_meta.test.ts b/packages/kbn-doc-links/src/get_doc_meta.test.ts index ec98fc5345a06..28685ee654a18 100644 --- a/packages/kbn-doc-links/src/get_doc_meta.test.ts +++ b/packages/kbn-doc-links/src/get_doc_meta.test.ts @@ -10,16 +10,20 @@ import { getDocLinksMeta } from './get_doc_meta'; describe('getDocLinksMeta', () => { it('returns the correct version for the `main` branch', () => { - expect(getDocLinksMeta({ kibanaBranch: 'main' }).version).toEqual('master'); + expect(getDocLinksMeta({ kibanaBranch: 'main', buildFlavor: 'traditional' }).version).toEqual( + 'master' + ); }); it('returns the correct version for other branches', () => { - expect(getDocLinksMeta({ kibanaBranch: '7.x' }).version).toEqual('7.x'); + expect(getDocLinksMeta({ kibanaBranch: '7.x', buildFlavor: 'traditional' }).version).toEqual( + '7.x' + ); }); it('returns the correct website url', () => { - expect(getDocLinksMeta({ kibanaBranch: '7.x' }).elasticWebsiteUrl).toEqual( - 'https://www.elastic.co/' - ); + expect( + getDocLinksMeta({ kibanaBranch: '7.x', buildFlavor: 'traditional' }).elasticWebsiteUrl + ).toEqual('https://www.elastic.co/'); }); }); diff --git a/packages/kbn-doc-links/src/get_doc_meta.ts b/packages/kbn-doc-links/src/get_doc_meta.ts index 10e144166d39f..6e36aef20471f 100644 --- a/packages/kbn-doc-links/src/get_doc_meta.ts +++ b/packages/kbn-doc-links/src/get_doc_meta.ts @@ -6,13 +6,17 @@ * Side Public License, v 1. */ -import { DocLinksMeta } from './types'; +import { DocLinksMeta, BuildFlavor } from './types'; export interface GetDocLinksMetaOptions { kibanaBranch: string; + buildFlavor: BuildFlavor; } -export const getDocLinksMeta = ({ kibanaBranch }: GetDocLinksMetaOptions): DocLinksMeta => { +export const getDocLinksMeta = ({ + kibanaBranch, + buildFlavor, +}: GetDocLinksMetaOptions): DocLinksMeta => { return { version: kibanaBranch === 'main' ? 'master' : kibanaBranch, elasticWebsiteUrl: 'https://www.elastic.co/', diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index f9e8699a06375..3b3b26be0426e 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -633,3 +633,5 @@ export interface DocLinks { readonly settings: string; }; } + +export type BuildFlavor = 'serverless' | 'traditional'; diff --git a/packages/kbn-elastic-agent-utils/src/agent_names.ts b/packages/kbn-elastic-agent-utils/src/agent_names.ts index f29160699a241..ca98b64024f8a 100644 --- a/packages/kbn-elastic-agent-utils/src/agent_names.ts +++ b/packages/kbn-elastic-agent-utils/src/agent_names.ts @@ -49,6 +49,7 @@ export type OpenTelemetryAgentName = | 'opentelemetry/ruby' | 'opentelemetry/rust' | 'opentelemetry/swift' + | 'opentelemetry/android' | 'opentelemetry/webjs'; export const OPEN_TELEMETRY_AGENT_NAMES: OpenTelemetryAgentName[] = [ 'otlp', @@ -63,6 +64,7 @@ export const OPEN_TELEMETRY_AGENT_NAMES: OpenTelemetryAgentName[] = [ 'opentelemetry/ruby', 'opentelemetry/rust', 'opentelemetry/swift', + 'opentelemetry/android', 'opentelemetry/webjs', ]; diff --git a/packages/kbn-es-query/index.ts b/packages/kbn-es-query/index.ts index ac0a078e34d94..cfcf8239196df 100644 --- a/packages/kbn-es-query/index.ts +++ b/packages/kbn-es-query/index.ts @@ -128,3 +128,5 @@ export { isDataViewFieldSubtypeMulti, isDataViewFieldSubtypeNested, } from './src/utils'; + +export type { ExecutionContextSearch } from './src/expressions/types'; diff --git a/packages/kbn-es-query/src/expressions/types.ts b/packages/kbn-es-query/src/expressions/types.ts new file mode 100644 index 0000000000000..42dc021c9b752 --- /dev/null +++ b/packages/kbn-es-query/src/expressions/types.ts @@ -0,0 +1,16 @@ +/* + * 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 { Filter, Query, TimeRange } from '../filters'; + +export interface ExecutionContextSearch { + filters?: Filter[]; + query?: Query | Query[]; + timeRange?: TimeRange; + disableWarningToasts?: boolean; +} diff --git a/packages/kbn-guided-onboarding/src/components/landing_page/guide/__snapshots__/guide_cards.test.tsx.snap b/packages/kbn-guided-onboarding/src/components/landing_page/guide/__snapshots__/guide_cards.test.tsx.snap deleted file mode 100644 index 9f1d86ef25477..0000000000000 --- a/packages/kbn-guided-onboarding/src/components/landing_page/guide/__snapshots__/guide_cards.test.tsx.snap +++ /dev/null @@ -1,2989 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`guide cards snapshots should render observability cards 1`] = ` - - -
- - - - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "1a2wnuz-euiFlexGroup-responsive-wrap-l-center-center-row", - "next": undefined, - "styles": "display:flex;align-items:stretch;flex-grow:1;label:euiFlexGroup;;;@media only screen and (max-width: 767px){flex-wrap:wrap;&>.euiFlexItem{inline-size: 100%; flex-basis:100%;}};label:responsive;;;flex-wrap:wrap;label:wrap;;;gap:24px;;label:l;;;justify-content:center;label:center;;;align-items:center;label:center;;;flex-direction:row;label:row;;;", - "toString": [Function], - } - } - /> -
-
- - -`; - -exports[`guide cards snapshots should render search cards 1`] = ` - - -
- - - - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "1a2wnuz-euiFlexGroup-responsive-wrap-l-center-center-row", - "next": undefined, - "styles": "display:flex;align-items:stretch;flex-grow:1;label:euiFlexGroup;;;@media only screen and (max-width: 767px){flex-wrap:wrap;&>.euiFlexItem{inline-size: 100%; flex-basis:100%;}};label:responsive;;;flex-wrap:wrap;label:wrap;;;gap:24px;;label:l;;;justify-content:center;label:center;;;align-items:center;label:center;;;flex-direction:row;label:row;;;", - "toString": [Function], - } - } - /> -
-
- - -`; - -exports[`guide cards snapshots should render security cards 1`] = ` - - -
- - - - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "1a2wnuz-euiFlexGroup-responsive-wrap-l-center-center-row", - "next": undefined, - "styles": "display:flex;align-items:stretch;flex-grow:1;label:euiFlexGroup;;;@media only screen and (max-width: 767px){flex-wrap:wrap;&>.euiFlexItem{inline-size: 100%; flex-basis:100%;}};label:responsive;;;flex-wrap:wrap;label:wrap;;;gap:24px;;label:l;;;justify-content:center;label:center;;;align-items:center;label:center;;;flex-direction:row;label:row;;;", - "toString": [Function], - } - } - /> -
-
- - -`; diff --git a/packages/kbn-guided-onboarding/src/components/landing_page/guide/guide_cards.test.tsx b/packages/kbn-guided-onboarding/src/components/landing_page/guide/guide_cards.test.tsx deleted file mode 100644 index ea0a18c89617d..0000000000000 --- a/packages/kbn-guided-onboarding/src/components/landing_page/guide/guide_cards.test.tsx +++ /dev/null @@ -1,57 +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 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { mount } from 'enzyme'; - -import { GuideCards, GuideCardsProps } from './guide_cards'; -import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; -import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; -import { I18nStart } from '@kbn/core-i18n-browser'; -import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; -import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; -import { GuideCardSolutions } from '../classic_version/guide_cards'; - -const defaultProps: Omit = { - activateGuide: jest.fn(), - navigateToApp: jest.fn(), - guidesState: [], - openModal: jest.fn(), - theme: themeServiceMock.createStartContract(), - i18nStart: {} as unknown as I18nStart, - cloud: cloudMock.createSetup(), - docLinks: docLinksServiceMock.createStartContract(), - navigateToUrl: jest.fn(), - url: sharePluginMock.createSetupContract().url, -}; - -// FLAKY: https://github.com/elastic/kibana/issues/172595 -// FLAKY: https://github.com/elastic/kibana/issues/172596 -// FLAKY: https://github.com/elastic/kibana/issues/172597 -describe.skip('guide cards', () => { - describe('snapshots', () => { - test('should render search cards', async () => { - const component = mount( - - ); - expect(component).toMatchSnapshot(); - }); - test('should render security cards', async () => { - const component = mount( - - ); - expect(component).toMatchSnapshot(); - }); - test('should render observability cards', async () => { - const component = mount( - - ); - expect(component).toMatchSnapshot(); - }); - }); -}); diff --git a/packages/kbn-guided-onboarding/tsconfig.json b/packages/kbn-guided-onboarding/tsconfig.json index 1bfd6c2454fcb..050ae7d99e95c 100644 --- a/packages/kbn-guided-onboarding/tsconfig.json +++ b/packages/kbn-guided-onboarding/tsconfig.json @@ -23,9 +23,7 @@ "@kbn/share-plugin", "@kbn/cloud-plugin", "@kbn/core-lifecycle-browser", - "@kbn/core-theme-browser-mocks", "@kbn/analytics", - "@kbn/core-doc-links-browser-mocks", "@kbn/core-mount-utils-browser" ], "exclude": [ diff --git a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts index 135987c4b30b6..6cabc530883aa 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts @@ -250,6 +250,19 @@ export const evalFunctionsDefinitions: FunctionDefinition[] = [ }, ], }, + { + name: 'to_geopoint', + description: i18n.translate('monaco.esql.definitions.toGeopointDoc', { + defaultMessage: 'Converts to geo_point.', + }), + signatures: [ + { + params: [{ name: 'field', type: 'any' }], + returnType: 'geo_point', + examples: [`from index | EVAL geopoint = to_geopoint(field)`], + }, + ], + }, { name: 'to_integer', alias: ['to_int'], diff --git a/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts b/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts index 8da25c2b46b8a..0df20ac7d88f4 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/validation/validation.test.ts @@ -37,6 +37,7 @@ function getCallbackMocks() { name: `${type}Field`, type, })), + { name: 'geoPointField', type: 'geo_point' }, { name: 'any#Char$ field', type: 'number' }, { name: 'kubernetes.something.something', type: 'number' }, { diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index ef99652ee767f..764fe35dd759d 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -131,7 +131,7 @@ pageLoadAssetSize: securitySolutionServerless: 62488 serverless: 16573 serverlessObservability: 68747 - serverlessSearch: 71995 + serverlessSearch: 72995 sessionView: 77750 share: 71239 snapshotRestore: 79032 diff --git a/packages/kbn-search-index-documents/lib/fetch_search_results.test.ts b/packages/kbn-search-index-documents/lib/fetch_search_results.test.ts index dc60dcba437bd..dec058aae0bf2 100644 --- a/packages/kbn-search-index-documents/lib/fetch_search_results.test.ts +++ b/packages/kbn-search-index-documents/lib/fetch_search_results.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { IScopedClusterClient } from '@kbn/core/server'; +import { ElasticsearchClient } from '@kbn/core/server'; import { DEFAULT_DOCS_PER_PAGE } from '../types'; import { fetchSearchResults } from './fetch_search_results'; @@ -14,9 +14,7 @@ import { fetchSearchResults } from './fetch_search_results'; const DEFAULT_FROM_VALUE = 0; describe('fetchSearchResults lib function', () => { const mockClient = { - asCurrentUser: { - search: jest.fn(), - }, + search: jest.fn(), }; const indexName = 'search-regular-index'; @@ -78,15 +76,13 @@ describe('fetchSearchResults lib function', () => { }); it('should return search results with hits', async () => { - mockClient.asCurrentUser.search.mockImplementation(() => - Promise.resolve(mockSearchResponseWithHits) - ); + mockClient.search.mockImplementation(() => Promise.resolve(mockSearchResponseWithHits)); await expect( - fetchSearchResults(mockClient as unknown as IScopedClusterClient, indexName, query) + fetchSearchResults(mockClient as unknown as ElasticsearchClient, indexName, query) ).resolves.toEqual(regularSearchResultsResponse); - expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({ + expect(mockClient.search).toHaveBeenCalledWith({ from: DEFAULT_FROM_VALUE, index: indexName, q: query, @@ -95,13 +91,11 @@ describe('fetchSearchResults lib function', () => { }); it('should escape quotes in queries and return results with hits', async () => { - mockClient.asCurrentUser.search.mockImplementation(() => - Promise.resolve(mockSearchResponseWithHits) - ); + mockClient.search.mockImplementation(() => Promise.resolve(mockSearchResponseWithHits)); await expect( fetchSearchResults( - mockClient as unknown as IScopedClusterClient, + mockClient as unknown as ElasticsearchClient, indexName, '"yellow banana"', 0, @@ -109,7 +103,7 @@ describe('fetchSearchResults lib function', () => { ) ).resolves.toEqual(regularSearchResultsResponse); - expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({ + expect(mockClient.search).toHaveBeenCalledWith({ from: DEFAULT_FROM_VALUE, index: indexName, q: '\\"yellow banana\\"', @@ -118,15 +112,13 @@ describe('fetchSearchResults lib function', () => { }); it('should return search results with hits when no query is passed', async () => { - mockClient.asCurrentUser.search.mockImplementation(() => - Promise.resolve(mockSearchResponseWithHits) - ); + mockClient.search.mockImplementation(() => Promise.resolve(mockSearchResponseWithHits)); await expect( - fetchSearchResults(mockClient as unknown as IScopedClusterClient, indexName) + fetchSearchResults(mockClient as unknown as ElasticsearchClient, indexName) ).resolves.toEqual(regularSearchResultsResponse); - expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({ + expect(mockClient.search).toHaveBeenCalledWith({ from: DEFAULT_FROM_VALUE, index: indexName, size: DEFAULT_DOCS_PER_PAGE, @@ -134,7 +126,7 @@ describe('fetchSearchResults lib function', () => { }); it('should return empty search results', async () => { - mockClient.asCurrentUser.search.mockImplementationOnce(() => + mockClient.search.mockImplementationOnce(() => Promise.resolve({ ...mockSearchResponseWithHits, hits: { @@ -149,10 +141,10 @@ describe('fetchSearchResults lib function', () => { ); await expect( - fetchSearchResults(mockClient as unknown as IScopedClusterClient, indexName, query) + fetchSearchResults(mockClient as unknown as ElasticsearchClient, indexName, query) ).resolves.toEqual(emptySearchResultsResponse); - expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({ + expect(mockClient.search).toHaveBeenCalledWith({ from: DEFAULT_FROM_VALUE, index: indexName, q: query, diff --git a/packages/kbn-search-index-documents/lib/fetch_search_results.ts b/packages/kbn-search-index-documents/lib/fetch_search_results.ts index 4427fded71c2c..3abca93516c5a 100644 --- a/packages/kbn-search-index-documents/lib/fetch_search_results.ts +++ b/packages/kbn-search-index-documents/lib/fetch_search_results.ts @@ -7,13 +7,13 @@ */ import { SearchHit } from '@elastic/elasticsearch/lib/api/types'; -import { IScopedClusterClient } from '@kbn/core/server'; +import { ElasticsearchClient } from '@kbn/core/server'; import { DEFAULT_DOCS_PER_PAGE, Paginate } from '../types'; import { escapeLuceneChars } from '../utils/escape_lucene_charts'; import { fetchWithPagination } from '../utils/fetch_with_pagination'; export const fetchSearchResults = async ( - client: IScopedClusterClient, + client: ElasticsearchClient, indexName: string, query?: string, from: number = 0, @@ -21,7 +21,7 @@ export const fetchSearchResults = async ( ): Promise> => { const result = await fetchWithPagination( async () => - await client.asCurrentUser.search({ + await client.search({ from, index: indexName, size, diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx b/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx index 8a57f90e75ecc..a7b621979a5a8 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx +++ b/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx @@ -125,7 +125,12 @@ export const AutocompleteFieldListsComponent: React.FC {i18n.SEE_DOCUMENTATION} diff --git a/packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx b/packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx index 929627537bbb9..3f5039a96e9f6 100755 --- a/packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx +++ b/packages/kbn-unified-field-list/src/components/field_stats/field_stats.tsx @@ -8,6 +8,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import { getTimeZone } from '@kbn/visualization-utils'; import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; import { getEsQueryConfig } from '@kbn/data-service/src/es_query'; import type { IUiSettingsClient } from '@kbn/core/public'; @@ -518,7 +519,7 @@ const FieldStatsComponent: React.FC = ({ yAccessors={['count']} xScaleType={ScaleType.Time} yScaleType={ScaleType.Linear} - timeZone="local" + timeZone={getTimeZone(uiSettings)} />
diff --git a/packages/kbn-unified-field-list/tsconfig.json b/packages/kbn-unified-field-list/tsconfig.json index eeca808e1bee7..dce08dcdebaf5 100644 --- a/packages/kbn-unified-field-list/tsconfig.json +++ b/packages/kbn-unified-field-list/tsconfig.json @@ -32,6 +32,7 @@ "@kbn/shared-ux-button-toolbar", "@kbn/field-utils", "@kbn/ml-ui-actions", + "@kbn/visualization-utils", ], "exclude": ["target/**/*"] } diff --git a/packages/kbn-visualization-utils/README.md b/packages/kbn-visualization-utils/README.md new file mode 100644 index 0000000000000..ae96f7eca7901 --- /dev/null +++ b/packages/kbn-visualization-utils/README.md @@ -0,0 +1,3 @@ +# @kbn/visualization-utils + +Utils for visualizations. diff --git a/src/plugins/vis_types/timeseries/public/application/lib/index.ts b/packages/kbn-visualization-utils/index.ts similarity index 87% rename from src/plugins/vis_types/timeseries/public/application/lib/index.ts rename to packages/kbn-visualization-utils/index.ts index 4fd845df4d58c..7aa0a2c5d770c 100644 --- a/src/plugins/vis_types/timeseries/public/application/lib/index.ts +++ b/packages/kbn-visualization-utils/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { getTimezone } from './get_timezone'; +export { getTimeZone } from './src/get_timezone'; diff --git a/packages/kbn-visualization-utils/jest.config.js b/packages/kbn-visualization-utils/jest.config.js new file mode 100644 index 0000000000000..6acb3b84b9bfb --- /dev/null +++ b/packages/kbn-visualization-utils/jest.config.js @@ -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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../..', + roots: ['/packages/kbn-visualization-utils'], +}; diff --git a/packages/kbn-visualization-utils/kibana.jsonc b/packages/kbn-visualization-utils/kibana.jsonc new file mode 100644 index 0000000000000..6589338ddb579 --- /dev/null +++ b/packages/kbn-visualization-utils/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/visualization-utils", + "owner": "@elastic/kibana-visualizations" +} diff --git a/packages/kbn-visualization-utils/package.json b/packages/kbn-visualization-utils/package.json new file mode 100644 index 0000000000000..867d82159aa52 --- /dev/null +++ b/packages/kbn-visualization-utils/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/visualization-utils", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0", + "sideEffects": false +} \ No newline at end of file diff --git a/packages/kbn-visualization-utils/src/get_timezone.test.ts b/packages/kbn-visualization-utils/src/get_timezone.test.ts new file mode 100644 index 0000000000000..b911e98bff5d0 --- /dev/null +++ b/packages/kbn-visualization-utils/src/get_timezone.test.ts @@ -0,0 +1,44 @@ +/* + * 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 moment from 'moment-timezone'; +import { IUiSettingsClient } from '@kbn/core/public'; +import { getTimeZone } from './get_timezone'; + +describe('getTimeZone', () => { + const originalTimezone = moment.tz.guess(); + + beforeAll(() => { + moment.tz.setDefault('America/New_York'); + }); + + afterAll(() => { + if (originalTimezone) { + moment.tz.setDefault(originalTimezone); + } + }); + + it('returns local time zone when uiSettings returns Browser', () => { + expect( + getTimeZone({ + get: () => 'Browser', + isDefault: () => true, + } as unknown as IUiSettingsClient) + ).toEqual('America/New_York'); + }); + + it('returns timezone defined on uiSettings', () => { + const timezone = 'America/Toronto'; + expect( + getTimeZone({ + get: () => timezone, + isDefault: () => false, + } as unknown as IUiSettingsClient) + ).toEqual(timezone); + }); +}); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/utils/get_timezone.ts b/packages/kbn-visualization-utils/src/get_timezone.ts similarity index 100% rename from src/plugins/chart_expressions/expression_heatmap/public/utils/get_timezone.ts rename to packages/kbn-visualization-utils/src/get_timezone.ts diff --git a/packages/kbn-visualization-utils/tsconfig.json b/packages/kbn-visualization-utils/tsconfig.json new file mode 100644 index 0000000000000..1afc36bf0b0be --- /dev/null +++ b/packages/kbn-visualization-utils/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["*.ts", "src/**/*", "__mocks__/**/*.ts"], + "compilerOptions": { + "outDir": "target/types" + }, + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core", + ] +} diff --git a/packages/kbn-xstate-utils/src/dev_tools.ts b/packages/kbn-xstate-utils/src/dev_tools.ts index fa16b808b3aec..15b5779677a5b 100644 --- a/packages/kbn-xstate-utils/src/dev_tools.ts +++ b/packages/kbn-xstate-utils/src/dev_tools.ts @@ -6,4 +6,52 @@ * Side Public License, v 1. */ +import { + isArray, + isBoolean, + isDate, + isNil, + isNumber, + isPlainObject, + isString, + mapValues, +} from 'lodash'; + export const isDevMode = () => process.env.NODE_ENV !== 'production'; + +export const getDevToolsOptions = (): boolean | object => + isDevMode() + ? { + actionSanitizer: sanitizeAction, + stateSanitizer: sanitizeState, + } + : false; + +const redactComplexValues = (value: unknown): unknown => { + if (isString(value) || isNumber(value) || isBoolean(value) || isDate(value) || isNil(value)) { + return value; + } + + if (isArray(value)) { + if (value.length > 100) { + return '[redacted large array]'; + } + return value.map(redactComplexValues); + } + + if ((isPlainObject as (v: unknown) => v is object)(value)) { + if (Object.keys(value).length > 100) { + return '[redacted large object]'; + } + return mapValues(value, (innerValue: unknown) => redactComplexValues(innerValue)); + } + + return `[redacted complex value of type ${typeof value}]`; +}; + +const sanitizeAction = redactComplexValues; + +const sanitizeState = (state: Record) => ({ + value: state.value, + context: redactComplexValues(state.context), +}); diff --git a/packages/kbn-xstate-utils/src/index.ts b/packages/kbn-xstate-utils/src/index.ts index 2cf5853db6e08..02cd8a2b176b1 100644 --- a/packages/kbn-xstate-utils/src/index.ts +++ b/packages/kbn-xstate-utils/src/index.ts @@ -7,6 +7,6 @@ */ export * from './actions'; +export * from './dev_tools'; export * from './notification_channel'; export * from './types'; -export * from './dev_tools'; diff --git a/packages/react/kibana_context/README.mdx b/packages/react/kibana_context/README.mdx index 28fd9ecb1600f..8738461245e65 100644 --- a/packages/react/kibana_context/README.mdx +++ b/packages/react/kibana_context/README.mdx @@ -1,9 +1,9 @@ --- -id: react/context -slug: /react/context +id: kibDevReactKibanaContext +slug: /kibana-dev-docs/react-context title: React Contexts in Kibana description: Kibana uses React Context to manage several global states. This is a collection of packages supporting those states. -tags: ['shared-ux', 'react', 'context'] +tags: ['kibana', 'dev','shared-ux', 'react', 'context'] date: 2023-07-25 --- diff --git a/packages/shared-ux/button_toolbar/src/buttons/toolbar_button/toolbar_button.tsx b/packages/shared-ux/button_toolbar/src/buttons/toolbar_button/toolbar_button.tsx index 84039857d0891..1e005d110e6cf 100644 --- a/packages/shared-ux/button_toolbar/src/buttons/toolbar_button/toolbar_button.tsx +++ b/packages/shared-ux/button_toolbar/src/buttons/toolbar_button/toolbar_button.tsx @@ -23,7 +23,7 @@ type ButtonRenderStyle = 'standard' | 'iconButton'; interface ToolbarButtonCommonProps extends Pick< EuiButtonPropsForButton, - 'onClick' | 'iconType' | 'size' | 'data-test-subj' | 'isDisabled' + 'onClick' | 'iconType' | 'size' | 'data-test-subj' | 'isDisabled' | 'aria-label' > { /** * Render style of the toolbar button @@ -162,7 +162,7 @@ const ToolbarIconButton = ({ "siem-ui-timeline": "d3de8ff3617be8f2a799d66b1471b9be6124bf40", "siem-ui-timeline-note": "0a32fb776907f596bedca292b8c646496ae9c57b", "siem-ui-timeline-pinned-event": "082daa3ce647b33873f6abccf340bdfa32057c8d", - "slo": "2048ab6791df2e1ae0936f29c20765cb8d2fcfaa", + "slo": "9a9995e4572de1839651c43b5fc4dc8276bb5815", "space": "8de4ec513e9bbc6b2f1d635161d850be7747d38e", "spaces-usage-stats": "3abca98713c52af8b30300e386c7779b3025a20e", "synthetics-monitor": "33ddc4b8979f378edf58bcc7ba13c5c5b572f42d", diff --git a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts b/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts index 1f6e9a7a58c77..e88a876edbc63 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_test_kit.ts @@ -12,7 +12,7 @@ import { SemVer } from 'semver'; import { defaultsDeep } from 'lodash'; import { BehaviorSubject, firstValueFrom, map } from 'rxjs'; -import { ConfigService, Env } from '@kbn/config'; +import { ConfigService, Env, BuildFlavor } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; import { REPO_ROOT } from '@kbn/repo-info'; import { KibanaMigrator } from '@kbn/core-saved-objects-migration-server-internal'; @@ -278,6 +278,7 @@ interface GetMigratorParams { loggerFactory: LoggerFactory; kibanaVersion: string; kibanaBranch: string; + buildFlavor?: BuildFlavor; nodeRoles: NodeRoles; } @@ -290,6 +291,7 @@ const getMigrator = async ({ loggerFactory, kibanaVersion, kibanaBranch, + buildFlavor = 'traditional', nodeRoles, }: GetMigratorParams) => { const savedObjectsConf = await firstValueFrom( @@ -301,8 +303,8 @@ const getMigrator = async ({ const soConfig = new SavedObjectConfig(savedObjectsConf, savedObjectsMigrationConf); const docLinks: DocLinksServiceStart = { - ...getDocLinksMeta({ kibanaBranch }), - links: getDocLinks({ kibanaBranch }), + ...getDocLinksMeta({ kibanaBranch, buildFlavor }), + links: getDocLinks({ kibanaBranch, buildFlavor }), }; const esCapabilities = await getCapabilitiesFromClient(client); diff --git a/src/core/server/integration_tests/saved_objects/migrations/test_utils.ts b/src/core/server/integration_tests/saved_objects/migrations/test_utils.ts index 610981bab56ab..85e2d7b318fc6 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/test_utils.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/test_utils.ts @@ -17,12 +17,18 @@ import JSON5 from 'json5'; export const getDocVersion = () => { const env = Env.createDefault(REPO_ROOT, getEnvOptions()); - return getDocLinksMeta({ kibanaBranch: env.packageInfo.branch }).version; + return getDocLinksMeta({ + kibanaBranch: env.packageInfo.branch, + buildFlavor: env.packageInfo.buildFlavor, + }).version; }; export const getMigrationDocLink = () => { const env = Env.createDefault(REPO_ROOT, getEnvOptions()); - const docLinks = getDocLinks({ kibanaBranch: env.packageInfo.branch }); + const docLinks = getDocLinks({ + kibanaBranch: env.packageInfo.branch, + buildFlavor: env.packageInfo.buildFlavor, + }); return docLinks.kibanaUpgradeSavedObjects; }; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx index 083e6430614da..bf9524c186134 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx @@ -379,6 +379,63 @@ describe('HeatmapComponent', function () { }); }); + it('should keep the minimum open end', () => { + const newData: Datatable = { + type: 'datatable', + rows: [{ 'col-0-1': -3 }], + columns: [{ id: 'col-0-1', name: 'Count', meta: { type: 'number' } }], + }; + const newProps = { + ...wrapperProps, + data: newData, + args: { + ...wrapperProps.args, + palette: { + params: { + colors: ['#6092c0', '#a8bfda', '#ebeff5', '#ecb385', '#e7664c'], + stops: [1, 2, 3, 4, 5], + range: 'number', + gradient: true, + continuity: 'above', + rangeMin: -Infinity, + rangeMax: null, + }, + }, + }, + } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + expect(component.find(Heatmap).prop('colorScale')).toEqual({ + bands: [ + { + start: -Infinity, + end: 1, + color: '#6092c0', + }, + { + start: 1, + end: 2, + color: '#a8bfda', + }, + { + start: 2, + end: 3, + color: '#ebeff5', + }, + { + start: 3, + end: 4, + color: '#ecb385', + }, + { + start: 4, + end: Infinity, + color: '#e7664c', + }, + ], + type: 'bands', + }); + }); + it('renders the axis titles', () => { const component = shallowWithIntl(); expect(component.find(Heatmap).prop('xAxisTitle')).toEqual('Dest'); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx index f0794318e6001..e541918801b59 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx @@ -97,11 +97,7 @@ function shiftAndNormalizeStops( if (params.range === 'percent') { result = min + ((max - min) * value) / 100; } - // a division by zero safeguard - if (!Number.isFinite(result)) { - return 1; - } - return Number(result.toFixed(2)); + return result; } ); } @@ -515,11 +511,9 @@ export const HeatmapComponent: FC = memo( let overwriteArrayIdx; if (endValue === Number.POSITIVE_INFINITY) { - overwriteArrayIdx = `≥ ${metricFormatter.convert(startValue)}`; + overwriteArrayIdx = `≥ ${valueFormatter(startValue)}`; } else { - overwriteArrayIdx = `${metricFormatter.convert(start)} - ${metricFormatter.convert( - endValue - )}`; + overwriteArrayIdx = `${valueFormatter(start)} - ${valueFormatter(endValue)}`; } const overwriteColor = overwriteColors?.[overwriteArrayIdx]; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx index fa899fe3ce295..1d324ad63be55 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; +import { getTimeZone } from '@kbn/visualization-utils'; import type { PersistedState } from '@kbn/visualizations-plugin/public'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { ExpressionRenderDefinition } from '@kbn/expressions-plugin/common/expression_renderers'; @@ -29,7 +30,6 @@ import { getPaletteService, getUISettings, } from '../services'; -import { getTimeZone } from '../utils/get_timezone'; interface ExpressioHeatmapRendererDependencies { getStartDeps: StartServicesGetter; diff --git a/src/plugins/chart_expressions/expression_heatmap/tsconfig.json b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json index 10e4ea05105a1..cdce4c3406ede 100644 --- a/src/plugins/chart_expressions/expression_heatmap/tsconfig.json +++ b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json @@ -28,6 +28,7 @@ "@kbn/analytics", "@kbn/chart-expressions-common", "@kbn/i18n-react", + "@kbn/visualization-utils", ], "exclude": [ "target/**/*", diff --git a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.test.ts b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.test.ts index 6dcfe4c79147a..30f55a9679269 100644 --- a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.test.ts +++ b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.test.ts @@ -8,11 +8,10 @@ import { Datatable, ExecutionContext } from '@kbn/expressions-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; import { TrendlineArguments } from '../types'; import { metricTrendlineFunction } from './metric_trendline_function'; -const fakeContext = {} as ExecutionContext; +const fakeContext = {} as ExecutionContext; const fakeInput = {} as Datatable; const metricTrendline = (args: TrendlineArguments) => metricTrendlineFunction().fn(fakeInput, args, fakeContext); diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/inference.delete_model.json b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.delete_model.json new file mode 100644 index 0000000000000..c7066c0a48b19 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.delete_model.json @@ -0,0 +1,27 @@ +{ + "inference.delete_model": { + "url_params": { + "error_trace": "__flag__", + "filter_path": [], + "human": "__flag__", + "pretty": "__flag__" + }, + "url_components": { + "task_type": [ + "sparse_embedding", + "text_embedding" + ] + }, + "methods": [ + "DELETE" + ], + "patterns": [ + "_inference/{task_type}/{model_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html", + "availability": { + "stack": true, + "serverless": false + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/inference.get_model.json b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.get_model.json new file mode 100644 index 0000000000000..40745a385fa75 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.get_model.json @@ -0,0 +1,27 @@ +{ + "inference.get_model": { + "url_params": { + "error_trace": "__flag__", + "filter_path": [], + "human": "__flag__", + "pretty": "__flag__" + }, + "url_components": { + "task_type": [ + "sparse_embedding", + "text_embedding" + ] + }, + "methods": [ + "GET" + ], + "patterns": [ + "_inference/{task_type}/{model_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html", + "availability": { + "stack": true, + "serverless": false + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/inference.inference.json b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.inference.json new file mode 100644 index 0000000000000..e8f959aa3330a --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.inference.json @@ -0,0 +1,27 @@ +{ + "inference.inference": { + "url_params": { + "error_trace": "__flag__", + "filter_path": [], + "human": "__flag__", + "pretty": "__flag__" + }, + "url_components": { + "task_type": [ + "sparse_embedding", + "text_embedding" + ] + }, + "methods": [ + "POST" + ], + "patterns": [ + "_inference/{task_type}/{model_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html", + "availability": { + "stack": true, + "serverless": false + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/inference.put_model.json b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.put_model.json new file mode 100644 index 0000000000000..69e26a1103c02 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/inference.put_model.json @@ -0,0 +1,27 @@ +{ + "inference.put_model": { + "url_params": { + "error_trace": "__flag__", + "filter_path": [], + "human": "__flag__", + "pretty": "__flag__" + }, + "url_components": { + "task_type": [ + "sparse_embedding", + "text_embedding" + ] + }, + "methods": [ + "PUT" + ], + "patterns": [ + "_inference/{task_type}/{model_id}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html", + "availability": { + "stack": true, + "serverless": false + } + } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json index 972ae313c20fb..f09c45526e4f2 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/ml.start_trained_model_deployment.json @@ -6,6 +6,7 @@ "human": "__flag__", "pretty": "__flag__", "cache_size": [], + "deployment_id": "", "number_of_allocations": [ "1" ], diff --git a/src/plugins/content_management/docs/conent_management_landing.mdx b/src/plugins/content_management/docs/conent_management_landing.mdx new file mode 100644 index 0000000000000..b2855d105c7db --- /dev/null +++ b/src/plugins/content_management/docs/conent_management_landing.mdx @@ -0,0 +1,22 @@ +--- +id: kibContentManagement +slug: /kibana-dev-docs/content-management +title: Content Management +date: 2023-04-13 +tags: ['kibana', 'dev', 'content management', 'saved objects'] +--- + + + +Kibana Saved Objects have traditionally been considered content, +but the content management project aims to provide a single abstraction for Kibana and solution content. +This includes the registration and collection of content metadata as well as the rendering capabilities, caching layer, backward compatible CRUD & Search APIs, +and eventually a collection of new features that enhance content items by adding additional capabilities for personalization, private objects and content folders. + +## Links + +- +- diff --git a/src/plugins/data/common/search/expressions/kibana.ts b/src/plugins/data/common/search/expressions/kibana.ts index aa83662e0b8d4..83d2cdc1c64b9 100644 --- a/src/plugins/data/common/search/expressions/kibana.ts +++ b/src/plugins/data/common/search/expressions/kibana.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { ExecutionContext, ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { ExpressionValueSearchContext, ExecutionContextSearch } from './kibana_context_type'; +import { ExpressionValueSearchContext } from './kibana_context_type'; const toArray = (query: undefined | T | T[]): T[] => !query ? [] : Array.isArray(query) ? query : [query]; @@ -20,7 +20,7 @@ export type ExpressionFunctionKibana = ExpressionFunctionDefinition< ExpressionValueSearchContext | null, object, ExpressionValueSearchContext, - ExecutionContext + ExecutionContext >; export const kibana: ExpressionFunctionKibana = { diff --git a/src/plugins/data/common/search/expressions/kibana_context.ts b/src/plugins/data/common/search/expressions/kibana_context.ts index 9f9a7f274ab5b..613a8ff2fede5 100644 --- a/src/plugins/data/common/search/expressions/kibana_context.ts +++ b/src/plugins/data/common/search/expressions/kibana_context.ts @@ -8,13 +8,7 @@ import { ExpressionFunctionDefinition, ExecutionContext } from '@kbn/expressions-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { - KibanaTimerangeOutput, - ExecutionContextSearch, - KibanaContext, - KibanaFilter, - KibanaQueryOutput, -} from '../..'; +import { KibanaTimerangeOutput, KibanaContext, KibanaFilter, KibanaQueryOutput } from '../..'; interface Arguments { q?: KibanaQueryOutput[] | null; @@ -28,5 +22,5 @@ export type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition< KibanaContext | null, Arguments, Promise, - ExecutionContext + ExecutionContext >; diff --git a/src/plugins/data/common/search/expressions/kibana_context_type.ts b/src/plugins/data/common/search/expressions/kibana_context_type.ts index d6947d2d46ce3..979fc65e4ac08 100644 --- a/src/plugins/data/common/search/expressions/kibana_context_type.ts +++ b/src/plugins/data/common/search/expressions/kibana_context_type.ts @@ -5,19 +5,11 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { Filter } from '@kbn/es-query'; +import { Filter, ExecutionContextSearch } from '@kbn/es-query'; import { ExpressionValueBoxed } from '@kbn/expressions-plugin/common'; -import { Query, TimeRange } from '../../query'; +import { Query } from '../../query'; import { DataViewField } from '../..'; -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -export type ExecutionContextSearch = { - filters?: Filter[]; - query?: Query | Query[]; - timeRange?: TimeRange; - disableWarningToasts?: boolean; -}; - export type ExpressionValueSearchContext = ExpressionValueBoxed< 'kibana_context', ExecutionContextSearch diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index 221a4f7ce9517..de2504dec2d99 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -138,7 +138,6 @@ export type { OptionedValueProp, ParsedInterval, // expressions - ExecutionContextSearch, ExpressionFunctionKql, ExpressionFunctionLucene, ExpressionFunctionKibana, diff --git a/src/plugins/data/server/query/routes.ts b/src/plugins/data/server/query/routes.ts index 7446e3ad83a12..5ac18df37d544 100644 --- a/src/plugins/data/server/query/routes.ts +++ b/src/plugins/data/server/query/routes.ts @@ -30,7 +30,7 @@ const SAVED_QUERY_ATTRS_CONFIG = schema.object({ const savedQueryResponseSchema = schema.object({ id: schema.string(), attributes: SAVED_QUERY_ATTRS_CONFIG, - namespaces: schema.arrayOf(schema.string()), + namespaces: schema.maybe(schema.arrayOf(schema.string())), }); const access = 'internal'; diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 7b386e864fbc1..46794e0a3c9c6 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -168,12 +168,12 @@ export function getUiSettings( name: i18n.translate('data.advancedSettings.defaultIndexTitle', { defaultMessage: 'Default data view', }), - value: null, + value: '', type: 'string', description: i18n.translate('data.advancedSettings.defaultIndexText', { defaultMessage: 'Used by discover and visualizations when a data view is not set.', }), - schema: schema.nullable(schema.string()), + schema: schema.string(), }, [UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: { name: i18n.translate('data.advancedSettings.courier.ignoreFilterTitle', { @@ -385,6 +385,13 @@ export function getUiSettings( defaultMessage: 'This week', }), }, + { + from: 'now-1m', + to: 'now', + display: i18n.translate('data.advancedSettings.timepicker.last1Minute', { + defaultMessage: 'Last 1 minute', + }), + }, { from: 'now-15m', to: 'now', @@ -471,7 +478,7 @@ export function getUiSettings( to: schema.string(), display: schema.string(), }), - { maxSize: 10 } + { maxSize: 12 } ) : schema.arrayOf( schema.object({ diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index 1bb24661da0cb..2a2575a773524 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -9,7 +9,11 @@ import React, { useEffect, useState, memo, useCallback, useMemo } from 'react'; import { useParams, useHistory } from 'react-router-dom'; import type { DataView } from '@kbn/data-views-plugin/public'; -import { redirectWhenMissing, SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; +import { + type IKbnUrlStateStorage, + redirectWhenMissing, + SavedObjectNotFound, +} from '@kbn/kibana-utils-plugin/public'; import { useExecutionContext } from '@kbn/kibana-react-plugin/public'; import { AnalyticsNoDataPageKibanaProvider, @@ -46,6 +50,7 @@ interface DiscoverLandingParams { export interface MainRouteProps { customizationCallbacks: CustomizationCallback[]; + stateStorageContainer?: IKbnUrlStateStorage; isDev: boolean; customizationContext: DiscoverCustomizationContext; } @@ -53,6 +58,7 @@ export interface MainRouteProps { export function DiscoverMainRoute({ customizationCallbacks, customizationContext, + stateStorageContainer, }: MainRouteProps) { const history = useHistory(); const services = useDiscoverServices(); @@ -70,6 +76,7 @@ export function DiscoverMainRoute({ history, services, customizationContext, + stateStorageContainer, }) ); const { customizationService, isInitialized: isCustomizationServiceInitialized } = diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index a14a7d3b797c6..2cf1e2c71880d 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -11,7 +11,7 @@ import { DiscoverStateContainer, createSearchSessionRestorationDataProvider, } from './discover_state'; -import { createBrowserHistory, History } from 'history'; +import { createBrowserHistory, createMemoryHistory, History } from 'history'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import type { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; import { @@ -27,6 +27,7 @@ import { waitFor } from '@testing-library/react'; import { DiscoverCustomizationContext, FetchStatus } from '../../types'; import { dataViewAdHoc, dataViewComplexMock } from '../../../__mocks__/data_view_complex'; import { copySavedSearch } from './discover_saved_search_container'; +import { createKbnUrlStateStorage, IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; const startSync = (appState: DiscoverAppStateContainer) => { const { start, stop } = appState.syncState(); @@ -151,6 +152,68 @@ describe('Test discover state', () => { expect(getCurrentUrl()).toBe('/#?_g=(refreshInterval:(pause:!t,value:5000))'); }); }); + +describe('Test discover state with overridden state storage', () => { + let stopSync = () => {}; + let history: History; + let stateStorage: IKbnUrlStateStorage; + let state: DiscoverStateContainer; + + beforeEach(async () => { + jest.useFakeTimers(); + history = createMemoryHistory({ + initialEntries: [ + { + pathname: '/', + hash: `?_a=()`, + }, + ], + }); + stateStorage = createKbnUrlStateStorage({ + history, + useHash: false, + useHashQuery: true, + }); + state = getDiscoverStateContainer({ + services: discoverServiceMock, + history, + customizationContext, + stateStorageContainer: stateStorage, + }); + state.savedSearchState.set(savedSearchMock); + state.appState.update({}, true); + stopSync = startSync(state.appState); + }); + + afterEach(() => { + stopSync(); + stopSync = () => {}; + jest.useRealTimers(); + }); + + test('setting app state and syncing to URL', async () => { + state.appState.update({ index: 'modified' }); + + await jest.runAllTimersAsync(); + + expect(history.createHref(history.location)).toMatchInlineSnapshot( + `"/#?_a=(columns:!(default_column),index:modified,interval:auto,sort:!())"` + ); + }); + + test('changing URL to be propagated to appState', async () => { + history.push('/#?_a=(index:modified)'); + + await jest.runAllTimersAsync(); + + expect(state.appState.getState()).toMatchInlineSnapshot(` + Object { + "index": "modified", + } + `); + }); +}); + describe('Test discover initial state sort handling', () => { test('Non-empty sort in URL should not be overwritten by saved search sort', async () => { const savedSearch = { diff --git a/src/plugins/discover/public/application/main/services/discover_state.ts b/src/plugins/discover/public/application/main/services/discover_state.ts index 5e4f8a30199ed..1dc58643ebdc0 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.ts @@ -71,6 +71,10 @@ interface DiscoverStateContainerParams { * Context object for customization related properties */ customizationContext: DiscoverCustomizationContext; + /** + * a custom url state storage + */ + stateStorageContainer?: IKbnUrlStateStorage; } export interface LoadParams { @@ -204,6 +208,7 @@ export function getDiscoverStateContainer({ history, services, customizationContext, + stateStorageContainer, }: DiscoverStateContainerParams): DiscoverStateContainer { const storeInSessionStorage = services.uiSettings.get('state:storeInSessionStorage'); const toasts = services.core.notifications.toasts; @@ -211,12 +216,14 @@ export function getDiscoverStateContainer({ /** * state storage for state in the URL */ - const stateStorage = createKbnUrlStateStorage({ - useHash: storeInSessionStorage, - history, - useHashQuery: customizationContext.displayMode !== 'embedded', - ...(toasts && withNotifyOnErrors(toasts)), - }); + const stateStorage = + stateStorageContainer ?? + createKbnUrlStateStorage({ + useHash: storeInSessionStorage, + history, + useHashQuery: customizationContext.displayMode !== 'embedded', + ...(toasts && withNotifyOnErrors(toasts)), + }); /** * Search session logic diff --git a/src/plugins/discover/public/components/discover_container/discover_container.tsx b/src/plugins/discover/public/components/discover_container/discover_container.tsx index 43426c83c7730..51fdbd0d3432d 100644 --- a/src/plugins/discover/public/components/discover_container/discover_container.tsx +++ b/src/plugins/discover/public/components/discover_container/discover_container.tsx @@ -11,6 +11,7 @@ import type { ScopedHistory } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import React, { useEffect, useMemo, useState } from 'react'; import { css } from '@emotion/react'; +import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; import { DiscoverMainRoute } from '../../application/main'; import type { DiscoverServices } from '../../build_services'; import type { CustomizationCallback } from '../../customizations'; @@ -29,6 +30,7 @@ export interface DiscoverContainerInternalProps { getDiscoverServices: () => Promise; scopedHistory: ScopedHistory; customizationCallbacks: CustomizationCallback[]; + stateStorageContainer?: IKbnUrlStateStorage; isDev: boolean; isLoading?: boolean; } @@ -55,6 +57,7 @@ export const DiscoverContainerInternal = ({ customizationCallbacks, isDev, getDiscoverServices, + stateStorageContainer, isLoading = false, }: DiscoverContainerInternalProps) => { const [discoverServices, setDiscoverServices] = useState(); @@ -97,6 +100,7 @@ export const DiscoverContainerInternal = ({ diff --git a/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx b/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx index 2c9a30431218d..c24383ff9fb18 100644 --- a/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx +++ b/src/plugins/embeddable/public/embeddable_panel/embeddable_panel.tsx @@ -129,8 +129,9 @@ export const EmbeddablePanel = (panelProps: UnwrappedEmbeddablePanelProps) => { * Select state from the embeddable */ const loading = useSelectFromEmbeddableOutput('loading', embeddable); + const rendered = useSelectFromEmbeddableOutput('rendered', embeddable); - if (loading === false && !initialLoadComplete) { + if ((loading === false || rendered === true || outputError) && !initialLoadComplete) { setInitialLoadComplete(true); } diff --git a/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts b/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts index 56748495a3456..36f5b0a5595a8 100644 --- a/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts +++ b/src/plugins/event_annotation/common/fetch_event_annotations/request_event_annotations.ts @@ -21,7 +21,6 @@ import { ExecutionContext } from '@kbn/expressions-plugin/common'; import moment from 'moment'; import { ESCalendarInterval, ESFixedInterval, roundDateToESInterval } from '@elastic/charts'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { i18n } from '@kbn/i18n'; import { handleRequest } from './handle_request'; @@ -71,7 +70,7 @@ export const requestEventAnnotations = ( abortSignal, getSearchSessionId, getExecutionContext, - }: ExecutionContext, + }: ExecutionContext, getStartDependencies: () => Promise ) => { return defer(async () => { diff --git a/src/plugins/event_annotation/tsconfig.json b/src/plugins/event_annotation/tsconfig.json index d115df48e8967..f6117e5f92aed 100644 --- a/src/plugins/event_annotation/tsconfig.json +++ b/src/plugins/event_annotation/tsconfig.json @@ -12,7 +12,6 @@ "@kbn/core", "@kbn/expressions-plugin", "@kbn/data-plugin", - "@kbn/utility-types", "@kbn/i18n", "@kbn/data-views-plugin", "@kbn/inspector-plugin", diff --git a/src/plugins/expressions/common/execution/types.ts b/src/plugins/expressions/common/execution/types.ts index dddc503285942..03dbcc8a6ff13 100644 --- a/src/plugins/expressions/common/execution/types.ts +++ b/src/plugins/expressions/common/execution/types.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import type { SerializableRecord } from '@kbn/utility-types'; import type { KibanaRequest } from '@kbn/core/server'; import type { KibanaExecutionContext } from '@kbn/core/public'; import { Adapters, RequestAdapter } from '@kbn/inspector-plugin/common'; +import { ExecutionContextSearch } from '@kbn/es-query'; import { Datatable, ExpressionType } from '../expression_types'; import { TablesAdapter } from '../util/tables_adapter'; import { ExpressionsInspectorAdapter } from '../util'; @@ -19,10 +19,7 @@ import { ExpressionsInspectorAdapter } from '../util'; * `ExecutionContext` is an object available to all functions during a single execution; * it provides various methods to perform side-effects. */ -export interface ExecutionContext< - InspectorAdapters extends Adapters = Adapters, - ExecutionContextSearch extends SerializableRecord = SerializableRecord -> { +export interface ExecutionContext { /** * Get search context of the expression. */ diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts index 0480e4966c01f..e73e07a387c46 100644 --- a/src/plugins/expressions/common/service/expressions_services.ts +++ b/src/plugins/expressions/common/service/expressions_services.ts @@ -8,7 +8,6 @@ import { Observable } from 'rxjs'; import type { Logger } from '@kbn/logging'; -import type { SerializableRecord } from '@kbn/utility-types'; import type { KibanaRequest } from '@kbn/core/server'; import type { KibanaExecutionContext } from '@kbn/core/public'; @@ -19,6 +18,7 @@ import { VersionedState, } from '@kbn/kibana-utils-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common/adapters'; +import { ExecutionContextSearch } from '@kbn/es-query'; import { Executor } from '../executor'; import { AnyExpressionRenderDefinition, ExpressionRendererRegistry } from '../expression_renderers'; import { ExpressionAstExpression } from '../ast'; @@ -130,7 +130,7 @@ export interface ExpressionsServiceSetup { } export interface ExpressionExecutionParams { - searchContext?: SerializableRecord; + searchContext?: ExecutionContextSearch; variables?: Record; diff --git a/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.test.tsx b/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.test.tsx index 0afdf72ea9b36..015dac1314bab 100644 --- a/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.test.tsx +++ b/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.test.tsx @@ -185,7 +185,7 @@ describe('ExpressionRenderer', () => { reload$={refreshSubject} expression="" debounce={1000} - searchContext={{ from: 'now-15m', to: 'now' }} + searchContext={{ timeRange: { from: 'now-15m', to: 'now' } }} /> ); diff --git a/src/plugins/expressions/public/types/index.ts b/src/plugins/expressions/public/types/index.ts index 870b44e9bc02c..7bbb486fde390 100644 --- a/src/plugins/expressions/public/types/index.ts +++ b/src/plugins/expressions/public/types/index.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import type { SerializableRecord } from '@kbn/utility-types'; import type { KibanaExecutionContext } from '@kbn/core/public'; import { Adapters } from '@kbn/inspector-plugin/public'; +import { ExecutionContextSearch } from '@kbn/es-query'; import { IInterpreterRenderHandlers, ExpressionValue, @@ -35,7 +35,7 @@ export interface ExpressionInterpreter { } export interface IExpressionLoaderParams { - searchContext?: SerializableRecord; + searchContext?: ExecutionContextSearch; context?: ExpressionValue; variables?: Record; // Enables debug tracking on each expression in the AST diff --git a/src/plugins/expressions/tsconfig.json b/src/plugins/expressions/tsconfig.json index 94f1d7852da39..5854100d9fa09 100644 --- a/src/plugins/expressions/tsconfig.json +++ b/src/plugins/expressions/tsconfig.json @@ -17,6 +17,7 @@ "@kbn/core-execution-context-common", "@kbn/tinymath", "@kbn/panel-loader", + "@kbn/es-query", ], "exclude": [ "target/**/*", diff --git a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts index a7b72cb863f71..f3d7a0e0d1f15 100644 --- a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts +++ b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.test.ts @@ -202,7 +202,7 @@ describe('kbn_url_storage', () => { await Promise.all([pr1, pr2, pr3]); expect(getCurrentUrl()).toBe('/3'); - expect(urlControls.getPendingUrl()).toBeUndefined(); + expect(urlControls.getPendingUrl()).toEqual(getCurrentUrl()); }); }); diff --git a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts index b81d3c1b81b63..9a4ed8e704b09 100644 --- a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts +++ b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts @@ -193,17 +193,17 @@ export const createKbnUrlControls = ( // runs scheduled url updates function flush(replace = shouldReplace) { - const nextUrl = getPendingUrl(); - - if (!nextUrl) return; + if (updateQueue.length === 0) { + return; + } + const nextUrl = getPendingUrl(); cleanUp(); const newUrl = updateUrl(nextUrl, replace); return newUrl; } function getPendingUrl() { - if (updateQueue.length === 0) return undefined; const resultUrl = updateQueue.reduce( (url, nextUpdate) => nextUpdate(url) ?? url, getCurrentUrl(history) diff --git a/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/create_kbn_url_state_storage.ts b/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/create_kbn_url_state_storage.ts index 6ad69238608c6..d823a95da59ce 100644 --- a/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/create_kbn_url_state_storage.ts +++ b/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/create_kbn_url_state_storage.ts @@ -116,7 +116,11 @@ export const createKbnUrlStateStorage = ( unlisten(); }; }).pipe( - map(() => getStateFromKbnUrl(key, undefined, { getFromHashQuery: useHashQuery })), + map(() => + getStateFromKbnUrl(key, history?.createHref(history.location), { + getFromHashQuery: useHashQuery, + }) + ), catchError((error) => { if (onGetErrorThrottled) onGetErrorThrottled(error); return of(null); diff --git a/src/plugins/unified_search/public/query_string_input/query_bar.scss b/src/plugins/unified_search/public/query_string_input/query_bar.scss index 89cca695ee154..2ecf27416a907 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar.scss +++ b/src/plugins/unified_search/public/query_string_input/query_bar.scss @@ -1,13 +1,9 @@ .kbnQueryBar__datePickerWrapper { .euiDatePopoverButton-isInvalid { background-image: euiFormControlGradient($euiColorDanger); - - // @todo Remove when EUI issue is resolved. - // @see https://github.com/elastic/eui/issues/4612 - &:focus { - color: $euiTextColor; - background-color: $euiFormBackgroundColor; - background-image: euiFormControlGradient($euiColorPrimary); - } } } +// increase the section height to avoid vertical scrolling +.euiQuickSelectPopover__section { + max-height: 142px; +} diff --git a/src/plugins/vis_types/timelion/public/helpers/get_timezone.ts b/src/plugins/vis_types/timelion/public/helpers/get_timezone.ts deleted file mode 100644 index 44fc531e77b78..0000000000000 --- a/src/plugins/vis_types/timelion/public/helpers/get_timezone.ts +++ /dev/null @@ -1,20 +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 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 moment from 'moment-timezone'; -import { IUiSettingsClient } from '@kbn/core/public'; - -export function getTimezone(config: IUiSettingsClient) { - if (config.isDefault('dateFormat:tz')) { - const detectedTimezone = moment.tz.guess(); - if (detectedTimezone) return detectedTimezone; - else return moment().format('Z'); - } else { - return config.get('dateFormat:tz', 'Browser'); - } -} diff --git a/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts b/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts index 283998460111f..499758a5c6cf7 100644 --- a/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts +++ b/src/plugins/vis_types/timelion/public/helpers/timelion_request_handler.ts @@ -11,8 +11,8 @@ import type { KibanaExecutionContext } from '@kbn/core/public'; import { DataView } from '@kbn/data-plugin/common'; import { Filter, buildEsQuery, TimeRange, Query } from '@kbn/es-query'; import { KibanaContext, getEsQueryConfig } from '@kbn/data-plugin/public'; +import { getTimeZone } from '@kbn/visualization-utils'; import { TimelionVisDependencies } from '../plugin'; -import { getTimezone } from './get_timezone'; import { TimelionVisParams } from '../timelion_vis_fn'; import { getDataSearch, getIndexPatterns } from './plugin_services'; import { VisSeries } from '../../common/vis_data'; @@ -58,7 +58,7 @@ export function getTimelionRequestHandler({ }: TimelionVisDependencies & { expressionAbortSignal: AbortSignal; }) { - const timezone = getTimezone(uiSettings); + const timezone = getTimeZone(uiSettings); return async function ({ timeRange, diff --git a/src/plugins/vis_types/timelion/tsconfig.json b/src/plugins/vis_types/timelion/tsconfig.json index 7121a7d7078be..b6581ddddb159 100644 --- a/src/plugins/vis_types/timelion/tsconfig.json +++ b/src/plugins/vis_types/timelion/tsconfig.json @@ -31,6 +31,7 @@ "@kbn/expect", "@kbn/std", "@kbn/timelion-grammar", + "@kbn/visualization-utils", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/timeseries/public/application/lib/get_timezone.ts b/src/plugins/vis_types/timeseries/public/application/lib/get_timezone.ts deleted file mode 100644 index 44fc531e77b78..0000000000000 --- a/src/plugins/vis_types/timeseries/public/application/lib/get_timezone.ts +++ /dev/null @@ -1,20 +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 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 moment from 'moment-timezone'; -import { IUiSettingsClient } from '@kbn/core/public'; - -export function getTimezone(config: IUiSettingsClient) { - if (config.isDefault('dateFormat:tz')) { - const detectedTimezone = moment.tz.guess(); - if (detectedTimezone) return detectedTimezone; - else return moment().format('Z'); - } else { - return config.get('dateFormat:tz', 'Browser'); - } -} diff --git a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/index.js b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/index.js index 418d1c0c19969..9f88adf53ca45 100644 --- a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/index.js +++ b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/index.js @@ -28,7 +28,7 @@ import { Tooltip, } from '@elastic/charts'; import { EuiIcon } from '@elastic/eui'; -import { getTimezone } from '../../../lib/get_timezone'; +import { getTimeZone } from '@kbn/visualization-utils'; import { getUISettings, getCharts } from '../../../../services'; import { GRID_LINE_CONFIG, ICON_TYPES_MAP, STACKED_OPTIONS } from '../../constants'; import { AreaSeriesDecorator } from './decorators/area_decorator'; @@ -121,7 +121,7 @@ export const TimeSeries = ({ } const uiSettings = getUISettings(); - const timeZone = getTimezone(uiSettings); + const timeZone = getTimeZone(uiSettings); const hasBarChart = series.some(({ bars }) => bars?.show); // apply legend style change if bgColor is configured diff --git a/src/plugins/vis_types/timeseries/public/request_handler.ts b/src/plugins/vis_types/timeseries/public/request_handler.ts index a3b6d43893c3c..721fdbea51798 100644 --- a/src/plugins/vis_types/timeseries/public/request_handler.ts +++ b/src/plugins/vis_types/timeseries/public/request_handler.ts @@ -8,7 +8,7 @@ import type { KibanaExecutionContext } from '@kbn/core/public'; import type { Adapters } from '@kbn/inspector-plugin/common'; import { KibanaContext } from '@kbn/data-plugin/public'; -import { getTimezone } from './application/lib/get_timezone'; +import { getTimeZone } from '@kbn/visualization-utils'; import { getUISettings, getDataStart, getCoreStart } from './services'; import { ROUTES } from '../common/constants'; @@ -44,7 +44,7 @@ export const metricsRequestHandler = async ({ expressionAbortSignal.addEventListener('abort', expressionAbortHandler); - const timezone = getTimezone(config); + const timezone = getTimeZone(config); const uiStateObj = uiState[visParams.type] ?? {}; const dataSearch = data.search; const parsedTimeRange = data.query.timefilter.timefilter.calculateBounds(input?.timeRange!); diff --git a/src/plugins/vis_types/timeseries/tsconfig.json b/src/plugins/vis_types/timeseries/tsconfig.json index e87ecc1e3f98f..49152c53f1f2f 100644 --- a/src/plugins/vis_types/timeseries/tsconfig.json +++ b/src/plugins/vis_types/timeseries/tsconfig.json @@ -45,6 +45,7 @@ "@kbn/home-plugin", "@kbn/std", "@kbn/tinymath", + "@kbn/visualization-utils", ], "exclude": [ "target/**/*", diff --git a/src/plugins/vis_types/vega/public/vega_fn.ts b/src/plugins/vis_types/vega/public/vega_fn.ts index 6dbd7c9792502..784d4ce1b7026 100644 --- a/src/plugins/vis_types/vega/public/vega_fn.ts +++ b/src/plugins/vis_types/vega/public/vega_fn.ts @@ -8,7 +8,6 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { ExecutionContextSearch } from '@kbn/data-plugin/public'; import { ExecutionContext, ExpressionFunctionDefinition, @@ -40,7 +39,7 @@ export type VegaExpressionFunctionDefinition = ExpressionFunctionDefinition< Input, Arguments, Output, - ExecutionContext + ExecutionContext >; export const createVegaFn = ( diff --git a/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts b/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts index d34ad5ccd5f4d..b980c684e529b 100644 --- a/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts +++ b/test/api_integration/apis/data_views/default_index_pattern/default_index_pattern.ts @@ -48,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response5.status).to.be(200); const response6 = await supertest.get(defaultPath); - expect(response6.body[serviceKeyId]).to.be(null); + expect(response6.body[serviceKeyId]).to.be(''); }); }); }); diff --git a/tsconfig.base.json b/tsconfig.base.json index 8f85732a60518..e634fe61248a1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1702,6 +1702,8 @@ "@kbn/vis-type-xy-plugin/*": ["src/plugins/vis_types/xy/*"], "@kbn/visualization-ui-components": ["packages/kbn-visualization-ui-components"], "@kbn/visualization-ui-components/*": ["packages/kbn-visualization-ui-components/*"], + "@kbn/visualization-utils": ["packages/kbn-visualization-utils"], + "@kbn/visualization-utils/*": ["packages/kbn-visualization-utils/*"], "@kbn/visualizations-plugin": ["src/plugins/visualizations"], "@kbn/visualizations-plugin/*": ["src/plugins/visualizations/*"], "@kbn/watcher-plugin": ["x-pack/plugins/watcher"], diff --git a/x-pack/packages/kbn-slo-schema/index.ts b/x-pack/packages/kbn-slo-schema/index.ts index 3d9e295055a61..98b183d391bb7 100644 --- a/x-pack/packages/kbn-slo-schema/index.ts +++ b/x-pack/packages/kbn-slo-schema/index.ts @@ -8,3 +8,4 @@ export * from './src/schema'; export * from './src/rest_specs'; export * from './src/models/duration'; +export * from './src/models/pagination'; diff --git a/x-pack/packages/kbn-slo-schema/src/models/pagination.ts b/x-pack/packages/kbn-slo-schema/src/models/pagination.ts new file mode 100644 index 0000000000000..815c30f71d4c4 --- /dev/null +++ b/x-pack/packages/kbn-slo-schema/src/models/pagination.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. + */ +export interface Paginated { + total: number; + page: number; + perPage: number; + results: T[]; +} + +export interface Pagination { + page: number; + perPage: number; +} diff --git a/x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts b/x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts index 54e463adc210c..574a7eb1f9244 100644 --- a/x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts +++ b/x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts @@ -6,6 +6,7 @@ */ import * as t from 'io-ts'; +import { toBooleanRt } from '@kbn/io-ts-utils'; import { allOrAnyString, apmTransactionDurationIndicatorSchema, @@ -109,6 +110,7 @@ const sloResponseSchema = t.intersection([ groupBy: allOrAnyString, createdAt: dateType, updatedAt: dateType, + version: t.number, }), t.partial({ instanceId: allOrAnyString, @@ -157,6 +159,12 @@ const manageSLOParamsSchema = t.type({ path: t.type({ id: sloIdSchema }), }); +const resetSLOParamsSchema = t.type({ + path: t.type({ id: sloIdSchema }), +}); + +const resetSLOResponseSchema = sloResponseSchema; + const updateSLOResponseSchema = sloResponseSchema; const findSLOResponseSchema = t.type({ @@ -182,23 +190,21 @@ const fetchHistoricalSummaryResponseSchema = t.array( }) ); -/** - * The query params schema for /internal/observability/slo/_definitions - * - * @private - */ -const findSloDefinitionsParamsSchema = t.type({ - query: t.type({ +const findSloDefinitionsParamsSchema = t.partial({ + query: t.partial({ search: t.string, + includeOutdatedOnly: toBooleanRt, + page: t.string, + perPage: t.string, }), }); -/** - * The response schema for /internal/observability/slo/_definitions - * - * @private - */ -const findSloDefinitionsResponseSchema = t.array(sloResponseSchema); +const findSloDefinitionsResponseSchema = t.type({ + page: t.number, + perPage: t.number, + total: t.number, + results: t.array(sloResponseSchema), +}); const getSLOBurnRatesResponseSchema = t.type({ burnRates: t.array( @@ -244,6 +250,9 @@ type GetSLOResponse = t.OutputOf; type ManageSLOParams = t.TypeOf; +type ResetSLOParams = t.TypeOf; +type ResetSLOResponse = t.OutputOf; + type UpdateSLOInput = t.OutputOf; type UpdateSLOParams = t.TypeOf; type UpdateSLOResponse = t.OutputOf; @@ -258,12 +267,8 @@ type FetchHistoricalSummaryParams = t.TypeOf; type HistoricalSummaryResponse = t.OutputOf; -/** - * The response type for /internal/observability/slo/_definitions - * - * @private - */ -type FindSloDefinitionsResponse = t.OutputOf; +type FindSLODefinitionsParams = t.TypeOf; +type FindSLODefinitionsResponse = t.OutputOf; type GetPreviewDataParams = t.TypeOf; type GetPreviewDataResponse = t.OutputOf; @@ -300,6 +305,8 @@ export { findSloDefinitionsParamsSchema, findSloDefinitionsResponseSchema, manageSLOParamsSchema, + resetSLOParamsSchema, + resetSLOResponseSchema, sloResponseSchema, sloWithSummaryResponseSchema, updateSLOParamsSchema, @@ -325,8 +332,11 @@ export type { FetchHistoricalSummaryParams, FetchHistoricalSummaryResponse, HistoricalSummaryResponse, - FindSloDefinitionsResponse, + FindSLODefinitionsParams, + FindSLODefinitionsResponse, ManageSLOParams, + ResetSLOParams, + ResetSLOResponse, SLOResponse, SLOWithSummaryResponse, UpdateSLOInput, diff --git a/x-pack/packages/kbn-slo-schema/src/schema/slo.ts b/x-pack/packages/kbn-slo-schema/src/schema/slo.ts index 29df82010710d..27e8a9e998f71 100644 --- a/x-pack/packages/kbn-slo-schema/src/schema/slo.ts +++ b/x-pack/packages/kbn-slo-schema/src/schema/slo.ts @@ -50,6 +50,7 @@ const sloSchema = t.type({ createdAt: dateType, updatedAt: dateType, groupBy: allOrAnyString, + version: t.number, }); const sloWithSummarySchema = t.intersection([sloSchema, t.type({ summary: summarySchema })]); diff --git a/x-pack/packages/kbn-slo-schema/tsconfig.json b/x-pack/packages/kbn-slo-schema/tsconfig.json index 3c94d9a902af8..bc9fd2fdede8a 100644 --- a/x-pack/packages/kbn-slo-schema/tsconfig.json +++ b/x-pack/packages/kbn-slo-schema/tsconfig.json @@ -11,7 +11,8 @@ "**/*.ts" ], "kbn_references": [ - "@kbn/std" + "@kbn/std", + "@kbn/io-ts-utils" ], "exclude": [ "target/**/*", diff --git a/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx b/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx index 7fa45baa1fdc6..e6c4e7b573335 100644 --- a/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx +++ b/x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx @@ -24,7 +24,7 @@ import { BarStyleAccessor, RectAnnotationSpec, } from '@elastic/charts/dist/chart_types/xy_chart/utils/specs'; - +import { getTimeZone } from '@kbn/visualization-utils'; import { i18n } from '@kbn/i18n'; import { IUiSettingsClient } from '@kbn/core/public'; import { @@ -146,16 +146,6 @@ enum VIEW_MODE { BRUSH = 'brush', } -function getTimezone(uiSettings: IUiSettingsClient) { - if (uiSettings.isDefault('dateFormat:tz')) { - const detectedTimezone = moment.tz.guess(); - if (detectedTimezone) return detectedTimezone; - else return moment().format('Z'); - } else { - return uiSettings.get('dateFormat:tz', 'Browser'); - } -} - function getBaselineBadgeOverflow( windowParametersAsPixels: WindowParameters, baselineBadgeWidth: number @@ -297,7 +287,7 @@ export const DocumentCountChart: FC = (props) => { timefilterUpdateHandler({ from, to }); }; - const timeZone = getTimezone(uiSettings); + const timeZone = getTimeZone(uiSettings); const [originalWindowParameters, setOriginalWindowParameters] = useState< WindowParameters | undefined diff --git a/x-pack/packages/ml/aiops_components/tsconfig.json b/x-pack/packages/ml/aiops_components/tsconfig.json index 5e4ebc04b91aa..2b3f56be981fe 100644 --- a/x-pack/packages/ml/aiops_components/tsconfig.json +++ b/x-pack/packages/ml/aiops_components/tsconfig.json @@ -26,6 +26,7 @@ "@kbn/charts-plugin", "@kbn/data-plugin", "@kbn/field-formats-plugin", + "@kbn/visualization-utils", ], "exclude": [ "target/**/*", diff --git a/x-pack/performance/journeys/many_fields_transform.ts b/x-pack/performance/journeys/many_fields_transform.ts index 14187c20e5c59..6fe945914c358 100644 --- a/x-pack/performance/journeys/many_fields_transform.ts +++ b/x-pack/performance/journeys/many_fields_transform.ts @@ -15,11 +15,11 @@ export const journey = new Journey({ .step('Go to Transforms', async ({ page, kbnUrl, kibanaPage }) => { await page.goto(kbnUrl.get(`app/management/data/transform`)); await kibanaPage.waitForHeader(); - await page.waitForSelector(subj('transformButtonCreate')); + await page.waitForSelector(subj('transformCreateFirstButton')); await page.waitForSelector(subj('globalLoadingIndicator-hidden')); }) .step('Go to data view selection', async ({ page }) => { - const createButtons = page.locator(subj('transformButtonCreate')); + const createButtons = page.locator(subj('transformCreateFirstButton')); await createButtons.first().click(); await page.waitForSelector(subj('savedObjectsFinderTable')); }) diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts index 35860bdfb0c53..02c647f17664d 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts @@ -43,7 +43,7 @@ import { actionsAuthorizationMock } from '../authorization/actions_authorization import { trackLegacyRBACExemption } from '../lib/track_legacy_rbac_exemption'; import { ConnectorTokenClient } from '../lib/connector_token_client'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; -import { Logger } from '@kbn/core/server'; +import { Logger, SavedObject } from '@kbn/core/server'; import { connectorTokenClientMock } from '../lib/connector_token_client.mock'; import { inMemoryMetricsMock } from '../monitoring/in_memory_metrics.mock'; import { getOAuthJwtAccessToken } from '../lib/get_oauth_jwt_access_token'; @@ -120,6 +120,14 @@ const executor: ExecutorType<{}, {}, {}, void> = async (options) => { const connectorTokenClient = connectorTokenClientMock.create(); const inMemoryMetrics = inMemoryMetricsMock.create(); +const actionTypeIdFromSavedObjectMock = (actionTypeId: string = 'my-action-type') => { + return { + attributes: { + actionTypeId, + }, + } as SavedObject; +}; + beforeEach(() => { jest.resetAllMocks(); mockedLicenseState = licenseStateMock.create(); @@ -2664,6 +2672,7 @@ describe('execute()', () => { (getAuthorizationModeBySource as jest.Mock).mockImplementationOnce(() => { return AuthorizationMode.RBAC; }); + unsecuredSavedObjectsClient.get.mockResolvedValueOnce(actionTypeIdFromSavedObjectMock()); await actionsClient.execute({ actionId: 'action-id', params: { @@ -2672,6 +2681,7 @@ describe('execute()', () => { source: asHttpRequestExecutionSource(request), }); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', additionalPrivileges: [], }); @@ -2685,6 +2695,8 @@ describe('execute()', () => { new Error(`Unauthorized to execute all actions`) ); + unsecuredSavedObjectsClient.get.mockResolvedValueOnce(actionTypeIdFromSavedObjectMock()); + await expect( actionsClient.execute({ actionId: 'action-id', @@ -2696,6 +2708,7 @@ describe('execute()', () => { ).rejects.toMatchInlineSnapshot(`[Error: Unauthorized to execute all actions]`); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', additionalPrivileges: [], }); @@ -2768,12 +2781,15 @@ describe('execute()', () => { executor, }); + unsecuredSavedObjectsClient.get.mockResolvedValueOnce(actionTypeIdFromSavedObjectMock()); + await actionsClient.execute({ actionId: 'system-connector-.cases', params: {}, }); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', additionalPrivileges: ['test/create'], }); @@ -2832,12 +2848,15 @@ describe('execute()', () => { executor, }); + unsecuredSavedObjectsClient.get.mockResolvedValueOnce(actionTypeIdFromSavedObjectMock()); + await actionsClient.execute({ actionId: 'testPreconfigured', params: {}, }); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', additionalPrivileges: [], }); @@ -2895,12 +2914,15 @@ describe('execute()', () => { executor, }); + unsecuredSavedObjectsClient.get.mockResolvedValueOnce(actionTypeIdFromSavedObjectMock()); + await actionsClient.execute({ actionId: 'system-connector-.cases', params: { foo: 'bar' }, }); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', additionalPrivileges: ['test/create'], }); @@ -3032,6 +3054,7 @@ describe('bulkEnqueueExecution()', () => { }, ]); expect(authorization.ensureAuthorized).toHaveBeenCalledWith({ + actionTypeId: 'my-action-type', operation: 'execute', }); }); diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.ts b/x-pack/plugins/actions/server/actions_client/actions_client.ts index 85376e64897ad..a5314ab2d7d3d 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.ts @@ -11,7 +11,7 @@ import url from 'url'; import { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { i18n } from '@kbn/i18n'; -import { omitBy, isUndefined, compact } from 'lodash'; +import { omitBy, isUndefined, compact, uniq } from 'lodash'; import { IScopedClusterClient, SavedObjectsClientContract, @@ -681,14 +681,39 @@ export class ActionsClient { }: Omit): Promise< ActionTypeExecutorResult > { + const log = this.context.logger; + if ( (await getAuthorizationModeBySource(this.context.unsecuredSavedObjectsClient, source)) === AuthorizationMode.RBAC ) { const additionalPrivileges = this.getSystemActionKibanaPrivileges(actionId, params); + let actionTypeId: string | undefined; + + try { + if (this.isPreconfigured(actionId)) { + const connector = this.context.inMemoryConnectors.find( + (inMemoryConnector) => inMemoryConnector.id === actionId + ); + + actionTypeId = connector?.actionTypeId; + } else { + // TODO: Optimize so we don't do another get on top of getAuthorizationModeBySource and within the actionExecutor.execute + const { attributes } = await this.context.unsecuredSavedObjectsClient.get( + 'action', + actionId + ); + + actionTypeId = attributes.actionTypeId; + } + } catch (err) { + log.debug(`Failed to retrieve actionTypeId for action [${actionId}]`, err); + } + await this.context.authorization.ensureAuthorized({ operation: 'execute', additionalPrivileges, + actionTypeId, }); } else { trackLegacyRBACExemption('execute', this.context.usageCounter); @@ -723,6 +748,11 @@ export class ActionsClient { * inside the ActionExecutor at execution time */ await this.context.authorization.ensureAuthorized({ operation: 'execute' }); + await Promise.all( + uniq(options.map((o) => o.actionTypeId)).map((actionTypeId) => + this.context.authorization.ensureAuthorized({ operation: 'execute', actionTypeId }) + ) + ); } if (authModes[AuthorizationMode.Legacy] > 0) { trackLegacyRBACExemption( @@ -740,7 +770,10 @@ export class ActionsClient { (await getAuthorizationModeBySource(this.context.unsecuredSavedObjectsClient, source)) === AuthorizationMode.RBAC ) { - await this.context.authorization.ensureAuthorized({ operation: 'execute' }); + await this.context.authorization.ensureAuthorized({ + operation: 'execute', + actionTypeId: options.actionTypeId, + }); } else { trackLegacyRBACExemption('ephemeralEnqueuedExecution', this.context.usageCounter); } diff --git a/x-pack/plugins/actions/server/authorization/actions_authorization.test.ts b/x-pack/plugins/actions/server/authorization/actions_authorization.test.ts index fa65b06777f98..f9f2094ba05ba 100644 --- a/x-pack/plugins/actions/server/authorization/actions_authorization.test.ts +++ b/x-pack/plugins/actions/server/authorization/actions_authorization.test.ts @@ -14,10 +14,16 @@ import { } from '../constants/saved_objects'; import { AuthenticatedUser } from '@kbn/security-plugin/server'; import { AuthorizationMode } from './get_authorization_mode_by_source'; +import { + CONNECTORS_ADVANCED_EXECUTE_PRIVILEGE_API_TAG, + CONNECTORS_BASIC_EXECUTE_PRIVILEGE_API_TAG, +} from '../feature'; const request = {} as KibanaRequest; const mockAuthorizationAction = (type: string, operation: string) => `${type}/${operation}`; +const BASIC_EXECUTE_AUTHZ = `api:${CONNECTORS_BASIC_EXECUTE_PRIVILEGE_API_TAG}`; +const ADVANCED_EXECUTE_AUTHZ = `api:${CONNECTORS_ADVANCED_EXECUTE_PRIVILEGE_API_TAG}`; function mockSecurity() { const security = securityMock.createSetup(); @@ -83,7 +89,7 @@ describe('ensureAuthorized', () => { expect(authorization.actions.savedObject.get).toHaveBeenCalledWith('action', 'create'); expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('action', 'create')], + kibana: [mockAuthorizationAction('action', 'create'), BASIC_EXECUTE_AUTHZ], }); }); @@ -123,6 +129,7 @@ describe('ensureAuthorized', () => { kibana: [ mockAuthorizationAction(ACTION_SAVED_OBJECT_TYPE, 'get'), mockAuthorizationAction(ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, 'create'), + BASIC_EXECUTE_AUTHZ, ], }); }); @@ -225,6 +232,54 @@ describe('ensureAuthorized', () => { mockAuthorizationAction(ACTION_SAVED_OBJECT_TYPE, 'get'), mockAuthorizationAction(ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, 'create'), 'test/create', + BASIC_EXECUTE_AUTHZ, + ], + }); + }); + + test('checks SentinelOne connector privileges correctly', async () => { + const { authorization } = mockSecurity(); + const checkPrivileges: jest.MockedFunction< + ReturnType + > = jest.fn(); + + authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + const actionsAuthorization = new ActionsAuthorization({ + request, + authorization, + }); + + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: [ + { + privilege: mockAuthorizationAction('myType', 'execute'), + authorized: true, + }, + ], + }); + + await actionsAuthorization.ensureAuthorized({ + operation: 'execute', + actionTypeId: '.sentinelone', + }); + + expect(authorization.actions.savedObject.get).toHaveBeenCalledWith( + ACTION_SAVED_OBJECT_TYPE, + 'get' + ); + + expect(authorization.actions.savedObject.get).toHaveBeenCalledWith( + ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, + 'create' + ); + + expect(checkPrivileges).toHaveBeenCalledWith({ + kibana: [ + mockAuthorizationAction(ACTION_SAVED_OBJECT_TYPE, 'get'), + mockAuthorizationAction(ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, 'create'), + ADVANCED_EXECUTE_AUTHZ, ], }); }); diff --git a/x-pack/plugins/actions/server/authorization/actions_authorization.ts b/x-pack/plugins/actions/server/authorization/actions_authorization.ts index 34eec819b431b..df282b95e9686 100644 --- a/x-pack/plugins/actions/server/authorization/actions_authorization.ts +++ b/x-pack/plugins/actions/server/authorization/actions_authorization.ts @@ -74,7 +74,15 @@ export class ActionsAuthorization { : [authorization.actions.savedObject.get(ACTION_SAVED_OBJECT_TYPE, operation)]; const { hasAllRequested } = await checkPrivileges({ - kibana: [...privileges, ...additionalPrivileges], + kibana: [ + ...privileges, + ...additionalPrivileges, + // SentinelOne sub-actions require that a user have `all` privilege to Actions and Connectors. + // This is a temporary solution until a more robust RBAC approach can be implemented for sub-actions + actionTypeId === '.sentinelone' + ? 'api:actions:execute-advanced-connectors' + : 'api:actions:execute-basic-connectors', + ], }); if (!hasAllRequested) { throw Boom.forbidden( diff --git a/x-pack/plugins/actions/server/feature.ts b/x-pack/plugins/actions/server/feature.ts index aa0b88dbee633..b44aaf61cad62 100644 --- a/x-pack/plugins/actions/server/feature.ts +++ b/x-pack/plugins/actions/server/feature.ts @@ -13,6 +13,9 @@ import { CONNECTOR_TOKEN_SAVED_OBJECT_TYPE, } from './constants/saved_objects'; +export const CONNECTORS_ADVANCED_EXECUTE_PRIVILEGE_API_TAG = 'actions:execute-advanced-connectors'; +export const CONNECTORS_BASIC_EXECUTE_PRIVILEGE_API_TAG = 'actions:execute-basic-connectors'; + /** * The order of appearance in the feature privilege page * under the management section. @@ -33,7 +36,10 @@ export const ACTIONS_FEATURE = { privileges: { all: { app: [], - api: [], + api: [ + CONNECTORS_ADVANCED_EXECUTE_PRIVILEGE_API_TAG, + CONNECTORS_BASIC_EXECUTE_PRIVILEGE_API_TAG, + ], catalogue: [], management: { insightsAndAlerting: ['triggersActions', 'triggersActionsConnectors'], @@ -50,7 +56,7 @@ export const ACTIONS_FEATURE = { }, read: { app: [], - api: [], + api: [CONNECTORS_BASIC_EXECUTE_PRIVILEGE_API_TAG], catalogue: [], management: { insightsAndAlerting: ['triggersActions', 'triggersActionsConnectors'], diff --git a/x-pack/plugins/actions/server/lib/action_executor.test.ts b/x-pack/plugins/actions/server/lib/action_executor.test.ts index 9e277b9084329..c58e16a11aa4a 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.test.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.test.ts @@ -835,6 +835,7 @@ test('successfully authorize system actions', async () => { await actionExecutor.execute({ ...executeParams, actionId: 'system-connector-.cases' }); expect(authorizationMock.ensureAuthorized).toBeCalledWith({ + actionTypeId: '.cases', operation: 'execute', additionalPrivileges: ['test/create'], }); @@ -875,7 +876,10 @@ test('Execute of SentinelOne sub-actions require create privilege', async () => await actionExecutor.execute({ ...executeParams, actionId: 'sentinel-one-connector-authz' }); - expect(authorizationMock.ensureAuthorized).toHaveBeenCalledWith({ operation: 'create' }); + expect(authorizationMock.ensureAuthorized).toHaveBeenCalledWith({ + operation: 'execute', + actionTypeId: '.sentinelone', + }); }); test('pass the params to the actionTypeRegistry when authorizing system actions', async () => { @@ -909,6 +913,7 @@ test('pass the params to the actionTypeRegistry when authorizing system actions' }); expect(authorizationMock.ensureAuthorized).toBeCalledWith({ + actionTypeId: '.cases', operation: 'execute', additionalPrivileges: ['test/create'], }); diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index fd1d8f92a0482..69aab56e4e5b3 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -565,14 +565,17 @@ const ensureAuthorizedToExecute = async ({ params ); - await authorization.ensureAuthorized({ operation: 'execute', additionalPrivileges }); - } - - // SentinelOne sub-actions require that a user have `all` privilege to Actions and Connectors. - // This is a temporary solution until a more robust RBAC approach can be implemented for sub-actions - if (actionTypeId === '.sentinelone') { await authorization.ensureAuthorized({ - operation: 'create', + operation: 'execute', + additionalPrivileges, + actionTypeId, + }); + } else if (actionTypeId === '.sentinelone') { + // SentinelOne sub-actions require that a user have `all` privilege to Actions and Connectors. + // This is a temporary solution until a more robust RBAC approach can be implemented for sub-actions + await authorization.ensureAuthorized({ + operation: 'execute', + actionTypeId, }); } } catch (error) { diff --git a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap index 79ecdc077ea6f..a372355d1db7c 100644 --- a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap @@ -151,6 +151,12 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the "description": "Total number of services utilizing the opentelemetry/swift agent within the last day" } }, + "opentelemetry/android": { + "type": "long", + "_meta": { + "description": "Total number of services utilizing the opentelemetry/android agent within the last day" + } + }, "opentelemetry/webjs": { "type": "long", "_meta": { diff --git a/x-pack/plugins/apm/public/components/app/profiling_overview/index.tsx b/x-pack/plugins/apm/public/components/app/profiling_overview/index.tsx index 3e460448ad422..9e8a0e2baf46e 100644 --- a/x-pack/plugins/apm/public/components/app/profiling_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/profiling_overview/index.tsx @@ -78,6 +78,8 @@ export function ProfilingOverview() { environment={environment} dataSource={preferred?.source} kuery={kuery} + rangeFrom={rangeFrom} + rangeTo={rangeTo} /> ), @@ -99,12 +101,23 @@ export function ProfilingOverview() { endIndex={10} dataSource={preferred?.source} kuery={kuery} + rangeFrom={rangeFrom} + rangeTo={rangeTo} /> ), }, ]; - }, [end, environment, kuery, preferred?.source, serviceName, start]); + }, [ + end, + environment, + kuery, + preferred?.source, + rangeFrom, + rangeTo, + serviceName, + start, + ]); if (isLoading) { return ( diff --git a/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx b/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx index 8dcda14783a8f..bbae54abdf708 100644 --- a/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx +++ b/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_flamegraph.tsx @@ -40,6 +40,8 @@ interface Props { ApmDocumentType.TransactionMetric | ApmDocumentType.TransactionEvent >; kuery: string; + rangeFrom: string; + rangeTo: string; } export function ProfilingFlamegraph({ @@ -49,6 +51,8 @@ export function ProfilingFlamegraph({ environment, dataSource, kuery, + rangeFrom, + rangeTo, }: Props) { const { profilingLocators } = useProfilingPlugin(); @@ -93,6 +97,8 @@ export function ProfilingFlamegraph({ data-test-subj="apmProfilingFlamegraphGoToFlamegraphLink" href={profilingLocators?.flamegraphLocator.getRedirectUrl({ kuery: mergeKueries([`(${hostNamesKueryFormat})`, kuery]), + rangeFrom, + rangeTo, })} > {i18n.translate('xpack.apm.profiling.flamegraph.link', { diff --git a/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_top_functions.tsx b/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_top_functions.tsx index 7b428802fbfc1..0462af188d3f9 100644 --- a/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_top_functions.tsx +++ b/x-pack/plugins/apm/public/components/app/profiling_overview/profiling_top_functions.tsx @@ -31,6 +31,8 @@ interface Props { ApmDocumentType.TransactionMetric | ApmDocumentType.TransactionEvent >; kuery: string; + rangeFrom: string; + rangeTo: string; } export function ProfilingTopNFunctions({ @@ -42,6 +44,8 @@ export function ProfilingTopNFunctions({ endIndex, dataSource, kuery, + rangeFrom, + rangeTo, }: Props) { const { profilingLocators } = useProfilingPlugin(); @@ -97,6 +101,8 @@ export function ProfilingTopNFunctions({ data-test-subj="apmProfilingTopNFunctionsGoToUniversalProfilingFlamegraphLink" href={profilingLocators?.topNFunctionsLocator.getRedirectUrl({ kuery: mergeKueries([`(${hostNamesKueryFormat})`, kuery]), + rangeFrom, + rangeTo, })} > {i18n.translate('xpack.apm.profiling.topnFunctions.link', { diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts index e52be12ca5c36..33a95f246f86b 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -373,6 +373,13 @@ const apmPerAgentSchema: Pick< 'Total number of services utilizing the opentelemetry/swift agent within the last day', }, }, + 'opentelemetry/android': { + type: 'long', + _meta: { + description: + 'Total number of services utilizing the opentelemetry/android agent within the last day', + }, + }, 'opentelemetry/webjs': { type: 'long', _meta: { diff --git a/x-pack/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts b/x-pack/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts index ea6e1436f00d0..1cd2ebfc7542a 100644 --- a/x-pack/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts +++ b/x-pack/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts @@ -28,7 +28,7 @@ export async function decoratePackagePolicyWithAgentConfigAndSourceMap({ apmIndices: APMIndices; }) { const [agentConfigurations, { artifacts }] = await Promise.all([ - listConfigurations(internalESClient, apmIndices), + listConfigurations({ internalESClient, apmIndices }), listSourceMapArtifacts({ fleetPluginStart }), ]); diff --git a/x-pack/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts b/x-pack/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts index ce8d4421dfc46..56f124ec150ba 100644 --- a/x-pack/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts +++ b/x-pack/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts @@ -39,7 +39,7 @@ export async function syncAgentConfigsToApmPackagePolicies({ const [savedObjectsClient, agentConfigurations, packagePolicies] = await Promise.all([ getInternalSavedObjectsClient(coreStart), - listConfigurations(internalESClient, apmIndices), + listConfigurations({ internalESClient, apmIndices }), getApmPackagePolicies({ coreStart, fleetPluginStart }), ]); diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts index 232c3d2d50c46..b8f393bb34406 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts @@ -6,7 +6,7 @@ */ import type { SearchHit } from '@kbn/es-types'; -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { SERVICE_ENVIRONMENT, @@ -15,16 +15,16 @@ import { import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; import { convertConfigSettingsToString } from './convert_settings_to_string'; -import { getConfigsAppliedToAgentsThroughFleet } from './get_config_applied_to_agent_through_fleet'; +import { getAgentConfigEtagMetrics } from './get_agent_config_etag_metrics'; export async function findExactConfiguration({ service, internalESClient, - apmIndices, + apmEventClient, }: { service: AgentConfiguration['service']; internalESClient: APMInternalESClient; - apmIndices: APMIndices; + apmEventClient: APMEventClient; }) { const serviceNameFilter = service.name ? { term: { [SERVICE_NAME]: service.name } } @@ -43,13 +43,10 @@ export async function findExactConfiguration({ }, }; - const [agentConfig, configsAppliedToAgentsThroughFleet] = await Promise.all([ - internalESClient.search( - 'find_exact_agent_configuration', - params - ), - getConfigsAppliedToAgentsThroughFleet(internalESClient, apmIndices), - ]); + const agentConfig = await internalESClient.search< + AgentConfiguration, + typeof params + >('find_exact_agent_configuration', params); const hit = agentConfig.hits.hits[0] as | SearchHit @@ -59,11 +56,33 @@ export async function findExactConfiguration({ return; } + const appliedByAgent = await getIsAppliedByAgent({ + apmEventClient, + agentConfiguration: hit._source, + }); + return { id: hit._id, ...convertConfigSettingsToString(hit)._source, - applied_by_agent: - hit._source.applied_by_agent || - configsAppliedToAgentsThroughFleet.hasOwnProperty(hit._source.etag), + applied_by_agent: appliedByAgent, }; } + +async function getIsAppliedByAgent({ + apmEventClient, + agentConfiguration, +}: { + apmEventClient: APMEventClient; + agentConfiguration: AgentConfiguration; +}) { + if (agentConfiguration.applied_by_agent) { + return true; + } + + const appliedEtags = await getAgentConfigEtagMetrics( + apmEventClient, + agentConfiguration.etag + ); + + return appliedEtags.includes(agentConfiguration.etag); +} diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts similarity index 55% rename from x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts rename to x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts index 067d7565247b9..fccf26f591ce3 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_config_applied_to_agent_through_fleet.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts @@ -7,23 +7,26 @@ import { termQuery, rangeQuery } from '@kbn/observability-plugin/server'; import datemath from '@kbn/datemath'; -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { METRICSET_NAME } from '../../../../common/es_fields/apm'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; -export async function getConfigsAppliedToAgentsThroughFleet( - internalESClient: APMInternalESClient, - apmIndices: APMIndices +export async function getAgentConfigEtagMetrics( + apmEventClient: APMEventClient, + etag?: string ) { const params = { - index: apmIndices.metric, - track_total_hits: 0, - size: 0, + apm: { + events: [ProcessorEvent.metric], + }, body: { + track_total_hits: 0, + size: 0, query: { bool: { filter: [ ...termQuery(METRICSET_NAME, 'agent_config'), + ...termQuery('labels.etag', etag), ...rangeQuery( datemath.parse('now-15m')!.valueOf(), datemath.parse('now')!.valueOf() @@ -42,18 +45,14 @@ export async function getConfigsAppliedToAgentsThroughFleet( }, }; - const response = await internalESClient.search( - 'get_config_applied_to_agent_through_fleet', + const response = await apmEventClient.search( + 'get_agent_config_etag_metrics', params ); return ( - response.aggregations?.config_by_etag.buckets.reduce( - (configsAppliedToAgentsThroughFleet, bucket) => { - configsAppliedToAgentsThroughFleet[bucket.key as string] = true; - return configsAppliedToAgentsThroughFleet; - }, - {} as Record - ) ?? {} + response.aggregations?.config_by_etag.buckets.map( + ({ key }) => key as string + ) ?? [] ); } diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts index 940ac7cd0b5a5..4566629bebd85 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts @@ -6,27 +6,33 @@ */ import { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { convertConfigSettingsToString } from './convert_settings_to_string'; -import { getConfigsAppliedToAgentsThroughFleet } from './get_config_applied_to_agent_through_fleet'; +import { getAgentConfigEtagMetrics } from './get_agent_config_etag_metrics'; import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; -export async function listConfigurations( - internalESClient: APMInternalESClient, - apmIndices: APMIndices -) { +export async function listConfigurations({ + internalESClient, + apmEventClient, + apmIndices, +}: { + internalESClient: APMInternalESClient; + apmEventClient?: APMEventClient; + apmIndices: APMIndices; +}) { const params = { index: APM_AGENT_CONFIGURATION_INDEX, size: 200, }; - const [agentConfigs, configsAppliedToAgentsThroughFleet] = await Promise.all([ + const [agentConfigs, appliedEtags = []] = await Promise.all([ internalESClient.search( 'list_agent_configuration', params ), - getConfigsAppliedToAgentsThroughFleet(internalESClient, apmIndices), + apmEventClient ? getAgentConfigEtagMetrics(apmEventClient) : undefined, ]); return agentConfigs.hits.hits @@ -36,7 +42,7 @@ export async function listConfigurations( ...hit._source, applied_by_agent: hit._source.applied_by_agent || - configsAppliedToAgentsThroughFleet.hasOwnProperty(hit._source.etag), + appliedEtags.includes(hit._source.etag), }; }); } diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts index 5a26721150660..176c0ef8e687a 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts @@ -55,7 +55,10 @@ describe('agent configuration queries', () => { it('fetches configurations', async () => { mock = await inspectSearchParams( ({ mockInternalESClient, mockIndices }) => - listConfigurations(mockInternalESClient, mockIndices) + listConfigurations({ + internalESClient: mockInternalESClient, + apmIndices: mockIndices, + }) ); expect(mock.params).toMatchSnapshot(); @@ -94,11 +97,11 @@ describe('agent configuration queries', () => { describe('findExactConfiguration', () => { it('find configuration by service.name', async () => { mock = await inspectSearchParams( - ({ mockInternalESClient, mockIndices }) => + ({ mockInternalESClient, mockApmEventClient }) => findExactConfiguration({ service: { name: 'foo' }, internalESClient: mockInternalESClient, - apmIndices: mockIndices, + apmEventClient: mockApmEventClient, }) ); @@ -107,11 +110,11 @@ describe('agent configuration queries', () => { it('find configuration by service.environment', async () => { mock = await inspectSearchParams( - ({ mockInternalESClient, mockIndices }) => + ({ mockInternalESClient, mockApmEventClient }) => findExactConfiguration({ service: { environment: 'bar' }, internalESClient: mockInternalESClient, - apmIndices: mockIndices, + apmEventClient: mockApmEventClient, }) ); @@ -120,11 +123,11 @@ describe('agent configuration queries', () => { it('find configuration by service.name and service.environment', async () => { mock = await inspectSearchParams( - ({ mockInternalESClient, mockIndices }) => + ({ mockInternalESClient, mockApmEventClient }) => findExactConfiguration({ service: { name: 'foo', environment: 'bar' }, internalESClient: mockInternalESClient, - apmIndices: mockIndices, + apmEventClient: mockApmEventClient, }) ); diff --git a/x-pack/plugins/apm/server/routes/settings/agent_configuration/route.ts b/x-pack/plugins/apm/server/routes/settings/agent_configuration/route.ts index b2c06044838ff..b47a4536191d2 100644 --- a/x-pack/plugins/apm/server/routes/settings/agent_configuration/route.ts +++ b/x-pack/plugins/apm/server/routes/settings/agent_configuration/route.ts @@ -50,13 +50,15 @@ const agentConfigurationRoute = createApmServerRoute({ throwNotFoundIfAgentConfigNotAvailable(resources.featureFlags); const apmIndices = await resources.getApmIndices(); - const internalESClient = await createInternalESClientWithResources( - resources - ); - const configurations = await listConfigurations( + const [internalESClient, apmEventClient] = await Promise.all([ + createInternalESClientWithResources(resources), + getApmEventClient(resources), + ]); + const configurations = await listConfigurations({ internalESClient, - apmIndices - ); + apmIndices, + apmEventClient, + }); return { configurations }; }, @@ -75,14 +77,14 @@ const getSingleAgentConfigurationRoute = createApmServerRoute({ const { params, logger } = resources; const { name, environment } = params.query; const service = { name, environment }; - const apmIndices = await resources.getApmIndices(); - const internalESClient = await createInternalESClientWithResources( - resources - ); + const [internalESClient, apmEventClient] = await Promise.all([ + createInternalESClientWithResources(resources), + getApmEventClient(resources), + ]); const exactConfig = await findExactConfiguration({ service, internalESClient, - apmIndices, + apmEventClient, }); if (!exactConfig) { @@ -114,13 +116,14 @@ const deleteAgentConfigurationRoute = createApmServerRoute({ const { params, logger, core, telemetryUsageCounter } = resources; const { service } = params.body; const apmIndices = await resources.getApmIndices(); - const internalESClient = await createInternalESClientWithResources( - resources - ); + const [internalESClient, apmEventClient] = await Promise.all([ + createInternalESClientWithResources(resources), + getApmEventClient(resources), + ]); const exactConfig = await findExactConfiguration({ service, internalESClient, - apmIndices, + apmEventClient, }); if (!exactConfig) { logger.info( @@ -171,16 +174,17 @@ const createOrUpdateAgentConfigurationRoute = createApmServerRoute({ const { params, logger, core, telemetryUsageCounter } = resources; const { body, query } = params; const apmIndices = await resources.getApmIndices(); - const internalESClient = await createInternalESClientWithResources( - resources - ); + const [internalESClient, apmEventClient] = await Promise.all([ + createInternalESClientWithResources(resources), + getApmEventClient(resources), + ]); // if the config already exists, it is fetched and updated // this is to avoid creating two configs with identical service params const exactConfig = await findExactConfiguration({ service: body.service, internalESClient, - apmIndices, + apmEventClient, }); // if the config exists ?overwrite=true is required diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts index a3941afc07e44..4442b1afe84d0 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { SerializableRecord } from '@kbn/utility-types'; import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { csv } from './csv'; @@ -40,7 +39,7 @@ one,1 two,2 fourty two,42`, }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expected); }); @@ -56,7 +55,7 @@ two\t2 fourty two\t42`, delimiter: '\t', }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expected); @@ -70,7 +69,7 @@ two%SPLIT%2 fourty two%SPLIT%42`, delimiter: '%SPLIT%', }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expected); }); @@ -83,7 +82,7 @@ fourty two%SPLIT%42`, data: `name,number\rone,1\rtwo,2\rfourty two,42`, newline: '\r', }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expected); }); @@ -107,7 +106,7 @@ fourty two%SPLIT%42`, data: `foo," bar ", baz, " buz " 1,2,3,4`, }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expectedResult); }); @@ -135,7 +134,7 @@ fourty two%SPLIT%42`, 1," best ",3, " ok" " good", bad, better , " worst " `, }, - {} as ExecutionContext + {} as ExecutionContext ) ).toEqual(expectedResult); }); @@ -150,7 +149,7 @@ one|1 two.2 fourty two,42`, }, - {} as ExecutionContext + {} as ExecutionContext ); }).toThrow(new RegExp(errors.invalidInputCSV().message)); }); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts index c3cf677c87ff6..8c500bd28c1ca 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts @@ -10,25 +10,16 @@ import { testTable, relationalTable } from './__fixtures__/test_tables'; import { dropdownControl } from './dropdownControl'; import { ExecutionContext } from '@kbn/expressions-plugin/common'; import { Adapters } from '@kbn/inspector-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; describe('dropdownControl', () => { const fn = functionWrapper(dropdownControl); it('returns a render as dropdown_filter', () => { expect( - fn( - testTable, - { filterColumn: 'name', valueColumn: 'name' }, - {} as ExecutionContext - ) + fn(testTable, { filterColumn: 'name', valueColumn: 'name' }, {} as ExecutionContext) ).toHaveProperty('type', 'render'); expect( - fn( - testTable, - { filterColumn: 'name', valueColumn: 'name' }, - {} as ExecutionContext - ) + fn(testTable, { filterColumn: 'name', valueColumn: 'name' }, {} as ExecutionContext) ).toHaveProperty('as', 'dropdown_filter'); }); @@ -41,25 +32,16 @@ describe('dropdownControl', () => { [] ); expect( - fn( - testTable, - { valueColumn: 'name' }, - {} as ExecutionContext - )?.value?.choices + fn(testTable, { valueColumn: 'name' }, {} as ExecutionContext)?.value?.choices ).toEqual(uniqueNames); }); it('returns an empty array when provided an invalid column', () => { expect( - fn( - testTable, - { valueColumn: 'foo' }, - {} as ExecutionContext - )?.value?.choices + fn(testTable, { valueColumn: 'foo' }, {} as ExecutionContext)?.value?.choices ).toEqual([]); expect( - fn(testTable, { valueColumn: '' }, {} as ExecutionContext) - ?.value?.choices + fn(testTable, { valueColumn: '' }, {} as ExecutionContext)?.value?.choices ).toEqual([]); }); }); @@ -71,7 +53,7 @@ describe('dropdownControl', () => { fn( relationalTable, { valueColumn: 'id', labelColumn: 'name' }, - {} as ExecutionContext + {} as ExecutionContext )?.value?.choices ).toEqual(expectedChoices); }); @@ -81,28 +63,20 @@ describe('dropdownControl', () => { describe('filterColumn', () => { it('sets which column the filter is applied to', () => { expect( - fn( - testTable, - { filterColumn: 'name' }, - {} as ExecutionContext - )?.value + fn(testTable, { filterColumn: 'name' }, {} as ExecutionContext)?.value ).toHaveProperty('column', 'name'); expect( fn( testTable, { filterColumn: 'name', valueColumn: 'price' }, - {} as ExecutionContext + {} as ExecutionContext )?.value ).toHaveProperty('column', 'name'); }); it('defaults to valueColumn if not provided', () => { expect( - fn( - testTable, - { valueColumn: 'price' }, - {} as ExecutionContext - )?.value + fn(testTable, { valueColumn: 'price' }, {} as ExecutionContext)?.value ).toHaveProperty('column', 'price'); }); }); diff --git a/x-pack/plugins/cases/common/ui/types.ts b/x-pack/plugins/cases/common/ui/types.ts index b4019861c06fa..2ab04f058179d 100644 --- a/x-pack/plugins/cases/common/ui/types.ts +++ b/x-pack/plugins/cases/common/ui/types.ts @@ -156,7 +156,7 @@ export interface SystemFilterOptions { severity: CaseSeverity[]; status: CaseStatuses[]; tags: string[]; - assignees: Array | null; + assignees: Array; reporters: User[]; owner: string[]; category: string[]; 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 6a425b9a803a7..2971da7a1041a 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 @@ -47,6 +47,7 @@ import { useLicense } from '../../common/use_license'; import * as api from '../../containers/api'; import { useGetCaseConfiguration } from '../../containers/configure/use_get_case_configuration'; import { useCaseConfigureResponse } from '../configure_cases/__mock__'; +import { useSuggestUserProfiles } from '../../containers/user_profiles/use_suggest_user_profiles'; jest.mock('../../containers/configure/use_get_case_configuration'); jest.mock('../../containers/use_get_cases'); @@ -63,6 +64,7 @@ jest.mock('../app/use_available_owners', () => ({ })); jest.mock('../../containers/use_update_case'); jest.mock('../../common/use_license'); +jest.mock('../../containers/user_profiles/use_suggest_user_profiles'); const useGetCaseConfigurationMock = useGetCaseConfiguration as jest.Mock; const useGetCasesMock = useGetCases as jest.Mock; @@ -74,6 +76,7 @@ const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock; const useUpdateCaseMock = useUpdateCase as jest.Mock; const useLicenseMock = useLicense as jest.Mock; const useGetCategoriesMock = useGetCategories as jest.Mock; +const useSuggestUserProfilesMock = useSuggestUserProfiles as jest.Mock; const mockTriggersActionsUiService = triggersActionsUiMock.createStart(); @@ -164,6 +167,7 @@ describe('AllCasesListGeneric', () => { useBulkGetUserProfilesMock.mockReturnValue({ data: userProfilesMap }); useUpdateCaseMock.mockReturnValue({ mutate: updateCaseProperty }); useLicenseMock.mockReturnValue({ isAtLeastPlatinum: () => false }); + useSuggestUserProfilesMock.mockReturnValue({ data: userProfiles, isLoading: false }); mockKibana(); moment.tz.setDefault('UTC'); window.localStorage.clear(); @@ -1078,6 +1082,43 @@ describe('AllCasesListGeneric', () => { ).toBeGreaterThan(0); }); }); + + it('should reset the assignees when deactivating the filter', async () => { + useLicenseMock.mockReturnValue({ isAtLeastPlatinum: () => true }); + + appMockRenderer.render(); + + // Opens assignees filter and checks an option + const assigneesButton = screen.getByTestId('options-filter-popover-button-assignees'); + userEvent.click(assigneesButton); + userEvent.click(screen.getByText('Damaged Raccoon')); + expect(within(assigneesButton).getByLabelText('1 active filters')).toBeInTheDocument(); + + // Deactivates assignees filter + userEvent.click(screen.getByRole('button', { name: 'More' })); + await waitForEuiPopoverOpen(); + userEvent.click(screen.getByRole('option', { name: 'Assignees' })); + + expect(useGetCasesMock).toHaveBeenLastCalledWith({ + filterOptions: { + ...DEFAULT_FILTER_OPTIONS, + owner: [SECURITY_SOLUTION_OWNER], + assignees: [], + }, + queryParams: DEFAULT_QUERY_PARAMS, + }); + + // Reopens assignees filter + userEvent.click(screen.getByRole('option', { name: 'Assignees' })); + // Opens the assignees popup + userEvent.click(assigneesButton); + expect(screen.getByLabelText('click to filter assignees')).toBeInTheDocument(); + expect( + within(screen.getByTestId('options-filter-popover-button-assignees')).queryByLabelText( + '1 active filters' + ) + ).not.toBeInTheDocument(); + }); }); }); diff --git a/x-pack/plugins/cases/public/components/all_cases/assignees_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/assignees_filter.test.tsx index 258f30b64eca8..90e204fe8ccfb 100644 --- a/x-pack/plugins/cases/public/components/all_cases/assignees_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/assignees_filter.test.tsx @@ -51,19 +51,13 @@ describe('AssigneesFilterPopover', () => { userEvent.click(screen.getByText('WD')); expect(onSelectionChange.mock.calls[0][0]).toMatchInlineSnapshot(` - Array [ - Object { - "data": Object {}, - "enabled": true, - "uid": "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", - "user": Object { - "email": "wet_dingo@elastic.co", - "full_name": "Wet Dingo", - "username": "wet_dingo", - }, - }, - ] - `); + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", + ], + } + `); }); it('calls onSelectionChange with a single user when different users are selected', async () => { @@ -83,32 +77,20 @@ describe('AssigneesFilterPopover', () => { userEvent.click(screen.getByText('damaged_raccoon@elastic.co')); expect(onSelectionChange.mock.calls[0][0]).toMatchInlineSnapshot(` - Array [ - Object { - "data": Object {}, - "enabled": true, - "uid": "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", - "user": Object { - "email": "wet_dingo@elastic.co", - "full_name": "Wet Dingo", - "username": "wet_dingo", - }, - }, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", + ], + } `); expect(onSelectionChange.mock.calls[1][0]).toMatchInlineSnapshot(` - Array [ - Object { - "data": Object {}, - "enabled": true, - "uid": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", - "user": Object { - "email": "damaged_raccoon@elastic.co", - "full_name": "Damaged Raccoon", - "username": "damaged_raccoon", - }, - }, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", + ], + } `); }); @@ -128,7 +110,7 @@ describe('AssigneesFilterPopover', () => { it('shows the 1 assigned total when the users are passed in', async () => { const props = { ...defaultProps, - selectedAssignees: [userProfiles[0]], + selectedAssignees: [userProfiles[0].uid], }; appMockRender.render(); @@ -145,7 +127,7 @@ describe('AssigneesFilterPopover', () => { it('shows the total when the multiple users are selected', async () => { const props = { ...defaultProps, - selectedAssignees: [userProfiles[0], userProfiles[1]], + selectedAssignees: [userProfiles[0].uid, userProfiles[1].uid], }; appMockRender.render(); @@ -239,9 +221,12 @@ describe('AssigneesFilterPopover', () => { userEvent.click(screen.getByText('No assignees')); expect(onSelectionChange.mock.calls[0][0]).toMatchInlineSnapshot(` - Array [ - null, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + null, + ], + } `); }); @@ -261,39 +246,30 @@ describe('AssigneesFilterPopover', () => { userEvent.click(screen.getByText('damaged_raccoon@elastic.co')); expect(onSelectionChange.mock.calls[0][0]).toMatchInlineSnapshot(` - Array [ - null, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + null, + ], + } `); expect(onSelectionChange.mock.calls[1][0]).toMatchInlineSnapshot(` - Array [ - Object { - "data": Object {}, - "enabled": true, - "uid": "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", - "user": Object { - "email": "wet_dingo@elastic.co", - "full_name": "Wet Dingo", - "username": "wet_dingo", - }, - }, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + "u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0", + ], + } `); expect(onSelectionChange.mock.calls[2][0]).toMatchInlineSnapshot(` - Array [ - Object { - "data": Object {}, - "enabled": true, - "uid": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", - "user": Object { - "email": "damaged_raccoon@elastic.co", - "full_name": "Damaged Raccoon", - "username": "damaged_raccoon", - }, - }, - ] + Object { + "filterId": "assignees", + "selectedOptionKeys": Array [ + "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0", + ], + } `); }); @@ -313,7 +289,7 @@ describe('AssigneesFilterPopover', () => { }); it('shows warning message when reaching maximum limit to filter', async () => { - const maxAssignees = Array(MAX_ASSIGNEES_FILTER_LENGTH).fill(userProfiles[0]); + const maxAssignees = Array(MAX_ASSIGNEES_FILTER_LENGTH).fill(userProfiles[0].uid); const props = { ...defaultProps, selectedAssignees: maxAssignees, diff --git a/x-pack/plugins/cases/public/components/all_cases/assignees_filter.tsx b/x-pack/plugins/cases/public/components/all_cases/assignees_filter.tsx index 8e88eec447e6c..3a2e03e827665 100644 --- a/x-pack/plugins/cases/public/components/all_cases/assignees_filter.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/assignees_filter.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFilterButton } from '@elastic/eui'; +import { EuiFilterButton, EuiFilterGroup } from '@elastic/eui'; +import type { UserProfileWithAvatar } from '@kbn/user-profile-components'; import { UserProfilesPopover } from '@kbn/user-profile-components'; import { isEmpty } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; @@ -24,14 +25,17 @@ import { MAX_ASSIGNEES_FILTER_LENGTH } from '../../../common/constants'; export const NO_ASSIGNEES_VALUE = null; export interface AssigneesFilterPopoverProps { - selectedAssignees: AssigneesFilteringSelection[]; + selectedAssignees: Array; currentUserProfile: CurrentUserProfile; isLoading: boolean; - onSelectionChange: (users: AssigneesFilteringSelection[]) => void; + onSelectionChange: (params: { + filterId: string; + selectedOptionKeys: Array; + }) => void; } const AssigneesFilterPopoverComponent: React.FC = ({ - selectedAssignees, + selectedAssignees: selectedAssigneesUids, currentUserProfile, isLoading, onSelectionChange, @@ -48,8 +52,10 @@ const AssigneesFilterPopoverComponent: React.FC = ( const onChange = useCallback( (users: AssigneesFilteringSelection[]) => { const sortedUsers = orderAssigneesIncludingNone(currentUserProfile, users); - - onSelectionChange(sortedUsers); + onSelectionChange({ + filterId: 'assignees', + selectedOptionKeys: sortedUsers.map((user) => user?.uid ?? null), + }); }, [currentUserProfile, onSelectionChange] ); @@ -88,47 +94,59 @@ const AssigneesFilterPopoverComponent: React.FC = ( return sortedUsers; }, [currentUserProfile, userProfiles, searchTerm]); + const selectedAssignees = selectedAssigneesUids + .map((uuid) => { + // this is the "no assignees" option + if (uuid === null) return null; + const userProfile = searchResultProfiles.find((user) => user?.uid === uuid); + return userProfile; + }) + .filter( + (userProfile): userProfile is UserProfileWithAvatar | null => userProfile !== undefined + ); // Filter out profiles that no longer exists const isLoadingData = isLoading || isLoadingSuggest; return ( - 0} - numActiveFilters={selectedAssignees.length} - aria-label={i18n.FILTER_ASSIGNEES_ARIA_LABEL} - > - {i18n.ASSIGNEES} - - } - selectableProps={{ - onChange, - onSearchChange, - selectedStatusMessage, - options: searchResultProfiles, - selectedOptions: selectedAssignees, - isLoading: isLoadingData || isUserTyping, - height: 'full', - searchPlaceholder: i18n.SEARCH_USERS, - clearButtonLabel: i18n.CLEAR_FILTERS, - emptyMessage: , - noMatchesMessage: !isUserTyping && !isLoadingData ? : , - limit: MAX_ASSIGNEES_FILTER_LENGTH, - limitReachedMessage, - singleSelection: false, - nullOptionLabel: i18n.NO_ASSIGNEES, - }} - /> + + 0} + numActiveFilters={selectedAssignees.length} + aria-label={i18n.FILTER_ASSIGNEES_ARIA_LABEL} + > + {i18n.ASSIGNEES} + + } + selectableProps={{ + onChange, + onSearchChange, + selectedStatusMessage, + options: searchResultProfiles, + selectedOptions: selectedAssignees, + isLoading: isLoadingData || isUserTyping, + height: 'full', + searchPlaceholder: i18n.SEARCH_USERS, + clearButtonLabel: i18n.CLEAR_FILTERS, + emptyMessage: , + noMatchesMessage: !isUserTyping && !isLoadingData ? : , + limit: MAX_ASSIGNEES_FILTER_LENGTH, + limitReachedMessage, + singleSelection: false, + nullOptionLabel: i18n.NO_ASSIGNEES, + }} + /> + ); }; AssigneesFilterPopoverComponent.displayName = 'AssigneesFilterPopover'; diff --git a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx index cbfdb30d122aa..b56c926bab965 100644 --- a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx @@ -18,6 +18,8 @@ import { EuiTextColor, EuiSpacer, useEuiTheme, + EuiFilterGroup, + EuiText, } from '@elastic/eui'; import { isEqual } from 'lodash/fp'; import * as i18n from './translations'; @@ -63,16 +65,17 @@ const getEuiSelectableCheckedOptions = ( ) => options.filter((option) => option.checked === 'on') as Array>; interface UseFilterParams { - buttonLabel?: string; buttonIconType?: string; + buttonLabel?: string; hideActiveOptionsNumber?: boolean; id: string; limit?: number; limitReachedMessage?: string; onChange: (params: { filterId: string; selectedOptionKeys: string[] }) => void; options: Array>; - selectedOptionKeys?: string[]; renderOption?: (option: FilterOption) => React.ReactNode; + selectedOptionKeys?: string[]; + transparentBackground?: boolean; } export const MultiSelectFilter = ({ buttonLabel, @@ -85,6 +88,7 @@ export const MultiSelectFilter = ({ options: rawOptions, selectedOptionKeys = [], renderOption, + transparentBackground, }: UseFilterParams) => { const { euiTheme } = useEuiTheme(); const [isPopoverOpen, setIsPopoverOpen] = useState(false); @@ -118,74 +122,85 @@ export const MultiSelectFilter = ({ }; return ( - 0 : undefined} - numActiveFilters={showActiveOptionsNumber ? selectedOptionKeys.length : undefined} - aria-label={buttonLabel} - > - {buttonLabel} - - } - isOpen={isPopoverOpen} - closePopover={() => setIsPopoverOpen(false)} - panelPaddingSize="none" - repositionOnScroll + - {isInvalid && ( - <> - - - - - )} - > - options={options} - searchable - searchProps={{ - placeholder: buttonLabel, - compressed: false, - 'data-test-subj': `${id}-search-input`, - }} - emptyMessage={i18n.EMPTY_FILTER_MESSAGE} - onChange={_onChange} - singleSelection={false} - renderOption={renderOption} - > - {(list, search) => ( -
0 : undefined} + numActiveFilters={showActiveOptionsNumber ? selectedOptionKeys.length : undefined} + aria-label={buttonLabel} > - {search} + + {buttonLabel} + + + } + isOpen={isPopoverOpen} + closePopover={() => setIsPopoverOpen(false)} + panelPaddingSize="none" + repositionOnScroll + > + {isInvalid && ( + <> + + + + + )} + > + options={options} + searchable + searchProps={{ + placeholder: buttonLabel, + compressed: false, + 'data-test-subj': `${id}-search-input`, + }} + emptyMessage={i18n.EMPTY_FILTER_MESSAGE} + onChange={_onChange} + singleSelection={false} + renderOption={renderOption} + > + {(list, search) => (
- {i18n.OPTIONS(options.length)} + {search} +
+ {i18n.OPTIONS(options.length)} +
+ + {list}
- - {list} -
- )} - -
+ )} + + + ); }; diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/more_filters_selectable.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/more_filters_selectable.tsx index e89ff2af07242..d191b339a05aa 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/more_filters_selectable.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/more_filters_selectable.tsx @@ -27,6 +27,7 @@ export const MoreFiltersSelectable = ({ onChange={onChange} options={options} selectedOptionKeys={activeFilters} + transparentBackground={true} /> ); }; diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.test.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.test.tsx index 483080ffd5ea6..62dd688cae29a 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.test.tsx @@ -27,7 +27,7 @@ const emptyFilterOptions: FilterOptions = { severity: [], status: [], tags: [], - assignees: null, + assignees: [], reporters: [], owner: [], category: [], diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx index aeedce3ff819f..0b522f6b066c8 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx @@ -17,7 +17,6 @@ import * as i18n from '../translations'; import { SeverityFilter } from '../severity_filter'; import { AssigneesFilterPopover } from '../assignees_filter'; import type { CurrentUserProfile } from '../../types'; -import type { AssigneesFilteringSelection } from '../../user_profiles/types'; import type { FilterChangeHandler, FilterConfig, FilterConfigRenderParams } from './types'; interface UseFilterConfigProps { @@ -28,13 +27,11 @@ interface UseFilterConfigProps { countInProgressCases: number | null; countOpenCases: number | null; currentUserProfile: CurrentUserProfile; - handleSelectedAssignees: (newAssignees: AssigneesFilteringSelection[]) => void; hiddenStatuses?: CaseStatuses[]; initialFilterOptions: Partial; isLoading: boolean; isSelectorView?: boolean; onFilterOptionsChange: FilterChangeHandler; - selectedAssignees: AssigneesFilteringSelection[]; tags: string[]; } @@ -46,13 +43,11 @@ export const getSystemFilterConfig = ({ countInProgressCases, countOpenCases, currentUserProfile, - handleSelectedAssignees, hiddenStatuses, initialFilterOptions, isLoading, isSelectorView, onFilterOptionsChange, - selectedAssignees, tags, }: UseFilterConfigProps): FilterConfig[] => { const onSystemFilterChange = ({ @@ -60,7 +55,7 @@ export const getSystemFilterConfig = ({ selectedOptionKeys, }: { filterId: string; - selectedOptionKeys: string[]; + selectedOptionKeys: Array; }) => { onFilterOptionsChange({ [filterId]: selectedOptionKeys, @@ -118,10 +113,10 @@ export const getSystemFilterConfig = ({ render: ({ filterOptions }: FilterConfigRenderParams) => { return ( ); }, @@ -199,13 +194,11 @@ export const useSystemFilterConfig = ({ countInProgressCases, countOpenCases, currentUserProfile, - handleSelectedAssignees, hiddenStatuses, initialFilterOptions, isLoading, isSelectorView, onFilterOptionsChange, - selectedAssignees, tags, }: UseFilterConfigProps) => { const filterConfig = getSystemFilterConfig({ @@ -216,13 +209,11 @@ export const useSystemFilterConfig = ({ countInProgressCases, countOpenCases, currentUserProfile, - handleSelectedAssignees, hiddenStatuses, initialFilterOptions, isLoading, isSelectorView, onFilterOptionsChange, - selectedAssignees, tags, }); diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx index 17854c7c33547..f4b93724ed4b9 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx @@ -165,6 +165,18 @@ describe('CasesTableFilters ', () => { "assignees": Array [ "u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0", ], + "category": Array [], + "customFields": Object {}, + "owner": Array [], + "reporters": Array [], + "search": "", + "searchFields": Array [ + "title", + "description", + ], + "severity": Array [], + "status": Array [], + "tags": Array [], } `); }); @@ -206,12 +218,11 @@ describe('CasesTableFilters ', () => { it('should remove assignee from selected assignees when assignee no longer exists', async () => { const overrideProps = { ...props, - initial: { + filterOptions: { ...DEFAULT_FILTER_OPTIONS, assignees: [ // invalid profile uid '123', - 'u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0', ], }, }; @@ -233,6 +244,18 @@ describe('CasesTableFilters ', () => { "assignees": Array [ "u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0", ], + "category": Array [], + "customFields": Object {}, + "owner": Array [], + "reporters": Array [], + "search": "", + "searchFields": Array [ + "title", + "description", + ], + "severity": Array [], + "status": Array [], + "tags": Array [], } `); }); @@ -305,6 +328,32 @@ describe('CasesTableFilters ', () => { expect(screen.getByTestId('options-filter-popover-button-assignees')).toBeInTheDocument(); }); + + it('shuld reset the assignees when deactivating the filter', async () => { + const overrideProps = { + ...props, + filterOptions: { + ...DEFAULT_FILTER_OPTIONS, + assignees: ['u_A_tM4n0wPkdiQ9smmd8o0Hr_h61XQfu8aRPh9GMoRoc_0'], + }, + }; + const license = licensingMock.createLicense({ + license: { type: 'platinum' }, + }); + + appMockRender = createAppMockRenderer({ license }); + appMockRender.render(); + + // deactivate the assignees filter + userEvent.click(screen.getByRole('button', { name: 'More' })); + await waitForEuiPopoverOpen(); + userEvent.click(screen.getByRole('option', { name: 'Assignees' })); + + expect(onFilterChanged).toHaveBeenCalledWith({ + ...DEFAULT_FILTER_OPTIONS, + assignees: [], + }); + }); }); describe('create case button', () => { @@ -534,7 +583,7 @@ describe('CasesTableFilters ', () => { userEvent.click(screen.getByRole('option', { name: 'Toggle' })); expect(screen.getByRole('button', { name: 'Toggle' })).toBeInTheDocument(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); const allFilters = within(filterBar).getAllByRole('button'); const orderedFilterLabels = ['Severity', 'Status', 'Tags', 'Categories', 'Toggle', 'More']; orderedFilterLabels.forEach((label, index) => { @@ -587,7 +636,7 @@ describe('CasesTableFilters ', () => { userEvent.click(screen.getByRole('option', { name: 'Status' })); expect(screen.queryByRole('button', { name: 'Status' })).not.toBeInTheDocument(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); const allFilters = within(filterBar).getAllByRole('button'); const orderedFilterLabels = ['Severity', 'Tags', 'Categories', 'More']; orderedFilterLabels.forEach((label, index) => { @@ -673,7 +722,7 @@ describe('CasesTableFilters ', () => { appMockRender.render(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); let allFilters: HTMLElement[]; await waitFor(() => { allFilters = within(filterBar).getAllByRole('button'); @@ -703,7 +752,7 @@ describe('CasesTableFilters ', () => { appMockRender.render(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); let allFilters: HTMLElement[]; await waitFor(() => { allFilters = within(filterBar).getAllByRole('button'); @@ -756,7 +805,7 @@ describe('CasesTableFilters ', () => { it('when a filter is active and isnt last in the list, it should move the filter to last position after deactivating and activating', async () => { appMockRender.render(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); let allFilters = within(filterBar).getAllByRole('button'); let orderedFilterLabels = ['Severity', 'Status', 'Tags', 'Categories', 'More']; orderedFilterLabels.forEach((label, index) => { @@ -788,7 +837,7 @@ describe('CasesTableFilters ', () => { }); appMockRender.render(); - const filterBar = screen.getByTestId('cases-table-filters-group'); + const filterBar = screen.getByTestId('cases-table-filters'); let allFilters: HTMLElement[]; await waitFor(() => { allFilters = within(filterBar).getAllByRole('button'); diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx index 8d472402b4e77..e9e4350b6619f 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filters.tsx @@ -6,7 +6,7 @@ */ import React, { useCallback, useState } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, EuiFilterGroup, EuiButton } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, EuiButton } from '@elastic/eui'; import { mergeWith, isEqual } from 'lodash'; import { MoreFiltersSelectable } from './table_filter_config/more_filters_selectable'; import type { CaseStatuses } from '../../../common/types/domain'; @@ -16,11 +16,10 @@ import { useGetTags } from '../../containers/use_get_tags'; import { useGetCategories } from '../../containers/use_get_categories'; import type { CurrentUserProfile } from '../types'; import { useCasesFeatures } from '../../common/use_cases_features'; -import type { AssigneesFilteringSelection } from '../user_profiles/types'; import { useSystemFilterConfig } from './table_filter_config/use_system_filter_config'; import { useFilterConfig } from './table_filter_config/use_filter_config'; -interface CasesTableFiltersProps { +export interface CasesTableFiltersProps { countClosedCases: number | null; countInProgressCases: number | null; countOpenCases: number | null; @@ -56,23 +55,10 @@ const CasesTableFiltersComponent = ({ filterOptions, }: CasesTableFiltersProps) => { const [search, setSearch] = useState(filterOptions.search); - const [selectedAssignees, setSelectedAssignees] = useState([]); const { data: tags = [] } = useGetTags(); const { data: categories = [] } = useGetCategories(); const { caseAssignmentAuthorized } = useCasesFeatures(); - const handleSelectedAssignees = useCallback( - (newAssignees: AssigneesFilteringSelection[]) => { - if (!isEqual(newAssignees, selectedAssignees)) { - setSelectedAssignees(newAssignees); - onFilterChanged({ - assignees: newAssignees.map((assignee) => assignee?.uid ?? null), - }); - } - }, - [selectedAssignees, onFilterChanged] - ); - const onFilterOptionsChange = useCallback( (partialFilterOptions: Partial) => { const newFilterOptions = mergeWith({}, filterOptions, partialFilterOptions, mergeCustomizer); @@ -91,13 +77,11 @@ const CasesTableFiltersComponent = ({ countInProgressCases, countOpenCases, currentUserProfile, - handleSelectedAssignees, hiddenStatuses, initialFilterOptions, isLoading, isSelectorView, onFilterOptionsChange, - selectedAssignees, tags, }); @@ -126,7 +110,12 @@ const CasesTableFiltersComponent = ({ }, [onCreateCasePressed]); return ( - + {isSelectorView && onCreateCasePressed ? ( - - - {activeFilters.map((filter) => ( - {filter.render({ filterOptions })} - ))} - {isSelectorView || ( - - )} - - + {activeFilters.map((filter) => ( + + {filter.render({ filterOptions })} + + ))} + + {isSelectorView || ( + + + + )} ); }; diff --git a/x-pack/plugins/cases/public/containers/api.test.tsx b/x-pack/plugins/cases/public/containers/api.test.tsx index 6f42c31186dc7..5b00fabbbbf50 100644 --- a/x-pack/plugins/cases/public/containers/api.test.tsx +++ b/x-pack/plugins/cases/public/containers/api.test.tsx @@ -364,7 +364,7 @@ describe('Cases API', () => { await getCases({ filterOptions: { ...DEFAULT_FILTER_OPTIONS, - assignees: null, + assignees: [], }, queryParams: DEFAULT_QUERY_PARAMS, signal: abortCtrl.signal, @@ -373,7 +373,7 @@ describe('Cases API', () => { expect(fetchMock).toHaveBeenCalledWith(`${CASES_INTERNAL_URL}/_search`, { method: 'POST', body: JSON.stringify({ - assignees: 'none', + assignees: undefined, searchFields: DEFAULT_FILTER_OPTIONS.searchFields, ...DEFAULT_QUERY_PARAMS, }), diff --git a/x-pack/plugins/cases/public/containers/utils.test.ts b/x-pack/plugins/cases/public/containers/utils.test.ts index 16dd6f25f3d2f..bb784686df6f1 100644 --- a/x-pack/plugins/cases/public/containers/utils.test.ts +++ b/x-pack/plugins/cases/public/containers/utils.test.ts @@ -160,10 +160,6 @@ describe('utils', () => { expect(constructAssigneesFilter([])).toEqual({}); }); - it('returns none if the assignees are null', () => { - expect(constructAssigneesFilter(null)).toEqual({ assignees: 'none' }); - }); - it('returns none for null values in the assignees array', () => { expect(constructAssigneesFilter([null, '123'])).toEqual({ assignees: ['none', '123'] }); }); diff --git a/x-pack/plugins/cases/public/containers/utils.ts b/x-pack/plugins/cases/public/containers/utils.ts index 50f8524dbe78e..a00e2e3b738a0 100644 --- a/x-pack/plugins/cases/public/containers/utils.ts +++ b/x-pack/plugins/cases/public/containers/utils.ts @@ -148,12 +148,11 @@ export const createUpdateSuccessToaster = ( export const constructAssigneesFilter = ( assignees: FilterOptions['assignees'] ): { assignees?: string | string[] } => - assignees === null || assignees.length > 0 + assignees.length > 0 ? { - assignees: - assignees?.map((assignee) => - assignee === null ? NO_ASSIGNEES_FILTERING_KEYWORD : assignee - ) ?? NO_ASSIGNEES_FILTERING_KEYWORD, + assignees: assignees?.map((assignee) => + assignee === null ? NO_ASSIGNEES_FILTERING_KEYWORD : assignee + ) ?? [NO_ASSIGNEES_FILTERING_KEYWORD], } : {}; diff --git a/x-pack/plugins/cloud_security_posture/public/components/accounts_evaluated_widget.tsx b/x-pack/plugins/cloud_security_posture/public/components/accounts_evaluated_widget.tsx index 98f99fbd29245..ef7e2750b34fd 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/accounts_evaluated_widget.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/accounts_evaluated_widget.tsx @@ -52,8 +52,8 @@ export const AccountsEvaluatedWidget = ({ }) => { const { euiTheme } = useEuiTheme(); - const filterBenchmarksById = (benchmarkId: string) => { - return benchmarkAssets?.filter((obj) => obj?.meta.benchmarkId === benchmarkId) || []; + const getBenchmarkById = (benchmarkId: string) => { + return benchmarkAssets?.find((obj) => obj?.meta.benchmarkId === benchmarkId); }; const navToFindings = useNavigateFindings(); @@ -67,7 +67,7 @@ export const AccountsEvaluatedWidget = ({ }; const benchmarkElements = benchmarks.map((benchmark) => { - const cloudAssetAmount = filterBenchmarksById(benchmark.type).length; + const cloudAssetAmount = getBenchmarkById(benchmark.type)?.meta?.assetCount || 0; return ( cloudAssetAmount > 0 && ( diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx index 89ec1007f7d53..17474fd9cd233 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx @@ -442,7 +442,7 @@ const AzureAccountTypeSelect = ({ updatePolicy( getPosturePolicy(newPolicy, input.type, { 'azure.account_type': { - value: AZURE_SINGLE_ACCOUNT, + value: isAzureOrganizationDisabled ? AZURE_SINGLE_ACCOUNT : AZURE_ORGANIZATION_ACCOUNT, type: 'text', }, 'azure.credentials.type': { diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx index 60e0c765853da..cff3c98688b31 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx @@ -20,7 +20,7 @@ import { XYBrushEvent, } from '@elastic/charts'; import moment from 'moment'; -import { IUiSettingsClient } from '@kbn/core/public'; +import { getTimeZone } from '@kbn/visualization-utils'; import { MULTILAYER_TIME_AXIS_STYLE } from '@kbn/charts-plugin/common'; import type { LogRateHistogramItem } from '@kbn/aiops-utils'; @@ -38,16 +38,6 @@ interface Props { const SPEC_ID = 'document_count'; -function getTimezone(uiSettings: IUiSettingsClient) { - if (uiSettings.isDefault('dateFormat:tz')) { - const detectedTimezone = moment.tz.guess(); - if (detectedTimezone) return detectedTimezone; - else return moment().format('Z'); - } else { - return uiSettings.get('dateFormat:tz', 'Browser'); - } -} - export function LoadingSpinner() { return ( @@ -126,7 +116,7 @@ export const DocumentCountChart: FC = ({ timefilterUpdateHandler(range); }; - const timeZone = getTimezone(uiSettings); + const timeZone = getTimeZone(uiSettings); return ( ; +export type DegradedDocs = rt.TypeOf; export const getDataStreamsStatsResponseRt = rt.exact( rt.intersection([ @@ -60,8 +60,8 @@ export const getDataStreamsStatsResponseRt = rt.exact( ]) ); -export const getDataStreamsMalformedDocsStatsResponseRt = rt.exact( +export const getDataStreamsDegradedDocsStatsResponseRt = rt.exact( rt.type({ - malformedDocs: rt.array(malformedDocsRt), + degradedDocs: rt.array(degradedDocsRt), }) ); diff --git a/x-pack/plugins/dataset_quality/common/data_streams_stats/data_stream_stat.ts b/x-pack/plugins/dataset_quality/common/data_streams_stats/data_stream_stat.ts index 96035415b3649..2456284eb3cdc 100644 --- a/x-pack/plugins/dataset_quality/common/data_streams_stats/data_stream_stat.ts +++ b/x-pack/plugins/dataset_quality/common/data_streams_stats/data_stream_stat.ts @@ -15,7 +15,7 @@ export class DataStreamStat { sizeBytes?: DataStreamStatType['size_bytes']; lastActivity?: DataStreamStatType['last_activity']; integration?: IntegrationType; - malformedDocs?: number; + degradedDocs?: number; private constructor(dataStreamStat: DataStreamStat) { this.name = dataStreamStat.name; @@ -24,7 +24,7 @@ export class DataStreamStat { this.sizeBytes = dataStreamStat.sizeBytes; this.lastActivity = dataStreamStat.lastActivity; this.integration = dataStreamStat.integration; - this.malformedDocs = dataStreamStat.malformedDocs; + this.degradedDocs = dataStreamStat.degradedDocs; } public static create(dataStreamStat: DataStreamStatType) { diff --git a/x-pack/plugins/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts b/x-pack/plugins/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts index d48e4452b548f..b198f45be7101 100644 --- a/x-pack/plugins/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts +++ b/x-pack/plugins/dataset_quality/common/data_streams_stats/malformed_docs_stat.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { MalformedDocsStatType } from './types'; +import { DegradedDocsStatType } from './types'; -export class MalformedDocsStat { - dataset: MalformedDocsStatType['dataset']; - percentage: MalformedDocsStatType['percentage']; +export class DegradedDocsStat { + dataset: DegradedDocsStatType['dataset']; + percentage: DegradedDocsStatType['percentage']; - private constructor(malformedDocsStat: MalformedDocsStat) { - this.dataset = malformedDocsStat.dataset; - this.percentage = malformedDocsStat.percentage; + private constructor(degradedDocsStat: DegradedDocsStat) { + this.dataset = degradedDocsStat.dataset; + this.percentage = degradedDocsStat.percentage; } - public static create(malformedDocsStat: MalformedDocsStatType) { - return new MalformedDocsStat(malformedDocsStat); + public static create(degradedDocsStat: DegradedDocsStatType) { + return new DegradedDocsStat(degradedDocsStat); } } diff --git a/x-pack/plugins/dataset_quality/common/data_streams_stats/types.ts b/x-pack/plugins/dataset_quality/common/data_streams_stats/types.ts index 586732f0899c9..1db25258a04f8 100644 --- a/x-pack/plugins/dataset_quality/common/data_streams_stats/types.ts +++ b/x-pack/plugins/dataset_quality/common/data_streams_stats/types.ts @@ -19,10 +19,10 @@ export type DataStreamStatType = GetDataStreamsStatsResponse['dataStreamsStats'] integration?: IntegrationType; }; -export type GetDataStreamsMalformedDocsStatsParams = - APIClientRequestParamsOf<`GET /internal/dataset_quality/data_streams/malformed_docs`>['params']; -export type GetDataStreamsMalformedDocsStatsQuery = GetDataStreamsMalformedDocsStatsParams['query']; -export type GetDataStreamsMalformedDocsStatsResponse = - APIReturnType<`GET /internal/dataset_quality/data_streams/malformed_docs`>; -export type DataStreamMalformedDocsStatServiceResponse = MalformedDocsStatType[]; -export type MalformedDocsStatType = GetDataStreamsMalformedDocsStatsResponse['malformedDocs'][0]; +export type GetDataStreamsDegradedDocsStatsParams = + APIClientRequestParamsOf<`GET /internal/dataset_quality/data_streams/degraded_docs`>['params']; +export type GetDataStreamsDegradedDocsStatsQuery = GetDataStreamsDegradedDocsStatsParams['query']; +export type GetDataStreamsDegradedDocsStatsResponse = + APIReturnType<`GET /internal/dataset_quality/data_streams/degraded_docs`>; +export type DataStreamDegradedDocsStatServiceResponse = DegradedDocsStatType[]; +export type DegradedDocsStatType = GetDataStreamsDegradedDocsStatsResponse['degradedDocs'][0]; diff --git a/x-pack/plugins/dataset_quality/common/translations.ts b/x-pack/plugins/dataset_quality/common/translations.ts index b26b7ca5c9029..596d1f38ab70c 100644 --- a/x-pack/plugins/dataset_quality/common/translations.ts +++ b/x-pack/plugins/dataset_quality/common/translations.ts @@ -11,10 +11,6 @@ export const datasetQualityAppTitle = i18n.translate('xpack.datasetQuality.appTi defaultMessage: 'Datasets', }); -export const onboardingLinkTitle = i18n.translate('xpack.datasetQuality.onboardingLinkTitle', { - defaultMessage: 'Add data', -}); - export const noDatasetsDescription = i18n.translate('xpack.datasetQuality.noDatasetsDescription', { defaultMessage: 'Try adjusting your time or filter.', }); diff --git a/x-pack/plugins/dataset_quality/public/components/dataset_quality/columns.tsx b/x-pack/plugins/dataset_quality/public/components/dataset_quality/columns.tsx index cccd4d3b12bb7..94223e10f316f 100644 --- a/x-pack/plugins/dataset_quality/public/components/dataset_quality/columns.tsx +++ b/x-pack/plugins/dataset_quality/public/components/dataset_quality/columns.tsx @@ -37,20 +37,20 @@ const sizeColumnName = i18n.translate('xpack.datasetQuality.sizeColumnName', { defaultMessage: 'Size', }); -const malformedDocsColumnName = i18n.translate('xpack.datasetQuality.malformedDocsColumnName', { - defaultMessage: 'Malformed Docs', +const degradedDocsColumnName = i18n.translate('xpack.datasetQuality.degradedDocsColumnName', { + defaultMessage: 'Degraded Docs', }); -const malformedDocsDescription = (minimimPercentage: number) => - i18n.translate('xpack.datasetQuality.malformedDocsQualityDescription', { +const degradedDocsDescription = (minimimPercentage: number) => + i18n.translate('xpack.datasetQuality.degradedDocsQualityDescription', { defaultMessage: 'greater than {minimimPercentage}%', values: { minimimPercentage }, }); -const malformedDocsColumnTooltip = ( +const degradedDocsColumnTooltip = ( @@ -62,13 +62,13 @@ const malformedDocsColumnTooltip = ( - {` ${malformedDocsDescription(POOR_QUALITY_MINIMUM_PERCENTAGE)}`} + {` ${degradedDocsDescription(POOR_QUALITY_MINIMUM_PERCENTAGE)}`} - {` ${malformedDocsDescription(DEGRADED_QUALITY_MINIMUM_PERCENTAGE)}`} + {` ${degradedDocsDescription(DEGRADED_QUALITY_MINIMUM_PERCENTAGE)}`} @@ -89,10 +89,10 @@ const lastActivityColumnName = i18n.translate('xpack.datasetQuality.lastActivity export const getDatasetQualitTableColumns = ({ fieldFormats, - loadingMalformedStats, + loadingDegradedStats, }: { fieldFormats: FieldFormatsStart; - loadingMalformedStats?: boolean; + loadingDegradedStats?: boolean; }): Array> => { return [ { @@ -129,28 +129,28 @@ export const getDatasetQualitTableColumns = ({ }, { name: ( - + - {`${malformedDocsColumnName} `} + {`${degradedDocsColumnName} `} ), - field: 'malformedDocs', + field: 'degradedDocs', sortable: true, render: (_, dataStreamStat: DataStreamStat) => ( - + - {`${dataStreamStat.malformedDocs}%`} + {`${dataStreamStat.degradedDocs ?? 0}%`} ), diff --git a/x-pack/plugins/dataset_quality/public/components/dataset_quality/header.tsx b/x-pack/plugins/dataset_quality/public/components/dataset_quality/header.tsx index 5126a645f7b6f..23753941cbe49 100644 --- a/x-pack/plugins/dataset_quality/public/components/dataset_quality/header.tsx +++ b/x-pack/plugins/dataset_quality/public/components/dataset_quality/header.tsx @@ -5,45 +5,10 @@ * 2.0. */ +import { EuiPageHeader } from '@elastic/eui'; import React from 'react'; -import { EuiPageHeader, EuiButton } from '@elastic/eui'; -import { - ObservabilityOnboardingLocatorParams, - OBSERVABILITY_ONBOARDING_LOCATOR, -} from '@kbn/deeplinks-observability'; -import { datasetQualityAppTitle, onboardingLinkTitle } from '../../../common/translations'; -import { useKibanaContextForPlugin } from '../../utils'; +import { datasetQualityAppTitle } from '../../../common/translations'; export function Header() { - const { - services: { share }, - } = useKibanaContextForPlugin(); - - const OnboardingLink = React.memo(() => { - const locator = share.url.locators.get( - OBSERVABILITY_ONBOARDING_LOCATOR - ); - - const onboardingUrl = locator?.getRedirectUrl({}); - - return ( - - {onboardingLinkTitle} - - ); - }); - - return ( - ]} - /> - ); + return ; } diff --git a/x-pack/plugins/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx b/x-pack/plugins/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx index 5f446a0367c3c..b3f9d8e3b852c 100644 --- a/x-pack/plugins/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx +++ b/x-pack/plugins/dataset_quality/public/components/quality_indicator/percentage_indicator.tsx @@ -5,7 +5,6 @@ * 2.0. */ -import { isNil } from 'lodash'; import React from 'react'; import { DEGRADED_QUALITY_MINIMUM_PERCENTAGE, @@ -13,11 +12,7 @@ import { } from '../../../common/constants'; import { QualityIndicator } from './indicator'; -export function QualityPercentageIndicator({ percentage }: { percentage?: number }) { - if (isNil(percentage)) { - return <>; - } - +export function QualityPercentageIndicator({ percentage = 0 }: { percentage?: number }) { const quality = percentage > POOR_QUALITY_MINIMUM_PERCENTAGE ? 'poor' diff --git a/x-pack/plugins/dataset_quality/public/hooks/use_dataset_quality_table.tsx b/x-pack/plugins/dataset_quality/public/hooks/use_dataset_quality_table.tsx index bf7afdc9d95e2..4bff4f54f0db3 100644 --- a/x-pack/plugins/dataset_quality/public/hooks/use_dataset_quality_table.tsx +++ b/x-pack/plugins/dataset_quality/public/hooks/use_dataset_quality_table.tsx @@ -36,9 +36,9 @@ export const useDatasetQualityTable = () => { const { dataStreamsStatsServiceClient: client } = useDatasetQualityContext(); const { data = [], loading } = useFetcher(async () => client.getDataStreamsStats(), []); - const { data: malformedStats = [], loading: loadingMalformedStats } = useFetcher( + const { data: degradedStats = [], loading: loadingDegradedStats } = useFetcher( async () => - client.getDataStreamsMalformedStats({ + client.getDataStreamsDegradedStats({ start: defaultTimeRange.from, end: defaultTimeRange.to, }), @@ -46,8 +46,8 @@ export const useDatasetQualityTable = () => { ); const columns = useMemo( - () => getDatasetQualitTableColumns({ fieldFormats, loadingMalformedStats }), - [fieldFormats, loadingMalformedStats] + () => getDatasetQualitTableColumns({ fieldFormats, loadingDegradedStats }), + [fieldFormats, loadingDegradedStats] ); const pagination = { @@ -77,18 +77,18 @@ export const useDatasetQualityTable = () => { const renderedItems = useMemo(() => { const overridenSortingField = sortingOverrides[sortField] || sortField; const mergedData = data.map((dataStream) => { - const malformedDocs = find(malformedStats, { dataset: dataStream.name }); + const degradedDocs = find(degradedStats, { dataset: dataStream.name }); return { ...dataStream, - malformedDocs: malformedDocs?.percentage, + degradedDocs: degradedDocs?.percentage, }; }); const sortedItems = orderBy(mergedData, overridenSortingField, sortDirection); return sortedItems.slice(pageIndex * pageSize, (pageIndex + 1) * pageSize); - }, [data, malformedStats, sortField, sortDirection, pageIndex, pageSize]); + }, [data, degradedStats, sortField, sortDirection, pageIndex, pageSize]); const resultsCount = useMemo(() => { const startNumberItemsOnPage = pageSize * pageIndex + (renderedItems.length ? 1 : 0); diff --git a/x-pack/plugins/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts b/x-pack/plugins/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts index 21a4b7b7dc2ff..5fe6f9ab28231 100644 --- a/x-pack/plugins/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts +++ b/x-pack/plugins/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts @@ -9,13 +9,13 @@ import { HttpStart } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { find, merge } from 'lodash'; import { - getDataStreamsMalformedDocsStatsResponseRt, + getDataStreamsDegradedDocsStatsResponseRt, getDataStreamsStatsResponseRt, } from '../../../common/api_types'; import { DataStreamStatServiceResponse, - GetDataStreamsMalformedDocsStatsQuery, - GetDataStreamsMalformedDocsStatsResponse, + GetDataStreamsDegradedDocsStatsQuery, + GetDataStreamsDegradedDocsStatsResponse, GetDataStreamsStatsError, GetDataStreamsStatsQuery, GetDataStreamsStatsResponse, @@ -52,10 +52,10 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { return mergedDataStreamsStats.map(DataStreamStat.create); } - public async getDataStreamsMalformedStats(params: GetDataStreamsMalformedDocsStatsQuery) { + public async getDataStreamsDegradedStats(params: GetDataStreamsDegradedDocsStatsQuery) { const response = await this.http - .get( - '/internal/dataset_quality/data_streams/malformed_docs', + .get( + '/internal/dataset_quality/data_streams/degraded_docs', { query: { ...params, @@ -65,18 +65,18 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { ) .catch((error) => { throw new GetDataStreamsStatsError( - `Failed to fetch data streams malformed stats": ${error}` + `Failed to fetch data streams degraded stats": ${error}` ); }); - const { malformedDocs } = decodeOrThrow( - getDataStreamsMalformedDocsStatsResponseRt, + const { degradedDocs } = decodeOrThrow( + getDataStreamsDegradedDocsStatsResponseRt, (message: string) => new GetDataStreamsStatsError( - `Failed to decode data streams malformed docs stats response: ${message}"` + `Failed to decode data streams degraded docs stats response: ${message}"` ) )(response); - return malformedDocs; + return degradedDocs; } } diff --git a/x-pack/plugins/dataset_quality/public/services/data_streams_stats/types.ts b/x-pack/plugins/dataset_quality/public/services/data_streams_stats/types.ts index 4f79753bc99cd..46c39082ce1d4 100644 --- a/x-pack/plugins/dataset_quality/public/services/data_streams_stats/types.ts +++ b/x-pack/plugins/dataset_quality/public/services/data_streams_stats/types.ts @@ -7,9 +7,9 @@ import { HttpStart } from '@kbn/core/public'; import { - DataStreamMalformedDocsStatServiceResponse, + DataStreamDegradedDocsStatServiceResponse, DataStreamStatServiceResponse, - GetDataStreamsMalformedDocsStatsQuery, + GetDataStreamsDegradedDocsStatsQuery, GetDataStreamsStatsQuery, } from '../../../common/data_streams_stats'; @@ -25,7 +25,7 @@ export interface DataStreamsStatsServiceStartDeps { export interface IDataStreamsStatsClient { getDataStreamsStats(params?: GetDataStreamsStatsQuery): Promise; - getDataStreamsMalformedStats( - params?: GetDataStreamsMalformedDocsStatsQuery - ): Promise; + getDataStreamsDegradedStats( + params?: GetDataStreamsDegradedDocsStatsQuery + ): Promise; } diff --git a/x-pack/plugins/dataset_quality/server/routes/data_streams/get_malformed_docs.ts b/x-pack/plugins/dataset_quality/server/routes/data_streams/get_degraded_docs.ts similarity index 83% rename from x-pack/plugins/dataset_quality/server/routes/data_streams/get_malformed_docs.ts rename to x-pack/plugins/dataset_quality/server/routes/data_streams/get_degraded_docs.ts index 155fe981428c7..4bbe01d219322 100644 --- a/x-pack/plugins/dataset_quality/server/routes/data_streams/get_malformed_docs.ts +++ b/x-pack/plugins/dataset_quality/server/routes/data_streams/get_degraded_docs.ts @@ -7,7 +7,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { MalformedDocs } from '../../../common/api_types'; +import { DegradedDocs } from '../../../common/api_types'; import { DATA_STREAM_DATASET, DATA_STREAM_NAMESPACE, @@ -17,7 +17,7 @@ import { import { DataStreamTypes } from '../../types/data_stream'; import { createDatasetQualityESClient, wildcardQuery } from '../../utils'; -export async function getMalformedDocsPaginated(options: { +export async function getDegradedDocsPaginated(options: { esClient: ElasticsearchClient; type?: DataStreamTypes; start: number; @@ -27,8 +27,8 @@ export async function getMalformedDocsPaginated(options: { dataset: string; namespace: string; }; - prevResults?: MalformedDocs[]; -}): Promise { + prevResults?: DegradedDocs[]; +}): Promise { const { esClient, type = 'logs', datasetQuery, start, end, after, prevResults = [] } = options; const datasetQualityESClient = createDatasetQualityESClient(esClient); @@ -61,7 +61,7 @@ export async function getMalformedDocsPaginated(options: { ], }, aggs: { - malformed: { + degraded: { filter: { exists: { field: _IGNORED, @@ -73,16 +73,16 @@ export async function getMalformedDocsPaginated(options: { }, }); - const currMalformedDocs = + const currDegradedDocs = response.aggregations?.datasets.buckets.map((bucket) => ({ dataset: `${type}-${bucket.key.dataset}-${bucket.key.namespace}`, - percentage: (bucket.malformed.doc_count * 100) / bucket.doc_count, + percentage: (bucket.degraded.doc_count * 100) / bucket.doc_count, })) ?? []; - const malformedDocs = [...prevResults, ...currMalformedDocs]; + const degradedDocs = [...prevResults, ...currDegradedDocs]; if (response.aggregations?.datasets.after_key) { - return getMalformedDocsPaginated({ + return getDegradedDocsPaginated({ esClient, type, start, @@ -92,9 +92,9 @@ export async function getMalformedDocsPaginated(options: { dataset: response.aggregations?.datasets.after_key.dataset as string, namespace: response.aggregations?.datasets.after_key.namespace as string, }, - prevResults: malformedDocs, + prevResults: degradedDocs, }); } - return malformedDocs; + return degradedDocs; } diff --git a/x-pack/plugins/dataset_quality/server/routes/data_streams/routes.ts b/x-pack/plugins/dataset_quality/server/routes/data_streams/routes.ts index a70bcc133e100..7be8c102060d6 100644 --- a/x-pack/plugins/dataset_quality/server/routes/data_streams/routes.ts +++ b/x-pack/plugins/dataset_quality/server/routes/data_streams/routes.ts @@ -13,8 +13,8 @@ import { Integration } from '../../types/integration'; import { createDatasetQualityServerRoute } from '../create_datasets_quality_server_route'; import { getDataStreams } from './get_data_streams'; import { getDataStreamsStats } from './get_data_streams_stats'; -import { getMalformedDocsPaginated } from './get_malformed_docs'; -import { MalformedDocs } from '../../../common/api_types'; +import { getDegradedDocsPaginated } from './get_degraded_docs'; +import { DegradedDocs } from '../../../common/api_types'; const statsRoute = createDatasetQualityServerRoute({ endpoint: 'GET /internal/dataset_quality/data_streams/stats', @@ -72,8 +72,8 @@ const statsRoute = createDatasetQualityServerRoute({ }, }); -const malformedDocsRoute = createDatasetQualityServerRoute({ - endpoint: 'GET /internal/dataset_quality/data_streams/malformed_docs', +const degradedDocsRoute = createDatasetQualityServerRoute({ + endpoint: 'GET /internal/dataset_quality/data_streams/degraded_docs', params: t.type({ query: t.intersection([ rangeRt, @@ -87,25 +87,25 @@ const malformedDocsRoute = createDatasetQualityServerRoute({ tags: [], }, async handler(resources): Promise<{ - malformedDocs: MalformedDocs[]; + degradedDocs: DegradedDocs[]; }> { const { context, params } = resources; const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asCurrentUser; - const malformedDocs = await getMalformedDocsPaginated({ + const degradedDocs = await getDegradedDocsPaginated({ esClient, ...params.query, }); return { - malformedDocs, + degradedDocs, }; }, }); export const dataStreamsRouteRepository = { ...statsRoute, - ...malformedDocsRoute, + ...degradedDocsRoute, }; diff --git a/x-pack/plugins/dataset_quality/tsconfig.json b/x-pack/plugins/dataset_quality/tsconfig.json index 3bfb546ed49ec..5d1bf785b81ad 100644 --- a/x-pack/plugins/dataset_quality/tsconfig.json +++ b/x-pack/plugins/dataset_quality/tsconfig.json @@ -13,7 +13,6 @@ "@kbn/core", "@kbn/core-plugins-server", "@kbn/core-elasticsearch-server-mocks", - "@kbn/deeplinks-observability", "@kbn/fleet-plugin", "@kbn/observability-shared-plugin", "@kbn/server-route-repository", diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.test.tsx index 970b1488010c0..62ac53004a773 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.test.tsx @@ -11,11 +11,11 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { EuiButtonIcon, EuiPanel, EuiTextColor, EuiTitle } from '@elastic/eui'; +import { EuiButtonEmpty, EuiPanel, EuiText, EuiTitle } from '@elastic/eui'; import { InferencePipeline, TrainedModelState } from '../../../../../../common/types/pipelines'; -import { InferencePipelineCard } from './inference_pipeline_card'; +import { InferencePipelineCard, TrainedModelHealthPopover } from './inference_pipeline_card'; import { MLModelTypeBadge } from './ml_model_type_badge'; export const DEFAULT_VALUES: InferencePipeline = { @@ -40,7 +40,7 @@ describe('InferencePipelineCard', () => { it('renders pipeline as title', () => { const wrapper = shallow(); expect(wrapper.find(EuiTitle)).toHaveLength(1); - const title = wrapper.find(EuiTitle).dive(); + const title = wrapper.find(EuiTitle).at(0).children(); expect(title.text()).toBe(DEFAULT_VALUES.pipelineName); }); it('renders pipeline as title with unknown model type', () => { @@ -51,14 +51,14 @@ describe('InferencePipelineCard', () => { const wrapper = shallow(); expect(wrapper.find(EuiTitle)).toHaveLength(1); // does not render subtitle - expect(wrapper.find(EuiTextColor)).toHaveLength(0); - const title = wrapper.find(EuiTitle).dive(); + expect(wrapper.find(EuiText)).toHaveLength(0); + const title = wrapper.find(EuiTitle).at(0).children(); expect(title.text()).toBe(DEFAULT_VALUES.pipelineName); }); it('renders model ID as subtitle', () => { const wrapper = shallow(); - expect(wrapper.find(EuiTextColor)).toHaveLength(1); - const subtitle = wrapper.find(EuiTextColor).dive(); + expect(wrapper.find(EuiText)).toHaveLength(1); + const subtitle = wrapper.find(EuiText).at(0).children(); expect(subtitle.text()).toBe(DEFAULT_VALUES.modelId); }); it('renders model type as badge', () => { @@ -67,20 +67,28 @@ describe('InferencePipelineCard', () => { const badge = wrapper.find(MLModelTypeBadge).render(); expect(badge.text()).toBe('ner'); }); - it('renders fix button when model not deployed', () => { +}); + +describe('TrainedModelHealthPopover', () => { + beforeEach(() => { + jest.clearAllMocks(); + setMockValues(mockValues); + }); + it('popover renders fix button when model not deployed', () => { const values = { ...DEFAULT_VALUES, modelState: TrainedModelState.NotDeployed, }; - const wrapper = shallow(); - expect(wrapper.find(EuiButtonIcon)).toHaveLength(1); + const wrapper = shallow(); + expect(wrapper.find(EuiButtonEmpty)).toHaveLength(3); - const fixButton = wrapper.find(EuiButtonIcon); + const fixButton = wrapper.find(EuiButtonEmpty).at(0); expect(fixButton.prop('iconType')).toBe('wrench'); expect(fixButton.prop('href')).toBe('/app/ml/trained_models'); + expect(fixButton.children().text()).toBe('Fix issue in Trained Models'); }); - it('does not render fix button when model deployed', () => { - const wrapper = shallow(); - expect(wrapper.find(EuiButtonIcon)).toHaveLength(0); + it('popover does not render fix button when model deployed', () => { + const wrapper = shallow(); + expect(wrapper.find(EuiButtonEmpty)).toHaveLength(2); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx index dcc4b2a0cad8f..342d05c398878 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_pipeline_card.tsx @@ -11,16 +11,14 @@ import { useActions, useValues } from 'kea'; import { EuiButtonEmpty, - EuiButtonIcon, EuiConfirmModal, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiPopover, EuiText, - EuiTextColor, EuiTitle, - EuiToolTip, + useIsWithinMaxBreakpoint, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -39,20 +37,18 @@ import { TrainedModelHealth } from './ml_model_health'; import { MLModelTypeBadge } from './ml_model_type_badge'; import { PipelinesLogic } from './pipelines_logic'; -export const InferencePipelineCard: React.FC = (pipeline) => { +export const TrainedModelHealthPopover: React.FC = (pipeline) => { const { http } = useValues(HttpLogic); const { indexName } = useValues(IndexNameLogic); const { ingestionMethod } = useValues(IndexViewLogic); + + const { deleteMlPipeline, detachMlPipeline } = useActions(PipelinesLogic); + const [isPopOverOpen, setIsPopOverOpen] = useState(false); const [showConfirmDelete, setShowConfirmDelete] = useState(false); - const { deleteMlPipeline, detachMlPipeline } = useActions(PipelinesLogic); - const showConfirmDeleteModal = () => { - setShowConfirmDelete(true); - setIsPopOverOpen(false); - }; - const { modelId, pipelineName, types: modelTypes } = pipeline; - const modelType = getMLType(modelTypes); - const modelTitle = getModelDisplayTitle(modelType); + + const { pipelineName } = pipeline; + const actionButton = ( = (pipeline) => ); + const showConfirmDeleteModal = () => { + setShowConfirmDelete(true); + setIsPopOverOpen(false); + }; + return ( - - - - + <> + setIsPopOverOpen(false)} + > + + {pipeline.modelState === TrainedModelState.NotDeployed && ( - - - -

{pipelineName ?? modelTitle}

-
-
- -
-
- {modelTitle && ( - - - - {modelId} - - - - - - - - - )} -
-
- - setIsPopOverOpen(false)} - > - {pipeline.modelState === TrainedModelState.NotDeployed && ( - - + + {i18n.translate( 'xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed.fixLink', - { defaultMessage: 'Fix issue in Trained Models' } + { + defaultMessage: 'Fix issue in Trained Models', + } )} - > - - - - )} - - -
- - {i18n.translate('xpack.enterpriseSearch.inferencePipelineCard.action.view', { - defaultMessage: 'View in Stack Management', - })} - -
-
- -
- { - detachMlPipeline({ indexName, pipelineName }); - setIsPopOverOpen(false); - }} - > - {i18n.translate('xpack.enterpriseSearch.inferencePipelineCard.action.detach', { - defaultMessage: 'Detach pipeline', - })} - -
-
- -
- -
-
-
-
-
-
+ + +
+ )} + + + + {i18n.translate('xpack.enterpriseSearch.inferencePipelineCard.action.view', { + defaultMessage: 'View in Stack Management', + })} + + + + + + { + detachMlPipeline({ indexName, pipelineName }); + setIsPopOverOpen(false); + }} + > + {i18n.translate('xpack.enterpriseSearch.inferencePipelineCard.action.detach', { + defaultMessage: 'Detach pipeline', + })} + + + + + + + + +
+ {showConfirmDelete && ( = (pipeline) => )} + + ); +}; + +export const InferencePipelineCard: React.FC = (pipeline) => { + const { modelId, pipelineName, types: modelTypes } = pipeline; + const modelType = getMLType(modelTypes); + const modelTitle = getModelDisplayTitle(modelType); + const isSmallScreen = useIsWithinMaxBreakpoint('s'); + + return ( + + + + + + +

{pipelineName ?? modelTitle}

+
+
+ {modelTitle && ( + + + + + {modelId} + + + + + + + + + + )} +
+
+ + + +
); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx index deea940cfe68d..49e00f30c12d4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/pipeline_select_option.tsx @@ -45,21 +45,21 @@ export const PipelineSelectOption: React.FC = ({ pipe // TODO: Add model state & pipeline info link. Make sure to check mobile rendering when doing this! - -
{pipeline.pipelineName}
+ +

{pipeline.pipelineName}

- + {modelIdDisplay} {pipeline.modelType.length > 0 && ( - {/* Wrap in a div to prevent the badge from growing to a whole row on mobile*/} -
+ {/* Wrap in a span to prevent the badge from growing to a whole row on mobile*/} + -
+
)}
diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts index 0d7fd264b143f..08c82e8523e44 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.test.ts @@ -19,12 +19,15 @@ jest.mock('@kbn/search-index-documents/lib', () => ({ describe('Elasticsearch Search', () => { let mockRouter: MockRouter; - const mockClient = {}; - + const mockClient = { + asCurrentUser: jest.fn(), + }; beforeEach(() => { const context = { - core: Promise.resolve({ elasticsearch: { client: mockClient } }), - } as jest.Mocked; + core: Promise.resolve({ + elasticsearch: { client: mockClient }, + }), + } as unknown as jest.Mocked; mockRouter = new MockRouter({ context, @@ -90,7 +93,7 @@ describe('Elasticsearch Search', () => { beforeEach(() => { const context = { core: Promise.resolve({ elasticsearch: { client: mockClient } }), - } as jest.Mocked; + } as unknown as jest.Mocked; mockRouterNoQuery = new MockRouter({ context, @@ -137,7 +140,7 @@ describe('Elasticsearch Search', () => { }); expect(fetchSearchResults).toHaveBeenCalledWith( - mockClient, + mockClient.asCurrentUser, 'search-index-name', 'banana', 0, diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts index f1f6862c58a8f..430740f85644c 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/search.ts @@ -43,7 +43,7 @@ export function registerSearchRoute({ router, log }: RouteDependencies) { elasticsearchErrorHandler(log, async (context, request, response) => { const indexName = decodeURIComponent(request.params.index_name); const searchQuery = request.body.searchQuery; - const { client } = (await context.core).elasticsearch; + const client = (await context.core).elasticsearch.client.asCurrentUser; const { page = 0, size = ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } = request.query; const from = page * size; try { diff --git a/x-pack/plugins/fleet/common/services/output_helpers.test.ts b/x-pack/plugins/fleet/common/services/output_helpers.test.ts index 1c3db129fee2f..cba42f1b6c233 100644 --- a/x-pack/plugins/fleet/common/services/output_helpers.test.ts +++ b/x-pack/plugins/fleet/common/services/output_helpers.test.ts @@ -101,4 +101,20 @@ describe('outputYmlIncludesReservedPerformanceKey', () => { expect(outputYmlIncludesReservedPerformanceKey(configYml, safeLoad)).toBe(false); }); }); + + describe('comment', () => { + it('returns false when reserved key is present only in a comment', () => { + const configYml = `true`; + + expect(outputYmlIncludesReservedPerformanceKey(configYml, safeLoad)).toBe(false); + }); + }); + + describe('empty string', () => { + it('returns false when YML is empty', () => { + const configYml = ``; + + expect(outputYmlIncludesReservedPerformanceKey(configYml, safeLoad)).toBe(false); + }); + }); }); diff --git a/x-pack/plugins/fleet/common/services/output_helpers.ts b/x-pack/plugins/fleet/common/services/output_helpers.ts index 0db73e4d83511..26d97f42c39b4 100644 --- a/x-pack/plugins/fleet/common/services/output_helpers.ts +++ b/x-pack/plugins/fleet/common/services/output_helpers.ts @@ -52,7 +52,10 @@ export function outputYmlIncludesReservedPerformanceKey( const parsedYml = safeLoad(configYml); if (!isObject(parsedYml)) { - return RESERVED_CONFIG_YML_KEYS.some((key) => parsedYml.includes(key)); + if (typeof parsedYml === 'string') { + return RESERVED_CONFIG_YML_KEYS.some((key) => parsedYml.includes(key)); + } + return false; } const flattenedYml = isObject(parsedYml) ? getFlattenedObject(parsedYml) : {}; diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 826f608b65864..1a7c4cefca34d 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -618,6 +618,7 @@ export interface IndexTemplateMappings { properties: any; dynamic_templates?: any; runtime?: any; + subobjects?: boolean; } // This is an index template v2, see https://github.com/elastic/elasticsearch/issues/53101 diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx index 94bb49d751283..53945f86e09e7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.test.tsx @@ -75,4 +75,20 @@ describe('SecretFormRow', () => { expect(onUsePlainText).toHaveBeenCalled(); }); + + it('should not display the cancel change button when no initial value is provided', () => { + const { queryByTestId } = render( + + + + ); + + expect(queryByTestId('secretCancelChangeBtn')).not.toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx index f483503af9e43..868c80b895fa3 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx @@ -41,7 +41,7 @@ export const SecretFormRow: React.FC<{ onUsePlainText, cancelEdit, }) => { - const hasInitialValue = initialValue !== undefined; + const hasInitialValue = !!initialValue; const [editMode, setEditMode] = useState(!initialValue); const valueHiddenPanel = ( @@ -98,7 +98,7 @@ export const SecretFormRow: React.FC<{ <> {children} {hasInitialValue && ( - + {cancelButton} )} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.test.tsx index 7aa29322229db..a666dda3bac4c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.test.tsx @@ -72,7 +72,7 @@ describe('OutputHealth', () => { await waitFor(async () => { expect(utils.getByTestId('outputHealthDegradedCallout').textContent).toContain( - 'Unable to connect to "Remote ES" at https://remote-es:443. Please check the details are correct.' + 'Unable to connect to "Remote ES" at https://remote-es:443.Please check the details are correct.' ); }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.tsx index c26a122287d01..0d71bb075cf25 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_health.tsx @@ -51,7 +51,7 @@ export const OutputHealth: React.FunctionComponent = ({ output, showBadge iconType="error" data-test-subj="outputHealthDegradedCallout" > -

+

{i18n.translate('xpack.fleet.output.calloutText', { defaultMessage: 'Unable to connect to "{name}" at {host}.', values: { @@ -59,7 +59,7 @@ export const OutputHealth: React.FunctionComponent = ({ output, showBadge host: output.hosts?.join(',') ?? '', }, })} -

{' '} +

{i18n.translate('xpack.fleet.output.calloutPromptText', { defaultMessage: 'Please check the details are correct.', diff --git a/x-pack/plugins/fleet/scripts/verify_test_packages/verify_test_packages.test.ts b/x-pack/plugins/fleet/scripts/verify_test_packages/verify_test_packages.test.ts index 219d101d6e1ad..b8d1ba7e9bec0 100644 --- a/x-pack/plugins/fleet/scripts/verify_test_packages/verify_test_packages.test.ts +++ b/x-pack/plugins/fleet/scripts/verify_test_packages/verify_test_packages.test.ts @@ -5,9 +5,30 @@ * 2.0. */ +import { securityMock } from '@kbn/security-plugin/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; + +import type { Logger } from '@kbn/core/server'; + +import { appContextService } from '../../server/services/app_context'; + import { verifyAllTestPackages } from './verify_test_packages'; +jest.mock('../../server/services/app_context'); + +const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; + describe('Test packages', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + test('All test packages should be valid (node scripts/verify_test_packages) ', async () => { const { errors } = await verifyAllTestPackages(); expect(errors).toEqual([]); diff --git a/x-pack/plugins/fleet/server/errors/handlers.ts b/x-pack/plugins/fleet/server/errors/handlers.ts index 3bfe94537c587..c85bfeced9db1 100644 --- a/x-pack/plugins/fleet/server/errors/handlers.ts +++ b/x-pack/plugins/fleet/server/errors/handlers.ts @@ -20,18 +20,14 @@ import { UninstallTokenError } from '../../common/errors'; import { appContextService } from '../services'; import { - AgentNotFoundError, - AgentActionNotFoundError, AgentPolicyNameExistsError, ConcurrentInstallOperationError, FleetError, - PackageNotFoundError, PackageUnsupportedMediaTypeError, RegistryConnectionError, RegistryError, RegistryResponseError, PackageFailedVerificationError, - PackagePolicyNotFoundError, FleetUnauthorizedError, PackagePolicyNameExistsError, PackageOutdatedError, @@ -41,6 +37,11 @@ import { PackageESError, KibanaSOReferenceError, PackageAlreadyInstalledError, + AgentPolicyInvalidError, + EnrollmentKeyNameExistsError, + AgentRequestInvalidError, + PackagePolicyRequestError, + FleetNotFoundError, } from '.'; type IngestErrorHandler = ( @@ -71,24 +72,31 @@ const getHTTPResponseCode = (error: FleetError): number => { if (error instanceof KibanaSOReferenceError) { return 400; } + if (error instanceof AgentPolicyInvalidError) { + return 400; + } + if (error instanceof AgentRequestInvalidError) { + return 400; + } + if (error instanceof PackagePolicyRequestError) { + return 400; + } // Unauthorized if (error instanceof FleetUnauthorizedError) { return 403; } // Not Found - if (error instanceof PackageNotFoundError || error instanceof PackagePolicyNotFoundError) { - return 404; - } - if (error instanceof AgentNotFoundError) { - return 404; - } - if (error instanceof AgentActionNotFoundError) { + if (error instanceof FleetNotFoundError) { return 404; } + // Conflict if (error instanceof AgentPolicyNameExistsError) { return 409; } + if (error instanceof EnrollmentKeyNameExistsError) { + return 409; + } if (error instanceof ConcurrentInstallOperationError) { return 409; } diff --git a/x-pack/plugins/fleet/server/errors/index.ts b/x-pack/plugins/fleet/server/errors/index.ts index 7f607f4692774..ce7245672e623 100644 --- a/x-pack/plugins/fleet/server/errors/index.ts +++ b/x-pack/plugins/fleet/server/errors/index.ts @@ -28,7 +28,7 @@ export class RegistryResponseError extends RegistryError { } // Package errors -export class PackageNotFoundError extends FleetError {} + export class PackageOutdatedError extends FleetError {} export class PackageFailedVerificationError extends FleetError { constructor(pkgName: string, pkgVersion: string) { @@ -43,20 +43,24 @@ export class PackageInvalidArchiveError extends FleetError {} export class PackageRemovalError extends FleetError {} export class PackageESError extends FleetError {} export class ConcurrentInstallOperationError extends FleetError {} -export class BundledPackageLocationNotFoundError extends FleetError {} + export class KibanaSOReferenceError extends FleetError {} export class PackageAlreadyInstalledError extends FleetError {} export class AgentPolicyError extends FleetError {} -export class AgentPolicyNotFoundError extends FleetError {} -export class AgentNotFoundError extends FleetError {} -export class AgentActionNotFoundError extends FleetError {} +export class AgentRequestInvalidError extends FleetError {} +export class AgentPolicyInvalidError extends FleetError {} + export class AgentPolicyNameExistsError extends AgentPolicyError {} export class AgentReassignmentError extends FleetError {} export class PackagePolicyIneligibleForUpgradeError extends FleetError {} export class PackagePolicyValidationError extends FleetError {} export class PackagePolicyNameExistsError extends FleetError {} -export class PackagePolicyNotFoundError extends FleetError {} +export class BundledPackageLocationNotFoundError extends FleetError {} + +export class PackagePolicyRequestError extends FleetError {} + +export class EnrollmentKeyNameExistsError extends FleetError {} export class HostedAgentPolicyRestrictionRelatedError extends FleetError { constructor(message = 'Cannot perform that action') { super( @@ -75,12 +79,27 @@ export class FleetEncryptedSavedObjectEncryptionKeyRequired extends FleetError { export class FleetSetupError extends FleetError {} export class GenerateServiceTokenError extends FleetError {} export class FleetUnauthorizedError extends FleetError {} +export class FleetNotFoundError extends FleetError {} export class OutputUnauthorizedError extends FleetError {} export class OutputInvalidError extends FleetError {} export class OutputLicenceError extends FleetError {} export class DownloadSourceError extends FleetError {} +// Not found errors +export class AgentNotFoundError extends FleetNotFoundError {} +export class AgentPolicyNotFoundError extends FleetNotFoundError {} +export class AgentActionNotFoundError extends FleetNotFoundError {} +export class DownloadSourceNotFound extends FleetNotFoundError {} +export class EnrollmentKeyNotFoundError extends FleetNotFoundError {} +export class FleetServerHostNotFoundError extends FleetNotFoundError {} +export class SigningServiceNotFoundError extends FleetNotFoundError {} +export class InputNotFoundError extends FleetNotFoundError {} +export class OutputNotFoundError extends FleetNotFoundError {} +export class PackageNotFoundError extends FleetNotFoundError {} +export class PackagePolicyNotFoundError extends FleetNotFoundError {} +export class StreamNotFoundError extends FleetNotFoundError {} + export class FleetServerHostUnauthorizedError extends FleetUnauthorizedError {} export class FleetProxyUnauthorizedError extends FleetUnauthorizedError {} diff --git a/x-pack/plugins/fleet/server/integration_tests/helpers/index.ts b/x-pack/plugins/fleet/server/integration_tests/helpers/index.ts index 23cdc80b8d65d..961f3c90fb549 100644 --- a/x-pack/plugins/fleet/server/integration_tests/helpers/index.ts +++ b/x-pack/plugins/fleet/server/integration_tests/helpers/index.ts @@ -8,6 +8,8 @@ import { adminTestUser } from '@kbn/test'; import { getSupertest, type createRoot, type HttpMethod } from '@kbn/core-test-helpers-kbn-server'; +import { FleetError } from '../../errors'; + type Root = ReturnType; export * from './docker_registry_helper'; @@ -18,7 +20,7 @@ export const waitForFleetSetup = async (root: Root) => { const resp = await statusApi.send(); const fleetStatus = resp.body?.status?.plugins?.fleet; if (fleetStatus?.meta?.error) { - throw new Error(`Setup failed: ${JSON.stringify(fleetStatus)}`); + throw new FleetError(`Setup failed: ${JSON.stringify(fleetStatus)}`); } return !fleetStatus || fleetStatus?.summary === 'Fleet is setting up'; diff --git a/x-pack/plugins/fleet/server/routes/agent/source_uri_utils.ts b/x-pack/plugins/fleet/server/routes/agent/source_uri_utils.ts index 3f571fdcb09cc..efedf164f6531 100644 --- a/x-pack/plugins/fleet/server/routes/agent/source_uri_utils.ts +++ b/x-pack/plugins/fleet/server/routes/agent/source_uri_utils.ts @@ -9,6 +9,7 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import { downloadSourceService } from '../../services'; import type { AgentPolicy } from '../../types'; +import { FleetError, DownloadSourceNotFound } from '../../errors'; export const getSourceUriForAgentPolicy = async ( soClient: SavedObjectsClientContract, @@ -17,12 +18,12 @@ export const getSourceUriForAgentPolicy = async ( const defaultDownloadSourceId = await downloadSourceService.getDefaultDownloadSourceId(soClient); if (!defaultDownloadSourceId) { - throw new Error('Default download source host is not setup'); + throw new FleetError('Default download source host is not setup'); } const downloadSourceId: string = agentPolicy.download_source_id || defaultDownloadSourceId; const downloadSource = await downloadSourceService.get(soClient, downloadSourceId); if (!downloadSource) { - throw new Error(`Download source host not found ${downloadSourceId}`); + throw new DownloadSourceNotFound(`Download source host not found ${downloadSourceId}`); } return { host: downloadSource.host, proxy_id: downloadSource.proxy_id }; }; diff --git a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.test.ts b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.test.ts index aefcbfc5cd87f..62f34559c79ee 100644 --- a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.test.ts +++ b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.test.ts @@ -15,7 +15,7 @@ describe('upgrade handler', () => { it('should throw if upgrade version is higher than kibana version', () => { expect(() => checkKibanaVersion('8.5.0', '8.4.0')).toThrowError( - 'cannot upgrade agent to 8.5.0 because it is higher than the installed kibana version 8.4.0' + 'Cannot upgrade agent to 8.5.0 because it is higher than the installed kibana version 8.4.0' ); }); diff --git a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts index 547fda566a95f..391c721e2ef9f 100644 --- a/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts +++ b/x-pack/plugins/fleet/server/routes/agent/upgrade_handler.ts @@ -19,7 +19,7 @@ import type { PostAgentUpgradeResponse } from '../../../common/types'; import type { PostAgentUpgradeRequestSchema, PostBulkAgentUpgradeRequestSchema } from '../../types'; import * as AgentService from '../../services/agents'; import { appContextService } from '../../services'; -import { defaultFleetErrorHandler } from '../../errors'; +import { defaultFleetErrorHandler, AgentRequestInvalidError } from '../../errors'; import { getRecentUpgradeInfoForAgent, isAgentUpgradeable, @@ -187,14 +187,15 @@ export const postBulkAgentsUpgradeHandler: RequestHandler< export const checkKibanaVersion = (version: string, kibanaVersion: string, force = false) => { // get version number only in case "-SNAPSHOT" is in it const kibanaVersionNumber = semverCoerce(kibanaVersion)?.version; - if (!kibanaVersionNumber) throw new Error(`kibanaVersion ${kibanaVersionNumber} is not valid`); + if (!kibanaVersionNumber) + throw new AgentRequestInvalidError(`KibanaVersion ${kibanaVersionNumber} is not valid`); const versionToUpgradeNumber = semverCoerce(version)?.version; if (!versionToUpgradeNumber) - throw new Error(`version to upgrade ${versionToUpgradeNumber} is not valid`); + throw new AgentRequestInvalidError(`Version to upgrade ${versionToUpgradeNumber} is not valid`); if (!force && semverGt(versionToUpgradeNumber, kibanaVersionNumber)) { - throw new Error( - `cannot upgrade agent to ${versionToUpgradeNumber} because it is higher than the installed kibana version ${kibanaVersionNumber}` + throw new AgentRequestInvalidError( + `Cannot upgrade agent to ${versionToUpgradeNumber} because it is higher than the installed kibana version ${kibanaVersionNumber}` ); } @@ -205,8 +206,8 @@ export const checkKibanaVersion = (version: string, kibanaVersion: string, force // When force is enabled, only the major and minor versions are checked if (force && !(kibanaMajorGt || kibanaMajorEqMinorGte)) { - throw new Error( - `cannot force upgrade agent to ${versionToUpgradeNumber} because it does not satisfy the major and minor of the installed kibana version ${kibanaVersionNumber}` + throw new AgentRequestInvalidError( + `Cannot force upgrade agent to ${versionToUpgradeNumber} because it does not satisfy the major and minor of the installed kibana version ${kibanaVersionNumber}` ); } }; @@ -228,8 +229,8 @@ const checkFleetServerVersion = ( } if (!force && semverGt(versionToUpgradeNumber, maxFleetServerVersion)) { - throw new Error( - `cannot upgrade agent to ${versionToUpgradeNumber} because it is higher than the latest fleet server version ${maxFleetServerVersion}` + throw new AgentRequestInvalidError( + `Cannot upgrade agent to ${versionToUpgradeNumber} because it is higher than the latest fleet server version ${maxFleetServerVersion}` ); } @@ -241,8 +242,8 @@ const checkFleetServerVersion = ( // When force is enabled, only the major and minor versions are checked if (force && !(fleetServerMajorGt || fleetServerMajorEqMinorGte)) { - throw new Error( - `cannot force upgrade agent to ${versionToUpgradeNumber} because it does not satisfy the major and minor of the latest fleet server version ${maxFleetServerVersion}` + throw new AgentRequestInvalidError( + `Cannot force upgrade agent to ${versionToUpgradeNumber} because it does not satisfy the major and minor of the latest fleet server version ${maxFleetServerVersion}` ); } }; diff --git a/x-pack/plugins/fleet/server/routes/epm/file_handler.test.ts b/x-pack/plugins/fleet/server/routes/epm/file_handler.test.ts new file mode 100644 index 0000000000000..56d6d8c127bc2 --- /dev/null +++ b/x-pack/plugins/fleet/server/routes/epm/file_handler.test.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 { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; +import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; +import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; +import { Headers } from 'node-fetch'; + +import { getBundledPackageByPkgKey } from '../../services/epm/packages/bundled_packages'; +import { getFile, getInstallation } from '../../services/epm/packages/get'; +import type { FleetRequestHandlerContext } from '../..'; +import { appContextService } from '../../services'; +import { unpackBufferEntries, getArchiveEntry } from '../../services/epm/archive'; +import { getAsset } from '../../services/epm/archive/storage'; + +import { getFileHandler } from './file_handler'; + +jest.mock('../../services/app_context'); +jest.mock('../../services/epm/archive'); +jest.mock('../../services/epm/archive/storage'); +jest.mock('../../services/epm/packages/bundled_packages'); +jest.mock('../../services/epm/packages/get'); + +const mockedGetBundledPackageByPkgKey = jest.mocked(getBundledPackageByPkgKey); +const mockedGetInstallation = jest.mocked(getInstallation); +const mockedGetFile = jest.mocked(getFile); +const mockedGetArchiveEntry = jest.mocked(getArchiveEntry); +const mockedUnpackBufferEntries = jest.mocked(unpackBufferEntries); +const mockedGetAsset = jest.mocked(getAsset); + +function mockContext() { + const mockSavedObjectsClient = savedObjectsClientMock.create(); + const mockElasticsearchClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + return { + fleet: { + internalSOClient: async () => mockSavedObjectsClient, + }, + core: { + savedObjects: { + client: mockSavedObjectsClient, + }, + elasticsearch: { + client: { + asInternalUser: mockElasticsearchClient, + }, + }, + }, + } as unknown as FleetRequestHandlerContext; +} + +describe('getFileHandler', () => { + beforeEach(() => { + const logger = loggingSystemMock.createLogger(); + jest.mocked(appContextService).getLogger.mockReturnValue(logger); + mockedGetBundledPackageByPkgKey.mockReset(); + mockedUnpackBufferEntries.mockReset(); + mockedGetFile.mockReset(); + mockedGetInstallation.mockReset(); + mockedGetArchiveEntry.mockReset(); + mockedGetAsset.mockReset(); + }); + + it('should return the file for bundled package and an existing file', async () => { + mockedGetBundledPackageByPkgKey.mockResolvedValue({ + getBuffer: () => Promise.resolve(), + } as any); + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'README.md', + }, + }); + const buffer = Buffer.from(`TEST`); + mockedUnpackBufferEntries.mockResolvedValue([ + { + path: 'test-1.0.0/README.md', + buffer, + }, + ]); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 200, + body: buffer, + headers: expect.objectContaining({ + 'content-type': 'text/markdown; charset=utf-8', + }), + }) + ); + }); + + it('should a 404 for bundled package with a non existing file', async () => { + mockedGetBundledPackageByPkgKey.mockResolvedValue({ + getBuffer: () => Promise.resolve(), + } as any); + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'idonotexists.md', + }, + }); + mockedUnpackBufferEntries.mockResolvedValue([ + { + path: 'test-1.0.0/README.md', + buffer: Buffer.from(`TEST`), + }, + ]); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 404, + body: 'bundled package file not found: idonotexists.md', + }) + ); + }); + + it('should proxy registry 200 for non bundled and non installed package', async () => { + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'idonotexists.md', + }, + }); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + + mockedGetFile.mockResolvedValue({ + status: 200, + // @ts-expect-error + body: 'test', + headers: new Headers({ + raw: '', + 'content-type': 'text/markdown', + }), + }); + + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 200, + body: 'test', + headers: expect.objectContaining({ + 'content-type': 'text/markdown', + }), + }) + ); + }); + + it('should proxy registry 404 for non bundled and non installed package', async () => { + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'idonotexists.md', + }, + }); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + + mockedGetFile.mockResolvedValue({ + status: 404, + // @ts-expect-error + body: 'not found', + headers: new Headers({ + raw: '', + 'content-type': 'text', + }), + }); + + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 404, + body: 'not found', + headers: expect.objectContaining({ + 'content-type': 'text', + }), + }) + ); + }); + + it('should return the file from installation for installed package', async () => { + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'README.md', + }, + }); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + + mockedGetInstallation.mockResolvedValue({ version: '1.0.0' } as any); + mockedGetArchiveEntry.mockReturnValue(Buffer.from('test')); + + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 200, + headers: expect.objectContaining({ + 'content-type': 'text/markdown; charset=utf-8', + }), + }) + ); + }); + + it('should a 404 if the file from installation do not exists for installed package', async () => { + const request = httpServerMock.createKibanaRequest({ + params: { + pkgName: 'test', + pkgVersion: '1.0.0', + filePath: 'README.md', + }, + }); + const response = httpServerMock.createResponseFactory(); + const context = mockContext(); + + mockedGetInstallation.mockResolvedValue({ version: '1.0.0' } as any); + await getFileHandler(context, request, response); + + expect(response.custom).toBeCalledWith( + expect.objectContaining({ + statusCode: 404, + body: 'installed package file not found: README.md', + }) + ); + }); +}); diff --git a/x-pack/plugins/fleet/server/routes/epm/file_handler.ts b/x-pack/plugins/fleet/server/routes/epm/file_handler.ts new file mode 100644 index 0000000000000..4b6b74628aa4e --- /dev/null +++ b/x-pack/plugins/fleet/server/routes/epm/file_handler.ts @@ -0,0 +1,141 @@ +/* + * 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 path from 'path'; + +import type { TypeOf } from '@kbn/config-schema'; +import mime from 'mime-types'; +import type { ResponseHeaders, KnownHeaders, HttpResponseOptions } from '@kbn/core/server'; + +import type { GetFileRequestSchema, FleetRequestHandler } from '../../types'; +import { getFile, getInstallation } from '../../services/epm/packages'; +import { defaultFleetErrorHandler } from '../../errors'; +import { getArchiveEntry } from '../../services/epm/archive'; +import { getAsset } from '../../services/epm/archive/storage'; +import { getBundledPackageByPkgKey } from '../../services/epm/packages/bundled_packages'; +import { pkgToPkgKey } from '../../services/epm/registry'; +import { unpackBufferEntries } from '../../services/epm/archive'; + +const CACHE_CONTROL_10_MINUTES_HEADER: HttpResponseOptions['headers'] = { + 'cache-control': 'max-age=600', +}; +export const getFileHandler: FleetRequestHandler< + TypeOf +> = async (context, request, response) => { + try { + const { pkgName, pkgVersion, filePath } = request.params; + const savedObjectsClient = (await context.fleet).internalSoClient; + + const installation = await getInstallation({ savedObjectsClient, pkgName }); + const useLocalFile = pkgVersion === installation?.version; + const assetPath = `${pkgName}-${pkgVersion}/${filePath}`; + + if (useLocalFile) { + const fileBuffer = getArchiveEntry(assetPath); + // only pull local installation if we don't have it cached + const storedAsset = !fileBuffer && (await getAsset({ savedObjectsClient, path: assetPath })); + + // error, if neither is available + if (!fileBuffer && !storedAsset) { + return response.custom({ + body: `installed package file not found: ${filePath}`, + statusCode: 404, + }); + } + + // if storedAsset is not available, fileBuffer *must* be + // b/c we error if we don't have at least one, and storedAsset is the least likely + const { buffer, contentType } = storedAsset + ? { + contentType: storedAsset.media_type, + buffer: storedAsset.data_utf8 + ? Buffer.from(storedAsset.data_utf8, 'utf8') + : Buffer.from(storedAsset.data_base64, 'base64'), + } + : { + contentType: mime.contentType(path.extname(assetPath)), + buffer: fileBuffer, + }; + + if (!contentType) { + return response.custom({ + body: `unknown content type for file: ${filePath}`, + statusCode: 400, + }); + } + + return response.custom({ + body: buffer, + statusCode: 200, + headers: { + ...CACHE_CONTROL_10_MINUTES_HEADER, + 'content-type': contentType, + }, + }); + } + + const bundledPackage = await getBundledPackageByPkgKey( + pkgToPkgKey({ name: pkgName, version: pkgVersion }) + ); + if (bundledPackage) { + const bufferEntries = await unpackBufferEntries( + await bundledPackage.getBuffer(), + 'application/zip' + ); + + const fileBuffer = bufferEntries.find((entry) => entry.path === assetPath)?.buffer; + + if (!fileBuffer) { + return response.custom({ + body: `bundled package file not found: ${filePath}`, + statusCode: 404, + }); + } + + // if storedAsset is not available, fileBuffer *must* be + // b/c we error if we don't have at least one, and storedAsset is the least likely + const { buffer, contentType } = { + contentType: mime.contentType(path.extname(assetPath)), + buffer: fileBuffer, + }; + + if (!contentType) { + return response.custom({ + body: `unknown content type for file: ${filePath}`, + statusCode: 400, + }); + } + + return response.custom({ + body: buffer, + statusCode: 200, + headers: { + ...CACHE_CONTROL_10_MINUTES_HEADER, + 'content-type': contentType, + }, + }); + } else { + const registryResponse = await getFile(pkgName, pkgVersion, filePath); + const headersToProxy: KnownHeaders[] = ['content-type']; + const proxiedHeaders = headersToProxy.reduce((headers, knownHeader) => { + const value = registryResponse.headers.get(knownHeader); + if (value !== null) { + headers[knownHeader] = value; + } + return headers; + }, {} as ResponseHeaders); + + return response.custom({ + body: registryResponse.body, + statusCode: registryResponse.status, + headers: { ...CACHE_CONTROL_10_MINUTES_HEADER, ...proxiedHeaders }, + }); + } + } catch (error) { + return defaultFleetErrorHandler({ error, response }); + } +}; diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index c03272119dd16..6fadeff5180c2 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -5,12 +5,9 @@ * 2.0. */ -import path from 'path'; - import type { TypeOf } from '@kbn/config-schema'; -import mime from 'mime-types'; import semverValid from 'semver/functions/valid'; -import type { ResponseHeaders, KnownHeaders, HttpResponseOptions } from '@kbn/core/server'; +import type { HttpResponseOptions } from '@kbn/core/server'; import { pick } from 'lodash'; @@ -41,7 +38,6 @@ import type { GetPackagesRequestSchema, GetInstalledPackagesRequestSchema, GetDataStreamsRequestSchema, - GetFileRequestSchema, GetInfoRequestSchema, InstallPackageFromRegistryRequestSchema, InstallPackageByUploadRequestSchema, @@ -60,21 +56,17 @@ import { getCategories, getPackages, getInstalledPackages, - getFile, getPackageInfo, isBulkInstallError, installPackage, removeInstallation, getLimitedPackages, - getInstallation, getBulkAssets, getTemplateInputs, } from '../../services/epm/packages'; import type { BulkInstallResponse } from '../../services/epm/packages'; import { defaultFleetErrorHandler, fleetErrorToResponseOptions, FleetError } from '../../errors'; import { appContextService, checkAllowedPackages } from '../../services'; -import { getArchiveEntry } from '../../services/epm/archive/cache'; -import { getAsset } from '../../services/epm/archive/storage'; import { getPackageUsageStats } from '../../services/epm/packages/get'; import { updatePackage } from '../../services/epm/packages/update'; import { getGpgKeyIdOrUndefined } from '../../services/epm/packages/package_verification'; @@ -206,80 +198,6 @@ export const getLimitedListHandler: FleetRequestHandler< } }; -export const getFileHandler: FleetRequestHandler< - TypeOf -> = async (context, request, response) => { - try { - const { pkgName, pkgVersion, filePath } = request.params; - const savedObjectsClient = (await context.fleet).internalSoClient; - const installation = await getInstallation({ savedObjectsClient, pkgName }); - const useLocalFile = pkgVersion === installation?.version; - - if (useLocalFile) { - const assetPath = `${pkgName}-${pkgVersion}/${filePath}`; - const fileBuffer = getArchiveEntry(assetPath); - // only pull local installation if we don't have it cached - const storedAsset = !fileBuffer && (await getAsset({ savedObjectsClient, path: assetPath })); - - // error, if neither is available - if (!fileBuffer && !storedAsset) { - return response.custom({ - body: `installed package file not found: ${filePath}`, - statusCode: 404, - }); - } - - // if storedAsset is not available, fileBuffer *must* be - // b/c we error if we don't have at least one, and storedAsset is the least likely - const { buffer, contentType } = storedAsset - ? { - contentType: storedAsset.media_type, - buffer: storedAsset.data_utf8 - ? Buffer.from(storedAsset.data_utf8, 'utf8') - : Buffer.from(storedAsset.data_base64, 'base64'), - } - : { - contentType: mime.contentType(path.extname(assetPath)), - buffer: fileBuffer, - }; - - if (!contentType) { - return response.custom({ - body: `unknown content type for file: ${filePath}`, - statusCode: 400, - }); - } - - return response.custom({ - body: buffer, - statusCode: 200, - headers: { - ...CACHE_CONTROL_10_MINUTES_HEADER, - 'content-type': contentType, - }, - }); - } else { - const registryResponse = await getFile(pkgName, pkgVersion, filePath); - const headersToProxy: KnownHeaders[] = ['content-type']; - const proxiedHeaders = headersToProxy.reduce((headers, knownHeader) => { - const value = registryResponse.headers.get(knownHeader); - if (value !== null) { - headers[knownHeader] = value; - } - return headers; - }, {} as ResponseHeaders); - - return response.custom({ - body: registryResponse.body, - statusCode: registryResponse.status, - headers: { ...CACHE_CONTROL_10_MINUTES_HEADER, ...proxiedHeaders }, - }); - } - } catch (error) { - return defaultFleetErrorHandler({ error, response }); - } -}; - export const getInfoHandler: FleetRequestHandler< TypeOf, TypeOf diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 6e0000bf4ccbf..5245381a409da 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -55,7 +55,6 @@ import { getListHandler, getInstalledListHandler, getLimitedListHandler, - getFileHandler, getInfoHandler, getBulkAssetsHandler, installPackageFromRegistryHandler, @@ -70,6 +69,7 @@ import { createCustomIntegrationHandler, getInputsHandler, } from './handlers'; +import { getFileHandler } from './file_handler'; const MAX_FILE_SIZE_BYTES = 104857600; // 100MB diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index cbc560cc72dc8..a16fd37c9ac15 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -6,7 +6,6 @@ */ import type { TypeOf } from '@kbn/config-schema'; -import Boom from '@hapi/boom'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import type { RequestHandler } from '@kbn/core/server'; @@ -43,7 +42,11 @@ import type { UpgradePackagePolicyResponse, } from '../../../common/types'; import { installationStatuses, inputsFormat } from '../../../common/constants'; -import { defaultFleetErrorHandler, PackagePolicyNotFoundError } from '../../errors'; +import { + defaultFleetErrorHandler, + PackagePolicyNotFoundError, + PackagePolicyRequestError, +} from '../../errors'; import { getInstallations, getPackageInfo } from '../../services/epm/packages'; import { PACKAGES_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../constants'; import { @@ -244,7 +247,7 @@ export const createPackagePolicyHandler: FleetRequestHandler< let newPackagePolicy: NewPackagePolicy; if (isSimplifiedCreatePackagePolicyRequest(newPolicy)) { if (!pkg) { - throw new Error('Package is required'); + throw new PackagePolicyRequestError('Package is required'); } const pkgInfo = await getPackageInfo({ savedObjectsClient: soClient, @@ -311,7 +314,7 @@ export const updatePackagePolicyHandler: FleetRequestHandler< const packagePolicy = await packagePolicyService.get(soClient, request.params.packagePolicyId); if (!packagePolicy) { - throw Boom.notFound('Package policy not found'); + throw new PackagePolicyNotFoundError('Package policy not found'); } if (limitedToPackages && limitedToPackages.length) { @@ -337,7 +340,7 @@ export const updatePackagePolicyHandler: FleetRequestHandler< isSimplifiedCreatePackagePolicyRequest(body as unknown as SimplifiedPackagePolicy) ) { if (!pkg) { - throw new Error('package is required'); + throw new PackagePolicyRequestError('Package is required'); } const pkgInfo = await getPackageInfo({ savedObjectsClient: soClient, diff --git a/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts b/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts index bbe00c49b414f..c7c02d8a53fb5 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts @@ -12,7 +12,7 @@ import { LICENCE_FOR_PER_POLICY_OUTPUT, outputType } from '../../../common/const import { policyHasFleetServer, policyHasSyntheticsIntegration } from '../../../common/services'; import { appContextService } from '..'; import { outputService } from '../output'; -import { OutputInvalidError, OutputLicenceError } from '../../errors'; +import { OutputInvalidError, OutputLicenceError, OutputNotFoundError } from '../../errors'; /** * Get the data output for a given agent policy @@ -28,7 +28,7 @@ export async function getDataOutputForAgentPolicy( agentPolicy.data_output_id || (await outputService.getDefaultDataOutputId(soClient)); if (!dataOutputId) { - throw new Error('No default data output found.'); + throw new OutputNotFoundError('No default data output found.'); } return outputService.get(soClient, dataOutputId); diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts index 4445ebbe84769..ec36c7575937e 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_permissions.ts @@ -24,6 +24,7 @@ import type { RegistryDataStreamPrivileges, } from '../../../common/types'; import { PACKAGE_POLICY_DEFAULT_INDEX_PRIVILEGES } from '../../constants'; +import { PackagePolicyRequestError } from '../../errors'; import type { PackagePolicy } from '../../types'; import { pkgToPkgKey } from '../epm/registry'; @@ -46,7 +47,7 @@ export function storedPackagePoliciesToAgentPermissions( ): FullAgentPolicyOutputPermissions | undefined { // I'm not sure what permissions to return for this case, so let's return the defaults if (!packagePolicies) { - throw new Error( + throw new PackagePolicyRequestError( 'storedPackagePoliciesToAgentPermissions should be called with a PackagePolicy' ); } @@ -57,7 +58,9 @@ export function storedPackagePoliciesToAgentPermissions( const permissionEntries = packagePolicies.map((packagePolicy) => { if (!packagePolicy.package) { - throw new Error(`No package for package policy ${packagePolicy.name ?? packagePolicy.id}`); + throw new PackagePolicyRequestError( + `No package for package policy ${packagePolicy.name ?? packagePolicy.id}` + ); } const pkg = packageInfoCache.get(pkgToPkgKey(packagePolicy.package))!; diff --git a/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts b/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts index b614b9c2dd9e4..0108e9cd97721 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts @@ -16,6 +16,7 @@ import { getSourceUriForAgentPolicy } from '../../routes/agent/source_uri_utils' import { getFleetServerHostsForAgentPolicy } from '../fleet_server_host'; import { appContextService } from '../app_context'; import { bulkGetFleetProxies } from '../fleet_proxies'; +import { OutputNotFoundError } from '../../errors'; export async function fetchRelatedSavedObjects( soClient: SavedObjectsClientContract, @@ -27,7 +28,7 @@ export async function fetchRelatedSavedObjects( ]); if (!defaultDataOutputId) { - throw new Error('Default output is not setup'); + throw new OutputNotFoundError('Default output is not setup'); } const dataOutputId = agentPolicy.data_output_id || defaultDataOutputId; @@ -51,11 +52,11 @@ export async function fetchRelatedSavedObjects( const dataOutput = outputs.find((output) => output.id === dataOutputId); if (!dataOutput) { - throw new Error(`Data output not found ${dataOutputId}`); + throw new OutputNotFoundError(`Data output not found ${dataOutputId}`); } const monitoringOutput = outputs.find((output) => output.id === monitoringOutputId); if (!monitoringOutput) { - throw new Error(`Monitoring output not found ${monitoringOutputId}`); + throw new OutputNotFoundError(`Monitoring output not found ${monitoringOutputId}`); } const proxyIds = uniq( diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index 931168f545b55..3e97594ee959f 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -8,6 +8,8 @@ import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { securityMock } from '@kbn/security-plugin/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; +import type { Logger } from '@kbn/core/server'; import { PackagePolicyRestrictionRelatedError, FleetUnauthorizedError } from '../errors'; import type { @@ -105,8 +107,13 @@ function getAgentPolicyCreateMock() { }); return soClient; } - +let mockedLogger: jest.Mocked; describe('agent policy', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + afterEach(() => { jest.resetAllMocks(); }); diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 568829fda978e..b44e0616b7b69 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -71,6 +71,7 @@ import { AgentPolicyNotFoundError, PackagePolicyRestrictionRelatedError, FleetUnauthorizedError, + FleetError, } from '../errors'; import type { FullAgentConfigMap } from '../../common/types/models/agent_cm'; @@ -125,24 +126,24 @@ class AgentPolicyService { id, savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, }); + const logger = appContextService.getLogger(); + logger.debug(`Starting update of agent policy ${id}`); const existingAgentPolicy = await this.get(soClient, id, true); if (!existingAgentPolicy) { - throw new Error('Agent policy not found'); + throw new AgentPolicyNotFoundError('Agent policy not found'); } if ( existingAgentPolicy.status === agentPolicyStatuses.Inactive && agentPolicy.status !== agentPolicyStatuses.Active ) { - throw new Error( + throw new FleetError( `Agent policy ${id} cannot be updated because it is ${existingAgentPolicy.status}` ); } - const logger = appContextService.getLogger(); - if (options.removeProtection) { logger.warn(`Setting tamper protection for Agent Policy ${id} to false`); } @@ -166,7 +167,7 @@ class AgentPolicyService { if (options.bumpRevision || options.removeProtection) { await this.triggerAgentPolicyUpdatedEvent(soClient, esClient, 'updated', id); } - + logger.debug(`Agent policy ${id} update completed`); return (await this.get(soClient, id)) as AgentPolicy; } @@ -190,7 +191,7 @@ class AgentPolicyService { is_preconfigured: true, }; - if (!id) throw new Error('Missing ID'); + if (!id) throw new AgentPolicyNotFoundError('Missing ID'); return await this.ensureAgentPolicy(soClient, esClient, newAgentPolicy, id as string); } @@ -254,6 +255,7 @@ class AgentPolicyService { this.checkTamperProtectionLicense(agentPolicy); const logger = appContextService.getLogger(); + logger.debug(`Creating new agent policy`); if (agentPolicy?.is_protected) { logger.warn( @@ -282,7 +284,7 @@ class AgentPolicyService { await appContextService.getUninstallTokenService()?.generateTokenForPolicyId(newSo.id); await this.triggerAgentPolicyUpdatedEvent(soClient, esClient, 'created', newSo.id); - + logger.debug(`Created new agent policy with id ${newSo.id}`); return { id: newSo.id, ...newSo.attributes }; } @@ -320,7 +322,7 @@ class AgentPolicyService { } if (agentPolicySO.error) { - throw new Error(agentPolicySO.error.message); + throw new FleetError(agentPolicySO.error.message); } const agentPolicy = { id: agentPolicySO.id, ...agentPolicySO.attributes }; @@ -356,7 +358,7 @@ class AgentPolicyService { } else if (agentPolicySO.error.statusCode === 404) { throw new AgentPolicyNotFoundError(`Agent policy ${agentPolicySO.id} not found`); } else { - throw new Error(agentPolicySO.error.message); + throw new FleetError(agentPolicySO.error.message); } } @@ -498,6 +500,9 @@ class AgentPolicyService { authorizationHeader?: HTTPAuthorizationHeader | null; } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Starting update of agent policy ${id}`); + if (agentPolicy.name) { await this.requireUniqueName(soClient, { id, @@ -508,14 +513,12 @@ class AgentPolicyService { const existingAgentPolicy = await this.get(soClient, id, true); if (!existingAgentPolicy) { - throw new Error('Agent policy not found'); + throw new AgentPolicyNotFoundError('Agent policy not found'); } this.checkTamperProtectionLicense(agentPolicy); await this.checkForValidUninstallToken(agentPolicy, id); - const logger = appContextService.getLogger(); - if (agentPolicy?.is_protected && !policyHasEndpointSecurity(existingAgentPolicy)) { logger.warn( 'Agent policy requires Elastic Defend integration to set tamper protection to true' @@ -558,10 +561,13 @@ class AgentPolicyService { newAgentPolicyProps: Pick, options?: { user?: AuthenticatedUser } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Starting copy of agent policy ${id}`); + // Copy base agent policy const baseAgentPolicy = await this.get(soClient, id, true); if (!baseAgentPolicy) { - throw new Error('Agent policy not found'); + throw new AgentPolicyNotFoundError('Agent policy not found'); } const newAgentPolicy = await this.create( soClient, @@ -631,11 +637,11 @@ class AgentPolicyService { // Get updated agent policy with package policies and adjusted tamper protection const updatedAgentPolicy = await this.get(soClient, newAgentPolicy.id, true); if (!updatedAgentPolicy) { - throw new Error('Copied agent policy not found'); + throw new AgentPolicyNotFoundError('Copied agent policy not found'); } await this.deployPolicy(soClient, newAgentPolicy.id); - + logger.debug(`Completed copy of agent policy ${id}`); return updatedAgentPolicy; } @@ -799,6 +805,9 @@ class AgentPolicyService { id: string, options?: { force?: boolean; removeFleetServerDocuments?: boolean; user?: AuthenticatedUser } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Deleting agent policy ${id}`); + auditLoggingService.writeCustomSoAuditLog({ action: 'delete', id, @@ -807,7 +816,7 @@ class AgentPolicyService { const agentPolicy = await this.get(soClient, id, false); if (!agentPolicy) { - throw new Error('Agent policy not found'); + throw new AgentPolicyNotFoundError('Agent policy not found'); } if (agentPolicy.is_managed && !options?.force) { @@ -822,7 +831,7 @@ class AgentPolicyService { }); if (total > 0) { - throw new Error('Cannot delete agent policy that is assigned to agent(s)'); + throw new FleetError('Cannot delete agent policy that is assigned to agent(s)'); } const packagePolicies = await packagePolicyService.findAllForAgentPolicy(soClient, id); @@ -860,7 +869,7 @@ class AgentPolicyService { if (options?.removeFleetServerDocuments) { await this.deleteFleetServerPoliciesForPolicyId(esClient, id); } - + logger.debug(`Deleted agent policy ${id}`); return { id, name: agentPolicy.name, @@ -954,7 +963,7 @@ class AgentPolicyService { return acc; }, [] as BulkResponseItem[]); - logger.debug( + logger.warn( `Failed to index documents during policy deployment: ${JSON.stringify(erroredDocuments)}` ); } @@ -1225,7 +1234,7 @@ class AgentPolicyService { ); if (uninstallTokenError) { - throw new Error( + throw new FleetError( `Cannot enable Agent Tamper Protection: ${uninstallTokenError.error.message}` ); } diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index 7ad50c8d962c1..b8eb0f7d0ca14 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import Boom from '@hapi/boom'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SortResults } from '@elastic/elasticsearch/lib/api/types'; import type { SavedObjectsClientContract, ElasticsearchClient } from '@kbn/core/server'; @@ -19,7 +18,12 @@ import type { AgentStatus, FleetServerAgent } from '../../../common/types'; import { SO_SEARCH_LIMIT } from '../../../common/constants'; import { isAgentUpgradeable } from '../../../common/services'; import { AGENTS_INDEX } from '../../constants'; -import { FleetError, isESClientError, AgentNotFoundError } from '../../errors'; +import { + FleetError, + isESClientError, + AgentNotFoundError, + FleetUnauthorizedError, +} from '../../errors'; import { auditLoggingService } from '../audit_logging'; @@ -548,10 +552,10 @@ export async function getAgentByAccessAPIKeyId( throw new AgentNotFoundError('Agent not found'); } if (agent.access_api_key_id !== accessAPIKeyId) { - throw new Error('Agent api key id is not matching'); + throw new FleetError('Agent api key id is not matching'); } if (!agent.active) { - throw Boom.forbidden('Agent inactive'); + throw new FleetUnauthorizedError('Agent inactive'); } return agent; diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.ts b/x-pack/plugins/fleet/server/services/agents/reassign.ts index 86d368d399310..0a5c6f9b51ee0 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.ts @@ -5,11 +5,14 @@ * 2.0. */ import type { SavedObjectsClientContract, ElasticsearchClient } from '@kbn/core/server'; -import Boom from '@hapi/boom'; import type { Agent } from '../../types'; import { agentPolicyService } from '../agent_policy'; -import { AgentReassignmentError, HostedAgentPolicyRestrictionRelatedError } from '../../errors'; +import { + AgentReassignmentError, + HostedAgentPolicyRestrictionRelatedError, + AgentPolicyNotFoundError, +} from '../../errors'; import { SO_SEARCH_LIMIT } from '../../constants'; @@ -33,7 +36,7 @@ export async function reassignAgent( ) { const newAgentPolicy = await agentPolicyService.get(soClient, newAgentPolicyId); if (!newAgentPolicy) { - throw Boom.notFound(`Agent policy not found: ${newAgentPolicyId}`); + throw new AgentPolicyNotFoundError(`Agent policy not found: ${newAgentPolicyId}`); } await reassignAgentIsAllowed(soClient, esClient, agentId, newAgentPolicyId); @@ -87,7 +90,7 @@ export async function reassignAgents( ): Promise<{ actionId: string }> { const newAgentPolicy = await agentPolicyService.get(soClient, newAgentPolicyId); if (!newAgentPolicy) { - throw Boom.notFound(`Agent policy not found: ${newAgentPolicyId}`); + throw new AgentPolicyNotFoundError(`Agent policy not found: ${newAgentPolicyId}`); } if (newAgentPolicy.is_managed) { throw new HostedAgentPolicyRestrictionRelatedError( diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts index 84aa2226b485c..d962279f0ca32 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts @@ -185,7 +185,7 @@ describe('update_agent_tags', () => { await expect( updateAgentTags(soClient, esClient, { agentIds: ['agent1'] }, ['one'], []) - ).rejects.toThrowError('version conflict of 100 agents'); + ).rejects.toThrowError('Version conflict of 100 agents'); }); it('should write out error results on last retry with version conflicts', async () => { @@ -211,7 +211,7 @@ describe('update_agent_tags', () => { retryCount: MAX_RETRY_COUNT, } ) - ).rejects.toThrowError('version conflict of 100 agents'); + ).rejects.toThrowError('Version conflict of 100 agents'); const agentAction = esClient.create.mock.calls[0][0] as any; expect(agentAction?.body.agents.length).toEqual(100); @@ -243,7 +243,7 @@ describe('update_agent_tags', () => { retryCount: MAX_RETRY_COUNT, } ) - ).rejects.toThrowError('version conflict of 1 agents'); + ).rejects.toThrowError('Version conflict of 1 agents'); const agentAction = esClient.create.mock.calls[0][0] as any; expect(agentAction?.body.agents.length).toEqual(3); diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts index d8208fd5f8d08..1c8db8451ccfa 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts @@ -15,6 +15,8 @@ import { AGENTS_INDEX } from '../../constants'; import { appContextService } from '../app_context'; +import { FleetError } from '../../errors'; + import { ActionRunner } from './action_runner'; import { BulkActionTaskType } from './bulk_action_types'; @@ -124,7 +126,9 @@ export async function updateTagsBatch( conflicts: 'proceed', // relying on the task to retry in case of conflicts - retry only conflicted agents }); } catch (error) { - throw new Error('Caught error: ' + JSON.stringify(error).slice(0, 1000)); + throw new FleetError( + 'Caught error while batch updating tags: ' + JSON.stringify(error).slice(0, 1000) + ); } appContextService.getLogger().debug(JSON.stringify(res).slice(0, 1000)); @@ -203,7 +207,7 @@ export async function updateTagsBatch( .getLogger() .debug(`action conflict result wrote on ${versionConflictCount} agents`); } - throw new Error(`version conflict of ${versionConflictCount} agents`); + throw new FleetError(`Version conflict of ${versionConflictCount} agents`); } return { actionId, updated: res.updated, took: res.took }; diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts index bc58941e4c295..9200346961f15 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts @@ -6,6 +6,10 @@ */ import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; + +import type { Logger } from '@kbn/core/server'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; import { ENROLLMENT_API_KEYS_INDEX } from '../../constants'; @@ -27,10 +31,20 @@ jest.mock('uuid', () => { const mockedAgentPolicyService = agentPolicyService as jest.Mocked; const mockedAuditLoggingService = auditLoggingService as jest.Mocked; + const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; describe('enrollment api keys', () => { beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + afterEach(() => { jest.resetAllMocks(); }); diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts index ac7087c95296a..360723ebcf220 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts @@ -16,13 +16,15 @@ import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query'; import type { ESSearchResponse as SearchResponse } from '@kbn/es-types'; import type { EnrollmentAPIKey, FleetServerEnrollmentAPIKey } from '../../types'; -import { FleetError } from '../../errors'; +import { FleetError, EnrollmentKeyNameExistsError, EnrollmentKeyNotFoundError } from '../../errors'; import { ENROLLMENT_API_KEYS_INDEX } from '../../constants'; import { agentPolicyService } from '../agent_policy'; import { escapeSearchQueryPhrase } from '../saved_object'; import { auditLoggingService } from '../audit_logging'; +import { appContextService } from '../app_context'; + import { invalidateAPIKeys } from './security'; const uuidRegex = @@ -90,7 +92,7 @@ export async function getEnrollmentAPIKey( return esDocToEnrollmentApiKey(body); } catch (e) { if (e instanceof errors.ResponseError && e.statusCode === 404) { - throw Boom.notFound(`Enrollment api key ${id} not found`); + throw new EnrollmentKeyNotFoundError(`Enrollment api key ${id} not found`); } throw e; @@ -106,6 +108,9 @@ export async function deleteEnrollmentApiKey( id: string, forceDelete = false ) { + const logger = appContextService.getLogger(); + logger.debug(`Deleting enrollment API key ${id}`); + const enrollmentApiKey = await getEnrollmentAPIKey(esClient, id); auditLoggingService.writeCustomAuditLog({ @@ -132,6 +137,9 @@ export async function deleteEnrollmentApiKey( refresh: 'wait_for', }); } + logger.debug( + `Deleted enrollment API key ${enrollmentApiKey.id} [api_key_id=${enrollmentApiKey.api_key_id}` + ); } export async function deleteEnrollmentApiKeyForAgentPolicyId( @@ -169,6 +177,9 @@ export async function generateEnrollmentAPIKey( ): Promise { const id = uuidv4(); const { name: providedKeyName, forceRecreate } = data; + const logger = appContextService.getLogger(); + logger.debug(`Creating enrollment API key ${data}`); + if (data.agentPolicyId) { await validateAgentPolicyId(soClient, data.agentPolicyId); } @@ -199,7 +210,7 @@ export async function generateEnrollmentAPIKey( k.name?.replace(providedKeyName, '').trim().match(uuidRegex) ) ) { - throw new FleetError( + throw new EnrollmentKeyNameExistsError( i18n.translate('xpack.fleet.serverError.enrollmentKeyDuplicate', { defaultMessage: 'An enrollment key named {providedKeyName} already exists for agent policy {agentPolicyId}', @@ -217,6 +228,7 @@ export async function generateEnrollmentAPIKey( auditLoggingService.writeCustomAuditLog({ message: `User creating enrollment API key [name=${name}] [policy_id=${agentPolicyId}]`, }); + logger.debug(`Creating enrollment API key [name=${name}] [policy_id=${agentPolicyId}]`); const key = await esClient.security .createApiKey({ @@ -245,11 +257,11 @@ export async function generateEnrollmentAPIKey( }, }) .catch((err) => { - throw new Error(`Impossible to create an api key: ${err.message}`); + throw new FleetError(`Impossible to create an api key: ${err.message}`); }); if (!key) { - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.serverError.unableToCreateEnrollmentKey', { defaultMessage: 'Unable to create an enrollment api key', }) @@ -332,9 +344,9 @@ export async function getEnrollmentAPIKeyById(esClient: ElasticsearchClient, api const [enrollmentAPIKey] = res.hits.hits.map(esDocToEnrollmentApiKey); if (enrollmentAPIKey?.api_key_id !== apiKeyId) { - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.serverError.returnedIncorrectKey', { - defaultMessage: 'find enrollmentKeyById returned an incorrect key', + defaultMessage: 'Find enrollmentKeyById returned an incorrect key', }) ); } diff --git a/x-pack/plugins/fleet/server/services/download_source.test.ts b/x-pack/plugins/fleet/server/services/download_source.test.ts index 8b63d376340ff..e244ec80077b2 100644 --- a/x-pack/plugins/fleet/server/services/download_source.test.ts +++ b/x-pack/plugins/fleet/server/services/download_source.test.ts @@ -8,6 +8,9 @@ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { securityMock } from '@kbn/security-plugin/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; + +import type { Logger } from '@kbn/core/server'; import type { DownloadSourceSOAttributes } from '../types'; @@ -132,9 +135,13 @@ function getMockedSoClient(options: { defaultDownloadSourceId?: string; sameName return soClient; } - +let mockedLogger: jest.Mocked; describe('Download Service', () => { beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + afterEach(() => { mockedAgentPolicyService.list.mockClear(); mockedAgentPolicyService.hasAPMIntegration.mockClear(); mockedAgentPolicyService.removeDefaultSourceFromAll.mockReset(); diff --git a/x-pack/plugins/fleet/server/services/download_source.ts b/x-pack/plugins/fleet/server/services/download_source.ts index f1719e2eb4798..e679123f7e255 100644 --- a/x-pack/plugins/fleet/server/services/download_source.ts +++ b/x-pack/plugins/fleet/server/services/download_source.ts @@ -41,7 +41,7 @@ class DownloadSourceService { ); if (soResponse.error) { - throw new Error(soResponse.error.message); + throw new FleetError(soResponse.error.message); } return savedObjectToDownloadSource(soResponse); @@ -69,6 +69,9 @@ class DownloadSourceService { downloadSource: DownloadSourceBase, options?: { id?: string; overwrite?: boolean } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Creating new download source`); + const data: DownloadSourceSOAttributes = downloadSource; await this.requireUniqueName(soClient, { @@ -100,6 +103,7 @@ class DownloadSourceService { overwrite: options?.overwrite ?? false, } ); + logger.debug(`Creating new download source ${options?.id}`); return savedObjectToDownloadSource(newSo); } @@ -108,6 +112,8 @@ class DownloadSourceService { id: string, newData: Partial ) { + const logger = appContextService.getLogger(); + logger.debug(`Updating download source ${id} with ${newData}`); const updateData: Partial = newData; if (updateData.proxy_id) { @@ -134,11 +140,16 @@ class DownloadSourceService { updateData ); if (soResponse.error) { - throw new Error(soResponse.error.message); + throw new FleetError(soResponse.error.message); + } else { + logger.debug(`Updated download source ${id}`); } } public async delete(soClient: SavedObjectsClientContract, id: string) { + const logger = appContextService.getLogger(); + logger.debug(`Deleting download source ${id}`); + const targetDS = await this.get(soClient, id); if (targetDS.is_default) { @@ -149,7 +160,7 @@ class DownloadSourceService { appContextService.getInternalUserESClient(), id ); - + logger.debug(`Deleted download source ${id}`); return soClient.delete(DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, id); } diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts index 9163b39575f87..0ab728affd751 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts @@ -5,9 +5,30 @@ * 2.0. */ +import { loggerMock } from '@kbn/logging-mocks'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; + +import type { Logger } from '@kbn/core/server'; + +import { appContextService } from '../..'; + import { compileTemplate } from './agent'; +jest.mock('../../app_context'); + +const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; + describe('compileTemplate', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + it('should work', () => { const streamTemplate = ` input: log diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts index 0bc220a500fb1..22d00451ce231 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts @@ -7,17 +7,21 @@ import Handlebars from 'handlebars'; import { safeLoad, safeDump } from 'js-yaml'; +import type { Logger } from '@kbn/core/server'; import type { PackagePolicyConfigRecord } from '../../../../common/types'; import { toCompiledSecretRef } from '../../secrets'; import { PackageInvalidArchiveError } from '../../../errors'; +import { appContextService } from '../..'; const handlebars = Handlebars.create(); export function compileTemplate(variables: PackagePolicyConfigRecord, templateStr: string) { - const { vars, yamlValues } = buildTemplateVariables(variables); + const logger = appContextService.getLogger(); + const { vars, yamlValues } = buildTemplateVariables(logger, variables); let compiledTemplate: string; try { + logger.debug(`Compiling agent template: ${templateStr}`); const template = handlebars.compile(templateStr, { noEscape: true }); compiledTemplate = template(vars); } catch (err) { @@ -65,12 +69,13 @@ function replaceVariablesInYaml(yamlVariables: { [k: string]: any }, yaml: any) return yaml; } -function buildTemplateVariables(variables: PackagePolicyConfigRecord) { +function buildTemplateVariables(logger: Logger, variables: PackagePolicyConfigRecord) { const yamlValues: { [k: string]: any } = {}; const vars = Object.entries(variables).reduce((acc, [key, recordEntry]) => { // support variables with . like key.patterns const keyParts = key.split('.'); const lastKeyPart = keyParts.pop(); + logger.debug(`Building agent template variables`); if (!lastKeyPart || !isValidKey(lastKeyPart)) { throw new PackageInvalidArchiveError( diff --git a/x-pack/plugins/fleet/server/services/epm/archive/cache.ts b/x-pack/plugins/fleet/server/services/epm/archive/cache.ts index 8b1fd141f3000..db0b0d709e683 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/cache.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/cache.ts @@ -43,7 +43,7 @@ export const getArchiveFilelist = (keyArgs: SharedKey) => export const setArchiveFilelist = (keyArgs: SharedKey, paths: string[]) => { const logger = appContextService.getLogger(); - logger.debug(`setting file list to the cache for ${keyArgs.name}-${keyArgs.version}`); + logger.debug(`Setting file list to the cache for ${keyArgs.name}-${keyArgs.version}`); logger.trace(JSON.stringify(paths)); return archiveFilelistCache.set(sharedKey(keyArgs), paths); }; @@ -79,7 +79,7 @@ export const setPackageInfo = ({ }: SharedKey & { packageInfo: ArchivePackage | RegistryPackage }) => { const logger = appContextService.getLogger(); const key = sharedKey({ name, version }); - logger.debug(`setting package info to the cache for ${name}-${version}`); + logger.debug(`Setting package info to the cache for ${name}-${version}`); logger.trace(JSON.stringify(packageInfo)); return packageInfoCache.set(key, packageInfo); }; diff --git a/x-pack/plugins/fleet/server/services/epm/archive/index.ts b/x-pack/plugins/fleet/server/services/epm/archive/index.ts index 330839b13dba9..bf96318d8d410 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/index.ts @@ -6,7 +6,11 @@ */ import type { AssetParts } from '../../../../common/types'; -import { PackageInvalidArchiveError, PackageUnsupportedMediaTypeError } from '../../../errors'; +import { + PackageInvalidArchiveError, + PackageUnsupportedMediaTypeError, + PackageNotFoundError, +} from '../../../errors'; import { getArchiveEntry, @@ -149,7 +153,7 @@ export function getPathParts(path: string): AssetParts { export function getAsset(key: string) { const buffer = getArchiveEntry(key); - if (buffer === undefined) throw new Error(`Cannot find asset ${key}`); + if (buffer === undefined) throw new PackageNotFoundError(`Cannot find asset ${key}`); return buffer; } diff --git a/x-pack/plugins/fleet/server/services/epm/archive/parse.test.ts b/x-pack/plugins/fleet/server/services/epm/archive/parse.test.ts index 1e7d7d24e2b8f..ac72f56946d04 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/parse.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/parse.test.ts @@ -4,9 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { loggerMock } from '@kbn/logging-mocks'; + +import type { Logger } from '@kbn/core/server'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; + import type { ArchivePackage } from '../../../../common/types'; import { PackageInvalidArchiveError } from '../../../errors'; +import { appContextService } from '../..'; + import { parseDefaultIngestPipeline, parseDataStreamElasticsearchEntry, @@ -21,7 +28,20 @@ import { parseAndVerifyReadme, } from './parse'; +jest.mock('../../app_context'); + +const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; describe('parseDefaultIngestPipeline', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + it('Should return undefined for stream without any elasticsearch dir', () => { expect( parseDefaultIngestPipeline('pkg-1.0.0/data_stream/stream1/', [ diff --git a/x-pack/plugins/fleet/server/services/epm/archive/parse.ts b/x-pack/plugins/fleet/server/services/epm/archive/parse.ts index e0111e196ddb0..eac5c2ac43db1 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/parse.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/parse.ts @@ -16,6 +16,8 @@ import { pick } from 'lodash'; import semverMajor from 'semver/functions/major'; import semverPrerelease from 'semver/functions/prerelease'; +import { appContextService } from '../..'; + import type { ArchivePackage, RegistryPolicyTemplate, @@ -198,7 +200,9 @@ export function parseAndVerifyArchive( topLevelDirOverride?: string ): ArchivePackage { // The top-level directory must match pkgName-pkgVersion, and no other top-level files or directories may be present + const logger = appContextService.getLogger(); const toplevelDir = topLevelDirOverride || paths[0].split('/')[0]; + paths.forEach((filePath) => { if (!filePath.startsWith(toplevelDir)) { throw new PackageInvalidArchiveError( @@ -210,6 +214,7 @@ export function parseAndVerifyArchive( // The package must contain a manifest file ... const manifestFile = path.posix.join(toplevelDir, MANIFEST_NAME); const manifestBuffer = assetsMap[manifestFile]; + logger.debug(`Verifying archive - checking manifest file and manifest buffer`); if (!paths.includes(manifestFile) || !manifestBuffer) { throw new PackageInvalidArchiveError( `Package at top-level directory ${toplevelDir} must contain a top-level ${MANIFEST_NAME} file.` @@ -219,6 +224,7 @@ export function parseAndVerifyArchive( // ... which must be valid YAML let manifest: ArchivePackage; try { + logger.debug(`Verifying archive - loading yaml`); manifest = yaml.safeLoad(manifestBuffer.toString()); } catch (error) { throw new PackageInvalidArchiveError( @@ -227,6 +233,7 @@ export function parseAndVerifyArchive( } // must have mandatory fields + logger.debug(`Verifying archive - verifying manifest content`); const reqGiven = pick(manifest, requiredArchivePackageProps); const requiredKeysMatch = Object.keys(reqGiven).toString() === requiredArchivePackageProps.toString(); @@ -246,13 +253,15 @@ export function parseAndVerifyArchive( const parsed: ArchivePackage = { ...reqGiven, ...optGiven }; // Package name and version from the manifest must match those from the toplevel directory + logger.debug(`Verifying archive - parsing manifest: ${parsed}`); const pkgKey = pkgToPkgKey({ name: parsed.name, version: parsed.version }); + if (!topLevelDirOverride && toplevelDir !== pkgKey) { throw new PackageInvalidArchiveError( `Name ${parsed.name} and version ${parsed.version} do not match top-level directory ${toplevelDir}` ); } - + logger.debug(`Parsing archive - parsing and verifying data streams`); const parsedDataStreams = parseAndVerifyDataStreams({ paths, pkgName: parsed.name, @@ -265,9 +274,11 @@ export function parseAndVerifyArchive( parsed.data_streams = parsedDataStreams; } + logger.debug(`Parsing archive - parsing and verifying policy templates`); parsed.policy_templates = parseAndVerifyPolicyTemplates(manifest); // add readme if exists + logger.debug(`Parsing archive - parsing and verifying Readme`); const readme = parseAndVerifyReadme(paths, parsed.name, parsed.version); if (readme) { parsed.readme = readme; @@ -283,6 +294,7 @@ export function parseAndVerifyArchive( // Ensure top-level variables are parsed as well if (manifest.vars) { + logger.debug(`Parsing archive - parsing and verifying top-level vars`); parsed.vars = parseAndVerifyVars(manifest.vars, 'manifest.yml'); } @@ -294,6 +306,7 @@ export function parseAndVerifyArchive( let tags: PackageSpecTags[]; try { tags = yaml.safeLoad(tagsBuffer.toString()); + logger.debug(`Parsing archive - parsing kibana/tags.yml file`); if (tags.length) { parsed.asset_tags = tags; } diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/retry.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/retry.ts index 773ed7273d885..32d0c9e23fb78 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/retry.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/retry.ts @@ -17,7 +17,10 @@ const retryResponseStatuses = [ 410, // Gone ]; +const retryMessages = ['no_shard_available_action_exception']; + const isRetryableError = (e: any, additionalResponseStatuses: number[] = []) => + retryMessages.some((msg) => e.message.includes(msg)) || e instanceof EsErrors.NoLivingConnectionsError || e instanceof EsErrors.ConnectionError || e instanceof EsErrors.TimeoutError || diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts index a621df33062a8..670ba36ed6a8d 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts @@ -755,6 +755,84 @@ describe('EPM template', () => { expect(mappings).toEqual(objectFieldWithPropertyReversedMapping); }); + it('tests processing object field with subobjects set to false (case B)', () => { + const objectFieldWithPropertyReversedLiteralYml = ` +- name: b.labels.* + type: object + object_type: keyword + subobjects: false + `; + const objectFieldWithPropertyReversedMapping = { + dynamic_templates: [ + { + 'b.labels.*': { + path_match: 'b.labels.*', + match_mapping_type: 'string', + mapping: { + type: 'keyword', + }, + }, + }, + ], + properties: { + b: { + type: 'object', + dynamic: true, + properties: { + labels: { + dynamic: true, + type: 'object', + subobjects: false, + }, + }, + }, + }, + }; + const fields: Field[] = safeLoad(objectFieldWithPropertyReversedLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldWithPropertyReversedMapping); + }); + + it('tests processing object field with subobjects set to false (case D)', () => { + const objectFieldWithPropertyReversedLiteralYml = ` +- name: d.labels + type: object + object_type: keyword + subobjects: false + `; + const objectFieldWithPropertyReversedMapping = { + dynamic_templates: [ + { + 'd.labels': { + path_match: 'd.labels.*', + match_mapping_type: 'string', + mapping: { + type: 'keyword', + }, + }, + }, + ], + properties: { + d: { + type: 'object', + dynamic: true, + properties: { + labels: { + dynamic: true, + type: 'object', + subobjects: false, + }, + }, + }, + }, + }; + const fields: Field[] = safeLoad(objectFieldWithPropertyReversedLiteralYml); + const processedFields = processFields(fields); + const mappings = generateMappings(processedFields); + expect(mappings).toEqual(objectFieldWithPropertyReversedMapping); + }); + it('tests processing nested field with property', () => { const nestedYaml = ` - name: a.b diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts index a26aa2c8e0114..a60e9dc0c7ced 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts @@ -222,9 +222,11 @@ function _generateMappings( properties: IndexTemplateMappings['properties']; hasNonDynamicTemplateMappings: boolean; hasDynamicTemplateMappings: boolean; + subobjects?: boolean; } { let hasNonDynamicTemplateMappings = false; let hasDynamicTemplateMappings = false; + let subobjects: boolean | undefined; const props: Properties = {}; function addParentObjectAsStaticProperty(field: Field) { @@ -237,6 +239,7 @@ function _generateMappings( const fieldProps = { type: 'object', dynamic: true, + ...(field.subobjects !== undefined && { subobjects: field.subobjects }), }; props[field.name] = fieldProps; @@ -435,6 +438,17 @@ function _generateMappings( ); } + // When a wildcard field specifies the subobjects setting, + // the parent intermediate object should set the subobjects + // setting. + // + // For example, if a wildcard field `foo.*` has subobjects, + // we should set subobjects on the intermediate object `foo`. + // + if (field.subobjects !== undefined && path.includes('*')) { + subobjects = field.subobjects; + } + if (dynProperties && matchingType) { addDynamicMappingWithIntermediateObjects(path, pathMatch, matchingType, dynProperties); @@ -476,6 +490,9 @@ function _generateMappings( } else { return; } + if (mappings.subobjects !== undefined) { + fieldProps.subobjects = mappings.subobjects; + } break; case 'group-nested': fieldProps = { @@ -583,6 +600,10 @@ function _generateMappings( fieldProps.time_series_dimension = field.dimension; } + if (field.subobjects !== undefined) { + fieldProps.subobjects = field.subobjects; + } + // Even if we don't add the property because it has a wildcard, notify // the parent that there is some kind of property, so the intermediate object // is still created. @@ -601,7 +622,12 @@ function _generateMappings( }); } - return { properties: props, hasNonDynamicTemplateMappings, hasDynamicTemplateMappings }; + return { + properties: props, + hasNonDynamicTemplateMappings, + hasDynamicTemplateMappings, + subobjects, + }; } function generateDynamicAndEnabled(field: Field) { diff --git a/x-pack/plugins/fleet/server/services/epm/fields/field.ts b/x-pack/plugins/fleet/server/services/epm/fields/field.ts index 437eed7c64192..495c0ddcaaf8a 100644 --- a/x-pack/plugins/fleet/server/services/epm/fields/field.ts +++ b/x-pack/plugins/fleet/server/services/epm/fields/field.ts @@ -40,6 +40,7 @@ export interface Field { dimension?: boolean; default_field?: boolean; runtime?: boolean | string; + subobjects?: boolean; // Fields specific of the aggregate_metric_double type metrics?: string[]; 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 23327a2253f86..27be17ef2a170 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 @@ -32,7 +32,11 @@ import type { PackageSpecTags, } from '../../../../types'; import { savedObjectTypes } from '../../packages'; -import { indexPatternTypes, getIndexPatternSavedObjects } from '../index_pattern/install'; +import { + indexPatternTypes, + getIndexPatternSavedObjects, + makeManagedIndexPatternsGlobal, +} from '../index_pattern/install'; import { saveKibanaAssetsRefs } from '../../packages/install'; import { deleteKibanaSavedObjectsAssets } from '../../packages/remove'; import { KibanaSOReferenceError } from '../../../../errors'; @@ -114,12 +118,14 @@ export function createSavedObjectKibanaAsset(asset: ArchiveAsset): SavedObjectTo } export async function installKibanaAssets(options: { + savedObjectsClient: SavedObjectsClientContract; savedObjectsImporter: SavedObjectsImporterContract; logger: Logger; pkgName: string; kibanaAssets: Record; }): Promise { - const { kibanaAssets, savedObjectsImporter, logger } = options; + const { kibanaAssets, savedObjectsClient, savedObjectsImporter, logger } = options; + const assetsToInstall = Object.entries(kibanaAssets).flatMap(([assetType, assets]) => { if (!validKibanaAssetTypes.has(assetType as KibanaAssetType)) { return []; @@ -152,6 +158,8 @@ export async function installKibanaAssets(options: { managed: true, }); + await makeManagedIndexPatternsGlobal(savedObjectsClient); + const installedAssets = await installKibanaSavedObjects({ logger, savedObjectsImporter, @@ -196,6 +204,7 @@ export async function installKibanaAssetsAndReferences({ ); const importedAssets = await installKibanaAssets({ + savedObjectsClient, logger, savedObjectsImporter, pkgName, diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts new file mode 100644 index 0000000000000..9e826d7f126ae --- /dev/null +++ b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.test.ts @@ -0,0 +1,54 @@ +/* + * 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 { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; + +import { createAppContextStartContractMock } from '../../../../mocks'; + +import { appContextService } from '../../../app_context'; + +import { makeManagedIndexPatternsGlobal } from './install'; + +describe('Fleet index patterns', () => { + let mockSoClient: jest.Mocked; + let mockContract: ReturnType; + + beforeEach(() => { + mockSoClient = savedObjectsClientMock.create(); + mockContract = createAppContextStartContractMock(); + appContextService.start(mockContract); + }); + + afterEach(() => { + appContextService.stop(); + }); + + describe('makeManagedIndexPatternsGlobal', () => { + it('should call updateObjectsSpaces with the correct params', async () => { + const result = await makeManagedIndexPatternsGlobal(mockSoClient); + + for (const pattern of ['logs-*', 'metrics-*']) { + expect(mockSoClient.updateObjectsSpaces).toHaveBeenCalledWith( + [{ id: pattern, type: 'index-pattern' }], + ['*'], + [] + ); + } + + expect(result).toHaveLength(2); + }); + + it('handles errors from updateObjectsSpaces', async () => { + mockSoClient.updateObjectsSpaces.mockRejectedValue(new Error('foo')); + + const result = await makeManagedIndexPatternsGlobal(mockSoClient); + + expect(result).toHaveLength(0); + }); + }); +}); 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 91e603e80aee2..6f1390f5e17cd 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 @@ -28,6 +28,30 @@ export function getIndexPatternSavedObjects() { })); } +export async function makeManagedIndexPatternsGlobal( + savedObjectsClient: SavedObjectsClientContract +) { + const logger = appContextService.getLogger(); + + const results = []; + + for (const indexPatternType of indexPatternTypes) { + try { + const result = await savedObjectsClient.updateObjectsSpaces( + [{ id: `${indexPatternType}-*`, type: INDEX_PATTERN_SAVED_OBJECT_TYPE }], + ['*'], + [] + ); + + results.push(result); + } catch (error) { + logger.error(`Error making managed index patterns global: ${error.message}`); + } + } + + return results; +} + export async function removeUnusedIndexPatterns(savedObjectsClient: SavedObjectsClientContract) { const logger = appContextService.getLogger(); // get all user installed packages diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts index 4007ad7545ece..3eb689dfa1a2a 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts @@ -10,6 +10,7 @@ import type { PackageClient, PackageService } from './package_service'; const createClientMock = (): jest.Mocked => ({ getInstallation: jest.fn(), ensureInstalledPackage: jest.fn(), + installPackage: jest.fn(), fetchFindLatestPackage: jest.fn(), readBundledPackage: jest.fn(), getPackage: jest.fn(), diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.ts b/x-pack/plugins/fleet/server/services/epm/package_service.ts index eee1afb37dcaa..a535af9636d1a 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.ts @@ -8,34 +8,40 @@ /* eslint-disable max-classes-per-file */ import type { - KibanaRequest, ElasticsearchClient, - SavedObjectsClientContract, + KibanaRequest, Logger, + SavedObjectsClientContract, } from '@kbn/core/server'; +import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; + import { HTTPAuthorizationHeader } from '../../../common/http_authorization_header'; import type { PackageList } from '../../../common'; import type { + ArchivePackage, + BundledPackage, CategoryId, EsAssetReference, InstallablePackage, Installation, RegistryPackage, - ArchivePackage, - BundledPackage, } from '../../types'; import type { FleetAuthzRouteConfig } from '../security/types'; -import { checkSuperuser, getAuthzFromRequest, doesNotHaveRequiredFleetAuthz } from '../security'; -import { FleetUnauthorizedError, FleetError } from '../../errors'; +import { checkSuperuser, doesNotHaveRequiredFleetAuthz, getAuthzFromRequest } from '../security'; +import { FleetError, FleetUnauthorizedError } from '../../errors'; import { INSTALL_PACKAGES_AUTHZ, READ_PACKAGE_INFO_AUTHZ } from '../../routes/epm'; -import { installTransforms, isTransform } from './elasticsearch/transform/install'; +import type { InstallResult } from '../../../common'; + import type { FetchFindLatestPackageOptions } from './registry'; +import * as Registry from './registry'; import { fetchFindLatestPackageOrThrow, getPackage } from './registry'; -import { ensureInstalledPackage, getInstallation, getPackages } from './packages'; + +import { installTransforms, isTransform } from './elasticsearch/transform/install'; +import { ensureInstalledPackage, getInstallation, getPackages, installPackage } from './packages'; import { generatePackageInfoFromArchiveBuffer } from './archive'; export type InstalledAssetType = EsAssetReference; @@ -52,8 +58,16 @@ export interface PackageClient { pkgName: string; pkgVersion?: string; spaceId?: string; + force?: boolean; }): Promise; + installPackage(options: { + pkgName: string; + pkgVersion?: string; + spaceId?: string; + force?: boolean; + }): Promise; + fetchFindLatestPackage( packageName: string, options?: FetchFindLatestPackageOptions @@ -151,6 +165,7 @@ class PackageClientImpl implements PackageClient { pkgName: string; pkgVersion?: string; spaceId?: string; + force?: boolean; }): Promise { await this.#runPreflight(INSTALL_PACKAGES_AUTHZ); @@ -160,6 +175,32 @@ class PackageClientImpl implements PackageClient { savedObjectsClient: this.internalSoClient, }); } + public async installPackage(options: { + pkgName: string; + pkgVersion?: string; + spaceId?: string; + force?: boolean; + }): Promise { + await this.#runPreflight(INSTALL_PACKAGES_AUTHZ); + + const { pkgName, pkgVersion, spaceId = DEFAULT_SPACE_ID, force = false } = options; + + // If pkgVersion isn't specified, find the latest package version + const pkgKeyProps = pkgVersion + ? { name: pkgName, version: pkgVersion } + : await Registry.fetchFindLatestPackageOrThrow(pkgName, { prerelease: true }); + const pkgkey = Registry.pkgToPkgKey(pkgKeyProps); + + return await installPackage({ + force, + pkgkey, + spaceId, + installSource: 'registry', + esClient: this.internalEsClient, + savedObjectsClient: this.internalSoClient, + neverIgnoreVerificationError: !force, + }); + } public async fetchFindLatestPackage( packageName: string, diff --git a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts index d8a943fef5341..5039891eef59d 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts @@ -100,7 +100,6 @@ export async function _installPackage({ skipDataStreamRollover?: boolean; }): Promise { const { name: pkgName, version: pkgVersion, title: pkgTitle } = packageInfo; - try { // if some installation already exists if (installedPkg) { @@ -108,12 +107,16 @@ export async function _installPackage({ const hasExceededTimeout = Date.now() - Date.parse(installedPkg.attributes.install_started_at) < MAX_TIME_COMPLETE_INSTALL; + logger.debug(`Package install - Install status ${installedPkg.attributes.install_status}`); // if the installation is currently running, don't try to install // instead, only return already installed assets if (isStatusInstalling && hasExceededTimeout) { // If this is a forced installation, ignore the timeout and restart the installation anyway + logger.debug(`Package install - Installation is running and has exceeded timeout`); + if (force) { + logger.debug(`Package install - Forced installation, restarting`); await restartInstallation({ savedObjectsClient, pkgName, @@ -131,6 +134,9 @@ export async function _installPackage({ } else { // if no installation is running, or the installation has been running longer than MAX_TIME_COMPLETE_INSTALL // (it might be stuck) update the saved object and proceed + logger.debug( + `Package install - no installation running or the installation has been running longer than ${MAX_TIME_COMPLETE_INSTALL}, restarting` + ); await restartInstallation({ savedObjectsClient, pkgName, @@ -140,6 +146,7 @@ export async function _installPackage({ }); } } else { + logger.debug(`Package install - Create installation`); await createInstallation({ savedObjectsClient, packageInfo, @@ -148,7 +155,7 @@ export async function _installPackage({ verificationResult, }); } - + logger.debug(`Package install - Installing Kibana assets`); const kibanaAssetPromise = withPackageSpan('Install Kibana assets', () => installKibanaAssetsAndReferences({ savedObjectsClient, @@ -182,7 +189,7 @@ export async function _installPackage({ esReferences = await withPackageSpan('Install ILM policies', () => installILMPolicy(packageInfo, paths, esClient, savedObjectsClient, logger, esReferences) ); - + logger.debug(`Package install - Installing Data Stream ILM policies`); ({ esReferences } = await withPackageSpan('Install Data Stream ILM policies', () => installIlmForDataStream( packageInfo, @@ -196,6 +203,7 @@ export async function _installPackage({ } // installs ml models + logger.debug(`Package install - installing ML models`); esReferences = await withPackageSpan('Install ML models', () => installMlModel(packageInfo, paths, esClient, savedObjectsClient, logger, esReferences) ); @@ -203,6 +211,9 @@ export async function _installPackage({ let indexTemplates: IndexTemplateEntry[] = []; if (packageInfo.type === 'integration') { + logger.debug( + `Package install - Installing index templates and pipelines, packageInfo.type ${packageInfo.type}` + ); const { installedTemplates, esReferences: templateEsReferences } = await installIndexTemplatesAndPipelines({ installedPkg: installedPkg ? installedPkg.attributes : undefined, @@ -221,6 +232,7 @@ export async function _installPackage({ // input packages create their data streams during package policy creation // we must use installed_es to infer which streams exist first then // we can install the new index templates + logger.debug(`Package install - packageInfo.type ${packageInfo.type}`); const dataStreamNames = installedPkg.attributes.installed_es .filter((ref) => ref.type === 'index_template') // index templates are named {type}-{dataset}, remove everything before first hyphen @@ -231,6 +243,9 @@ export async function _installPackage({ ); if (dataStreams.length) { + logger.debug( + `Package install - installing index templates and pipelines with datastreams length ${dataStreams.length}` + ); const { installedTemplates, esReferences: templateEsReferences } = await installIndexTemplatesAndPipelines({ installedPkg: installedPkg ? installedPkg.attributes : undefined, @@ -248,19 +263,21 @@ export async function _installPackage({ } try { + logger.debug(`Package install - Removing legacy templates`); await removeLegacyTemplates({ packageInfo, esClient, logger }); } catch (e) { logger.warn(`Error removing legacy templates: ${e.message}`); } // update current backing indices of each data stream + logger.debug(`Package install - Updating backing indices of each data stream`); await withPackageSpan('Update write indices', () => updateCurrentWriteIndices(esClient, logger, indexTemplates, { ignoreMappingUpdateErrors, skipDataStreamRollover, }) ); - + logger.debug(`Package install - Installing transforms`); ({ esReferences } = await withPackageSpan('Install transforms', () => installTransforms({ installablePackage: packageInfo, @@ -282,6 +299,9 @@ export async function _installPackage({ (installType === 'update' || installType === 'reupdate') && installedPkg ) { + logger.debug( + `Package install - installType ${installType} Deleting previous ingest pipelines` + ); esReferences = await withPackageSpan('Delete previous ingest pipelines', () => deletePreviousPipelines( esClient, @@ -294,6 +314,9 @@ export async function _installPackage({ } // pipelines from a different version may have installed during a failed update if (installType === 'rollback' && installedPkg) { + logger.debug( + `Package install - installType ${installType} Deleting previous ingest pipelines` + ); esReferences = await withPackageSpan('Delete previous ingest pipelines', () => deletePreviousPipelines( esClient, @@ -306,6 +329,7 @@ export async function _installPackage({ } const installedKibanaAssetsRefs = await kibanaAssetPromise; + logger.debug(`Package install - Updating archive entries`); const packageAssetResults = await withPackageSpan('Update archive entries', () => saveArchiveEntries({ savedObjectsClient, @@ -326,7 +350,7 @@ export async function _installPackage({ id: pkgName, savedObjectType: PACKAGES_SAVED_OBJECT_TYPE, }); - + logger.debug(`Package install - Updating install status`); const updatedPackage = await withPackageSpan('Update install status', () => savedObjectsClient.update(PACKAGES_SAVED_OBJECT_TYPE, pkgName, { version: pkgVersion, @@ -340,6 +364,7 @@ export async function _installPackage({ ), }) ); + logger.debug(`Package install - Install status ${updatedPackage?.attributes?.install_status}`); // If the package is flagged with the `keep_policies_up_to_date` flag, upgrade its // associated package policies after installation @@ -350,11 +375,13 @@ export async function _installPackage({ perPage: SO_SEARCH_LIMIT, kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${pkgName}`, }); - + logger.debug( + `Package install - Package is flagged with keep_policies_up_to_date, upgrading its associated package policies ${policyIdsToUpgrade}` + ); await packagePolicyService.upgrade(savedObjectsClient, esClient, policyIdsToUpgrade.items); }); } - + logger.debug(`Package install - Installation complete}`); return [...installedKibanaAssetsRefs, ...esReferences]; } catch (err) { if (SavedObjectsErrorHelpers.isConflictError(err)) { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts index c58d14dd47320..bfb99d0f17980 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.test.ts @@ -186,7 +186,7 @@ describe('install', () => { expect(sendTelemetryEvents).toHaveBeenCalledWith(expect.anything(), undefined, { currentVersion: 'not_installed', dryRun: false, - errorMessage: 'Requires basic license', + errorMessage: 'Installation requires basic license', eventType: 'package-install', installType: 'install', newVersion: '1.3.0', diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install.ts b/x-pack/plugins/fleet/server/services/epm/packages/install.ts index 0760bd94a56ec..d4f9cd249177d 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install.ts @@ -516,6 +516,9 @@ async function installPackageCommon(options: { } = options; let { telemetryEvent } = options; const logger = appContextService.getLogger(); + logger.info( + `Install - Starting installation of ${pkgName}@${pkgVersion} from ${installSource}, paths: ${paths}` + ); // Workaround apm issue with async spans: https://github.com/elastic/apm-agent-nodejs/issues/2611 await Promise.resolve(); @@ -564,7 +567,8 @@ async function installPackageCommon(options: { } const elasticSubscription = getElasticSubscription(packageInfo); if (!licenseService.hasAtLeast(elasticSubscription)) { - const err = new Error(`Requires ${elasticSubscription} license`); + logger.error(`Installation requires ${elasticSubscription} license`); + const err = new FleetError(`Installation requires ${elasticSubscription} license`); sendEvent({ ...telemetryEvent, errorMessage: err.message, @@ -606,6 +610,7 @@ async function installPackageCommon(options: { skipDataStreamRollover, }) .then(async (assets) => { + logger.debug(`Removing old assets from previous versions of ${pkgName}`); await removeOldAssets({ soClient: savedObjectsClient, pkgName: packageInfo.name, @@ -759,7 +764,7 @@ export async function installPackage(args: InstallPackageParams): Promise .at(integrationPosition); if (!integration) { - throw new Error(`Index name ${index} does not seem to be a File storage index`); + throw new FleetError(`Index name ${index} does not seem to be a File storage index`); } response.direction = isDeliveryToHost ? 'to-host' : 'from-host'; @@ -69,7 +70,7 @@ export const parseFileStorageIndex = (index: string): ParsedFileStorageIndex => } } - throw new Error( + throw new FleetError( `Unable to parse index [${index}]. Does not match a known index pattern: [${fileStorageIndexPatterns.join( ' | ' )}]` diff --git a/x-pack/plugins/fleet/server/services/fleet_proxies.test.ts b/x-pack/plugins/fleet/server/services/fleet_proxies.test.ts index 89801b66b49c1..730b368495cb6 100644 --- a/x-pack/plugins/fleet/server/services/fleet_proxies.test.ts +++ b/x-pack/plugins/fleet/server/services/fleet_proxies.test.ts @@ -4,11 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { loggerMock } from '@kbn/logging-mocks'; +import type { Logger } from '@kbn/core/server'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; import { savedObjectsClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { FLEET_PROXY_SAVED_OBJECT_TYPE } from '../constants'; +import { appContextService } from './app_context'; + import { deleteFleetProxy } from './fleet_proxies'; import { listFleetServerHostsForProxyId, updateFleetServerHost } from './fleet_server_host'; import { outputService } from './output'; @@ -17,6 +22,7 @@ import { downloadSourceService } from './download_source'; jest.mock('./output'); jest.mock('./download_source'); jest.mock('./fleet_server_host'); +jest.mock('./app_context'); const mockedListFleetServerHostsForProxyId = listFleetServerHostsForProxyId as jest.MockedFunction< typeof listFleetServerHostsForProxyId @@ -35,8 +41,19 @@ const PROXY_IDS = { PRECONFIGURED: 'test-preconfigured', RELATED_PRECONFIGURED: 'test-related-preconfigured', }; +const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; describe('Fleet proxies service', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + const soClientMock = savedObjectsClientMock.create(); const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); diff --git a/x-pack/plugins/fleet/server/services/fleet_proxies.ts b/x-pack/plugins/fleet/server/services/fleet_proxies.ts index cf45b90804c22..61aa07b8e0614 100644 --- a/x-pack/plugins/fleet/server/services/fleet_proxies.ts +++ b/x-pack/plugins/fleet/server/services/fleet_proxies.ts @@ -24,6 +24,8 @@ import type { Output, } from '../types'; +import { appContextService } from './app_context'; + import { listFleetServerHostsForProxyId, updateFleetServerHost } from './fleet_server_host'; import { outputService } from './output'; import { downloadSourceService } from './download_source'; @@ -70,6 +72,9 @@ export async function createFleetProxy( data: NewFleetProxy, options?: { id?: string; overwrite?: boolean; fromPreconfiguration?: boolean } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Creating fleet proxy ${data}`); + const res = await soClient.create( FLEET_PROXY_SAVED_OBJECT_TYPE, fleetProxyDataToSOAttribute(data), @@ -78,7 +83,7 @@ export async function createFleetProxy( overwrite: options?.overwrite, } ); - + logger.debug(`Created fleet proxy ${options?.id}`); return savedObjectToFleetProxy(res); } @@ -97,6 +102,9 @@ export async function deleteFleetProxy( id: string, options?: { fromPreconfiguration?: boolean } ) { + const logger = appContextService.getLogger(); + logger.debug(`Deleting fleet proxy ${id}`); + const fleetProxy = await getFleetProxy(soClient, id); if (fleetProxy.is_preconfigured && !options?.fromPreconfiguration) { @@ -120,6 +128,7 @@ export async function deleteFleetProxy( } await updateRelatedSavedObject(soClient, esClient, fleetServerHosts, outputs, downloadSources); + logger.debug(`Deleted fleet proxy ${id}`); return await soClient.delete(FLEET_PROXY_SAVED_OBJECT_TYPE, id); } @@ -130,6 +139,8 @@ export async function updateFleetProxy( data: Partial, options?: { fromPreconfiguration?: boolean } ) { + const logger = appContextService.getLogger(); + logger.debug(`Updating fleet proxy ${id}`); const originalItem = await getFleetProxy(soClient, id); if (data.is_preconfigured && !options?.fromPreconfiguration) { @@ -141,7 +152,7 @@ export async function updateFleetProxy( id, fleetProxyDataToSOAttribute(data) ); - + logger.debug(`Updated fleet proxy ${id}`); return { ...originalItem, ...data, diff --git a/x-pack/plugins/fleet/server/services/fleet_server_host.test.ts b/x-pack/plugins/fleet/server/services/fleet_server_host.test.ts index 40f65ca21c5ef..f92261ffb9f8e 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server_host.test.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server_host.test.ts @@ -6,6 +6,10 @@ */ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; + +import type { Logger } from '@kbn/core/server'; +import { securityMock } from '@kbn/security-plugin/server/mocks'; import { GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, @@ -13,9 +17,25 @@ import { DEFAULT_FLEET_SERVER_HOST_ID, } from '../constants'; +import { appContextService } from './app_context'; + import { migrateSettingsToFleetServerHost } from './fleet_server_host'; +jest.mock('./app_context'); + +const mockedAppContextService = appContextService as jest.Mocked; +mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ + ...securityMock.createSetup(), +})); + +let mockedLogger: jest.Mocked; + describe('migrateSettingsToFleetServerHost', () => { + beforeEach(() => { + mockedLogger = loggerMock.create(); + mockedAppContextService.getLogger.mockReturnValue(mockedLogger); + }); + it('should not migrate settings if a default fleet server policy config exists', async () => { const soClient = savedObjectsClientMock.create(); soClient.find.mockImplementation(({ type }) => { diff --git a/x-pack/plugins/fleet/server/services/fleet_server_host.ts b/x-pack/plugins/fleet/server/services/fleet_server_host.ts index 156d7e478b02b..66bed0b61977e 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server_host.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server_host.ts @@ -26,7 +26,9 @@ import type { NewFleetServerHost, AgentPolicy, } from '../types'; -import { FleetServerHostUnauthorizedError } from '../errors'; +import { FleetServerHostUnauthorizedError, FleetServerHostNotFoundError } from '../errors'; + +import { appContextService } from './app_context'; import { agentPolicyService } from './agent_policy'; import { escapeSearchQueryPhrase } from './saved_object'; @@ -46,6 +48,7 @@ export async function createFleetServerHost( data: NewFleetServerHost, options?: { id?: string; overwrite?: boolean; fromPreconfiguration?: boolean } ): Promise { + const logger = appContextService.getLogger(); if (data.is_default) { const defaultItem = await getDefaultFleetServerHost(soClient); if (defaultItem && defaultItem.id !== options?.id) { @@ -61,13 +64,13 @@ export async function createFleetServerHost( if (data.host_urls) { data.host_urls = data.host_urls.map(normalizeHostsForAgents); } - + logger.debug(`Creating fleet server host with ${data}`); const res = await soClient.create( FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, data, { id: options?.id, overwrite: options?.overwrite } ); - + logger.debug(`Created fleet server host ${options?.id}`); return savedObjectToFleetServerHost(res); } @@ -122,6 +125,9 @@ export async function deleteFleetServerHost( id: string, options?: { fromPreconfiguration?: boolean } ) { + const logger = appContextService.getLogger(); + logger.debug(`Deleting fleet server host ${id}`); + const fleetServerHost = await getFleetServerHost(soClient, id); if (fleetServerHost.is_preconfigured && !options?.fromPreconfiguration) { @@ -147,6 +153,9 @@ export async function updateFleetServerHost( data: Partial, options?: { fromPreconfiguration?: boolean } ) { + const logger = appContextService.getLogger(); + logger.debug(`Updating fleet server host ${id}`); + const originalItem = await getFleetServerHost(soClient, id); if (data.is_preconfigured && !options?.fromPreconfiguration) { @@ -174,7 +183,7 @@ export async function updateFleetServerHost( } await soClient.update(FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, id, data); - + logger.debug(`Updated fleet server host ${id}`); return { ...originalItem, ...data, @@ -224,7 +233,7 @@ export async function getFleetServerHostsForAgentPolicy( const defaultFleetServerHost = await getDefaultFleetServerHost(soClient); if (!defaultFleetServerHost) { - throw new Error('Default Fleet Server host is not setup'); + throw new FleetServerHostNotFoundError('Default Fleet Server host is not setup'); } return defaultFleetServerHost; diff --git a/x-pack/plugins/fleet/server/services/output.test.ts b/x-pack/plugins/fleet/server/services/output.test.ts index 6e7df5c7d4e50..c17cf9d3af210 100644 --- a/x-pack/plugins/fleet/server/services/output.test.ts +++ b/x-pack/plugins/fleet/server/services/output.test.ts @@ -1841,4 +1841,66 @@ describe('Output Service', () => { }); }); }); + + describe('backfillAllOutputPresets', () => { + it('should update non-preconfigured output', async () => { + const soClient = getMockedSoClient({}); + + soClient.find.mockResolvedValue({ + saved_objects: [ + { + ...mockOutputSO('non-preconfigured-output', { + is_preconfigured: false, + type: 'elasticsearch', + }), + score: 0, + }, + ], + total: 1, + per_page: 1, + page: 1, + }); + + soClient.get.mockResolvedValue({ + ...mockOutputSO('non-preconfigured-output', { + is_preconfigured: false, + type: 'elasticsearch', + }), + }); + + const promise = outputService.backfillAllOutputPresets(soClient, esClientMock); + + await expect(promise).resolves.not.toThrow(); + }); + + it('should update preconfigured output', async () => { + const soClient = getMockedSoClient({}); + + soClient.find.mockResolvedValue({ + saved_objects: [ + { + ...mockOutputSO('preconfigured-output', { + is_preconfigured: true, + type: 'elasticsearch', + }), + score: 0, + }, + ], + total: 1, + per_page: 1, + page: 1, + }); + + soClient.get.mockResolvedValue({ + ...mockOutputSO('preconfigured-output', { + is_preconfigured: true, + type: 'elasticsearch', + }), + }); + + const promise = outputService.backfillAllOutputPresets(soClient, esClientMock); + + await expect(promise).resolves.not.toThrow(); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/services/output.ts b/x-pack/plugins/fleet/server/services/output.ts index 32784a94f6729..7b838d9b9b0a5 100644 --- a/x-pack/plugins/fleet/server/services/output.ts +++ b/x-pack/plugins/fleet/server/services/output.ts @@ -57,6 +57,7 @@ import { FleetEncryptedSavedObjectEncryptionKeyRequired, OutputInvalidError, OutputUnauthorizedError, + FleetError, } from '../errors'; import type { OutputType } from '../types'; @@ -436,6 +437,9 @@ class OutputService { secretHashes?: Record; } ): Promise { + const logger = appContextService.getLogger(); + logger.debug(`Creating new output`); + const data: OutputSOAttributes = { ...omit(output, ['ssl', 'secrets']) }; if (output.type === outputType.RemoteElasticsearch) { if (data.is_default) { @@ -604,7 +608,7 @@ class OutputService { overwrite: options?.overwrite || options?.fromPreconfiguration, id, }); - + logger.debug(`Created new output ${id}`); return outputSavedObjectToOutput(newSo); } @@ -694,7 +698,7 @@ class OutputService { }); if (outputSO.error) { - throw new Error(outputSO.error.message); + throw new FleetError(outputSO.error.message); } return outputSavedObjectToOutput(outputSO); @@ -707,6 +711,9 @@ class OutputService { fromPreconfiguration: false, } ) { + const logger = appContextService.getLogger(); + logger.debug(`Deleting output ${id}`); + const originalOutput = await this.get(soClient, id); if (originalOutput.is_preconfigured && !fromPreconfiguration) { @@ -741,7 +748,7 @@ class OutputService { esClient: appContextService.getInternalUserESClient(), output: originalOutput, }); - + logger.debug(`Deleted output ${id}`); return soDeleteResult; } @@ -757,6 +764,9 @@ class OutputService { fromPreconfiguration: false, } ) { + const logger = appContextService.getLogger(); + logger.debug(`Updating output ${id}`); + if (data.type === outputType.RemoteElasticsearch) { if (data.is_default) { throw new OutputInvalidError( @@ -998,18 +1008,17 @@ class OutputService { ); if (outputSO.error) { - throw new Error(outputSO.error.message); + throw new FleetError(outputSO.error.message); } if (secretsToDelete.length) { try { await deleteSecrets({ esClient, ids: secretsToDelete.map((s) => s.id) }); } catch (err) { - appContextService - .getLogger() - .warn(`Error cleaning up secrets for output ${id}: ${err.message}`); + logger.warn(`Error cleaning up secrets for output ${id}: ${err.message}`); } } + logger.debug(`Updated output ${id}`); } public async backfillAllOutputPresets( @@ -1023,7 +1032,13 @@ class OutputService { async (output) => { const preset = getDefaultPresetForEsOutput(output.config_yaml ?? '', safeLoad); - await outputService.update(soClient, esClient, output.id, { preset }); + await outputService.update( + soClient, + esClient, + output.id, + { preset }, + { fromPreconfiguration: true } + ); await agentPolicyService.bumpAllAgentPoliciesForOutput(soClient, esClient, output.id); }, { diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index 983fdd7e8d29b..d3d49a7f001fc 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -80,6 +80,9 @@ import { HostedAgentPolicyRestrictionRelatedError, FleetUnauthorizedError, PackagePolicyNameExistsError, + AgentPolicyNotFoundError, + InputNotFoundError, + StreamNotFoundError, } from '../errors'; import { NewPackagePolicySchema, PackagePolicySchema, UpdatePackagePolicySchema } from '../types'; import type { @@ -171,6 +174,8 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const logger = appContextService.getLogger(); let secretReferences: PolicySecretReference[] | undefined; + logger.debug(`Creating new package policy`); + let enrichedPackagePolicy = await packagePolicyService.runExternalCallbacks( 'packagePolicyCreate', packagePolicy, @@ -300,6 +305,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } const createdPackagePolicy = { id: newSo.id, version: newSo.version, ...newSo.attributes }; + logger.debug(`Created new package policy with id ${newSo.id} and version ${newSo.version}`); return packagePolicyService.runExternalCallbacks( 'packagePolicyPostCreate', @@ -351,6 +357,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { }> = []; const logger = appContextService.getLogger(); + logger.debug(`Starting bulk create of package policy`); const packagePoliciesWithIds = packagePolicies.map((p) => { if (!p.id) { @@ -420,7 +427,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { if (hasCreatedSO?.error && !hasFailed) { failedPolicies.push({ packagePolicy, - error: hasCreatedSO?.error ?? new Error('Failed to create package policy.'), + error: hasCreatedSO?.error ?? new FleetError('Failed to create package policy.'), }); } }); @@ -434,7 +441,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { }); } } - + logger.debug(`Created new package policies`); return { created: newSos.map((newSo) => ({ id: newSo.id, @@ -498,7 +505,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } if (packagePolicySO.error) { - throw new Error(packagePolicySO.error.message); + throw new FleetError(packagePolicySO.error.message); } let experimentalFeatures: ExperimentalDataStreamFeature[] | undefined; @@ -587,7 +594,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } else if (so.error.statusCode === 404) { throw new PackagePolicyNotFoundError(`Package policy ${so.id} not found`); } else { - throw new Error(so.error.message); + throw new FleetError(so.error.message); } } @@ -689,12 +696,14 @@ class PackagePolicyClientImpl implements PackagePolicyClient { id, savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); + const logger = appContextService.getLogger(); let enrichedPackagePolicy: UpdatePackagePolicy; let secretReferences: PolicySecretReference[] | undefined; let secretsToDelete: PolicySecretReference[] | undefined; try { + logger.debug(`Starting update of package policy ${id}`); enrichedPackagePolicy = await packagePolicyService.runExternalCallbacks( 'packagePolicyUpdate', packagePolicyUpdate, @@ -702,7 +711,6 @@ class PackagePolicyClientImpl implements PackagePolicyClient { esClient ); } catch (error) { - const logger = appContextService.getLogger(); logger.error(`An error occurred executing "packagePolicyUpdate" callback: ${error}`); logger.error(error); if (error.apiPassThrough) { @@ -718,7 +726,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { throw new PackagePolicyRestrictionRelatedError(`Cannot update package policy ${id}`); } if (!oldPackagePolicy) { - throw new Error('Package policy not found'); + throw new PackagePolicyNotFoundError('Package policy not found'); } if ( @@ -774,6 +782,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { packagePolicy: restOfPackagePolicy, }); + logger.debug(`Updating SO with revision ${oldPackagePolicy.revision + 1}`); await soClient.update( SAVED_OBJECT_TYPE, id, @@ -825,6 +834,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } } // Bump revision of associated agent policy + logger.debug(`Bumping revision of associated agent policy ${packagePolicy.policy_id}`); const bumpPromise = agentPolicyService.bumpRevision( soClient, esClient, @@ -845,6 +855,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { await Promise.all([bumpPromise, assetRemovePromise, deleteSecretsPromise]); sendUpdatePackagePolicyTelemetryEvent(soClient, [packagePolicyUpdate], [oldPackagePolicy]); + logger.debug(`Package policy ${id} update completed`); return newPolicy; } @@ -874,7 +885,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { ); if (!oldPackagePolicies || oldPackagePolicies.length === 0) { - throw new Error('Package policy not found'); + throw new PackagePolicyNotFoundError('Package policy not found'); } const packageInfos = await getPackageInfoForPackagePolicies(packagePolicyUpdates, soClient); @@ -892,7 +903,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const packagePolicy = { ...packagePolicyUpdate, name: packagePolicyUpdate.name.trim() }; const oldPackagePolicy = oldPackagePolicies.find((p) => p.id === id); if (!oldPackagePolicy) { - throw new Error('Package policy not found'); + throw new PackagePolicyNotFoundError('Package policy not found'); } let secretReferences: PolicySecretReference[] | undefined; @@ -1050,6 +1061,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const result: PostDeletePackagePoliciesResponse = []; const logger = appContextService.getLogger(); + logger.debug(`Deleting package policies ${ids}`); const packagePolicies = await this.getByIDs(soClient, ids, { ignoreMissing: true }); if (!packagePolicies) { @@ -1194,6 +1206,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { context, request ); + logger.debug(`Deleted package policies ${ids}`); } catch (error) { logger.error(`An error occurred executing "packagePolicyPostDelete" callback: ${error}`); logger.error(error); @@ -1924,7 +1937,9 @@ async function _compilePackagePolicyInput( const packageInput = packageInputs.find((pkgInput) => pkgInput.type === input.type); if (!packageInput) { - throw new Error(`Input template not found, unable to find input type ${input.type}`); + throw new InputNotFoundError( + `Input template not found, unable to find input type ${input.type}` + ); } if (!packageInput.template_path) { return undefined; @@ -1935,7 +1950,9 @@ async function _compilePackagePolicyInput( ); if (!pkgInputTemplate || !pkgInputTemplate.buffer) { - throw new Error(`Unable to load input template at /agent/input/${packageInput.template_path!}`); + throw new InputNotFoundError( + `Unable to load input template at /agent/input/${packageInput.template_path!}` + ); } return compileTemplate( @@ -2019,7 +2036,7 @@ async function _compilePackageStream( const packageDataStreams = getNormalizedDataStreams(pkgInfo); if (!packageDataStreams) { - throw new Error('Stream template not found, no data streams'); + throw new StreamNotFoundError('Stream template not found, no data streams'); } const packageDataStream = packageDataStreams.find( @@ -2027,7 +2044,7 @@ async function _compilePackageStream( ); if (!packageDataStream) { - throw new Error( + throw new StreamNotFoundError( `Stream template not found, unable to find dataset ${stream.data_stream.dataset}` ); } @@ -2038,11 +2055,15 @@ async function _compilePackageStream( (pkgStream) => pkgStream.input === input.type ); if (!streamFromPkg) { - throw new Error(`Stream template not found, unable to find stream for input ${input.type}`); + throw new StreamNotFoundError( + `Stream template not found, unable to find stream for input ${input.type}` + ); } if (!streamFromPkg.template_path) { - throw new Error(`Stream template path not found for dataset ${stream.data_stream.dataset}`); + throw new StreamNotFoundError( + `Stream template path not found for dataset ${stream.data_stream.dataset}` + ); } const datasetPath = packageDataStream.path; @@ -2054,7 +2075,7 @@ async function _compilePackageStream( ); if (!pkgStreamTemplate || !pkgStreamTemplate.buffer) { - throw new Error( + throw new StreamNotFoundError( `Unable to load stream template ${streamFromPkg.template_path} for dataset ${stream.data_stream.dataset}` ); } @@ -2484,7 +2505,7 @@ async function validateIsNotHostedPolicy( const agentPolicy = await agentPolicyService.get(soClient, id, false); if (!agentPolicy) { - throw new Error('Agent policy not found'); + throw new AgentPolicyNotFoundError('Agent policy not found'); } if (agentPolicy.is_managed && !force) { diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index 73fc61cf0fab9..ad1e1c0ddb8b5 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -26,6 +26,8 @@ import type { PreconfigurationError } from '../../common/constants'; import { PRECONFIGURATION_LATEST_KEYWORD } from '../../common/constants'; import { PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE } from '../constants'; +import { FleetError } from '../errors'; + import { escapeSearchQueryPhrase } from './saved_object'; import { pkgToPkgKey } from './epm/registry'; import { getInstallation, getPackageInfo } from './epm/packages'; @@ -67,7 +69,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( .map(([, versions]) => versions.map((v) => pkgToPkgKey(v)).join(', ')) .join('; '); - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.preconfiguration.duplicatePackageError', { defaultMessage: 'Duplicate packages specified in configuration: {duplicateList}', values: { @@ -119,6 +121,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( await ensurePackagesCompletedInstall(soClient, esClient); // Create policies specified in Kibana config + logger.debug(`Creating preconfigured policies`); const preconfiguredPolicies = await Promise.allSettled( policies.map(async (preconfiguredAgentPolicy) => { if (preconfiguredAgentPolicy.id) { @@ -140,7 +143,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( !preconfiguredAgentPolicy.is_default && !preconfiguredAgentPolicy.is_default_fleet_server ) { - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.preconfiguration.missingIDError', { defaultMessage: '{agentPolicyName} is missing an `id` field. `id` is required, except for policies marked is_default or is_default_fleet_server.', @@ -221,7 +224,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( const rejectedPackage = rejectedPackages.find((rp) => rp.package?.name === pkg.name); if (rejectedPackage) { - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.preconfiguration.packageRejectedError', { defaultMessage: `[{agentPolicyName}] could not be added. [{pkgName}] could not be installed due to error: [{errorMessage}]`, values: { @@ -232,8 +235,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( }) ); } - - throw new Error( + throw new FleetError( i18n.translate('xpack.fleet.preconfiguration.packageMissingError', { defaultMessage: '[{agentPolicyName}] could not be added. [{pkgName}] is not installed, add [{pkgName}] to [{packagesConfigValue}] or remove it from [{packagePolicyName}].', @@ -257,7 +259,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( packagePolicy.name === installablePackagePolicy.name ); }); - + logger.debug(`Adding preconfigured package policies ${packagePoliciesToAdd}`); const s = apm.startSpan('Add preconfigured package policies', 'preconfiguration'); await addPreconfiguredPolicyPackages( soClient, diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/fleet_server_host.ts b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_server_host.ts index 8c6b9680318d7..f622b1115e16e 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/fleet_server_host.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_server_host.ts @@ -11,6 +11,8 @@ import { normalizeHostsForAgents } from '../../../common/services'; import type { FleetConfigType } from '../../config'; import { DEFAULT_FLEET_SERVER_HOST_ID } from '../../constants'; +import { FleetError } from '../../errors'; + import type { FleetServerHost } from '../../types'; import { appContextService } from '../app_context'; import { @@ -63,7 +65,7 @@ export function getPreconfiguredFleetServerHostFromConfig(config?: FleetConfigTy ]); if (fleetServerHosts.filter((fleetServerHost) => fleetServerHost.is_default).length > 1) { - throw new Error('Only one default Fleet Server host is allowed'); + throw new FleetError('Only one default Fleet Server host is allowed'); } return fleetServerHosts; diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts index f32ec17e22eaf..87adf58e42667 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts @@ -22,6 +22,7 @@ import { packagePolicyService } from '../package_policy'; import { getAgentsByKuery, forceUnenrollAgent } from '../agents'; import { listEnrollmentApiKeys, deleteEnrollmentApiKey } from '../api_keys'; import type { AgentPolicy } from '../../types'; +import { AgentPolicyInvalidError } from '../../errors'; export async function resetPreconfiguredAgentPolicies( soClient: SavedObjectsClientContract, @@ -135,7 +136,7 @@ async function _deleteExistingData( throw err; }); if (policy && !policy.is_preconfigured) { - throw new Error('Invalid policy'); + throw new AgentPolicyInvalidError(`Invalid policy ${agentPolicyId}`); } if (policy) { existingPolicies = [policy]; diff --git a/x-pack/plugins/fleet/server/services/security/message_signing_service.ts b/x-pack/plugins/fleet/server/services/security/message_signing_service.ts index b3d08e9a0b8e9..741b9e33dec88 100644 --- a/x-pack/plugins/fleet/server/services/security/message_signing_service.ts +++ b/x-pack/plugins/fleet/server/services/security/message_signing_service.ts @@ -22,6 +22,7 @@ import { MessageSigningError } from '../../../common/errors'; import { MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE } from '../../constants'; import { appContextService } from '../app_context'; +import { SigningServiceNotFoundError } from '../../errors'; interface MessageSigningKeys { private_key: string; @@ -118,10 +119,10 @@ export class MessageSigningService implements MessageSigningServiceInterface { signer.end(); if (!serializedPrivateKey) { - throw new Error('unable to find private key'); + throw new SigningServiceNotFoundError('Unable to find private key'); } if (!passphrase) { - throw new Error('unable to find passphrase'); + throw new SigningServiceNotFoundError('Unable to find passphrase'); } const privateKey = Buffer.from(serializedPrivateKey, 'base64'); @@ -139,7 +140,7 @@ export class MessageSigningService implements MessageSigningServiceInterface { const { publicKey } = await this.generateKeyPair(); if (!publicKey) { - throw new Error('unable to find public key'); + throw new SigningServiceNotFoundError('Unable to find public key'); } return publicKey; diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index 575da165d001d..cc4be9bab0bcc 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -125,7 +125,6 @@ async function createSetupSideEffects( esClient, getPreconfiguredOutputFromConfig(appContextService.getConfig()) ), - settingsService.settingsSetup(soClient), ]); @@ -228,7 +227,7 @@ async function createSetupSideEffects( stepSpan?.end(); stepSpan = apm.startSpan('Set up enrollment keys for preconfigured policies', 'preconfiguration'); - logger.debug('Setting up Fleet enrollment keys'); + logger.debug('Setting up Fleet enrollment keys for preconfigured policies'); await ensureDefaultEnrollmentAPIKeysExists(soClient, esClient); stepSpan?.end(); diff --git a/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx b/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx index 856e3543cd962..cd3317c5eb23b 100644 --- a/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx +++ b/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx @@ -28,6 +28,7 @@ const INDEX_TEMPLATE_TO_CLEAN = [ export async function cleanUpOldFileIndices(esClient: ElasticsearchClient, logger: Logger) { try { // Clean indices + logger.info('Cleaning old indices'); await pMap( INDICES_TO_CLEAN, async (indiceToClean) => { diff --git a/x-pack/plugins/fleet/tsconfig.json b/x-pack/plugins/fleet/tsconfig.json index 4d3c850b9e75d..4503d328e1503 100644 --- a/x-pack/plugins/fleet/tsconfig.json +++ b/x-pack/plugins/fleet/tsconfig.json @@ -102,5 +102,6 @@ "@kbn/dashboard-plugin", "@kbn/cloud", "@kbn/config", + "@kbn/core-http-server-mocks", ] } diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx index 5f0abbf3a952f..bab45a9ffe856 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx @@ -56,10 +56,18 @@ export const FlyoutWrapper = ({ values: { lang: language }, })} ; diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts b/x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts index c505a07da7768..8b8ab4e1ea241 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/all_dataset_selection.ts @@ -6,7 +6,6 @@ */ import { Dataset } from '../datasets'; -import { encodeDatasetSelection } from './encoding'; import { DatasetSelectionStrategy } from './types'; export class AllDatasetSelection implements DatasetSelectionStrategy { @@ -23,18 +22,13 @@ export class AllDatasetSelection implements DatasetSelectionStrategy { } toDataviewSpec() { - const { name, title } = this.selection.dataset.toDataviewSpec(); - return { - id: this.toURLSelectionId(), - name, - title, - }; + return this.selection.dataset.toDataviewSpec(); } - toURLSelectionId() { - return encodeDatasetSelection({ + toPlainSelection() { + return { selectionType: this.selectionType, - }); + }; } public static create() { diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/encoding.test.ts b/x-pack/plugins/log_explorer/common/dataset_selection/encoding.test.ts deleted file mode 100644 index d88d939858d0e..0000000000000 --- a/x-pack/plugins/log_explorer/common/dataset_selection/encoding.test.ts +++ /dev/null @@ -1,100 +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 { IndexPattern } from '@kbn/io-ts-utils'; -import { encodeDatasetSelection, decodeDatasetSelectionId } from './encoding'; -import { DatasetEncodingError } from './errors'; -import { DatasetSelectionPlain } from './types'; - -describe('DatasetSelection', () => { - const allDatasetSelectionPlain: DatasetSelectionPlain = { - selectionType: 'all', - }; - const encodedAllDatasetSelection = 'BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA'; - - const singleDatasetSelectionPlain: DatasetSelectionPlain = { - selectionType: 'single', - selection: { - name: 'azure', - version: '1.5.23', - dataset: { - name: 'logs-azure.activitylogs-*' as IndexPattern, - title: 'activitylogs', - }, - }, - }; - const encodedSingleDatasetSelection = - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtFgF4CuATmAHRZzwBu8sAJ5VadAFTkANAlhRU3BPyEiQASklFS8lu0m8wrEEjTkAjBwCsHAEwBmcuvBQeKACqCADmSPJqUVUA=='; - - const invalidDatasetSelectionPlain = { - selectionType: 'single', - selection: { - dataset: { - // Missing mandatory `name` property - title: 'activitylogs', - }, - }, - }; - const invalidCompressedId = 'random'; - const invalidEncodedDatasetSelection = 'BQZwpgNmDGAuCWB7AdgFQJ4AcwC4T2QHMoBKIA=='; - - describe('#encodeDatasetSelection', () => { - test('should encode and compress a valid DatasetSelection plain object', () => { - // Encode AllDatasetSelection plain object - expect(encodeDatasetSelection(allDatasetSelectionPlain)).toEqual(encodedAllDatasetSelection); - // Encode SingleDatasetSelection plain object - expect(encodeDatasetSelection(singleDatasetSelectionPlain)).toEqual( - encodedSingleDatasetSelection - ); - }); - - test('should throw a DatasetEncodingError if the input is an invalid DatasetSelection plain object', () => { - const encodingRunner = () => - encodeDatasetSelection(invalidDatasetSelectionPlain as DatasetSelectionPlain); - - expect(encodingRunner).toThrow(DatasetEncodingError); - expect(encodingRunner).toThrow(/^The current dataset selection is invalid/); - }); - }); - - describe('#decodeDatasetSelectionId', () => { - test('should decode and decompress a valid encoded string', () => { - // Decode AllDatasetSelection plain object - expect(decodeDatasetSelectionId(encodedAllDatasetSelection)).toEqual( - allDatasetSelectionPlain - ); - // Decode SingleDatasetSelection plain object - expect(decodeDatasetSelectionId(encodedSingleDatasetSelection)).toEqual( - singleDatasetSelectionPlain - ); - }); - - test('should throw a DatasetEncodingError if the input is an invalid compressed id', () => { - expect(() => decodeDatasetSelectionId(invalidCompressedId)).toThrow( - new DatasetEncodingError('The stored id is not a valid compressed value.') - ); - }); - - test('should throw a DatasetEncodingError if the decompressed value is an invalid DatasetSelection plain object', () => { - const decodingRunner = () => decodeDatasetSelectionId(invalidEncodedDatasetSelection); - - expect(decodingRunner).toThrow(DatasetEncodingError); - expect(decodingRunner).toThrow(/^The current dataset selection is invalid/); - }); - }); - - test('encoding and decoding should restore the original DatasetSelection plain object', () => { - // Encode/Decode AllDatasetSelection plain object - expect(decodeDatasetSelectionId(encodeDatasetSelection(allDatasetSelectionPlain))).toEqual( - allDatasetSelectionPlain - ); - // Encode/Decode SingleDatasetSelection plain object - expect(decodeDatasetSelectionId(encodeDatasetSelection(singleDatasetSelectionPlain))).toEqual( - singleDatasetSelectionPlain - ); - }); -}); diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/encoding.ts b/x-pack/plugins/log_explorer/common/dataset_selection/encoding.ts deleted file mode 100644 index 83a7c5357fde5..0000000000000 --- a/x-pack/plugins/log_explorer/common/dataset_selection/encoding.ts +++ /dev/null @@ -1,40 +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 { decode, encode, RisonValue } from '@kbn/rison'; -import * as lz from 'lz-string'; -import { decodeOrThrow } from '../runtime_types'; -import { DatasetEncodingError } from './errors'; -import { DatasetSelectionPlain, datasetSelectionPlainRT } from './types'; - -export const encodeDatasetSelection = (datasetSelectionPlain: DatasetSelectionPlain) => { - const safeDatasetSelection = decodeOrThrow( - datasetSelectionPlainRT, - (message: string) => - new DatasetEncodingError(`The current dataset selection is invalid: ${message}"`) - )(datasetSelectionPlain); - - return lz.compressToBase64(encode(safeDatasetSelection)); -}; - -export const decodeDatasetSelectionId = (datasetSelectionId: string): DatasetSelectionPlain => { - const risonDatasetSelection: RisonValue = lz.decompressFromBase64(datasetSelectionId); - - if (risonDatasetSelection === null || risonDatasetSelection === '') { - throw new DatasetEncodingError('The stored id is not a valid compressed value.'); - } - - const decodedDatasetSelection = decode(risonDatasetSelection); - - const datasetSelection = decodeOrThrow( - datasetSelectionPlainRT, - (message: string) => - new DatasetEncodingError(`The current dataset selection is invalid: ${message}"`) - )(decodedDatasetSelection); - - return datasetSelection; -}; diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts b/x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts index 43faebc618140..f881e90723e14 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/hydrate_dataset_selection.ts.ts @@ -13,11 +13,9 @@ import { UnresolvedDatasetSelection } from './unresolved_dataset_selection'; export const hydrateDatasetSelection = (datasetSelection: DatasetSelectionPlain) => { if (datasetSelection.selectionType === 'all') { return AllDatasetSelection.create(); - } - if (datasetSelection.selectionType === 'single') { + } else if (datasetSelection.selectionType === 'single') { return SingleDatasetSelection.fromSelection(datasetSelection.selection); - } - if (datasetSelection.selectionType === 'unresolved') { + } else { return UnresolvedDatasetSelection.fromSelection(datasetSelection.selection); } }; diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/index.ts b/x-pack/plugins/log_explorer/common/dataset_selection/index.ts index f390f7a89f87c..26fd974d0f0ac 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/index.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/index.ts @@ -28,7 +28,6 @@ export const isDatasetSelection = (input: any): input is DatasetSelection => { export * from './all_dataset_selection'; export * from './single_dataset_selection'; export * from './unresolved_dataset_selection'; -export * from './encoding'; export * from './errors'; export * from './hydrate_dataset_selection.ts'; export * from './types'; diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/single_dataset_selection.ts b/x-pack/plugins/log_explorer/common/dataset_selection/single_dataset_selection.ts index 21c788579ed70..6667dd55f3abe 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/single_dataset_selection.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/single_dataset_selection.ts @@ -6,7 +6,6 @@ */ import { Dataset } from '../datasets'; -import { encodeDatasetSelection } from './encoding'; import { DatasetSelectionStrategy, SingleDatasetSelectionPayload } from './types'; export class SingleDatasetSelection implements DatasetSelectionStrategy { @@ -29,16 +28,11 @@ export class SingleDatasetSelection implements DatasetSelectionStrategy { } toDataviewSpec() { - const { name, title } = this.selection.dataset.toDataviewSpec(); - return { - id: this.toURLSelectionId(), - name, - title, - }; + return this.selection.dataset.toDataviewSpec(); } - toURLSelectionId() { - return encodeDatasetSelection({ + toPlainSelection() { + return { selectionType: this.selectionType, selection: { name: this.selection.name, @@ -46,7 +40,7 @@ export class SingleDatasetSelection implements DatasetSelectionStrategy { version: this.selection.version, dataset: this.selection.dataset.toPlain(), }, - }); + }; } public static fromSelection(selection: SingleDatasetSelectionPayload) { diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/types.ts b/x-pack/plugins/log_explorer/common/dataset_selection/types.ts index 239bbc1108a29..db3638aff6331 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/types.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/types.ts @@ -62,7 +62,11 @@ export type UnresolvedDatasetSelectionPayload = rt.TypeOf< >; export type DatasetSelectionPlain = rt.TypeOf; +export type DataViewSpecWithId = DataViewSpec & { + id: string; +}; + export interface DatasetSelectionStrategy { - toDataviewSpec(): DataViewSpec; - toURLSelectionId(): string; + toDataviewSpec(): DataViewSpecWithId; + toPlainSelection(): DatasetSelectionPlain; } diff --git a/x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts b/x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts index acfd5180f0ed3..e534403fab617 100644 --- a/x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts +++ b/x-pack/plugins/log_explorer/common/dataset_selection/unresolved_dataset_selection.ts @@ -6,7 +6,6 @@ */ import { Dataset } from '../datasets'; -import { encodeDatasetSelection } from './encoding'; import { DatasetSelectionStrategy, UnresolvedDatasetSelectionPayload } from './types'; export class UnresolvedDatasetSelection implements DatasetSelectionStrategy { @@ -25,22 +24,17 @@ export class UnresolvedDatasetSelection implements DatasetSelectionStrategy { } toDataviewSpec() { - const { name, title } = this.selection.dataset.toDataviewSpec(); - return { - id: this.toURLSelectionId(), - name, - title, - }; + return this.selection.dataset.toDataviewSpec(); } - toURLSelectionId() { - return encodeDatasetSelection({ + toPlainSelection() { + return { selectionType: this.selectionType, selection: { name: this.selection.name, dataset: this.selection.dataset.toPlain(), }, - }); + }; } public static fromSelection(selection: UnresolvedDatasetSelectionPayload) { diff --git a/x-pack/plugins/log_explorer/common/datasets/models/dataset.ts b/x-pack/plugins/log_explorer/common/datasets/models/dataset.ts index 6c18f62350e41..18545b24754d8 100644 --- a/x-pack/plugins/log_explorer/common/datasets/models/dataset.ts +++ b/x-pack/plugins/log_explorer/common/datasets/models/dataset.ts @@ -6,9 +6,9 @@ */ import { IconType } from '@elastic/eui'; -import { DataViewSpec } from '@kbn/data-views-plugin/common'; import { IndexPattern } from '@kbn/io-ts-utils'; import { TIMESTAMP_FIELD } from '../../constants'; +import { DataViewSpecWithId } from '../../dataset_selection'; import { DatasetId, DatasetType, IntegrationType } from '../types'; type IntegrationBase = Partial>; @@ -49,7 +49,7 @@ export class Dataset { return `${type}-${dataset}-*` as IndexPattern; } - toDataviewSpec(): DataViewSpec { + toDataviewSpec(): DataViewSpecWithId { // Invert the property because the API returns the index pattern as `name` and a readable name as `title` return { id: this.id, diff --git a/x-pack/plugins/log_explorer/common/display_options/index.ts b/x-pack/plugins/log_explorer/common/display_options/index.ts new file mode 100644 index 0000000000000..6cc0ccaa93a6d --- /dev/null +++ b/x-pack/plugins/log_explorer/common/display_options/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 * from './types'; diff --git a/x-pack/plugins/log_explorer/common/display_options/types.ts b/x-pack/plugins/log_explorer/common/display_options/types.ts new file mode 100644 index 0000000000000..b4c482d088a54 --- /dev/null +++ b/x-pack/plugins/log_explorer/common/display_options/types.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. + */ + +export interface ChartDisplayOptions { + breakdownField: string | null; +} + +export type PartialChartDisplayOptions = Partial; + +export interface GridColumnDisplayOptions { + field: string; + width?: number; +} + +export interface GridRowsDisplayOptions { + rowHeight: number; + rowsPerPage: number; +} + +export type PartialGridRowsDisplayOptions = Partial; + +export interface GridDisplayOptions { + columns: GridColumnDisplayOptions[]; + rows: GridRowsDisplayOptions; +} + +export type PartialGridDisplayOptions = Partial< + Omit & { rows?: PartialGridRowsDisplayOptions } +>; + +export interface DisplayOptions { + grid: GridDisplayOptions; + chart: ChartDisplayOptions; +} + +export interface PartialDisplayOptions { + grid?: PartialGridDisplayOptions; + chart?: PartialChartDisplayOptions; +} diff --git a/x-pack/plugins/log_explorer/common/index.ts b/x-pack/plugins/log_explorer/common/index.ts index 989f981879ac0..5466a00ae0caa 100644 --- a/x-pack/plugins/log_explorer/common/index.ts +++ b/x-pack/plugins/log_explorer/common/index.ts @@ -5,4 +5,28 @@ * 2.0. */ -export { AllDatasetSelection, UnresolvedDatasetSelection } from './dataset_selection'; +export { + availableControlPanelFields, + availableControlsPanels, + controlPanelConfigs, + ControlPanelRT, +} from './control_panels'; +export type { AvailableControlPanels, ControlPanels } from './control_panels'; +export { + AllDatasetSelection, + datasetSelectionPlainRT, + hydrateDatasetSelection, + UnresolvedDatasetSelection, +} from './dataset_selection'; +export type { DatasetSelectionPlain } from './dataset_selection'; +export type { + ChartDisplayOptions, + DisplayOptions, + GridColumnDisplayOptions, + GridDisplayOptions, + GridRowsDisplayOptions, + PartialChartDisplayOptions, + PartialDisplayOptions, + PartialGridDisplayOptions, + PartialGridRowsDisplayOptions, +} from './display_options'; diff --git a/x-pack/plugins/log_explorer/kibana.jsonc b/x-pack/plugins/log_explorer/kibana.jsonc index 71781ca9cada3..9275751ca1898 100644 --- a/x-pack/plugins/log_explorer/kibana.jsonc +++ b/x-pack/plugins/log_explorer/kibana.jsonc @@ -12,16 +12,18 @@ "logExplorer" ], "requiredPlugins": [ + "controls", "data", "dataViews", "discover", + "embeddable", "fieldFormats", "fleet", "kibanaReact", "kibanaUtils", - "controls", - "embeddable", + "navigation", "share", + "unifiedSearch" ], "optionalPlugins": [], "requiredBundles": [], diff --git a/x-pack/plugins/log_explorer/public/components/flyout_detail/flyout_detail.tsx b/x-pack/plugins/log_explorer/public/components/flyout_detail/flyout_detail.tsx index 8f1da5cbfc18d..8be2f2ec6b03b 100644 --- a/x-pack/plugins/log_explorer/public/components/flyout_detail/flyout_detail.tsx +++ b/x-pack/plugins/log_explorer/public/components/flyout_detail/flyout_detail.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FlyoutProps, LogDocument } from './types'; +import { LogExplorerFlyoutContentProps, LogDocument } from './types'; import { useDocDetail } from './use_doc_detail'; import { FlyoutHeader } from './flyout_header'; import { FlyoutHighlights } from './flyout_highlights'; @@ -16,7 +16,7 @@ export function FlyoutDetail({ dataView, doc, actions, -}: Pick) { +}: Pick) { const parsedDoc = useDocDetail(doc as LogDocument, { dataView }); return ( diff --git a/x-pack/plugins/log_explorer/public/components/flyout_detail/types.ts b/x-pack/plugins/log_explorer/public/components/flyout_detail/types.ts index 958cc1a3351f0..d88d0d1c9ad8a 100644 --- a/x-pack/plugins/log_explorer/public/components/flyout_detail/types.ts +++ b/x-pack/plugins/log_explorer/public/components/flyout_detail/types.ts @@ -5,55 +5,4 @@ * 2.0. */ -import type { DataView } from '@kbn/data-views-plugin/common'; -import type { FlyoutContentProps } from '@kbn/discover-plugin/public'; -import type { DataTableRecord } from '@kbn/discover-utils/types'; - -export interface FlyoutProps extends FlyoutContentProps { - dataView: DataView; - doc: LogDocument; -} - -export interface LogDocument extends DataTableRecord { - flattened: { - '@timestamp': string; - 'log.level'?: [string]; - message?: [string]; - - 'host.name'?: string; - 'service.name'?: string; - 'trace.id'?: string; - 'agent.name'?: string; - 'orchestrator.cluster.name'?: string; - 'orchestrator.resource.id'?: string; - 'cloud.provider'?: string; - 'cloud.region'?: string; - 'cloud.availability_zone'?: string; - 'cloud.project.id'?: string; - 'cloud.instance.id'?: string; - 'log.file.path'?: string; - 'data_stream.namespace': string; - 'data_stream.dataset': string; - }; -} - -export interface FlyoutDoc { - '@timestamp': string; - 'log.level'?: string; - message?: string; - - 'host.name'?: string; - 'service.name'?: string; - 'trace.id'?: string; - 'agent.name'?: string; - 'orchestrator.cluster.name'?: string; - 'orchestrator.resource.id'?: string; - 'cloud.provider'?: string; - 'cloud.region'?: string; - 'cloud.availability_zone'?: string; - 'cloud.project.id'?: string; - 'cloud.instance.id'?: string; - 'log.file.path'?: string; - 'data_stream.namespace': string; - 'data_stream.dataset': string; -} +export type { FlyoutDoc, LogDocument, LogExplorerFlyoutContentProps } from '../../controller'; diff --git a/x-pack/plugins/log_explorer/public/components/flyout_detail/use_doc_detail.ts b/x-pack/plugins/log_explorer/public/components/flyout_detail/use_doc_detail.ts index b07802e5fb946..2a6baca186ae3 100644 --- a/x-pack/plugins/log_explorer/public/components/flyout_detail/use_doc_detail.ts +++ b/x-pack/plugins/log_explorer/public/components/flyout_detail/use_doc_detail.ts @@ -7,11 +7,11 @@ import { formatFieldValue } from '@kbn/discover-utils'; import * as constants from '../../../common/constants'; import { useKibanaContextForPlugin } from '../../utils/use_kibana'; -import { FlyoutDoc, FlyoutProps, LogDocument } from './types'; +import { FlyoutDoc, LogExplorerFlyoutContentProps, LogDocument } from './types'; export function useDocDetail( doc: LogDocument, - { dataView }: Pick + { dataView }: Pick ): FlyoutDoc { const { services } = useKibanaContextForPlugin(); diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx index 57736dd4b96dd..638ca847f6549 100644 --- a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx @@ -5,100 +5,43 @@ * 2.0. */ +import type { ScopedHistory } from '@kbn/core-application-browser'; +import type { CoreStart } from '@kbn/core/public'; import React, { useMemo } from 'react'; -import { ScopedHistory } from '@kbn/core-application-browser'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { DiscoverAppState } from '@kbn/discover-plugin/public'; -import type { BehaviorSubject } from 'rxjs'; -import { CoreStart } from '@kbn/core/public'; -import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; -import { HIDE_ANNOUNCEMENTS } from '@kbn/discover-utils'; +import type { LogExplorerController } from '../../controller'; import { createLogExplorerProfileCustomizations } from '../../customizations/log_explorer_profile'; -import { createPropertyGetProxy } from '../../utils/proxies'; -import { LogExplorerProfileContext } from '../../state_machines/log_explorer_profile'; import { LogExplorerStartDeps } from '../../types'; -import { LogExplorerCustomizations } from './types'; export interface CreateLogExplorerArgs { core: CoreStart; plugins: LogExplorerStartDeps; } -export interface LogExplorerStateContainer { - appState?: DiscoverAppState; - logExplorerState?: Partial; -} - export interface LogExplorerProps { - customizations?: LogExplorerCustomizations; scopedHistory: ScopedHistory; - state$?: BehaviorSubject; + controller: LogExplorerController; } export const createLogExplorer = ({ core, plugins }: CreateLogExplorerArgs) => { const { - data, discover: { DiscoverContainer }, } = plugins; - const overrideServices = { - data: createDataServiceProxy(data), - uiSettings: createUiSettingsServiceProxy(core.uiSettings), - }; - - return ({ customizations = {}, scopedHistory, state$ }: LogExplorerProps) => { + return ({ scopedHistory, controller }: LogExplorerProps) => { const logExplorerCustomizations = useMemo( - () => [createLogExplorerProfileCustomizations({ core, customizations, plugins, state$ })], - [customizations, state$] + () => [createLogExplorerProfileCustomizations({ controller, core, plugins })], + [controller] ); + const { urlStateStorage, ...overrideServices } = controller.discoverServices; + return ( ); }; }; - -/** - * Create proxy for the data service, in which session service enablement calls - * are no-ops. - */ -const createDataServiceProxy = (data: DataPublicPluginStart) => { - const noOpEnableStorage = () => {}; - - const sessionServiceProxy = createPropertyGetProxy(data.search.session, { - enableStorage: () => noOpEnableStorage, - }); - - const searchServiceProxy = createPropertyGetProxy(data.search, { - session: () => sessionServiceProxy, - }); - - return createPropertyGetProxy(data, { - search: () => searchServiceProxy, - }); -}; -/** - * Create proxy for the uiSettings service, in which settings preferences are overwritten - * with custom values - */ -const createUiSettingsServiceProxy = (uiSettings: IUiSettingsClient) => { - const overrides: Record = { - [HIDE_ANNOUNCEMENTS]: true, - }; - - return createPropertyGetProxy(uiSettings, { - get: - () => - (key, ...args) => { - if (key in overrides) { - return overrides[key]; - } - - return uiSettings.get(key, ...args); - }, - }); -}; diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts b/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts deleted file mode 100644 index 2b366cce7c55c..0000000000000 --- a/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts +++ /dev/null @@ -1,25 +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 { DataTableRecord } from '@kbn/discover-utils/types'; - -export type RenderPreviousContent = () => React.ReactNode; - -export interface LogExplorerFlyoutContentProps { - doc: DataTableRecord; -} - -export type FlyoutRenderContent = ( - renderPreviousContent: RenderPreviousContent, - props: LogExplorerFlyoutContentProps -) => React.ReactNode; - -export interface LogExplorerCustomizations { - flyout?: { - renderContent?: FlyoutRenderContent; - }; -} diff --git a/x-pack/plugins/log_explorer/public/controller/controller_customizations.ts b/x-pack/plugins/log_explorer/public/controller/controller_customizations.ts new file mode 100644 index 0000000000000..97f0cb4ff8b23 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/controller_customizations.ts @@ -0,0 +1,71 @@ +/* + * 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 { DataView } from '@kbn/data-views-plugin/common'; +import { FlyoutContentProps as DiscoverFlyoutContentProps } from '@kbn/discover-plugin/public'; +import type { DataTableRecord } from '@kbn/discover-utils/types'; + +export interface LogExplorerCustomizations { + flyout?: { + renderContent?: RenderContentCustomization; + }; +} + +export interface LogExplorerFlyoutContentProps extends DiscoverFlyoutContentProps { + dataView: DataView; + doc: LogDocument; +} + +export interface LogDocument extends DataTableRecord { + flattened: { + '@timestamp': string; + 'log.level'?: [string]; + message?: [string]; + + 'host.name'?: string; + 'service.name'?: string; + 'trace.id'?: string; + 'agent.name'?: string; + 'orchestrator.cluster.name'?: string; + 'orchestrator.resource.id'?: string; + 'cloud.provider'?: string; + 'cloud.region'?: string; + 'cloud.availability_zone'?: string; + 'cloud.project.id'?: string; + 'cloud.instance.id'?: string; + 'log.file.path'?: string; + 'data_stream.namespace': string; + 'data_stream.dataset': string; + }; +} + +export interface FlyoutDoc { + '@timestamp': string; + 'log.level'?: string; + message?: string; + + 'host.name'?: string; + 'service.name'?: string; + 'trace.id'?: string; + 'agent.name'?: string; + 'orchestrator.cluster.name'?: string; + 'orchestrator.resource.id'?: string; + 'cloud.provider'?: string; + 'cloud.region'?: string; + 'cloud.availability_zone'?: string; + 'cloud.project.id'?: string; + 'cloud.instance.id'?: string; + 'log.file.path'?: string; + 'data_stream.namespace': string; + 'data_stream.dataset': string; +} + +export type RenderContentCustomization = ( + renderPreviousContent: RenderPreviousContent +) => (props: Props) => React.ReactNode; + +export type RenderPreviousContent = (props: Props) => React.ReactNode; diff --git a/x-pack/plugins/log_explorer/public/controller/create_controller.ts b/x-pack/plugins/log_explorer/public/controller/create_controller.ts new file mode 100644 index 0000000000000..53260aeb97281 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/create_controller.ts @@ -0,0 +1,99 @@ +/* + * 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 { CoreStart } from '@kbn/core/public'; +import { getDevToolsOptions } from '@kbn/xstate-utils'; +import equal from 'fast-deep-equal'; +import { distinctUntilChanged, EMPTY, from, map, shareReplay } from 'rxjs'; +import { interpret } from 'xstate'; +import { DatasetsService } from '../services/datasets'; +import { createLogExplorerControllerStateMachine } from '../state_machines/log_explorer_controller'; +import { LogExplorerStartDeps } from '../types'; +import { LogExplorerCustomizations } from './controller_customizations'; +import { createDataServiceProxy } from './custom_data_service'; +import { createUiSettingsServiceProxy } from './custom_ui_settings_service'; +import { + createDiscoverMemoryHistory, + createMemoryUrlStateStorage, +} from './custom_url_state_storage'; +import { getContextFromPublicState, getPublicStateFromContext } from './public_state'; +import { + LogExplorerController, + LogExplorerDiscoverServices, + LogExplorerPublicStateUpdate, +} from './types'; + +interface Dependencies { + core: CoreStart; + plugins: LogExplorerStartDeps; +} + +type InitialState = LogExplorerPublicStateUpdate; + +export const createLogExplorerControllerFactory = + ({ core, plugins: { data } }: Dependencies) => + async ({ + customizations = {}, + initialState, + }: { + customizations?: LogExplorerCustomizations; + initialState?: InitialState; + }): Promise => { + const datasetsClient = new DatasetsService().start({ + http: core.http, + }).client; + + const customMemoryHistory = createDiscoverMemoryHistory(); + const customMemoryUrlStateStorage = createMemoryUrlStateStorage(customMemoryHistory); + const customUiSettings = createUiSettingsServiceProxy(core.uiSettings); + const customData = createDataServiceProxy({ + data, + http: core.http, + uiSettings: customUiSettings, + }); + const discoverServices: LogExplorerDiscoverServices = { + data: customData, + history: () => customMemoryHistory, + uiSettings: customUiSettings, + filterManager: customData.query.filterManager, + timefilter: customData.query.timefilter.timefilter, + urlStateStorage: customMemoryUrlStateStorage, + }; + + const initialContext = getContextFromPublicState(initialState ?? {}); + + const machine = createLogExplorerControllerStateMachine({ + datasetsClient, + initialContext, + query: discoverServices.data.query, + toasts: core.notifications.toasts, + }); + + const service = interpret(machine, { + devTools: getDevToolsOptions(), + }); + + const logExplorerState$ = from(service).pipe( + map(({ context }) => getPublicStateFromContext(context)), + distinctUntilChanged(equal), + shareReplay(1) + ); + + return { + actions: {}, + customizations, + datasetsClient, + discoverServices, + event$: EMPTY, + service, + state$: logExplorerState$, + stateMachine: machine, + }; + }; + +export type CreateLogExplorerControllerFactory = typeof createLogExplorerControllerFactory; +export type CreateLogExplorerController = ReturnType; diff --git a/x-pack/plugins/log_explorer/public/controller/custom_data_service.ts b/x-pack/plugins/log_explorer/public/controller/custom_data_service.ts new file mode 100644 index 0000000000000..790fbaa04df86 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/custom_data_service.ts @@ -0,0 +1,63 @@ +/* + * 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 { HttpStart } from '@kbn/core-http-browser'; +import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { DataPublicPluginStart, NowProvider, QueryService } from '@kbn/data-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { createPropertyGetProxy } from '../utils/proxies'; + +/** + * Create proxy for the data service, in which session service enablement calls + * are no-ops. + */ +export const createDataServiceProxy = ({ + data, + http, + uiSettings, +}: { + data: DataPublicPluginStart; + http: HttpStart; + uiSettings: IUiSettingsClient; +}) => { + /** + * search session + */ + const noOpEnableStorage = () => {}; + + const sessionServiceProxy = createPropertyGetProxy(data.search.session, { + enableStorage: () => noOpEnableStorage, + }); + + const searchServiceProxy = createPropertyGetProxy(data.search, { + session: () => sessionServiceProxy, + }); + + /** + * query + */ + const customStorage = new Storage(localStorage); + const customQueryService = new QueryService(); + customQueryService.setup({ + nowProvider: new NowProvider(), + storage: customStorage, + uiSettings, + }); + const customQuery = customQueryService.start({ + http, + storage: customStorage, + uiSettings, + }); + + /** + * combined + */ + return createPropertyGetProxy(data, { + query: () => customQuery, + search: () => searchServiceProxy, + }); +}; diff --git a/x-pack/plugins/log_explorer/public/controller/custom_ui_settings_service.ts b/x-pack/plugins/log_explorer/public/controller/custom_ui_settings_service.ts new file mode 100644 index 0000000000000..bd247b91ba1f5 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/custom_ui_settings_service.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 { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import { HIDE_ANNOUNCEMENTS, MODIFY_COLUMNS_ON_SWITCH } from '@kbn/discover-utils'; +import { createPropertyGetProxy } from '../utils/proxies'; + +/** + * Create proxy for the uiSettings service, in which settings preferences are overwritten + * with custom values + */ +export const createUiSettingsServiceProxy = (uiSettings: IUiSettingsClient) => { + const overrides: Record = { + [HIDE_ANNOUNCEMENTS]: true, + [MODIFY_COLUMNS_ON_SWITCH]: false, + }; + + return createPropertyGetProxy(uiSettings, { + get: + () => + (key, ...args) => { + if (key in overrides) { + return overrides[key]; + } + + return uiSettings.get(key, ...args); + }, + }); +}; diff --git a/x-pack/plugins/log_explorer/public/controller/custom_url_state_storage.ts b/x-pack/plugins/log_explorer/public/controller/custom_url_state_storage.ts new file mode 100644 index 0000000000000..bddb162963376 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/custom_url_state_storage.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 { createKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import { createMemoryHistory } from 'history'; +import { LogExplorerDiscoverServices } from './types'; + +type DiscoverHistory = ReturnType; + +/** + * Create a MemoryHistory instance. It is initialized with an application state + * object, because Discover radically resets too much when the URL is "empty". + */ +export const createDiscoverMemoryHistory = (): DiscoverHistory => + createMemoryHistory({ + initialEntries: [{ search: `?_a=()` }], + }); + +/** + * Create a url state storage that's not connected to the real browser location + * to isolate the Discover component from these side-effects. + */ +export const createMemoryUrlStateStorage = (memoryHistory: DiscoverHistory) => + createKbnUrlStateStorage({ + history: memoryHistory, + useHash: false, + useHashQuery: false, + }); diff --git a/x-pack/plugins/log_explorer/public/controller/index.ts b/x-pack/plugins/log_explorer/public/controller/index.ts new file mode 100644 index 0000000000000..8c1ebbc752dbd --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/index.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 * from './controller_customizations'; +export * from './create_controller'; +export * from './provider'; +export * from './types'; diff --git a/x-pack/plugins/log_explorer/public/controller/lazy_create_controller.ts b/x-pack/plugins/log_explorer/public/controller/lazy_create_controller.ts new file mode 100644 index 0000000000000..46104b3960940 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/lazy_create_controller.ts @@ -0,0 +1,15 @@ +/* + * 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 { CreateLogExplorerControllerFactory } from './create_controller'; + +export const createLogExplorerControllerLazyFactory: CreateLogExplorerControllerFactory = + (dependencies) => async (args) => { + const { createLogExplorerControllerFactory } = await import('./create_controller'); + + return createLogExplorerControllerFactory(dependencies)(args); + }; diff --git a/x-pack/plugins/log_explorer/public/controller/provider.ts b/x-pack/plugins/log_explorer/public/controller/provider.ts new file mode 100644 index 0000000000000..a66b03f477cb1 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/provider.ts @@ -0,0 +1,15 @@ +/* + * 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 createContainer from 'constate'; +import type { LogExplorerController } from './types'; + +const useLogExplorerController = ({ controller }: { controller: LogExplorerController }) => + controller; + +export const [LogExplorerControllerProvider, useLogExplorerControllerContext] = + createContainer(useLogExplorerController); diff --git a/x-pack/plugins/log_explorer/public/controller/public_state.ts b/x-pack/plugins/log_explorer/public/controller/public_state.ts new file mode 100644 index 0000000000000..04c12160a8809 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/public_state.ts @@ -0,0 +1,134 @@ +/* + * 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 { + availableControlsPanels, + controlPanelConfigs, + ControlPanels, + hydrateDatasetSelection, +} from '../../common'; +import { + DEFAULT_CONTEXT, + LogExplorerControllerContext, +} from '../state_machines/log_explorer_controller'; +import { + LogExplorerPublicState, + LogExplorerPublicStateUpdate, + OptionsListControlOption, +} from './types'; + +export const getPublicStateFromContext = ( + context: LogExplorerControllerContext +): LogExplorerPublicState => { + return { + chart: context.chart, + datasetSelection: context.datasetSelection.toPlainSelection(), + grid: context.grid, + filters: context.filters, + query: context.query, + refreshInterval: context.refreshInterval, + time: context.time, + controls: getPublicControlsStateFromControlPanels(context.controlPanels), + }; +}; + +export const getContextFromPublicState = ( + publicState: LogExplorerPublicStateUpdate +): LogExplorerControllerContext => ({ + ...DEFAULT_CONTEXT, + chart: { + ...DEFAULT_CONTEXT.chart, + ...publicState.chart, + }, + controlPanels: getControlPanelsFromPublicControlsState(publicState.controls), + datasetSelection: + publicState.datasetSelection != null + ? hydrateDatasetSelection(publicState.datasetSelection) + : DEFAULT_CONTEXT.datasetSelection, + grid: { + ...DEFAULT_CONTEXT.grid, + ...publicState.grid, + rows: { + ...DEFAULT_CONTEXT.grid.rows, + ...publicState.grid?.rows, + }, + }, + filters: publicState.filters ?? DEFAULT_CONTEXT.filters, + query: publicState.query ?? DEFAULT_CONTEXT.query, + refreshInterval: publicState.refreshInterval ?? DEFAULT_CONTEXT.refreshInterval, + time: publicState.time ?? DEFAULT_CONTEXT.time, +}); + +const getPublicControlsStateFromControlPanels = ( + controlPanels: ControlPanels | undefined +): LogExplorerPublicState['controls'] => + controlPanels != null + ? { + ...(availableControlsPanels.NAMESPACE in controlPanels + ? { + [availableControlsPanels.NAMESPACE]: getOptionsListPublicControlStateFromControlPanel( + controlPanels[availableControlsPanels.NAMESPACE] + ), + } + : {}), + } + : {}; + +const getOptionsListPublicControlStateFromControlPanel = ( + optionsListControlPanel: ControlPanels[string] +): OptionsListControlOption => ({ + mode: optionsListControlPanel.explicitInput.exclude ? 'exclude' : 'include', + selection: optionsListControlPanel.explicitInput.existsSelected + ? { type: 'exists' } + : { + type: 'options', + selectedOptions: optionsListControlPanel.explicitInput.selectedOptions ?? [], + }, +}); + +const getControlPanelsFromPublicControlsState = ( + publicControlsState: LogExplorerPublicStateUpdate['controls'] +): ControlPanels => { + if (publicControlsState == null) { + return {}; + } + + const namespacePublicControlState = publicControlsState[availableControlsPanels.NAMESPACE]; + + return { + ...(namespacePublicControlState + ? { + [availableControlsPanels.NAMESPACE]: getControlPanelFromOptionsListPublicControlState( + availableControlsPanels.NAMESPACE, + namespacePublicControlState + ), + } + : {}), + }; +}; + +const getControlPanelFromOptionsListPublicControlState = ( + controlId: string, + publicControlState: OptionsListControlOption +): ControlPanels[string] => { + const defaultControlPanelConfig = controlPanelConfigs[controlId]; + + return { + ...defaultControlPanelConfig, + explicitInput: { + ...defaultControlPanelConfig.explicitInput, + exclude: publicControlState.mode === 'exclude', + ...(publicControlState.selection.type === 'exists' + ? { + existsSelected: true, + } + : { + selectedOptions: publicControlState.selection.selectedOptions, + }), + }, + }; +}; diff --git a/x-pack/plugins/log_explorer/public/controller/types.ts b/x-pack/plugins/log_explorer/public/controller/types.ts new file mode 100644 index 0000000000000..50eb259d38cb3 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/controller/types.ts @@ -0,0 +1,73 @@ +/* + * 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 { QueryState } from '@kbn/data-plugin/public'; +import { DiscoverContainerProps } from '@kbn/discover-plugin/public'; +import { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import { Observable } from 'rxjs'; +import { + availableControlsPanels, + DatasetSelectionPlain, + DisplayOptions, + PartialDisplayOptions, +} from '../../common'; +import { IDatasetsClient } from '../services/datasets'; +import { + LogExplorerControllerStateMachine, + LogExplorerControllerStateService, +} from '../state_machines/log_explorer_controller'; +import { LogExplorerCustomizations } from './controller_customizations'; + +export interface LogExplorerController { + actions: {}; + customizations: LogExplorerCustomizations; + datasetsClient: IDatasetsClient; + discoverServices: LogExplorerDiscoverServices; + event$: Observable; + service: LogExplorerControllerStateService; + state$: Observable; + stateMachine: LogExplorerControllerStateMachine; +} + +export type LogExplorerDiscoverServices = Pick< + Required, + 'data' | 'filterManager' | 'timefilter' | 'uiSettings' | 'history' +> & { + urlStateStorage: IKbnUrlStateStorage; +}; + +export interface OptionsListControlOption { + mode: 'include' | 'exclude'; + selection: + | { + type: 'options'; + selectedOptions: string[]; + } + | { + type: 'exists'; + }; +} + +export interface ControlOptions { + [availableControlsPanels.NAMESPACE]?: OptionsListControlOption; +} + +// we might want to wrap this into an object that has a "state value" laster +export type LogExplorerPublicState = QueryState & + DisplayOptions & { + controls: ControlOptions; + datasetSelection: DatasetSelectionPlain; + }; + +export type LogExplorerPublicStateUpdate = QueryState & + PartialDisplayOptions & { + controls?: ControlOptions; + datasetSelection?: DatasetSelectionPlain; + }; + +// a placeholder for now +export type LogExplorerPublicEvent = never; diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_dataset_filters.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_dataset_filters.tsx index c315971fb23a5..e7b3dc6bbd431 100644 --- a/x-pack/plugins/log_explorer/public/customizations/custom_dataset_filters.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/custom_dataset_filters.tsx @@ -10,21 +10,21 @@ import { Query } from '@kbn/es-query'; import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { useControlPanels } from '../hooks/use_control_panels'; -import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; +import { LogExplorerControllerStateService } from '../state_machines/log_explorer_controller'; const DATASET_FILTERS_CUSTOMIZATION_ID = 'datasetFiltersCustomization'; interface CustomDatasetFiltersProps { - logExplorerProfileStateService: LogExplorerProfileStateService; + logExplorerControllerStateService: LogExplorerControllerStateService; data: DataPublicPluginStart; } const CustomDatasetFilters = ({ - logExplorerProfileStateService, + logExplorerControllerStateService, data, }: CustomDatasetFiltersProps) => { const { getInitialInput, setControlGroupAPI, query, filters, timeRange } = useControlPanels( - logExplorerProfileStateService, + logExplorerControllerStateService, data ); diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_dataset_selector.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_dataset_selector.tsx index 5b9fc3223fddf..a93a893bb20e9 100644 --- a/x-pack/plugins/log_explorer/public/customizations/custom_dataset_selector.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/custom_dataset_selector.tsx @@ -15,15 +15,15 @@ import { DataViewsProvider, useDataViewsContext } from '../hooks/use_data_views' import { useEsql } from '../hooks/use_esql'; import { IntegrationsProvider, useIntegrationsContext } from '../hooks/use_integrations'; import { IDatasetsClient } from '../services/datasets'; -import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; +import { LogExplorerControllerStateService } from '../state_machines/log_explorer_controller'; interface CustomDatasetSelectorProps { - logExplorerProfileStateService: LogExplorerProfileStateService; + logExplorerControllerStateService: LogExplorerControllerStateService; } -export const CustomDatasetSelector = withProviders(({ logExplorerProfileStateService }) => { +export const CustomDatasetSelector = withProviders(({ logExplorerControllerStateService }) => { const { datasetSelection, handleDatasetSelectionChange } = useDatasetSelection( - logExplorerProfileStateService + logExplorerControllerStateService ); const { @@ -111,13 +111,13 @@ function withProviders(Component: React.FunctionComponent - + diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx index 2fd71f948146f..b94cc930cafec 100644 --- a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx @@ -5,46 +5,41 @@ * 2.0. */ -import React, { useCallback } from 'react'; +import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; import { FlyoutDetail } from '../components/flyout_detail/flyout_detail'; -import { FlyoutProps } from '../components/flyout_detail'; -import { useLogExplorerCustomizationsContext } from '../hooks/use_log_explorer_customizations'; +import { LogExplorerFlyoutContentProps } from '../components/flyout_detail'; +import { useLogExplorerControllerContext } from '../controller'; -export const CustomFlyoutContent = ({ - actions, - dataView, - doc, - renderDefaultContent, -}: FlyoutProps) => { - const { flyout } = useLogExplorerCustomizationsContext(); +export const CustomFlyoutContent = (props: LogExplorerFlyoutContentProps) => { + const { + customizations: { flyout }, + } = useLogExplorerControllerContext(); - const renderPreviousContent = useCallback( - () => ( - <> - {/* Apply custom Log Explorer detail */} - - - - - ), - [actions, dataView, doc] + const renderCustomizedContent = useMemo( + () => flyout?.renderContent?.(renderContent) ?? renderContent, + [flyout] ); - const content = flyout?.renderContent - ? flyout?.renderContent(renderPreviousContent, { doc }) - : renderPreviousContent(); - return ( {/* Apply custom Log Explorer detail */} - {content} + {renderCustomizedContent(props)} {/* Restore default content */} - {renderDefaultContent()} + {props.renderDefaultContent()} ); }; +const renderContent = ({ actions, dataView, doc }: LogExplorerFlyoutContentProps) => ( + <> + {/* Apply custom Log Explorer detail */} + + + + +); + // eslint-disable-next-line import/no-default-export export default CustomFlyoutContent; diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_search_bar.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_search_bar.tsx new file mode 100644 index 0000000000000..1cc3d6bf95eec --- /dev/null +++ b/x-pack/plugins/log_explorer/public/customizations/custom_search_bar.tsx @@ -0,0 +1,41 @@ +/* + * 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 { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; + +export const createCustomSearchBar = ({ + navigation, + data, + unifiedSearch, +}: { + data: DataPublicPluginStart; + navigation: NavigationPublicPluginStart; + unifiedSearch: UnifiedSearchPublicPluginStart; +}) => { + const { + ui: { createTopNavWithCustomContext }, + } = navigation; + + const { + ui: { getCustomSearchBar }, + } = unifiedSearch; + + const CustomSearchBar = getCustomSearchBar(data); + + const customUnifiedSearch = { + ...unifiedSearch, + ui: { + ...unifiedSearch.ui, + SearchBar: CustomSearchBar, + AggregateQuerySearchBar: CustomSearchBar, + }, + }; + + return createTopNavWithCustomContext(customUnifiedSearch); +}; diff --git a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx index 89c585d8d201e..5712a72ed0e1c 100644 --- a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx @@ -4,19 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; + import type { CoreStart } from '@kbn/core/public'; -import { CustomizationCallback, DiscoverStateContainer } from '@kbn/discover-plugin/public'; +import type { CustomizationCallback } from '@kbn/discover-plugin/public'; import { i18n } from '@kbn/i18n'; +import React from 'react'; import useObservable from 'react-use/lib/useObservable'; -import { combineLatest, from, map, Subscription, type BehaviorSubject } from 'rxjs'; -import { LogExplorerStateContainer } from '../components/log_explorer'; -import { LogExplorerCustomizations } from '../components/log_explorer/types'; -import { LogExplorerCustomizationsProvider } from '../hooks/use_log_explorer_customizations'; -import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; -import { LogExplorerStartDeps } from '../types'; +import { waitFor } from 'xstate/lib/waitFor'; +import type { LogExplorerController } from '../controller'; +import { LogExplorerControllerProvider } from '../controller/provider'; +import type { LogExplorerStartDeps } from '../types'; import { dynamic } from '../utils/dynamic'; import { useKibanaContextForPluginProvider } from '../utils/use_kibana'; +import { createCustomSearchBar } from './custom_search_bar'; const LazyCustomDatasetFilters = dynamic(() => import('./custom_dataset_filters')); const LazyCustomDatasetSelector = dynamic(() => import('./custom_dataset_selector')); @@ -24,56 +24,31 @@ const LazyCustomFlyoutContent = dynamic(() => import('./custom_flyout_content')) export interface CreateLogExplorerProfileCustomizationsDeps { core: CoreStart; - customizations: LogExplorerCustomizations; plugins: LogExplorerStartDeps; - state$?: BehaviorSubject; + controller: LogExplorerController; } export const createLogExplorerProfileCustomizations = ({ core, - customizations: logExplorerCustomizations, plugins, - state$, + controller, }: CreateLogExplorerProfileCustomizationsDeps): CustomizationCallback => async ({ customizations, stateContainer }) => { - const { data, dataViews, discover } = plugins; - // Lazy load dependencies - const datasetServiceModuleLoadable = import('../services/datasets'); - const logExplorerMachineModuleLoadable = import('../state_machines/log_explorer_profile'); - - const [{ DatasetsService }, { initializeLogExplorerProfileStateService, waitForState }] = - await Promise.all([datasetServiceModuleLoadable, logExplorerMachineModuleLoadable]); - - const datasetsClient = new DatasetsService().start({ - http: core.http, - }).client; + const { discoverServices, service } = controller; + const pluginsWithOverrides = { + ...plugins, + ...discoverServices, + }; + const { data, dataViews, discover, navigation, unifiedSearch } = pluginsWithOverrides; - const logExplorerProfileStateService = initializeLogExplorerProfileStateService({ - datasetsClient, - stateContainer, - toasts: core.notifications.toasts, - }); + service.send('RECEIVED_STATE_CONTAINER', { discoverStateContainer: stateContainer }); /** * Wait for the machine to be fully initialized to set the restored selection * create the DataView and set it in the stateContainer from Discover */ - await waitForState(logExplorerProfileStateService, 'initialized'); - - /** - * Subscribe the state$ BehaviorSubject when the consumer app wants to react to state changes. - * It emits a combined state of: - * - log explorer state machine context - * - appState from the discover stateContainer - */ - let stateSubscription: Subscription; - if (state$) { - stateSubscription = createStateUpdater({ - logExplorerProfileStateService, - stateContainer, - }).subscribe(state$); - } + await waitFor(service, (state) => state.matches('initialized'), { timeout: 30000 }); /** * Replace the DataViewPicker with a custom `DatasetSelector` to pick integrations streams @@ -87,20 +62,22 @@ export const createLogExplorerProfileCustomizations = return ( ); }, PrependFilterBar: () => ( - + ), + CustomSearchBar: createCustomSearchBar({ + data, + navigation, + unifiedSearch, + }), }); /** @@ -143,32 +120,13 @@ export const createLogExplorerProfileCustomizations = return ( - + - + ); }, }); - return () => { - if (stateSubscription) { - stateSubscription.unsubscribe(); - } - }; + return () => {}; }; - -const createStateUpdater = ({ - logExplorerProfileStateService, - stateContainer, -}: { - logExplorerProfileStateService: LogExplorerProfileStateService; - stateContainer: DiscoverStateContainer; -}) => { - return combineLatest([from(logExplorerProfileStateService), stateContainer.appState.state$]).pipe( - map(([logExplorerState, appState]) => ({ - logExplorerState: logExplorerState.context, - appState, - })) - ); -}; diff --git a/x-pack/plugins/log_explorer/public/hooks/use_control_panels.tsx b/x-pack/plugins/log_explorer/public/hooks/use_control_panels.tsx index c10cddabbe0b1..f38b902aaa045 100644 --- a/x-pack/plugins/log_explorer/public/hooks/use_control_panels.tsx +++ b/x-pack/plugins/log_explorer/public/hooks/use_control_panels.tsx @@ -13,16 +13,16 @@ import { Query, TimeRange } from '@kbn/es-query'; import { useQuerySubscriber } from '@kbn/unified-field-list'; import { useSelector } from '@xstate/react'; import { useCallback } from 'react'; -import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; +import { LogExplorerControllerStateService } from '../state_machines/log_explorer_controller'; export const useControlPanels = ( - logExplorerProfileStateService: LogExplorerProfileStateService, + logExplorerControllerStateService: LogExplorerControllerStateService, data: DataPublicPluginStart ) => { const { query, filters, fromDate, toDate } = useQuerySubscriber({ data }); const timeRange: TimeRange = { from: fromDate!, to: toDate! }; - const controlPanels = useSelector(logExplorerProfileStateService, (state) => { + const controlPanels = useSelector(logExplorerControllerStateService, (state) => { if (!('controlPanels' in state.context)) return; return state.context.controlPanels; }); @@ -45,12 +45,12 @@ export const useControlPanels = ( const setControlGroupAPI = useCallback( (controlGroupAPI: ControlGroupAPI) => { - logExplorerProfileStateService.send({ + logExplorerControllerStateService.send({ type: 'INITIALIZE_CONTROL_GROUP_API', controlGroupAPI, }); }, - [logExplorerProfileStateService] + [logExplorerControllerStateService] ); return { getInitialInput, setControlGroupAPI, query, filters, timeRange }; diff --git a/x-pack/plugins/log_explorer/public/hooks/use_dataset_selection.ts b/x-pack/plugins/log_explorer/public/hooks/use_dataset_selection.ts index 6bff4055f3635..1f611da05c8cc 100644 --- a/x-pack/plugins/log_explorer/public/hooks/use_dataset_selection.ts +++ b/x-pack/plugins/log_explorer/public/hooks/use_dataset_selection.ts @@ -8,20 +8,20 @@ import { useSelector } from '@xstate/react'; import { useCallback } from 'react'; import { DatasetSelectionChange } from '../../common/dataset_selection'; -import { LogExplorerProfileStateService } from '../state_machines/log_explorer_profile'; +import { LogExplorerControllerStateService } from '../state_machines/log_explorer_controller'; export const useDatasetSelection = ( - logExplorerProfileStateService: LogExplorerProfileStateService + logExplorerControllerStateService: LogExplorerControllerStateService ) => { - const datasetSelection = useSelector(logExplorerProfileStateService, (state) => { + const datasetSelection = useSelector(logExplorerControllerStateService, (state) => { return state.context.datasetSelection; }); const handleDatasetSelectionChange: DatasetSelectionChange = useCallback( (data) => { - logExplorerProfileStateService.send({ type: 'UPDATE_DATASET_SELECTION', data }); + logExplorerControllerStateService.send({ type: 'UPDATE_DATASET_SELECTION', data }); }, - [logExplorerProfileStateService] + [logExplorerControllerStateService] ); return { datasetSelection, handleDatasetSelectionChange }; diff --git a/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts b/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts deleted file mode 100644 index 0557e17761cb4..0000000000000 --- a/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts +++ /dev/null @@ -1,17 +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 createContainer from 'constate'; -import { LogExplorerCustomizations } from '../components/log_explorer/types'; - -interface UseLogExplorerCustomizationsDeps { - value: LogExplorerCustomizations; -} - -const useLogExplorerCustomizations = ({ value }: UseLogExplorerCustomizationsDeps) => value; - -export const [LogExplorerCustomizationsProvider, useLogExplorerCustomizationsContext] = - createContainer(useLogExplorerCustomizations); diff --git a/x-pack/plugins/log_explorer/public/index.ts b/x-pack/plugins/log_explorer/public/index.ts index 1ca7f37aa4c9b..005b5cca07a14 100644 --- a/x-pack/plugins/log_explorer/public/index.ts +++ b/x-pack/plugins/log_explorer/public/index.ts @@ -8,12 +8,20 @@ import type { PluginInitializerContext } from '@kbn/core/public'; import type { LogExplorerConfig } from '../common/plugin_config'; import { LogExplorerPlugin } from './plugin'; -export type { LogExplorerPluginSetup, LogExplorerPluginStart } from './types'; -export type { LogExplorerStateContainer } from './components/log_explorer'; export type { + CreateLogExplorerController, + LogExplorerController, LogExplorerCustomizations, LogExplorerFlyoutContentProps, -} from './components/log_explorer/types'; + LogExplorerPublicState, + LogExplorerPublicStateUpdate, +} from './controller'; +export type { LogExplorerControllerContext } from './state_machines/log_explorer_controller'; +export type { LogExplorerPluginSetup, LogExplorerPluginStart } from './types'; +export { + getDiscoverColumnsFromDisplayOptions, + getDiscoverGridFromDisplayOptions, +} from './utils/convert_discover_app_state'; export function plugin(context: PluginInitializerContext) { return new LogExplorerPlugin(context); diff --git a/x-pack/plugins/log_explorer/public/plugin.ts b/x-pack/plugins/log_explorer/public/plugin.ts index 3c637b6b06caf..8c527c28fb8b2 100644 --- a/x-pack/plugins/log_explorer/public/plugin.ts +++ b/x-pack/plugins/log_explorer/public/plugin.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; +import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; import { DISCOVER_APP_LOCATOR, DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; import { LogExplorerLocatorDefinition, LogExplorerLocators } from '../common/locators'; import { createLogExplorer } from './components/log_explorer'; -import { +import { createLogExplorerControllerLazyFactory } from './controller/lazy_create_controller'; +import type { LogExplorerPluginSetup, LogExplorerPluginStart, LogExplorerSetupDeps, @@ -48,8 +49,14 @@ export class LogExplorerPlugin implements Plugin => + async (context) => { + if (!('discoverStateContainer' in context)) return; + return context.controlPanels + ? constructControlPanelsWithDataViewId(context.discoverStateContainer, context.controlPanels) + : undefined; + }; + +export const subscribeControlGroup = + (): InvokeCreator => + (context) => + (send) => { + if (!('controlGroupAPI' in context)) return; + if (!('discoverStateContainer' in context)) return; + const { discoverStateContainer } = context; + + const filtersSubscription = context.controlGroupAPI.onFiltersPublished$.subscribe( + (newFilters) => { + discoverStateContainer.internalState.transitions.setCustomFilters(newFilters); + discoverStateContainer.actions.fetchData(); + } + ); + + const inputSubscription = context.controlGroupAPI.getInput$().subscribe(({ panels }) => { + if (!deepEqual(panels, context.controlPanels)) { + send({ type: 'UPDATE_CONTROL_PANELS', controlPanels: panels }); + } + }); + + return () => { + filtersSubscription.unsubscribe(); + inputSubscription.unsubscribe(); + }; + }; + +export const updateControlPanels = + (): InvokeCreator => + async (context, event) => { + if (!('controlGroupAPI' in context)) return; + if (!('discoverStateContainer' in context)) return; + const { discoverStateContainer } = context; + + const newControlPanels = + ('controlPanels' in event && event.controlPanels) || context.controlPanels; + + if (!newControlPanels) return undefined; + + const controlPanelsWithId = constructControlPanelsWithDataViewId( + discoverStateContainer, + newControlPanels! + ); + + context.controlGroupAPI.updateInput({ panels: controlPanelsWithId }); + + return controlPanelsWithId; + }; + +const constructControlPanelsWithDataViewId = ( + stateContainer: DiscoverStateContainer, + newControlPanels: ControlPanels +) => { + const dataView = stateContainer.internalState.getState().dataView!; + + const validatedControlPanels = isValidState(newControlPanels) + ? newControlPanels + : getVisibleControlPanelsConfig(dataView); + + const controlsPanelsWithId = mergeDefaultPanelsWithControlPanels( + dataView, + validatedControlPanels! + ); + + return controlsPanelsWithId; +}; + +const isValidState = (state: ControlPanels | undefined | null): boolean => { + return Object.keys(state ?? {}).length > 0 && ControlPanelRT.is(state); +}; + +const getVisibleControlPanels = (dataView: DataView | undefined) => + availableControlPanelFields.filter( + (panelKey) => dataView?.fields.getByName(panelKey) !== undefined + ); + +export const getVisibleControlPanelsConfig = (dataView?: DataView) => { + return getVisibleControlPanels(dataView).reduce((panelsMap, panelKey) => { + const config = controlPanelConfigs[panelKey]; + + return { ...panelsMap, [panelKey]: config }; + }, {} as ControlPanels); +}; + +const addDataViewIdToControlPanels = (controlPanels: ControlPanels, dataViewId: string = '') => { + return mapValues(controlPanels, (controlPanelConfig) => ({ + ...controlPanelConfig, + explicitInput: { ...controlPanelConfig.explicitInput, dataViewId }, + })); +}; + +const mergeDefaultPanelsWithControlPanels = (dataView: DataView, urlPanels: ControlPanels) => { + // Get default panel configs from existing fields in data view + const visiblePanels = getVisibleControlPanelsConfig(dataView); + + // Get list of panel which can be overridden to avoid merging additional config from url + const existingKeys = Object.keys(visiblePanels); + const controlPanelsToOverride = pick(urlPanels, existingKeys); + + // Merge default and existing configs and add dataView.id to each of them + return addDataViewIdToControlPanels( + { ...visiblePanels, ...controlPanelsToOverride }, + dataView.id + ); +}; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/data_view_service.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/data_view_service.ts similarity index 64% rename from x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/data_view_service.ts rename to x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/data_view_service.ts index fa2b2992ee76b..76ac9c0c82f23 100644 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/data_view_service.ts +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/data_view_service.ts @@ -5,23 +5,15 @@ * 2.0. */ -import { DiscoverStateContainer } from '@kbn/discover-plugin/public'; import { InvokeCreator } from 'xstate'; -import { LogExplorerProfileContext, LogExplorerProfileEvent } from './types'; - -interface LogExplorerProfileDataViewStateDependencies { - stateContainer: DiscoverStateContainer; -} +import { LogExplorerControllerContext, LogExplorerControllerEvent } from '../types'; export const createAndSetDataView = - ({ - stateContainer, - }: LogExplorerProfileDataViewStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => + (): InvokeCreator => async (context) => { - const dataView = await stateContainer.actions.createAndAppendAdHocDataView( + if (!('discoverStateContainer' in context)) return; + const { discoverStateContainer } = context; + const dataView = await discoverStateContainer.actions.createAndAppendAdHocDataView( context.datasetSelection.toDataviewSpec() ); /** @@ -32,5 +24,5 @@ export const createAndSetDataView = * to the existing one or the default logs-*. * We set explicitly the data view here to be used when restoring the data view on the initial load. */ - stateContainer.actions.setDataView(dataView); + discoverStateContainer.actions.setDataView(dataView); }; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/discover_service.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/discover_service.ts new file mode 100644 index 0000000000000..512523c24c8f7 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/discover_service.ts @@ -0,0 +1,83 @@ +/* + * 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 { ActionFunction, actions, InvokeCallback } from 'xstate'; +import { + getChartDisplayOptionsFromDiscoverAppState, + getDiscoverAppStateFromContext, + getGridColumnDisplayOptionsFromDiscoverAppState, + getGridRowsDisplayOptionsFromDiscoverAppState, + getQueryStateFromDiscoverAppState, +} from '../../../../utils/convert_discover_app_state'; +import { LogExplorerControllerContext, LogExplorerControllerEvent } from '../types'; + +export const subscribeToDiscoverState = + () => + ( + context: LogExplorerControllerContext + ): InvokeCallback => + (send, onEvent) => { + if (!('discoverStateContainer' in context)) { + throw new Error('Failed to subscribe to the Discover state: no state container in context.'); + } + + const { appState } = context.discoverStateContainer; + + const subscription = appState.state$.subscribe({ + next: (newAppState) => { + if (isEmpty(newAppState)) { + return; + } + + send({ + type: 'RECEIVE_DISCOVER_APP_STATE', + appState: newAppState, + }); + }, + }); + + return () => { + subscription.unsubscribe(); + }; + }; + +export const updateContextFromDiscoverAppState = actions.assign< + LogExplorerControllerContext, + LogExplorerControllerEvent +>((context, event) => { + if ('appState' in event && event.type === 'RECEIVE_DISCOVER_APP_STATE') { + return { + chart: { + ...context.chart, + ...getChartDisplayOptionsFromDiscoverAppState(event.appState), + }, + grid: { + columns: + getGridColumnDisplayOptionsFromDiscoverAppState(event.appState) ?? context.grid.columns, + rows: { + ...context.grid.rows, + ...getGridRowsDisplayOptionsFromDiscoverAppState(event.appState), + }, + }, + ...getQueryStateFromDiscoverAppState(event.appState), + }; + } + + return {}; +}); + +export const updateDiscoverAppStateFromContext: ActionFunction< + LogExplorerControllerContext, + LogExplorerControllerEvent +> = (context, _event) => { + if (!('discoverStateContainer' in context)) { + return; + } + + context.discoverStateContainer.appState.update(getDiscoverAppStateFromContext(context)); +}; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/selection_service.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/selection_service.ts similarity index 79% rename from x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/selection_service.ts rename to x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/selection_service.ts index 6de3d24025802..a5aeac069fc32 100644 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/selection_service.ts +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/selection_service.ts @@ -6,21 +6,21 @@ */ import { InvokeCreator } from 'xstate'; -import { Dataset } from '../../../../common/datasets'; -import { SingleDatasetSelection } from '../../../../common/dataset_selection'; -import { IDatasetsClient } from '../../../services/datasets'; -import { LogExplorerProfileContext, LogExplorerProfileEvent } from './types'; +import { Dataset } from '../../../../../common/datasets'; +import { SingleDatasetSelection } from '../../../../../common/dataset_selection'; +import { IDatasetsClient } from '../../../../services/datasets'; +import { LogExplorerControllerContext, LogExplorerControllerEvent } from '../types'; -interface LogExplorerProfileUrlStateDependencies { +interface LogExplorerControllerUrlStateDependencies { datasetsClient: IDatasetsClient; } export const validateSelection = ({ datasetsClient, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent + }: LogExplorerControllerUrlStateDependencies): InvokeCreator< + LogExplorerControllerContext, + LogExplorerControllerEvent > => (context) => async (send) => { diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/timefilter_service.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/timefilter_service.ts new file mode 100644 index 0000000000000..124a6778493b0 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/services/timefilter_service.ts @@ -0,0 +1,68 @@ +/* + * 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 { QueryStart } from '@kbn/data-plugin/public'; +import { map, merge, Observable } from 'rxjs'; +import { ActionFunction, actions } from 'xstate'; +import type { LogExplorerControllerContext, LogExplorerControllerEvent } from '../types'; + +export const subscribeToTimefilterService = + (query: QueryStart) => (): Observable => { + const { + timefilter: { timefilter }, + } = query; + + const time$ = timefilter.getTimeUpdate$().pipe( + map( + (): LogExplorerControllerEvent => ({ + type: 'RECEIVE_TIMEFILTER_TIME', + time: timefilter.getTime(), + }) + ) + ); + + const refreshInterval$ = timefilter.getRefreshIntervalUpdate$().pipe( + map( + (): LogExplorerControllerEvent => ({ + type: 'RECEIVE_TIMEFILTER_REFRESH_INTERVAL', + refreshInterval: timefilter.getRefreshInterval(), + }) + ) + ); + + return merge(time$, refreshInterval$); + }; + +export const updateContextFromTimefilter = actions.assign< + LogExplorerControllerContext, + LogExplorerControllerEvent +>((context, event) => { + if (event.type === 'RECEIVE_TIMEFILTER_TIME' && 'time' in event) { + return { + time: event.time, + }; + } + + if (event.type === 'RECEIVE_TIMEFILTER_REFRESH_INTERVAL' && 'refreshInterval' in event) { + return { + refreshInterval: event.refreshInterval, + }; + } + + return {}; +}); + +export const updateTimefilterFromContext = + (query: QueryStart): ActionFunction => + (context, _event) => { + if (context.time != null) { + query.timefilter.timefilter.setTime(context.time); + } + if (context.refreshInterval != null) { + query.timefilter.timefilter.setRefreshInterval(context.refreshInterval); + } + }; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/state_machine.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/state_machine.ts new file mode 100644 index 0000000000000..ef9c87ee7ae14 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/state_machine.ts @@ -0,0 +1,298 @@ +/* + * 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 { IToasts } from '@kbn/core/public'; +import { QueryStart } from '@kbn/data-plugin/public'; +import { actions, createMachine, interpret, InterpreterFrom, raise } from 'xstate'; +import { ControlPanelRT } from '../../../../common/control_panels'; +import { isDatasetSelection } from '../../../../common/dataset_selection'; +import { IDatasetsClient } from '../../../services/datasets'; +import { DEFAULT_CONTEXT } from './defaults'; +import { + createCreateDataViewFailedNotifier, + createDatasetSelectionRestoreFailedNotifier, +} from './notifications'; +import { + initializeControlPanels, + subscribeControlGroup, + updateControlPanels, +} from './services/control_panels'; +import { createAndSetDataView } from './services/data_view_service'; +import { + subscribeToDiscoverState, + updateContextFromDiscoverAppState, + updateDiscoverAppStateFromContext, +} from './services/discover_service'; +import { validateSelection } from './services/selection_service'; +import { + subscribeToTimefilterService, + updateContextFromTimefilter, + updateTimefilterFromContext, +} from './services/timefilter_service'; +import { + LogExplorerControllerContext, + LogExplorerControllerEvent, + LogExplorerControllerTypeState, +} from './types'; + +export const createPureLogExplorerControllerStateMachine = ( + initialContext: LogExplorerControllerContext +) => + /** @xstate-layout N4IgpgJg5mDOIC5QBkD2UCiAPADgG1QCcxCBhVAOwBdDU88SA6AVwoEt2q2BDPNgL0gBiAEoZSGAJIA1DABEA+gGUAKgEEVGBaQDyAOXWS9GEQG0ADAF1EoHKlhsulGyCyIAtACYAbIwDsAIzmAJwAzH4ArAA0IACeiJ5+AByMwZ6hnokALD6e5kneAL6FMWiYuATEZJQ0dAyEjByOPHz8HFBy3FTc0mxgAO5CEJRgjRQAbqgA1qNl2PhEJOTUtPRMTVy8Au2d3b0DCByTAMZdbJQWlpcudg5OFC5uCAGejObentFxiBHBwYyeLIBX5JfLeX7BCLFUroeaVJY1Vb1MbNLZtCgdLo9PqDEi0Br4LoAMyIAFtGHMKotqis6utOC1thjdtiDkdUKd7pdrkgQLdms5eU9sowAqEkn8IuLIUDvN4YvEEFksqE3hFQaEglkperPNCQJSFlVlrU1g0Noz0VATasAArcChgPCwIYjMaTGYU2FU42Iunmhlo9o2uj2x3Ow4TDlnC5WHm2ewCh5Cjy+YLeJJ+cGfTMS96fBWIJJJAKMULa8wZbzmPyfbxZfWG+E003Ii1BjEhvBhp0uvFERiEqgkwjkpvUrttwOtYN+7sO3uRk4xijcqw3RP3R4JPyqgJZDM14sygJywsIXf-TV+LLBEIFXc5Rveo0I2lmlGbVrCMQSGRaORJCUXRZBEBQ1FtW1lHUTR4z5TdzmTUBhVCdNRX3QEQmSbUknPCJAn8IJawiTxgm1dIoRKA0X2bSd6VRb8IFEcQpFkBQAEUAFUTAATWgjQMDg-ktxTBBMIiRhiyzcUpSzSJz0fRhvACPws0rEsIgietn3KV8WyReivwESBGAgLFYDAKglCdMBjnuRhxi2MyuAxayGDsxChGQIDND0BQVB0bQAAk1D0ABxDAlCEhDBWQxAyN8W8wkCJIfDSIFzzlLJ0KyfIwmVAIklCUIdLhCc5ynBjjIgUzzMstzbPsxy+Gc9oGo8yghE4205AEhRevUJQMBUZQMGQcQVEkfRoruRDtwQB9RXBVCIn3cwQnBc8S1VcEVQ0yIPgCAJSp9N9W0My0TOc7gLKsmyOooBynLOVz7vuIQBrUIaRqG8bSEm-QFDEVQdDEBQADE1EkZBOLEGak3m8FS1COUAmCNS5Wvc80hSYtPFS4rvDvJJNJOvS6IDKrBBq67bva+y2AgBgup6vrPu+0a-oBvR4ZEuLnh8FJCaK6t8drcstrFJSIj24EDs8I6ydoiqLrRK66ru9yGaZsAPo0L7hs5iapr84GArByHodhwT115YS5tE4FwUYFUifMdJlQid2sklnaZfFOWtIV46qPHX130qozqdq7o6bexCWBwVrmSxfZBmGR13WmWYaPKiPVcYmObvq+PKET5PMT2HEl2jLk41thNZti1xEEK4qlKBPIUfVHJQmxtCIVS9MvewopQ9z8PzspqP1djkutYT5gk5eyvWVxQh8UHPBiTJL1dOV-Pp8ummNfpxfl5c1e05rzlELXaw7ZipCW+edMUi9kIwh77xNXPIJITeGkfKy0ayniVnnKen5j6MGOHOMKtAl6wBYOwac1UhBGEkJNNQ3kABaWhdAGBEDoZACgwpEO6uBW0kheYO35nmAEgI0afGVAHXC3xnjlgkrlSUwQmHuzHjCfeECDJHzVjVWB754GoEQY0HWet1AKGkJIDAAB1BQ3UBryBoc3J4LwDwAk1Ojcih5wh-ylNlIqljEj4wopRQRZVJ4iKgWImBcCEE4CQYzZmGi+oEJUEQkhtpQpjSig3eCTdn66JRn4VImRqx+DCLwzIAQzFkRdvuDMqk-D5FvHY6iQjHH+mcYXCRpopEyKXhXLsPZnSukzuyT0YczpOPbCUtx0iPHlxXtUhcEZ2S31jFcMJ9sdGt3RuYN4GRAShG-r-dhKkMzSzvFpXcRNEgh3sadfSRTWnVVcZI9xSDKndLnDUvsG8BxDhHGOCezSdmoOjqU1Y5TOnHMvj08MsAb4rnvhuCJ80VJpKSNqLIoJ+FpBvH-QIEl1rlhJumImaRKJUQoKgCAcAXBNO2WaP5CNRLuBvIREI4QviKgSf4CUwQSYkQPOkMi4DCkflYLs6muK+YvxyH-bwMT8Z-D5fyv4Aj8kOLuR+FlOxU44jZbQl+7hSye01AWdhyoJnYV+DM7UMzUoMtFZHS0s53xnOlaMhAXgJlZCzEHJK-KCgKX3GWFSt57zcvLHqceBTdUF2qsayJPwSKpA+JWBWvwgTanPKhV4CteEkTlCEHIwQdXYr1S42m89GoypGb6hA1ZVQo2UujasmMVJ4QIoENIGZgS5MSImimxS9mps1umsuzVGYrzPs3TN81Ah7hybC3aeQ-CZV+ACJhqUf5BoKDWlWojC4NvbY9LxYAfUAu1DyksCSSb1nMAeNhioso5TyuWIERUSrupFUmr10c52l0em8iVVcBjLsdqeGJwJULig3WRIq-dspVgjcCI8B4p2HzrY89piCn382rBM9MXdg1kX3KS1unxX0oyBO+9U6M8lYtrSykyTy6AvKOSgqmkBIMv3rCkWDQbgQIbDfMlGKQxTZlPGkfhwHIF4fEeBzpi7yO6KlP8UiylbzZLyPjP+R6lLdwVms9jZ6tm4YefhnjRyL4GtNEax+-zHZYQBH8EInxNLrsHfMt2bxKygt+HKP4nxijFCAA */ + createMachine< + LogExplorerControllerContext, + LogExplorerControllerEvent, + LogExplorerControllerTypeState + >( + { + context: initialContext, + predictableActionArguments: true, + id: 'LogExplorerController', + initial: 'uninitialized', + states: { + uninitialized: { + on: { + RECEIVED_STATE_CONTAINER: { + target: 'initializingDataView', + actions: ['storeDiscoverStateContainer'], + }, + }, + }, + initializingDataView: { + invoke: { + src: 'createDataView', + onDone: { + target: 'initializingControlPanels', + actions: ['updateDiscoverAppStateFromContext', 'updateTimefilterFromContext'], + }, + onError: { + target: 'initialized', + actions: [ + 'notifyCreateDataViewFailed', + 'updateDiscoverAppStateFromContext', + 'updateTimefilterFromContext', + ], + }, + }, + }, + initializingControlPanels: { + invoke: { + src: 'initializeControlPanels', + onDone: { + target: 'initialized', + actions: ['storeControlPanels'], + }, + onError: { + target: 'initialized', + }, + }, + }, + initialized: { + type: 'parallel', + invoke: [ + { + src: 'discoverStateService', + id: 'discoverStateService', + }, + { + src: 'timefilterService', + id: 'timefilterService', + }, + ], + states: { + datasetSelection: { + initial: 'validatingSelection', + states: { + validatingSelection: { + invoke: { + src: 'validateSelection', + }, + on: { + LISTEN_TO_CHANGES: { + target: 'idle', + }, + UPDATE_DATASET_SELECTION: { + target: 'updatingDataView', + actions: ['storeDatasetSelection'], + }, + DATASET_SELECTION_RESTORE_FAILURE: { + target: 'updatingDataView', + actions: ['notifyDatasetSelectionRestoreFailed'], + }, + }, + }, + idle: { + on: { + UPDATE_DATASET_SELECTION: { + target: 'updatingDataView', + actions: ['storeDatasetSelection'], + }, + DATASET_SELECTION_RESTORE_FAILURE: { + target: 'updatingDataView', + actions: ['notifyDatasetSelectionRestoreFailed'], + }, + }, + }, + updatingDataView: { + invoke: { + src: 'createDataView', + onDone: { + target: 'idle', + actions: ['notifyDataViewUpdate'], + }, + onError: { + target: 'idle', + actions: ['notifyCreateDataViewFailed'], + }, + }, + }, + }, + }, + controlGroups: { + initial: 'uninitialized', + states: { + uninitialized: { + on: { + INITIALIZE_CONTROL_GROUP_API: { + target: 'idle', + cond: 'controlGroupAPIExists', + actions: ['storeControlGroupAPI'], + }, + }, + }, + idle: { + invoke: { + src: 'subscribeControlGroup', + }, + on: { + DATA_VIEW_UPDATED: { + target: 'updatingControlPanels', + }, + UPDATE_CONTROL_PANELS: { + target: 'updatingControlPanels', + }, + }, + }, + updatingControlPanels: { + invoke: { + src: 'updateControlPanels', + onDone: { + target: 'idle', + actions: ['storeControlPanels'], + }, + onError: { + target: 'idle', + }, + }, + }, + }, + }, + }, + on: { + RECEIVE_DISCOVER_APP_STATE: { + actions: ['updateContextFromDiscoverAppState'], + }, + RECEIVE_QUERY_STATE: { + actions: ['updateQueryStateFromQueryServiceState'], + }, + RECEIVE_TIMEFILTER_TIME: { + actions: ['updateContextFromTimefilter'], + }, + RECEIVE_TIMEFILTER_REFRESH_INTERVAL: { + actions: ['updateContextFromTimefilter'], + }, + }, + }, + }, + }, + { + actions: { + storeDatasetSelection: actions.assign((_context, event) => + 'data' in event && isDatasetSelection(event.data) + ? { + datasetSelection: event.data, + } + : {} + ), + storeDiscoverStateContainer: actions.assign((_context, event) => + 'discoverStateContainer' in event + ? { + discoverStateContainer: event.discoverStateContainer, + } + : {} + ), + storeControlGroupAPI: actions.assign((_context, event) => + 'controlGroupAPI' in event + ? { + controlGroupAPI: event.controlGroupAPI, + } + : {} + ), + storeControlPanels: actions.assign((_context, event) => + 'data' in event && ControlPanelRT.is(event.data) + ? { + controlPanels: event.data, + } + : {} + ), + notifyDataViewUpdate: raise('DATA_VIEW_UPDATED'), + updateContextFromDiscoverAppState, + updateDiscoverAppStateFromContext, + updateContextFromTimefilter, + }, + guards: { + controlGroupAPIExists: (_context, event) => { + return 'controlGroupAPI' in event && event.controlGroupAPI != null; + }, + }, + } + ); + +export interface LogExplorerControllerStateMachineDependencies { + datasetsClient: IDatasetsClient; + initialContext?: LogExplorerControllerContext; + query: QueryStart; + toasts: IToasts; +} + +export const createLogExplorerControllerStateMachine = ({ + datasetsClient, + initialContext = DEFAULT_CONTEXT, + query, + toasts, +}: LogExplorerControllerStateMachineDependencies) => + createPureLogExplorerControllerStateMachine(initialContext).withConfig({ + actions: { + notifyCreateDataViewFailed: createCreateDataViewFailedNotifier(toasts), + notifyDatasetSelectionRestoreFailed: createDatasetSelectionRestoreFailedNotifier(toasts), + updateTimefilterFromContext: updateTimefilterFromContext(query), + }, + services: { + createDataView: createAndSetDataView(), + initializeControlPanels: initializeControlPanels(), + subscribeControlGroup: subscribeControlGroup(), + updateControlPanels: updateControlPanels(), + validateSelection: validateSelection({ datasetsClient }), + discoverStateService: subscribeToDiscoverState(), + timefilterService: subscribeToTimefilterService(query), + }, + }); + +export const initializeLogExplorerControllerStateService = ( + deps: LogExplorerControllerStateMachineDependencies +) => { + const machine = createLogExplorerControllerStateMachine(deps); + return interpret(machine).start(); +}; + +export type LogExplorerControllerStateService = InterpreterFrom< + typeof createLogExplorerControllerStateMachine +>; + +export type LogExplorerControllerStateMachine = ReturnType< + typeof createLogExplorerControllerStateMachine +>; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/types.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/types.ts new file mode 100644 index 0000000000000..73d87913a8150 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_controller/src/types.ts @@ -0,0 +1,166 @@ +/* + * 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 { ControlGroupAPI } from '@kbn/controls-plugin/public'; +import { QueryState, RefreshInterval, TimeRange } from '@kbn/data-plugin/common'; +import { DiscoverAppState, DiscoverStateContainer } from '@kbn/discover-plugin/public'; +import { DoneInvokeEvent } from 'xstate'; +import { ControlPanels, DisplayOptions } from '../../../../common'; +import type { DatasetEncodingError, DatasetSelection } from '../../../../common/dataset_selection'; + +export interface WithDatasetSelection { + datasetSelection: DatasetSelection; +} + +export interface WithControlPanelGroupAPI { + controlGroupAPI: ControlGroupAPI; +} + +export interface WithControlPanels { + controlPanels?: ControlPanels; +} + +export type WithQueryState = QueryState; + +export type WithDisplayOptions = DisplayOptions; + +export interface WithDiscoverStateContainer { + discoverStateContainer: DiscoverStateContainer; +} + +export type DefaultLogExplorerControllerState = WithDatasetSelection & + WithQueryState & + WithDisplayOptions; + +export type LogExplorerControllerTypeState = + | { + value: 'uninitialized'; + context: WithDatasetSelection & WithControlPanels & WithQueryState & WithDisplayOptions; + } + | { + value: 'initializingDataView'; + context: WithDatasetSelection & WithControlPanels & WithQueryState & WithDisplayOptions; + } + | { + value: 'initializingControlPanels'; + context: WithDatasetSelection & WithControlPanels & WithQueryState & WithDisplayOptions; + } + | { + value: 'initializingStateContainer'; + context: WithDatasetSelection & WithControlPanels & WithQueryState & WithDisplayOptions; + } + | { + value: 'initialized'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.datasetSelection.validatingSelection'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.datasetSelection.idle'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.datasetSelection.updatingDataView'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.datasetSelection.updatingStateContainer'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.controlGroups.uninitialized'; + context: WithDatasetSelection & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.controlGroups.idle'; + context: WithDatasetSelection & + WithControlPanelGroupAPI & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + } + | { + value: 'initialized.controlGroups.updatingControlPanels'; + context: WithDatasetSelection & + WithControlPanelGroupAPI & + WithControlPanels & + WithQueryState & + WithDisplayOptions & + WithDiscoverStateContainer; + }; + +export type LogExplorerControllerContext = LogExplorerControllerTypeState['context']; + +export type LogExplorerControllerStateValue = LogExplorerControllerTypeState['value']; + +export type LogExplorerControllerEvent = + | { + type: 'RECEIVED_STATE_CONTAINER'; + discoverStateContainer: DiscoverStateContainer; + } + | { + type: 'LISTEN_TO_CHANGES'; + } + | { + type: 'UPDATE_DATASET_SELECTION'; + data: DatasetSelection; + } + | { + type: 'DATASET_SELECTION_RESTORE_FAILURE'; + } + | { + type: 'INITIALIZE_CONTROL_GROUP_API'; + controlGroupAPI: ControlGroupAPI | undefined; + } + | { + type: 'UPDATE_CONTROL_PANELS'; + controlPanels: ControlPanels | null; + } + | { + type: 'RECEIVE_DISCOVER_APP_STATE'; + appState: DiscoverAppState; + } + | { + type: 'RECEIVE_TIMEFILTER_TIME'; + time: TimeRange; + } + | { + type: 'RECEIVE_TIMEFILTER_REFRESH_INTERVAL'; + refreshInterval: RefreshInterval; + } + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/state_machine.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/state_machine.ts deleted file mode 100644 index 4fa1673b5879d..0000000000000 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/state_machine.ts +++ /dev/null @@ -1,279 +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 { IToasts } from '@kbn/core/public'; -import { DiscoverStateContainer } from '@kbn/discover-plugin/public'; -import { actions, createMachine, interpret, InterpreterFrom, raise } from 'xstate'; -import { IDatasetsClient } from '../../../services/datasets'; -import { isDatasetSelection } from '../../../../common/dataset_selection'; -import { createAndSetDataView } from './data_view_service'; -import { validateSelection } from './selection_service'; -import { DEFAULT_CONTEXT } from './defaults'; -import { - createCreateDataViewFailedNotifier, - createDatasetSelectionRestoreFailedNotifier, -} from './notifications'; -import { - ControlPanelRT, - LogExplorerProfileContext, - LogExplorerProfileEvent, - LogExplorerProfileTypeState, -} from './types'; -import { - initializeControlPanels, - initializeFromUrl, - listenUrlChange, - subscribeControlGroup, - updateControlPanels, - updateStateContainer, -} from './url_state_storage_service'; - -export const createPureLogExplorerProfileStateMachine = ( - initialContext: LogExplorerProfileContext -) => - /** @xstate-layout N4IgpgJg5mDOIC5QBkD2UCiAPADgG1QCcxCAFQ1AMwEs8wA6AVwDtrWAXagQz2oC9IAYgDaABgC6iUDlSxqnVMykgsiAIwAOAMz0NagEwBWUdoBsWgOxaAnEYA0IAJ7rt9UxesWD+2xf2WAXwCHNExcAmIyCho6ejZ5bl4+NigAMQoAWwBVQjxBCEUGNgA3VABrBlDsfCIScipaIo5E-hT01GzchBLUAGMuBWYxcWHlGTlB5VUEYw1dfQ1RQ30LC0NrbX0HZwQ1CwAWemtDLTV991FTPWWtIJD0aoi66Ma45p5W5jTMnLySCkI9HwA0oRAy9Cq4VqUQasXinA+yS+7U6eG6zFK-UGw1GSBA4wSiimiFm80Wy1W60220QenoxlEjP2J32alEmmsdxAkJqkXqMSaCURKQAIgMuAA1ahgADu+UKb1KFQhDyhfJecPeSVF4qlsvRmIG1EUOIkY1khKUeOmPkM9D8pkMFm0bMpFhpM3Obi0tqdxk0Fi5PKeMIFbyF2q+YvYkulcv+RCBeBBYJVYV5z1hgoRkag0dj+p6WONQwkuOkFsm1sQtvt+kdztOojdHquonoah91h9WkWS1MQdVGdDr3hLSRUAAwop2BQ8KQuMwwHhYPKl4rypUhyH+aOtZ8pzO5wulyuDX0jSay2a8QSq6BphZTNZ6Po1O+jMy++YPScLEdLi0UwDG7Z9jkHdMdw1bNxxSadmFnVB50XZdVwTQFgXYUFCHBYNoV3TUIwPeDEOQ09YHPYsrxGG8KwmEtiQQJ8XzfD9DC-RkfycRB9msdt9kuBYNA0Dxlg0Adgm5bd8Og8McwPABlGN2DAEiuDYEg1yaJUt0gmSszk2CviUgZVJndSl0ISjL1LGjJFvSsGOrBAtC0Q4tFEc5DHE-YPI0XjTA9NRDCdI4rhEvR9HrEKIMefSwzHYVjOUsyEIszT0KTFMcLTOL1QMxLcxMlS1I0qyixs017Loy1GNc9zPMdHy-ICoLDDZehzg0Wx3z4vtbkkvD8oS-cBAgegIHFWAwHYBTlzAXpBnoYoPkmzhjPmxaS0EZAAEkFIAFQwAA5AB9A6AHlTsnAAJABBY6AHEMAU8t8UcolnOE-9fLWZ9NEsAwgtc9ttG6p0fQsQCNFitVMxGoixomqaZrmugtsUZbVqNDb0cGQQslIEU7qO07iYOu6FIwA7Tqp5AMEnA7dou463rvJyH1pETOssQx-u0Lwtm43Yzjtbz1jZGwDg2Ab7j04a90RyBkZjabZs2paVt4NaUjRhb8fJynqdpjB6cZ5mzoAJRey7rdO1I7t25AsmttmPqtTmEG+nm-usAHBba9rOp67trGffz-Nh4cCJgxFlbWrg1b1jHmDiCA6AJomSYwMmSaNmm6YZpmWbd+jPs9s5PFff19jWZsDH2IWdk7MP7UdUx-GbdxTGbKOoIK0b45R9W8ZLNOM8NqmC9NouLdO63Douu2Hadl2MFL2rnMr-8jHZWvjEFxvgcZehTn0fZIr48WYcG6SFcI+SkYTpONbHxgcB1qNdTjLSN2VIb4aK0fkPVWqNX6Y3fp-PM39CwYgvNia81V3plw9ioGsbI1CvnfJ5SwtdTB4OBmoF83k+KmHcCcNyN85Z5UAQ-ccIDE5gNHhAj+ONoExj1PGQgAIspYVTAAkcdC47jWfkw-Wb9WHrXYQWGU1kEF2XNCgxib52RYLZL9PBBDhadncPQEwfF-BXGWKIBYfd4pAPoSI4eyclqQLYcVVKMYyq-x6P-O+tDY5JAYS-Zhqc7FSIcaVSyciSxVUUZvT2KjMGsRwQcJ8Wjm7sUwdYEOlgnxOk5LfeWHjDLCJVowke4iWFQMCeZZxmVMLYVwu4wRnj+DeLESnJgkjdYpSCSQEJ1EN73jQQgFR+h6TnGsL5TQQlz5BWCnMEwEsTGeSipk6hcNam5K8eNXoR4kKPQoO-WATBWCDwgIIXax1dpMzuntAAWjnScLMDqWwusgU6j17mE1OndUgu1ukc16bYQ4ngyHuDDs2ICgVtFrB+syICfse5QxsGY++dSkbrIQnOLZqAdnjzAIIQ2p0JS7QwAAdVOoTcmGARRfPLr098T5T6+T4s6RYWhvIen0J5O0TLgpkPWN3FY8KcmFXqWsjZeA0UYuoOnLFJLs7XVufcx5pAHqm1erRZBESqWdh0EsWu-kiG1zWEFDQJxdAbHaqIYZVxnQSUWdHWSAqkXCtFTgXZ-i4LCpPKhFxcC3HZOWXa5WyLSKOudS0r4JFjwoTPBVeRFLUHTF+UcJ8ZCPAwpBUFPi7kNjnGlm+c1fLfUHPoAG1F2ynXNKgWGpC7qVyCAqcmPhOUBExxWYKwtDqS3BvLW6iNFEo2hMQeEnpcbz4JoBcm4FZC01V0NWoHuYd8F9SCJJZgqAIBwGUI26CA7vnTAALSgp2Duu0KTj0npPVFPNTaWB+ogFuyl0wj7aI0AMwFBxOx8ydG+C9trRptB+LkW9saazOmNf5aZ+CfTMjai+PYngjCdgOJ5bQX6B6Ix1BwuMAHGLuFbPg0+6xTV6EuMyK1UkfVNrta6lFlbu2YecsYAZjciGms8qyVlhhfxRQ7F2KW58Fh+2QwjR+rTTLtMILRz22HtHtRYhyN87gpZMoExY4R4nensR0E6PQz5WTsm+h6Tw7ZvIwuZBSZ8stSM0PzUrKxoDCkp1U9MCW9JnQzuGRgvT2ilhTMNSk8+axOz7CU0I1Z+SfFFNTlrcV9jwGoPZnexA5hiEue0+5kSx9-xgxScJXiWqFkWaWeRgtoi7NLXFXQBz6gjDPq8H7KkAkbDpd0DYfs6wTGdiC4ihpJWJFQPzJwiruwRIMf8rxXyzZmSdmPi+VyfFJawfEoYDrzan7WJi2W+xbSymWQG4Y0wnURvNYg0yiZ-ksHn20LxXsIUSMbpQ8AoVVGRXtoG05zTrmdOaDS9oshL5hkUL9D3KKVD8s2ru5Y1tj2g17OvQNtYcwZ2smy+Qp8WggrOnbCHYCLmNX6CW9eiHgb22YoG2cDqrJWR+Dwf6DQaaTG6GluJNy13nR44LUWzZROXWhq7eRAbiXnNabc7pr7zdDV7cQ+1CbthnyBkXUAA */ - createMachine( - { - context: initialContext, - predictableActionArguments: true, - id: 'LogExplorerProfile', - initial: 'uninitialized', - states: { - uninitialized: { - always: 'initializingFromUrl', - }, - initializingFromUrl: { - invoke: { - src: 'initializeFromUrl', - onDone: { - target: 'initializingDataView', - actions: ['storeDatasetSelection'], - }, - onError: { - target: 'initializingDataView', - actions: ['notifyDatasetSelectionRestoreFailed'], - }, - }, - }, - initializingDataView: { - invoke: { - src: 'createDataView', - onDone: { - target: 'initializingControlPanels', - }, - onError: { - target: 'initialized', - actions: ['notifyCreateDataViewFailed'], - }, - }, - }, - initializingControlPanels: { - invoke: { - src: 'initializeControlPanels', - onDone: { - target: 'initializingStateContainer', - actions: ['storeControlPanels'], - }, - onError: { - target: 'initializingStateContainer', - }, - }, - }, - initializingStateContainer: { - invoke: { - src: 'updateStateContainer', - onDone: { - target: 'initialized', - }, - onError: { - target: 'initialized', - }, - }, - }, - initialized: { - type: 'parallel', - states: { - datasetSelection: { - initial: 'validatingSelection', - states: { - validatingSelection: { - invoke: { - src: 'validateSelection', - }, - on: { - LISTEN_TO_CHANGES: { - target: 'idle', - }, - UPDATE_DATASET_SELECTION: { - target: 'updatingDataView', - actions: ['storeDatasetSelection'], - }, - DATASET_SELECTION_RESTORE_FAILURE: { - target: 'updatingDataView', - actions: ['notifyDatasetSelectionRestoreFailed'], - }, - }, - }, - idle: { - invoke: { - src: 'listenUrlChange', - }, - on: { - UPDATE_DATASET_SELECTION: { - target: 'updatingDataView', - actions: ['storeDatasetSelection'], - }, - DATASET_SELECTION_RESTORE_FAILURE: { - target: 'updatingDataView', - actions: ['notifyDatasetSelectionRestoreFailed'], - }, - }, - }, - updatingDataView: { - invoke: { - src: 'createDataView', - onDone: { - target: 'updatingStateContainer', - }, - onError: { - target: 'updatingStateContainer', - actions: ['notifyCreateDataViewFailed'], - }, - }, - }, - updatingStateContainer: { - invoke: { - src: 'updateStateContainer', - onDone: { - target: 'idle', - actions: ['notifyDataViewUpdate'], - }, - onError: { - target: 'idle', - actions: ['notifyCreateDataViewFailed'], - }, - }, - }, - }, - }, - controlGroups: { - initial: 'uninitialized', - states: { - uninitialized: { - on: { - INITIALIZE_CONTROL_GROUP_API: { - target: 'idle', - cond: 'controlGroupAPIExists', - actions: ['storeControlGroupAPI'], - }, - }, - }, - idle: { - invoke: { - src: 'subscribeControlGroup', - }, - on: { - DATA_VIEW_UPDATED: { - target: 'updatingControlPanels', - }, - UPDATE_CONTROL_PANELS: { - target: 'updatingControlPanels', - }, - }, - }, - updatingControlPanels: { - invoke: { - src: 'updateControlPanels', - onDone: { - target: 'idle', - actions: ['storeControlPanels'], - }, - onError: { - target: 'idle', - }, - }, - }, - }, - }, - }, - }, - }, - }, - { - actions: { - storeDatasetSelection: actions.assign((_context, event) => - 'data' in event && isDatasetSelection(event.data) - ? { - datasetSelection: event.data, - } - : {} - ), - storeControlGroupAPI: actions.assign((_context, event) => - 'controlGroupAPI' in event - ? { - controlGroupAPI: event.controlGroupAPI, - } - : {} - ), - storeControlPanels: actions.assign((_context, event) => - 'data' in event && ControlPanelRT.is(event.data) - ? { - controlPanels: event.data, - } - : {} - ), - notifyDataViewUpdate: raise('DATA_VIEW_UPDATED'), - }, - guards: { - controlGroupAPIExists: (_context, event) => { - return 'controlGroupAPI' in event && event.controlGroupAPI != null; - }, - }, - } - ); - -export interface LogExplorerProfileStateMachineDependencies { - initialContext?: LogExplorerProfileContext; - datasetsClient: IDatasetsClient; - stateContainer: DiscoverStateContainer; - toasts: IToasts; -} - -export const createLogExplorerProfileStateMachine = ({ - initialContext = DEFAULT_CONTEXT, - datasetsClient, - stateContainer, - toasts, -}: LogExplorerProfileStateMachineDependencies) => - createPureLogExplorerProfileStateMachine(initialContext).withConfig({ - actions: { - notifyCreateDataViewFailed: createCreateDataViewFailedNotifier(toasts), - notifyDatasetSelectionRestoreFailed: createDatasetSelectionRestoreFailedNotifier(toasts), - }, - services: { - createDataView: createAndSetDataView({ stateContainer }), - initializeFromUrl: initializeFromUrl({ stateContainer }), - initializeControlPanels: initializeControlPanels({ stateContainer }), - listenUrlChange: listenUrlChange({ stateContainer }), - subscribeControlGroup: subscribeControlGroup({ stateContainer }), - updateControlPanels: updateControlPanels({ stateContainer }), - updateStateContainer: updateStateContainer({ stateContainer }), - validateSelection: validateSelection({ datasetsClient }), - }, - }); - -export const initializeLogExplorerProfileStateService = ( - deps: LogExplorerProfileStateMachineDependencies -) => { - const machine = createLogExplorerProfileStateMachine(deps); - - return interpret(machine).start(); -}; - -export type LogExplorerProfileStateService = InterpreterFrom< - typeof createLogExplorerProfileStateMachine ->; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/types.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/types.ts deleted file mode 100644 index fe4323fac0cd4..0000000000000 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/types.ts +++ /dev/null @@ -1,128 +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 * as rt from 'io-ts'; -import { ControlGroupAPI } from '@kbn/controls-plugin/public'; -import { DoneInvokeEvent } from 'xstate'; -import type { DatasetEncodingError, DatasetSelection } from '../../../../common/dataset_selection'; - -export interface WithDatasetSelection { - datasetSelection: DatasetSelection; -} - -export interface WithControlPanelGroupAPI { - controlGroupAPI: ControlGroupAPI; -} - -export interface WithControlPanels { - controlPanels: ControlPanels; -} - -export type DefaultLogExplorerProfileState = WithDatasetSelection; - -export type LogExplorerProfileTypeState = - | { - value: 'uninitialized'; - context: WithDatasetSelection; - } - | { - value: 'initializingFromUrl'; - context: WithDatasetSelection; - } - | { - value: 'initializingDataView'; - context: WithDatasetSelection; - } - | { - value: 'initializingControlPanels'; - context: WithDatasetSelection; - } - | { - value: 'initializingStateContainer'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.datasetSelection.validatingSelection'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.datasetSelection.idle'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.datasetSelection.updatingDataView'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.datasetSelection.updatingStateContainer'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.controlGroups.uninitialized'; - context: WithDatasetSelection & WithControlPanels; - } - | { - value: 'initialized.controlGroups.idle'; - context: WithDatasetSelection & WithControlPanelGroupAPI & WithControlPanels; - } - | { - value: 'initialized.controlGroups.updatingControlPanels'; - context: WithDatasetSelection & WithControlPanelGroupAPI & WithControlPanels; - }; - -export type LogExplorerProfileContext = LogExplorerProfileTypeState['context']; - -export type LogExplorerProfileStateValue = LogExplorerProfileTypeState['value']; - -export type LogExplorerProfileEvent = - | { - type: 'LISTEN_TO_CHANGES'; - } - | { - type: 'UPDATE_DATASET_SELECTION'; - data: DatasetSelection; - } - | { - type: 'DATASET_SELECTION_RESTORE_FAILURE'; - } - | { - type: 'INITIALIZE_CONTROL_GROUP_API'; - controlGroupAPI: ControlGroupAPI | undefined; - } - | { - type: 'UPDATE_CONTROL_PANELS'; - controlPanels: ControlPanels | null; - } - | DoneInvokeEvent - | DoneInvokeEvent - | DoneInvokeEvent - | DoneInvokeEvent - | DoneInvokeEvent; - -const PanelRT = rt.type({ - order: rt.number, - width: rt.union([rt.literal('medium'), rt.literal('small'), rt.literal('large')]), - grow: rt.boolean, - type: rt.string, - explicitInput: rt.intersection([ - rt.type({ id: rt.string }), - rt.partial({ - dataViewId: rt.string, - fieldName: rt.string, - title: rt.union([rt.string, rt.undefined]), - selectedOptions: rt.array(rt.string), - }), - ]), -}); - -export const ControlPanelRT = rt.record(rt.string, PanelRT); - -export type ControlPanels = rt.TypeOf; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/url_state_storage_service.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/url_state_storage_service.ts deleted file mode 100644 index b84cce4dbf2cf..0000000000000 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/url_state_storage_service.ts +++ /dev/null @@ -1,284 +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 { InvokeCreator } from 'xstate'; -import { pick, mapValues } from 'lodash'; -import deepEqual from 'fast-deep-equal'; -import { DiscoverAppState, DiscoverStateContainer } from '@kbn/discover-plugin/public'; -import type { DataView } from '@kbn/data-views-plugin/public'; -import { ROWS_HEIGHT_OPTIONS } from '@kbn/unified-data-table'; -import { - AllDatasetSelection, - decodeDatasetSelectionId, - hydrateDatasetSelection, - isDatasetSelection, -} from '../../../../common/dataset_selection'; -import { - DATA_GRID_COLUMNS_PREFERENCES, - DATA_GRID_DEFAULT_COLUMNS, - LOG_LEVEL_FIELD, -} from '../../../../common/constants'; -import { - ControlPanelRT, - ControlPanels, - LogExplorerProfileContext, - LogExplorerProfileEvent, -} from './types'; -import { - availableControlPanelFields, - controlPanelConfigs, - CONTROL_PANELS_URL_KEY, -} from './defaults'; - -interface LogExplorerProfileUrlStateDependencies { - stateContainer: DiscoverStateContainer; -} - -export const listenUrlChange = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - (context) => - (send) => { - const unsubscribe = stateContainer.appState.subscribe((nextState) => { - const { index } = nextState; - const prevIndex = stateContainer.appState.getPrevious().index; - - // Preventing update if the index didn't change - if (prevIndex === index) return; - - try { - const datasetSelection = extractDatasetSelectionFromIndex({ index, context }); - - if (isDatasetSelection(datasetSelection)) { - send({ type: 'UPDATE_DATASET_SELECTION', data: datasetSelection }); - } - } catch (error) { - send({ type: 'DATASET_SELECTION_RESTORE_FAILURE' }); - } - }); - - return () => unsubscribe(); - }; - -export const initializeFromUrl = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - async (context) => { - const { index } = stateContainer.appState.getState(); - - return extractDatasetSelectionFromIndex({ index, context }); - }; - -export const initializeControlPanels = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - async (context) => { - const urlPanels = stateContainer.stateStorage.get(CONTROL_PANELS_URL_KEY); - const controlPanelsWithId = constructControlPanelsWithDataViewId(stateContainer, urlPanels!); - - return controlPanelsWithId; - }; - -const extractDatasetSelectionFromIndex = ({ - index, - context, -}: { - index?: string; - context: LogExplorerProfileContext; -}) => { - // If the index parameter doesn't exists, use initialContext value or fallback to AllDatasetSelection - if (!index) { - return context.datasetSelection ?? AllDatasetSelection.create(); - } - - const rawDatasetSelection = decodeDatasetSelectionId(index); - const datasetSelection = hydrateDatasetSelection(rawDatasetSelection); - - return datasetSelection; -}; - -export const subscribeControlGroup = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - (context) => - (send) => { - if (!('controlGroupAPI' in context)) return; - - const filtersSubscription = context.controlGroupAPI.onFiltersPublished$.subscribe( - (newFilters) => { - stateContainer.internalState.transitions.setCustomFilters(newFilters); - stateContainer.actions.fetchData(); - } - ); - - // Keeps our state in sync with the url changes and makes sure it adheres to correct schema - const urlSubscription = stateContainer.stateStorage - .change$(CONTROL_PANELS_URL_KEY) - .subscribe((controlPanels) => { - if (!deepEqual(controlPanels, context.controlPanels)) { - send({ type: 'UPDATE_CONTROL_PANELS', controlPanels }); - } - }); - - // Keeps the url in sync with the controls state after change - const inputSubscription = context.controlGroupAPI.getInput$().subscribe(({ panels }) => { - if (!deepEqual(panels, context.controlPanels)) { - send({ type: 'UPDATE_CONTROL_PANELS', controlPanels: panels }); - } - }); - - return () => { - filtersSubscription.unsubscribe(); - urlSubscription.unsubscribe(); - inputSubscription.unsubscribe(); - }; - }; - -export const updateControlPanels = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - async (context, event) => { - if (!('controlGroupAPI' in context)) return; - - const newControlPanels = - ('controlPanels' in event && event.controlPanels) || context.controlPanels; - const controlPanelsWithId = constructControlPanelsWithDataViewId( - stateContainer, - newControlPanels! - ); - - context.controlGroupAPI.updateInput({ panels: controlPanelsWithId }); - - return controlPanelsWithId; - }; - -export const updateStateContainer = - ({ - stateContainer, - }: LogExplorerProfileUrlStateDependencies): InvokeCreator< - LogExplorerProfileContext, - LogExplorerProfileEvent - > => - async () => { - const { breakdownField, columns, grid, rowHeight } = stateContainer.appState.getState(); - const stateUpdates: DiscoverAppState = {}; - - // Update data grid columns list - const shouldSetDefaultColumns = - stateContainer.appState.isEmptyURL() || !columns || columns.length === 0; - if (shouldSetDefaultColumns) { - stateUpdates.columns = DATA_GRID_DEFAULT_COLUMNS; - } - - // Configure DataGrid columns preferences - const initialColumnsPreferences = grid?.columns ?? {}; - stateUpdates.grid = { - columns: { ...DATA_GRID_COLUMNS_PREFERENCES, ...initialColumnsPreferences }, - }; - - // Configure rowHeight preference - stateUpdates.rowHeight = rowHeight ?? ROWS_HEIGHT_OPTIONS.single; - - // Configure breakdown field preference - stateUpdates.breakdownField = breakdownField ?? LOG_LEVEL_FIELD; - - // Finally batch update state app state - stateContainer.appState.update(stateUpdates, true); - }; - -/** - * Utils - */ - -const constructControlPanelsWithDataViewId = ( - stateContainer: DiscoverStateContainer, - newControlPanels: ControlPanels -) => { - const dataView = stateContainer.internalState.getState().dataView!; - - const validatedControlPanels = isValidState(newControlPanels) - ? newControlPanels - : getVisibleControlPanelsConfig(dataView); - - const controlsPanelsWithId = mergeDefaultPanelsWithUrlConfig(dataView, validatedControlPanels!); - - if (!deepEqual(controlsPanelsWithId, stateContainer.stateStorage.get(CONTROL_PANELS_URL_KEY))) { - stateContainer.stateStorage.set( - CONTROL_PANELS_URL_KEY, - cleanControlPanels(controlsPanelsWithId), - { replace: true } - ); - } - - return controlsPanelsWithId; -}; - -const isValidState = (state: ControlPanels | undefined | null): boolean => { - return Object.keys(state ?? {}).length > 0 && ControlPanelRT.is(state); -}; - -const getVisibleControlPanels = (dataView: DataView | undefined) => - availableControlPanelFields.filter( - (panelKey) => dataView?.fields.getByName(panelKey) !== undefined - ); - -export const getVisibleControlPanelsConfig = (dataView?: DataView) => { - return getVisibleControlPanels(dataView).reduce((panelsMap, panelKey) => { - const config = controlPanelConfigs[panelKey]; - - return { ...panelsMap, [panelKey]: config }; - }, {} as ControlPanels); -}; - -const addDataViewIdToControlPanels = (controlPanels: ControlPanels, dataViewId: string = '') => { - return mapValues(controlPanels, (controlPanelConfig) => ({ - ...controlPanelConfig, - explicitInput: { ...controlPanelConfig.explicitInput, dataViewId }, - })); -}; - -const cleanControlPanels = (controlPanels: ControlPanels) => { - return mapValues(controlPanels, (controlPanelConfig) => { - const { explicitInput } = controlPanelConfig; - const { dataViewId, ...rest } = explicitInput; - return { ...controlPanelConfig, explicitInput: rest }; - }); -}; - -const mergeDefaultPanelsWithUrlConfig = (dataView: DataView, urlPanels: ControlPanels) => { - // Get default panel configs from existing fields in data view - const visiblePanels = getVisibleControlPanelsConfig(dataView); - - // Get list of panel which can be overridden to avoid merging additional config from url - const existingKeys = Object.keys(visiblePanels); - const controlPanelsToOverride = pick(urlPanels, existingKeys); - - // Merge default and existing configs and add dataView.id to each of them - return addDataViewIdToControlPanels( - { ...visiblePanels, ...controlPanelsToOverride }, - dataView.id - ); -}; diff --git a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/utils.ts b/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/utils.ts deleted file mode 100644 index c7907cb358e0c..0000000000000 --- a/x-pack/plugins/log_explorer/public/state_machines/log_explorer_profile/src/utils.ts +++ /dev/null @@ -1,23 +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 { LogExplorerProfileStateService } from './state_machine'; -import { LogExplorerProfileStateValue } from './types'; - -export const waitForState = ( - service: LogExplorerProfileStateService, - targetState: LogExplorerProfileStateValue -) => { - return new Promise((resolve) => { - const { unsubscribe } = service.subscribe((state) => { - if (state.matches(targetState)) { - resolve(state); - unsubscribe(); - } - }); - }); -}; diff --git a/x-pack/plugins/log_explorer/public/types.ts b/x-pack/plugins/log_explorer/public/types.ts index e07b8fdb14b3f..32fcf5315e27c 100644 --- a/x-pack/plugins/log_explorer/public/types.ts +++ b/x-pack/plugins/log_explorer/public/types.ts @@ -6,18 +6,22 @@ */ import type { ComponentType } from 'react'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import type { DiscoverSetup, DiscoverStart } from '@kbn/discover-plugin/public'; -import { SharePluginSetup } from '@kbn/share-plugin/public'; -import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import { LogExplorerLocators } from '../common/locators'; +import type { SharePluginSetup } from '@kbn/share-plugin/public'; +import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; +import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { LogExplorerLocators } from '../common/locators'; import type { LogExplorerProps } from './components/log_explorer'; +import type { CreateLogExplorerController } from './controller'; export interface LogExplorerPluginSetup { locators: LogExplorerLocators; } export interface LogExplorerPluginStart { LogExplorer: ComponentType; + createLogExplorerController: CreateLogExplorerController; } export interface LogExplorerSetupDeps { @@ -30,4 +34,6 @@ export interface LogExplorerStartDeps { dataViews: DataViewsPublicPluginStart; discover: DiscoverStart; fieldFormats: FieldFormatsStart; + navigation: NavigationPublicPluginStart; + unifiedSearch: UnifiedSearchPublicPluginStart; } diff --git a/x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts b/x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts new file mode 100644 index 0000000000000..dea02a0bec002 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/utils/convert_discover_app_state.ts @@ -0,0 +1,73 @@ +/* + * 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 { QueryState } from '@kbn/data-plugin/public'; +import { DiscoverAppState } from '@kbn/discover-plugin/public'; +import { cloneDeep } from 'lodash'; +import { + ChartDisplayOptions, + DisplayOptions, + GridColumnDisplayOptions, + GridRowsDisplayOptions, +} from '../../common'; + +export const getGridColumnDisplayOptionsFromDiscoverAppState = ( + discoverAppState: DiscoverAppState +): GridColumnDisplayOptions[] | undefined => + discoverAppState.columns?.map((field) => ({ + field, + width: discoverAppState.grid?.columns?.[field]?.width, + })); + +export const getGridRowsDisplayOptionsFromDiscoverAppState = ( + discoverAppState: DiscoverAppState +): Partial => ({ + ...(discoverAppState.rowHeight != null ? { rowHeight: discoverAppState.rowHeight } : {}), + ...(discoverAppState.rowsPerPage != null ? { rowsPerPage: discoverAppState.rowsPerPage } : {}), +}); + +export const getChartDisplayOptionsFromDiscoverAppState = ( + discoverAppState: DiscoverAppState +): Partial => ({ + breakdownField: discoverAppState.breakdownField ?? null, +}); + +export const getQueryStateFromDiscoverAppState = ( + discoverAppState: DiscoverAppState +): QueryState => ({ + query: discoverAppState.query, + filters: discoverAppState.filters, +}); + +export const getDiscoverAppStateFromContext = ( + displayOptions: DisplayOptions & QueryState +): Partial => ({ + breakdownField: displayOptions.chart.breakdownField ?? undefined, + columns: getDiscoverColumnsFromDisplayOptions(displayOptions), + grid: getDiscoverGridFromDisplayOptions(displayOptions), + rowHeight: displayOptions.grid.rows.rowHeight, + rowsPerPage: displayOptions.grid.rows.rowsPerPage, + query: cloneDeep(displayOptions.query), + filters: cloneDeep(displayOptions.filters), +}); + +export const getDiscoverColumnsFromDisplayOptions = ( + displayOptions: DisplayOptions +): DiscoverAppState['columns'] => displayOptions.grid.columns.map(({ field }) => field); + +export const getDiscoverGridFromDisplayOptions = ( + displayOptions: DisplayOptions +): DiscoverAppState['grid'] => ({ + columns: displayOptions.grid.columns.reduce< + NonNullable['columns']> + >((gridColumns, { field, width }) => { + if (width != null) { + gridColumns[field] = { width }; + } + return gridColumns; + }, {}), +}); diff --git a/x-pack/plugins/log_explorer/tsconfig.json b/x-pack/plugins/log_explorer/tsconfig.json index a36d764cbee56..b236e7f03ced3 100644 --- a/x-pack/plugins/log_explorer/tsconfig.json +++ b/x-pack/plugins/log_explorer/tsconfig.json @@ -3,31 +3,43 @@ "compilerOptions": { "outDir": "target/types" }, - "include": ["../../../typings/**/*", "common/**/*", "public/**/*", "server/**/*", ".storybook/**/*.tsx"], + "include": [ + "../../../typings/**/*", + "common/**/*", + "public/**/*", + "server/**/*", + ".storybook/**/*.tsx" + ], "kbn_references": [ + "@kbn/controls-plugin", "@kbn/core", + "@kbn/core-application-browser", + "@kbn/core-http-browser", + "@kbn/core-ui-settings-browser", + "@kbn/custom-icons", + "@kbn/data-plugin", + "@kbn/data-views-plugin", + "@kbn/deeplinks-observability", "@kbn/discover-plugin", + "@kbn/discover-utils", + "@kbn/elastic-agent-utils", + "@kbn/embeddable-plugin", + "@kbn/es-query", + "@kbn/field-formats-plugin", + "@kbn/fleet-plugin", "@kbn/i18n", "@kbn/i18n-react", - "@kbn/fleet-plugin", "@kbn/io-ts-utils", - "@kbn/data-views-plugin", - "@kbn/rison", - "@kbn/controls-plugin", - "@kbn/embeddable-plugin", - "@kbn/es-query", "@kbn/kibana-react-plugin", - "@kbn/data-plugin", - "@kbn/unified-field-list", - "@kbn/core-application-browser", + "@kbn/kibana-utils-plugin", + "@kbn/navigation-plugin", "@kbn/share-plugin", "@kbn/unified-data-table", - "@kbn/core-ui-settings-browser", - "@kbn/discover-utils", - "@kbn/deeplinks-observability", - "@kbn/field-formats-plugin", - "@kbn/custom-icons", - "@kbn/elastic-agent-utils" + "@kbn/unified-field-list", + "@kbn/unified-search-plugin", + "@kbn/xstate-utils" ], - "exclude": ["target/**/*"] + "exclude": [ + "target/**/*" + ] } diff --git a/x-pack/plugins/observability/common/slo/constants.ts b/x-pack/plugins/observability/common/slo/constants.ts index 0dd9df915eee4..c2de5598fa8ce 100644 --- a/x-pack/plugins/observability/common/slo/constants.ts +++ b/x-pack/plugins/observability/common/slo/constants.ts @@ -5,8 +5,8 @@ * 2.0. */ -export const SLO_RESOURCES_VERSION = 2; -export const SLO_SUMMARY_TRANSFORMS_VERSION = 3; +export const SLO_MODEL_VERSION = 2; +export const SLO_RESOURCES_VERSION = 3; export const SLO_COMPONENT_TEMPLATE_MAPPINGS_NAME = '.slo-observability.sli-mappings'; export const SLO_COMPONENT_TEMPLATE_SETTINGS_NAME = '.slo-observability.sli-settings'; @@ -17,8 +17,7 @@ export const SLO_INDEX_TEMPLATE_PATTERN = `.slo-observability.sli-*`; export const SLO_DESTINATION_INDEX_NAME = `.slo-observability.sli-v${SLO_RESOURCES_VERSION}`; export const SLO_DESTINATION_INDEX_PATTERN = `.slo-observability.sli-v${SLO_RESOURCES_VERSION}*`; -export const SLO_INGEST_PIPELINE_NAME = `.slo-observability.sli.pipeline`; -// slo-observability.sli-v.(YYYY-MM-DD) +export const SLO_INGEST_PIPELINE_NAME = `.slo-observability.sli.pipeline-v${SLO_RESOURCES_VERSION}`; export const SLO_INGEST_PIPELINE_INDEX_NAME_PREFIX = `.slo-observability.sli-v${SLO_RESOURCES_VERSION}.`; export const SLO_SUMMARY_COMPONENT_TEMPLATE_MAPPINGS_NAME = '.slo-observability.summary-mappings'; @@ -26,12 +25,15 @@ export const SLO_SUMMARY_COMPONENT_TEMPLATE_SETTINGS_NAME = '.slo-observability. export const SLO_SUMMARY_INDEX_TEMPLATE_NAME = '.slo-observability.summary'; export const SLO_SUMMARY_INDEX_TEMPLATE_PATTERN = `.slo-observability.summary-*`; -export const SLO_SUMMARY_TRANSFORM_NAME_PREFIX = 'slo-summary-'; export const SLO_SUMMARY_DESTINATION_INDEX_NAME = `.slo-observability.summary-v${SLO_RESOURCES_VERSION}`; // store the temporary summary document generated by transform export const SLO_SUMMARY_TEMP_INDEX_NAME = `.slo-observability.summary-v${SLO_RESOURCES_VERSION}.temp`; // store the temporary summary document export const SLO_SUMMARY_DESTINATION_INDEX_PATTERN = `.slo-observability.summary-v${SLO_RESOURCES_VERSION}*`; // include temp and non-temp summary indices -export const SLO_SUMMARY_INGEST_PIPELINE_NAME = `.slo-observability.summary.pipeline`; - export const getSLOTransformId = (sloId: string, sloRevision: number) => `slo-${sloId}-${sloRevision}`; + +export const getSLOSummaryTransformId = (sloId: string, sloRevision: number) => + `slo-summary-${sloId}-${sloRevision}`; + +export const getSLOSummaryPipelineId = (sloId: string, sloRevision: number) => + `.slo-observability.summary.pipeline-${sloId}-${sloRevision}`; diff --git a/x-pack/plugins/observability/docs/openapi/slo/bundled.json b/x-pack/plugins/observability/docs/openapi/slo/bundled.json index ff366afc2ff1f..1ec1b5a629f02 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/bundled.json +++ b/x-pack/plugins/observability/docs/openapi/slo/bundled.json @@ -143,7 +143,7 @@ { "name": "page", "in": "query", - "description": "The page number to return", + "description": "The page to use for pagination, must be greater or equal than 1", "schema": { "type": "integer", "default": 1 @@ -153,7 +153,7 @@ { "name": "perPage", "in": "query", - "description": "The number of SLOs to return per page", + "description": "Number of SLOs returned by page", "schema": { "type": "integer", "default": 25, @@ -280,7 +280,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/slo_response" + "$ref": "#/components/schemas/slo_with_summary_response" } } } @@ -361,7 +361,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/slo_response" + "$ref": "#/components/schemas/slo_definition_response" } } } @@ -605,6 +605,79 @@ } } }, + "/s/{spaceId}/api/observability/slos/{sloId}/_reset": { + "post": { + "summary": "Resets an SLO.", + "operationId": "resetSloOp", + "description": "You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n", + "tags": [ + "slo" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + }, + { + "$ref": "#/components/parameters/slo_id" + } + ], + "responses": { + "204": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/slo_definition_response" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, + "401": { + "description": "Unauthorized response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/401_response" + } + } + } + }, + "403": { + "description": "Unauthorized response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/403_response" + } + } + } + }, + "404": { + "description": "Not found response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/404_response" + } + } + } + } + } + } + }, "/s/{spaceId}/internal/observability/slos/_historical_summary": { "post": { "summary": "Retrieves the historical summary for a list of SLOs", @@ -675,6 +748,104 @@ } } }, + "/s/{spaceId}/internal/observability/slos/_definitions": { + "get": { + "summary": "Get the SLO definitions", + "operationId": "getDefinitionsOp", + "description": "You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.\n", + "tags": [ + "slo" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + }, + { + "name": "includeOutdatedOnly", + "in": "query", + "description": "Indicates if the API returns only outdated SLO or all SLO definitions", + "schema": { + "type": "boolean" + }, + "example": true + }, + { + "name": "search", + "in": "query", + "description": "Filters the SLOs by name", + "schema": { + "type": "string" + }, + "example": "my service availability" + }, + { + "name": "page", + "in": "query", + "description": "The page to use for pagination, must be greater or equal than 1", + "schema": { + "type": "number" + }, + "example": 1 + }, + { + "name": "perPage", + "in": "query", + "description": "Number of SLOs returned by page", + "schema": { + "type": "integer", + "default": 100, + "maximum": 1000 + }, + "example": 100 + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/find_slo_definitions_response" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, + "401": { + "description": "Unauthorized response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/401_response" + } + } + } + }, + "403": { + "description": "Unauthorized response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/403_response" + } + } + } + } + } + } + }, "/s/{spaceId}/api/observability/slos/_delete_instances": { "post": { "summary": "Batch delete rollup and summary data for the matching list of sloId and instanceId", @@ -1587,7 +1758,7 @@ } } }, - "slo_response": { + "slo_with_summary_response": { "title": "SLO response", "type": "object", "required": [ @@ -1606,7 +1777,8 @@ "instanceId", "tags", "createdAt", - "updatedAt" + "updatedAt", + "version" ], "properties": { "id": { @@ -1708,6 +1880,11 @@ "description": "The last update date", "type": "string", "example": "2023-01-12T10:03:19.000Z" + }, + "version": { + "description": "The internal SLO version", + "type": "number", + "example": 2 } } }, @@ -1731,7 +1908,7 @@ "results": { "type": "array", "items": { - "$ref": "#/components/schemas/slo_response" + "$ref": "#/components/schemas/slo_with_summary_response" } } } @@ -1994,6 +2171,126 @@ } } }, + "slo_definition_response": { + "title": "SLO definition response", + "type": "object", + "required": [ + "id", + "name", + "description", + "indicator", + "timeWindow", + "budgetingMethod", + "objective", + "settings", + "revision", + "enabled", + "groupBy", + "tags", + "createdAt", + "updatedAt", + "version" + ], + "properties": { + "id": { + "description": "The identifier of the SLO.", + "type": "string", + "example": "8853df00-ae2e-11ed-90af-09bb6422b258" + }, + "name": { + "description": "The name of the SLO.", + "type": "string", + "example": "My Service SLO" + }, + "description": { + "description": "The description of the SLO.", + "type": "string", + "example": "My SLO description" + }, + "indicator": { + "discriminator": { + "propertyName": "type", + "mapping": { + "sli.apm.transactionErrorRate": "#/components/schemas/indicator_properties_apm_availability", + "sli.kql.custom": "#/components/schemas/indicator_properties_custom_kql", + "sli.apm.transactionDuration": "#/components/schemas/indicator_properties_apm_latency", + "sli.metric.custom": "#/components/schemas/indicator_properties_custom_metric", + "sli.histogram.custom": "#/components/schemas/indicator_properties_histogram", + "sli.metric.timeslice": "#/components/schemas/indicator_properties_timeslice_metric" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/indicator_properties_custom_kql" + }, + { + "$ref": "#/components/schemas/indicator_properties_apm_availability" + }, + { + "$ref": "#/components/schemas/indicator_properties_apm_latency" + }, + { + "$ref": "#/components/schemas/indicator_properties_custom_metric" + }, + { + "$ref": "#/components/schemas/indicator_properties_histogram" + }, + { + "$ref": "#/components/schemas/indicator_properties_timeslice_metric" + } + ] + }, + "timeWindow": { + "$ref": "#/components/schemas/time_window" + }, + "budgetingMethod": { + "$ref": "#/components/schemas/budgeting_method" + }, + "objective": { + "$ref": "#/components/schemas/objective" + }, + "settings": { + "$ref": "#/components/schemas/settings" + }, + "revision": { + "description": "The SLO revision", + "type": "number", + "example": 2 + }, + "enabled": { + "description": "Indicate if the SLO is enabled", + "type": "boolean", + "example": true + }, + "groupBy": { + "description": "optional group by field to use to generate an SLO per distinct value", + "type": "string", + "example": "some.field" + }, + "tags": { + "description": "List of tags", + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "description": "The creation date", + "type": "string", + "example": "2023-01-12T10:03:19.000Z" + }, + "updatedAt": { + "description": "The last update date", + "type": "string", + "example": "2023-01-12T10:03:19.000Z" + }, + "version": { + "description": "The internal SLO version", + "type": "number", + "example": 2 + } + } + }, "historical_summary_request": { "title": "Historical summary request", "type": "object", @@ -2037,6 +2334,31 @@ } } }, + "find_slo_definitions_response": { + "title": "Find SLO definitions response", + "description": "A paginated response of SLO definitions matching the query.\n", + "type": "object", + "properties": { + "page": { + "type": "number", + "example": 2 + }, + "perPage": { + "type": "number", + "example": 100 + }, + "total": { + "type": "number", + "example": 123 + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/slo_definition_response" + } + } + } + }, "delete_slo_instances_request": { "title": "Delete SLO instances request", "description": "The delete SLO instances request takes a list of SLO id and instance id, then delete the rollup and summary data. This API can be used to remove the staled data of an instance SLO that no longer get updated.\n", diff --git a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml index 5aa20726b6a07..643b0d29fea66 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml @@ -86,14 +86,14 @@ paths: example: 'slo.name:latency* and slo.tags : "prod"' - name: page in: query - description: The page number to return + description: The page to use for pagination, must be greater or equal than 1 schema: type: integer default: 1 example: 1 - name: perPage in: query - description: The number of SLOs to return per page + description: Number of SLOs returned by page schema: type: integer default: 25 @@ -176,7 +176,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' '400': description: Bad request content: @@ -224,7 +224,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_definition_response' '400': description: Bad request content: @@ -365,6 +365,49 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' + /s/{spaceId}/api/observability/slos/{sloId}/_reset: + post: + summary: Resets an SLO. + operationId: resetSloOp + description: | + You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - $ref: '#/components/parameters/slo_id' + responses: + '204': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/slo_definition_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' /s/{spaceId}/internal/observability/slos/_historical_summary: post: summary: Retrieves the historical summary for a list of SLOs @@ -407,6 +450,68 @@ paths: application/json: schema: $ref: '#/components/schemas/403_response' + /s/{spaceId}/internal/observability/slos/_definitions: + get: + summary: Get the SLO definitions + operationId: getDefinitionsOp + description: | + You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - name: includeOutdatedOnly + in: query + description: Indicates if the API returns only outdated SLO or all SLO definitions + schema: + type: boolean + example: true + - name: search + in: query + description: Filters the SLOs by name + schema: + type: string + example: my service availability + - name: page + in: query + description: The page to use for pagination, must be greater or equal than 1 + schema: + type: number + example: 1 + - name: perPage + in: query + description: Number of SLOs returned by page + schema: + type: integer + default: 100 + maximum: 1000 + example: 100 + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/find_slo_definitions_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' /s/{spaceId}/api/observability/slos/_delete_instances: post: summary: Batch delete rollup and summary data for the matching list of sloId and instanceId @@ -1103,7 +1208,7 @@ components: example: 0.9836 errorBudget: $ref: '#/components/schemas/error_budget' - slo_response: + slo_with_summary_response: title: SLO response type: object required: @@ -1123,6 +1228,7 @@ components: - tags - createdAt - updatedAt + - version properties: id: description: The identifier of the SLO. @@ -1192,6 +1298,10 @@ components: description: The last update date type: string example: '2023-01-12T10:03:19.000Z' + version: + description: The internal SLO version + type: number + example: 2 find_slo_response: title: Find SLO response description: | @@ -1210,7 +1320,7 @@ components: results: type: array items: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' 400_response: title: Bad request type: object @@ -1386,6 +1496,92 @@ components: type: array items: type: string + slo_definition_response: + title: SLO definition response + type: object + required: + - id + - name + - description + - indicator + - timeWindow + - budgetingMethod + - objective + - settings + - revision + - enabled + - groupBy + - tags + - createdAt + - updatedAt + - version + properties: + id: + description: The identifier of the SLO. + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + name: + description: The name of the SLO. + type: string + example: My Service SLO + description: + description: The description of the SLO. + type: string + example: My SLO description + indicator: + discriminator: + propertyName: type + mapping: + sli.apm.transactionErrorRate: '#/components/schemas/indicator_properties_apm_availability' + sli.kql.custom: '#/components/schemas/indicator_properties_custom_kql' + sli.apm.transactionDuration: '#/components/schemas/indicator_properties_apm_latency' + sli.metric.custom: '#/components/schemas/indicator_properties_custom_metric' + sli.histogram.custom: '#/components/schemas/indicator_properties_histogram' + sli.metric.timeslice: '#/components/schemas/indicator_properties_timeslice_metric' + oneOf: + - $ref: '#/components/schemas/indicator_properties_custom_kql' + - $ref: '#/components/schemas/indicator_properties_apm_availability' + - $ref: '#/components/schemas/indicator_properties_apm_latency' + - $ref: '#/components/schemas/indicator_properties_custom_metric' + - $ref: '#/components/schemas/indicator_properties_histogram' + - $ref: '#/components/schemas/indicator_properties_timeslice_metric' + timeWindow: + $ref: '#/components/schemas/time_window' + budgetingMethod: + $ref: '#/components/schemas/budgeting_method' + objective: + $ref: '#/components/schemas/objective' + settings: + $ref: '#/components/schemas/settings' + revision: + description: The SLO revision + type: number + example: 2 + enabled: + description: Indicate if the SLO is enabled + type: boolean + example: true + groupBy: + description: optional group by field to use to generate an SLO per distinct value + type: string + example: some.field + tags: + description: List of tags + type: array + items: + type: string + createdAt: + description: The creation date + type: string + example: '2023-01-12T10:03:19.000Z' + updatedAt: + description: The last update date + type: string + example: '2023-01-12T10:03:19.000Z' + version: + description: The internal SLO version + type: number + example: 2 historical_summary_request: title: Historical summary request type: object @@ -1416,6 +1612,25 @@ components: example: 0.9836 errorBudget: $ref: '#/components/schemas/error_budget' + find_slo_definitions_response: + title: Find SLO definitions response + description: | + A paginated response of SLO definitions matching the query. + type: object + properties: + page: + type: number + example: 2 + perPage: + type: number + example: 100 + total: + type: number + example: 123 + results: + type: array + items: + $ref: '#/components/schemas/slo_definition_response' delete_slo_instances_request: title: Delete SLO instances request description: | diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml new file mode 100644 index 0000000000000..274bdc7016a04 --- /dev/null +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml @@ -0,0 +1,18 @@ +title: Find SLO definitions response +description: > + A paginated response of SLO definitions matching the query. +type: object +properties: + page: + type: number + example: 2 + perPage: + type: number + example: 100 + total: + type: number + example: 123 + results: + type: array + items: + $ref: 'slo_definition_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml index 36a701efa34f4..b94aa6e6dc1c5 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml @@ -15,4 +15,4 @@ properties: results: type: array items: - $ref: 'slo_response.yaml' \ No newline at end of file + $ref: 'slo_with_summary_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_definition_response.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_definition_response.yaml new file mode 100644 index 0000000000000..0b4ffa774d10f --- /dev/null +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_definition_response.yaml @@ -0,0 +1,85 @@ +title: SLO definition response +type: object +required: + - id + - name + - description + - indicator + - timeWindow + - budgetingMethod + - objective + - settings + - revision + - enabled + - groupBy + - tags + - createdAt + - updatedAt + - version +properties: + id: + description: The identifier of the SLO. + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + name: + description: The name of the SLO. + type: string + example: My Service SLO + description: + description: The description of the SLO. + type: string + example: My SLO description + indicator: + discriminator: + propertyName: type + mapping: + sli.apm.transactionErrorRate: './indicator_properties_apm_availability.yaml' + sli.kql.custom: './indicator_properties_custom_kql.yaml' + sli.apm.transactionDuration: './indicator_properties_apm_latency.yaml' + sli.metric.custom: './indicator_properties_custom_metric.yaml' + sli.histogram.custom: './indicator_properties_histogram.yaml' + sli.metric.timeslice: './indicator_properties_timeslice_metric.yaml' + oneOf: + - $ref: "indicator_properties_custom_kql.yaml" + - $ref: "indicator_properties_apm_availability.yaml" + - $ref: "indicator_properties_apm_latency.yaml" + - $ref: "indicator_properties_custom_metric.yaml" + - $ref: "indicator_properties_histogram.yaml" + - $ref: "indicator_properties_timeslice_metric.yaml" + timeWindow: + $ref: "time_window.yaml" + budgetingMethod: + $ref: "budgeting_method.yaml" + objective: + $ref: "objective.yaml" + settings: + $ref: "settings.yaml" + revision: + description: The SLO revision + type: number + example: 2 + enabled: + description: Indicate if the SLO is enabled + type: boolean + example: true + groupBy: + description: optional group by field to use to generate an SLO per distinct value + type: string + example: "some.field" + tags: + description: List of tags + type: array + items: + type: string + createdAt: + description: The creation date + type: string + example: "2023-01-12T10:03:19.000Z" + updatedAt: + description: The last update date + type: string + example: "2023-01-12T10:03:19.000Z" + version: + description: The internal SLO version + type: number + example: 2 \ No newline at end of file diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml similarity index 96% rename from x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml rename to x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml index bd58e88c7b641..df8e35996feb3 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml @@ -17,6 +17,7 @@ required: - tags - createdAt - updatedAt + - version properties: id: description: The identifier of the SLO. @@ -86,3 +87,7 @@ properties: description: The last update date type: string example: "2023-01-12T10:03:19.000Z" + version: + description: The internal SLO version + type: number + example: 2 \ No newline at end of file diff --git a/x-pack/plugins/observability/docs/openapi/slo/entrypoint.yaml b/x-pack/plugins/observability/docs/openapi/slo/entrypoint.yaml index 910f795aa40a7..10ed40a98d479 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/entrypoint.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/entrypoint.yaml @@ -20,11 +20,15 @@ paths: "/s/{spaceId}/api/observability/slos/{sloId}": $ref: "paths/s@{spaceid}@api@slos@{sloid}.yaml" "/s/{spaceId}/api/observability/slos/{sloId}/enable": - $ref: "paths/s@{spaceid}@api@slos@{sloid}@{enable}.yaml" + $ref: "paths/s@{spaceid}@api@slos@{sloid}@enable.yaml" "/s/{spaceId}/api/observability/slos/{sloId}/disable": - $ref: "paths/s@{spaceid}@api@slos@{sloid}@{disable}.yaml" + $ref: "paths/s@{spaceid}@api@slos@{sloid}@disable.yaml" + "/s/{spaceId}/api/observability/slos/{sloId}/_reset": + $ref: "paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml" "/s/{spaceId}/internal/observability/slos/_historical_summary": $ref: "paths/s@{spaceid}@api@slos@_historical_summary.yaml" + "/s/{spaceId}/internal/observability/slos/_definitions": + $ref: "paths/s@{spaceid}@api@slos@_definitions.yaml" "/s/{spaceId}/api/observability/slos/_delete_instances": $ref: "paths/s@{spaceid}@api@slos@_delete_instances.yaml" components: diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml index b606a0aac05fb..782e8fb477f94 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml @@ -68,14 +68,14 @@ get: example: 'slo.name:latency* and slo.tags : "prod"' - name: page in: query - description: The page number to return + description: The page to use for pagination, must be greater or equal than 1 schema: type: integer default: 1 example: 1 - name: perPage in: query - description: The number of SLOs to return per page + description: Number of SLOs returned by page schema: type: integer default: 25 diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml new file mode 100644 index 0000000000000..508c3cc86f8fe --- /dev/null +++ b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml @@ -0,0 +1,62 @@ +get: + summary: Get the SLO definitions + operationId: getDefinitionsOp + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: ../components/headers/kbn_xsrf.yaml + - $ref: ../components/parameters/space_id.yaml + - name: includeOutdatedOnly + in: query + description: Indicates if the API returns only outdated SLO or all SLO definitions + schema: + type: boolean + example: true + - name: search + in: query + description: Filters the SLOs by name + schema: + type: string + example: 'my service availability' + - name: page + in: query + description: The page to use for pagination, must be greater or equal than 1 + schema: + type: number + example: 1 + - name: perPage + in: query + description: Number of SLOs returned by page + schema: + type: integer + default: 100 + maximum: 1000 + example: 100 + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '../components/schemas/find_slo_definitions_response.yaml' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml index a7740b7517464..76d8f0eb640da 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml @@ -22,7 +22,7 @@ get: content: application/json: schema: - $ref: '../components/schemas/slo_response.yaml' + $ref: '../components/schemas/slo_with_summary_response.yaml' '400': description: Bad request content: @@ -72,7 +72,7 @@ put: content: application/json: schema: - $ref: '../components/schemas/slo_response.yaml' + $ref: '../components/schemas/slo_definition_response.yaml' '400': description: Bad request content: diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml new file mode 100644 index 0000000000000..6739d3df78328 --- /dev/null +++ b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml @@ -0,0 +1,43 @@ +post: + summary: Resets an SLO. + operationId: resetSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: ../components/headers/kbn_xsrf.yaml + - $ref: ../components/parameters/space_id.yaml + - $ref: ../components/parameters/slo_id.yaml + responses: + '204': + description: Successful request + content: + application/json: + schema: + $ref: '../components/schemas/slo_definition_response.yaml' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '../components/schemas/404_response.yaml' diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@{disable}.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml similarity index 100% rename from x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@{disable}.yaml rename to x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml diff --git a/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@{enable}.yaml b/x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml similarity index 100% rename from x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@{enable}.yaml rename to x-pack/plugins/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml diff --git a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx index 85806a8b8d4f5..005cefec1e30f 100644 --- a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx +++ b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx @@ -8,7 +8,6 @@ import { EuiFieldNumber, EuiFormRow, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { ChangeEvent, useState } from 'react'; -import numeral from '@elastic/numeral'; interface Props { initialBurnRate?: number; @@ -28,6 +27,7 @@ export function BudgetConsumed({ const [budgetConsumed, setBudgetConsumed] = useState( ((initialBurnRate * longLookbackWindowInHours) / sloTimeWindowInHours) * 100 ); + const [formattedValue, setFormattedValue] = useState(budgetConsumed.toFixed(2)); const hasError = errors !== undefined && errors.length > 0; const onBudgetConsumedChanged = (event: ChangeEvent) => { @@ -60,8 +60,15 @@ export function BudgetConsumed({ step={0.01} min={0.01} max={100} - value={numeral(budgetConsumed).format('0[.0]')} - onChange={(event) => onBudgetConsumedChanged(event)} + value={formattedValue} + onChange={(event) => { + onBudgetConsumedChanged(event); + setFormattedValue(event.target.value); + }} + onBlur={(event) => { + const value = event.target.value; + setFormattedValue(Number(value).toFixed(2)); + }} data-test-subj="budgetConsumed" /> diff --git a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate.tsx b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate.tsx index ac7b92950fc96..1e76ddec456e2 100644 --- a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate.tsx +++ b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate.tsx @@ -8,7 +8,6 @@ import { EuiFieldNumber, EuiFormRow, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { ChangeEvent, useState } from 'react'; -import numeral from '@elastic/numeral'; interface Props { initialBurnRate?: number; @@ -20,6 +19,7 @@ interface Props { export function BurnRate({ onChange, initialBurnRate = 1, maxBurnRate, errors }: Props) { const [burnRate, setBurnRate] = useState(initialBurnRate); const hasError = errors !== undefined && errors.length > 0; + const [formattedValue, setFormattedValue] = useState(burnRate.toFixed(2)); const onBurnRateChange = (event: ChangeEvent) => { const value = Number(event.target.value); @@ -51,8 +51,15 @@ export function BurnRate({ onChange, initialBurnRate = 1, maxBurnRate, errors }: step={0.01} min={0.01} max={maxBurnRate} - value={numeral(burnRate).format('0[.0]')} - onChange={(event) => onBurnRateChange(event)} + value={formattedValue} + onChange={(event) => { + onBurnRateChange(event); + setFormattedValue(event.target.value); + }} + onBlur={(event) => { + const value = event.target.value; + setFormattedValue(Number(value).toFixed(2)); + }} data-test-subj="burnRate" /> diff --git a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/slo_selector.tsx b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/slo_selector.tsx index 5ec21da2efc1c..6e35ce265bad5 100644 --- a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/slo_selector.tsx +++ b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/slo_selector.tsx @@ -22,7 +22,7 @@ function SloSelector({ initialSlo, onSelected, errors }: Props) { const [options, setOptions] = useState>>([]); const [selectedOptions, setSelectedOptions] = useState>>(); const [searchValue, setSearchValue] = useState(''); - const { isLoading, data: sloList } = useFetchSloDefinitions({ name: searchValue }); + const { isLoading, data } = useFetchSloDefinitions({ name: searchValue }); const hasError = errors !== undefined && errors.length > 0; useEffect(() => { @@ -30,17 +30,17 @@ function SloSelector({ initialSlo, onSelected, errors }: Props) { }, [initialSlo]); useEffect(() => { - const isLoadedWithData = !isLoading && sloList !== undefined; + const isLoadedWithData = !isLoading && !!data?.results; const opts: Array> = isLoadedWithData - ? sloList.map((slo) => ({ value: slo.id, label: slo.name })) + ? data?.results?.map((slo) => ({ value: slo.id, label: slo.name })) : []; setOptions(opts); - }, [isLoading, sloList]); + }, [isLoading, data]); const onChange = (opts: Array>) => { setSelectedOptions(opts); const selectedSlo = - opts.length === 1 ? sloList?.find((slo) => slo.id === opts[0].value) : undefined; + opts.length === 1 ? data?.results?.find((slo) => slo.id === opts[0].value) : undefined; onSelected(selectedSlo); }; diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx index e15248d72c497..98627c9ca80d5 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx @@ -16,7 +16,7 @@ import { EuiExpression, EuiPopover, } from '@elastic/eui'; -import React, { useState, useCallback, useMemo } from 'react'; +import React, { useState, useCallback, useMemo, useEffect } from 'react'; import { range, first, xor, debounce } from 'lodash'; import { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -64,9 +64,14 @@ export function CustomEquationEditor({ expression?.metrics ?? [NEW_METRIC] ); const [customEqPopoverOpen, setCustomEqPopoverOpen] = useState(false); - const [equation, setEquation] = useState(expression?.equation || undefined); + const [equation, setEquation] = useState(expression?.equation); const debouncedOnChange = useMemo(() => debounce(onChange, 500), [onChange]); + useEffect(() => { + setCustomMetrics(expression?.metrics ?? [NEW_METRIC]); + setEquation(expression?.equation); + }, [expression?.metrics, expression?.equation]); + const handleAddNewRow = useCallback(() => { setCustomMetrics((previous) => { const currentVars = previous?.map((m) => m.name) ?? []; diff --git a/x-pack/plugins/observability/public/data/slo/slo.ts b/x-pack/plugins/observability/public/data/slo/slo.ts index 5e210526884fd..c53d55a32839f 100644 --- a/x-pack/plugins/observability/public/data/slo/slo.ts +++ b/x-pack/plugins/observability/public/data/slo/slo.ts @@ -5,9 +5,9 @@ * 2.0. */ +import { ALL_VALUE, FindSLOResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { cloneDeep } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; -import { ALL_VALUE, FindSLOResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { buildDegradingSummary, buildHealthySummary, @@ -16,8 +16,8 @@ import { buildTimeslicesObjective, buildViolatedSummary, } from './common'; -import { buildCalendarAlignedTimeWindow, buildRollingTimeWindow } from './time_window'; import { buildApmAvailabilityIndicator, buildCustomKqlIndicator } from './indicator'; +import { buildCalendarAlignedTimeWindow, buildRollingTimeWindow } from './time_window'; export const emptySloList: FindSLOResponse = { results: [], @@ -68,6 +68,7 @@ const baseSlo: Omit = { enabled: true, createdAt: now, updatedAt: now, + version: 2, }; export const sloList: FindSLOResponse = { diff --git a/x-pack/plugins/observability/public/hooks/slo/use_fetch_slo_definitions.ts b/x-pack/plugins/observability/public/hooks/slo/use_fetch_slo_definitions.ts index e74b3570177e4..b3b7f59dd37cf 100644 --- a/x-pack/plugins/observability/public/hooks/slo/use_fetch_slo_definitions.ts +++ b/x-pack/plugins/observability/public/hooks/slo/use_fetch_slo_definitions.ts @@ -5,24 +5,16 @@ * 2.0. */ -import { FindSloDefinitionsResponse, SLOResponse } from '@kbn/slo-schema'; -import { - QueryObserverResult, - RefetchOptions, - RefetchQueryFilters, - useQuery, -} from '@tanstack/react-query'; +import { FindSLODefinitionsResponse } from '@kbn/slo-schema'; +import { useQuery } from '@tanstack/react-query'; import { useKibana } from '../../utils/kibana_react'; import { sloKeys } from './query_key_factory'; export interface UseFetchSloDefinitionsResponse { + data: FindSLODefinitionsResponse | undefined; isLoading: boolean; isSuccess: boolean; isError: boolean; - data: SLOResponse[] | undefined; - refetch: ( - options?: (RefetchOptions & RefetchQueryFilters) | undefined - ) => Promise>; } interface Params { @@ -33,18 +25,13 @@ export function useFetchSloDefinitions({ name = '' }: Params): UseFetchSloDefini const { http } = useKibana().services; const search = name.endsWith('*') ? name : `${name}*`; - const { isLoading, isError, isSuccess, data, refetch } = useQuery({ + const { isLoading, isError, isSuccess, data } = useQuery({ queryKey: sloKeys.definitions(search), queryFn: async ({ signal }) => { try { - const response = await http.get( - '/internal/observability/slos/_definitions', - { - query: { - search, - }, - signal, - } + const response = await http.get( + '/api/observability/slos/_definitions', + { query: { search }, signal } ); return response; @@ -56,5 +43,5 @@ export function useFetchSloDefinitions({ name = '' }: Params): UseFetchSloDefini refetchOnWindowFocus: false, }); - return { isLoading, isError, isSuccess, data, refetch }; + return { isLoading, isError, isSuccess, data }; } diff --git a/x-pack/plugins/observability/public/locators/slo_edit.test.ts b/x-pack/plugins/observability/public/locators/slo_edit.test.ts index a01a988dcdb55..cb485ea3e3877 100644 --- a/x-pack/plugins/observability/public/locators/slo_edit.test.ts +++ b/x-pack/plugins/observability/public/locators/slo_edit.test.ts @@ -20,7 +20,7 @@ describe('SloEditLocator', () => { it('should return correct url when slo is provided', async () => { const location = await locator.getLocation(buildSlo({ id: 'foo' })); expect(location.path).toEqual( - "/slos/edit/foo?_a=(budgetingMethod:occurrences,createdAt:'2022-12-29T10:11:12.000Z',description:'some%20description%20useful',enabled:!t,groupBy:'*',id:foo,indicator:(params:(filter:'baz:%20foo%20and%20bar%20%3E%202',good:'http_status:%202xx',index:some-index,timestampField:custom_timestamp,total:'a%20query'),type:sli.kql.custom),instanceId:'*',name:'super%20important%20level%20service',objective:(target:0.98),revision:1,settings:(frequency:'1m',syncDelay:'1m'),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:'30d',type:rolling),updatedAt:'2022-12-29T10:11:12.000Z')" + "/slos/edit/foo?_a=(budgetingMethod:occurrences,createdAt:'2022-12-29T10:11:12.000Z',description:'some%20description%20useful',enabled:!t,groupBy:'*',id:foo,indicator:(params:(filter:'baz:%20foo%20and%20bar%20%3E%202',good:'http_status:%202xx',index:some-index,timestampField:custom_timestamp,total:'a%20query'),type:sli.kql.custom),instanceId:'*',name:'super%20important%20level%20service',objective:(target:0.98),revision:1,settings:(frequency:'1m',syncDelay:'1m'),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:'30d',type:rolling),updatedAt:'2022-12-29T10:11:12.000Z',version:2)" ); }); }); diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_health_color.ts b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_health_color.ts index 52aab86039a3c..32b81e6dd9263 100644 --- a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_health_color.ts +++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_health_color.ts @@ -17,6 +17,8 @@ export function getHealthColor(status: RuleExecutionStatuses) { return 'primary'; case 'pending': return 'accent'; + case 'warning': + return 'warning'; default: return 'subdued'; } diff --git a/x-pack/plugins/observability/public/pages/slo_details/slo_details.test.tsx b/x-pack/plugins/observability/public/pages/slo_details/slo_details.test.tsx index de21fb145677f..c9b04fee85eb2 100644 --- a/x-pack/plugins/observability/public/pages/slo_details/slo_details.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_details/slo_details.test.tsx @@ -257,6 +257,7 @@ describe('SLO Details Page', () => { settings, updatedAt, instanceId, + version, ...newSlo } = slo; diff --git a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx index 8d4d45a08d709..cd3459975d011 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx @@ -128,6 +128,8 @@ describe('SLO Edit Page', () => { const mockCreate = jest.fn(); const mockUpdate = jest.fn(); + const history = createBrowserHistory(); + beforeEach(() => { jest.clearAllMocks(); mockKibana(); @@ -136,9 +138,8 @@ describe('SLO Edit Page', () => { jest.spyOn(console, 'warn').mockImplementation(() => {}); jest.spyOn(console, 'error').mockImplementation(() => {}); - const history = createBrowserHistory(); history.replace(''); - jest.spyOn(Router, 'useHistory').mockReturnValueOnce(history); + jest.spyOn(Router, 'useHistory').mockReturnValue(history); useFetchDataViewsMock.mockReturnValue({ isLoading: false, @@ -256,11 +257,9 @@ describe('SLO Edit Page', () => { it('prefills the form with values from URL', () => { jest.spyOn(Router, 'useParams').mockReturnValue({ sloId: undefined }); - const history = createBrowserHistory(); history.replace( '/slos/create?_a=(indicator:(params:(environment:prod,service:cartService),type:sli.apm.transactionDuration))' ); - jest.spyOn(Router, 'useHistory').mockReturnValueOnce(history); jest .spyOn(Router, 'useLocation') .mockReturnValue({ pathname: 'foo', search: '', state: '', hash: '' }); @@ -336,11 +335,9 @@ describe('SLO Edit Page', () => { const slo = buildSlo({ id: '123' }); jest.spyOn(Router, 'useParams').mockReturnValue({ sloId: '123' }); - const history = createBrowserHistory(); history.push( '/slos/123/edit?_a=(name:%27updated-name%27,indicator:(params:(environment:prod,service:cartService),type:sli.apm.transactionDuration),objective:(target:0.92))' ); - jest.spyOn(Router, 'useHistory').mockReturnValueOnce(history); jest .spyOn(Router, 'useLocation') .mockReturnValue({ pathname: 'foo', search: '', state: '', hash: '' }); diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts index b4aef3c39a80d..5e1778596ce16 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts @@ -12,6 +12,14 @@ export const getSLOMappingsTemplate = (name: string) => ({ template: { mappings: { properties: { + event: { + properties: { + ingested: { + type: 'date', + format: 'strict_date_optional_time', + }, + }, + }, '@timestamp': { type: 'date', format: 'date_optional_time||epoch_millis', @@ -21,11 +29,9 @@ export const getSLOMappingsTemplate = (name: string) => ({ properties: { name: { type: 'keyword', - ignore_above: 256, }, environment: { type: 'keyword', - ignore_above: 256, }, }, }, @@ -33,11 +39,9 @@ export const getSLOMappingsTemplate = (name: string) => ({ properties: { name: { type: 'keyword', - ignore_above: 256, }, type: { type: 'keyword', - ignore_above: 256, }, }, }, @@ -50,56 +54,8 @@ export const getSLOMappingsTemplate = (name: string) => ({ revision: { type: 'long', }, - groupBy: { - type: 'keyword', - ignore_above: 256, - }, instanceId: { type: 'keyword', - ignore_above: 256, - }, - name: { - type: 'keyword', - ignore_above: 256, - }, - description: { - type: 'keyword', - ignore_above: 256, - }, - tags: { - type: 'keyword', - ignore_above: 256, - }, - indicator: { - properties: { - type: { - type: 'keyword', - ignore_above: 256, - }, - }, - }, - objective: { - properties: { - target: { - type: 'double', - }, - sliceDurationInSeconds: { - type: 'long', - }, - }, - }, - budgetingMethod: { - type: 'keyword', - }, - timeWindow: { - properties: { - duration: { - type: 'keyword', - }, - type: { - type: 'keyword', - }, - }, }, numerator: { type: 'long', @@ -110,6 +66,9 @@ export const getSLOMappingsTemplate = (name: string) => ({ isGoodSlice: { type: 'byte', }, + groupings: { + type: 'flattened', + }, }, }, }, diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts index 9641b64f5f1d0..c75eb8586334a 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts @@ -17,11 +17,9 @@ export const getSLOSummaryMappingsTemplate = (name: string) => ({ properties: { name: { type: 'keyword', - ignore_above: 256, }, environment: { type: 'keyword', - ignore_above: 256, }, }, }, @@ -29,11 +27,9 @@ export const getSLOSummaryMappingsTemplate = (name: string) => ({ properties: { name: { type: 'keyword', - ignore_above: 256, }, type: { type: 'keyword', - ignore_above: 256, }, }, }, @@ -48,29 +44,49 @@ export const getSLOSummaryMappingsTemplate = (name: string) => ({ }, groupBy: { type: 'keyword', - ignore_above: 256, + }, + groupings: { + type: 'flattened', }, instanceId: { type: 'keyword', - ignore_above: 256, + fields: { + text: { + type: 'text', + }, + }, }, name: { - type: 'keyword', - ignore_above: 256, + type: 'text', + fields: { + keyword: { + type: 'keyword', + }, + }, }, description: { - type: 'keyword', - ignore_above: 256, + type: 'text', }, tags: { type: 'keyword', - ignore_above: 256, }, indicator: { properties: { type: { type: 'keyword', - ignore_above: 256, + }, + }, + }, + objective: { + properties: { + target: { + type: 'double', + }, + timesliceTarget: { + type: 'double', + }, + timesliceWindow: { + type: 'keyword', }, }, }, @@ -115,11 +131,21 @@ export const getSLOSummaryMappingsTemplate = (name: string) => ({ }, status: { type: 'keyword', - ignore_above: 32, }, isTempDoc: { type: 'boolean', }, + latestSliTimestamp: { + type: 'date', + format: 'date_optional_time||epoch_millis', + }, + summaryUpdatedAt: { + type: 'date', + format: 'date_optional_time||epoch_millis', + }, + spaceId: { + type: 'keyword', + }, }, }, }, diff --git a/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts b/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts index 30724989925d7..6a3a6684ab191 100644 --- a/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts +++ b/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts @@ -9,18 +9,25 @@ import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOPipelineTemplate = (id: string, indexNamePrefix: string) => ({ id, - description: 'Monthly date-time index naming for SLO data', + description: 'Ingest pipeline for SLO rollup data', processors: [ + { + set: { + field: 'event.ingested', + value: '{{{_ingest.timestamp}}}', + }, + }, { date_index_name: { field: '@timestamp', index_name_prefix: indexNamePrefix, date_rounding: 'M', + date_formats: ['UNIX_MS', 'ISO8601', "yyyy-MM-dd'T'HH:mm:ss.SSSXX"], }, }, ], _meta: { - description: 'SLO ingest pipeline', + description: 'Ingest pipeline for SLO rollup data', version: SLO_RESOURCES_VERSION, managed: true, managed_by: 'observability', diff --git a/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts b/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts index 8246504ac216c..d279c925f86bf 100644 --- a/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts +++ b/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts @@ -5,56 +5,167 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; +import { getSLOSummaryPipelineId, SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO } from '../../domain/models'; -export const getSLOSummaryPipelineTemplate = (id: string) => ({ - id, - description: 'SLO summary ingest pipeline', - processors: [ - { - split: { - description: 'Split comma separated list of tags into an array', - field: 'slo.tags', - separator: ',', +export const getSLOSummaryPipelineTemplate = (slo: SLO, spaceId: string) => { + const errorBudgetEstimated = + slo.budgetingMethod === 'occurrences' && slo.timeWindow.type === 'calendarAligned'; + + const optionalObjectiveTimesliceProcessors = timeslicesBudgetingMethodSchema.is( + slo.budgetingMethod + ) + ? [ + { + set: { + description: 'Set objective.timesliceTarget field', + field: 'slo.objective.timesliceTarget', + value: slo.objective.timesliceTarget, + }, + }, + { + set: { + description: 'Set objective.timesliceWindow field', + field: 'slo.objective.timesliceWindow', + value: slo.objective.timesliceWindow!.format(), + }, + }, + ] + : []; + + return { + id: getSLOSummaryPipelineId(slo.id, slo.revision), + description: `Ingest pipeline for SLO summary data [id: ${slo.id}, revision: ${slo.revision}]`, + processors: [ + { + set: { + description: 'Set errorBudgetEstimated field', + field: 'errorBudgetEstimated', + value: errorBudgetEstimated, + }, }, - }, - { - set: { - description: "if 'statusCode == 0', set status to NO_DATA", - if: 'ctx.statusCode == 0', - field: 'status', - value: 'NO_DATA', + { + set: { + description: 'Set isTempDoc field', + field: 'isTempDoc', + value: false, + }, }, - }, - { - set: { - description: "if 'statusCode == 1', set statusLabel to VIOLATED", - if: 'ctx.statusCode == 1', - field: 'status', - value: 'VIOLATED', + { + set: { + description: 'Set groupBy field', + field: 'slo.groupBy', + value: slo.groupBy, + }, }, - }, - { - set: { - description: "if 'statusCode == 2', set status to DEGRADING", - if: 'ctx.statusCode == 2', - field: 'status', - value: 'DEGRADING', + { + set: { + description: 'Set name field', + field: 'slo.name', + value: slo.name, + }, }, - }, - { - set: { - description: "if 'statusCode == 4', set status to HEALTHY", - if: 'ctx.statusCode == 4', - field: 'status', - value: 'HEALTHY', + { + set: { + description: 'Set description field', + field: 'slo.description', + value: slo.description, + }, + }, + { + set: { + description: 'Set tags field', + field: 'slo.tags', + value: slo.tags, + }, + }, + { + set: { + description: 'Set indicator.type field', + field: 'slo.indicator.type', + value: slo.indicator.type, + }, + }, + { + set: { + description: 'Set budgetingMethod field', + field: 'slo.budgetingMethod', + value: slo.budgetingMethod, + }, + }, + { + set: { + description: 'Set timeWindow.duration field', + field: 'slo.timeWindow.duration', + value: slo.timeWindow.duration.format(), + }, + }, + { + set: { + description: 'Set timeWindow.type field', + field: 'slo.timeWindow.type', + value: slo.timeWindow.type, + }, + }, + { + set: { + description: 'Set objective.target field', + field: 'slo.objective.target', + value: slo.objective.target, + }, + }, + ...optionalObjectiveTimesliceProcessors, + { + set: { + description: "if 'statusCode == 0', set status to NO_DATA", + if: 'ctx.statusCode == 0', + field: 'status', + value: 'NO_DATA', + }, + }, + { + set: { + description: "if 'statusCode == 1', set statusLabel to VIOLATED", + if: 'ctx.statusCode == 1', + field: 'status', + value: 'VIOLATED', + }, + }, + { + set: { + description: "if 'statusCode == 2', set status to DEGRADING", + if: 'ctx.statusCode == 2', + field: 'status', + value: 'DEGRADING', + }, + }, + { + set: { + description: "if 'statusCode == 4', set status to HEALTHY", + if: 'ctx.statusCode == 4', + field: 'status', + value: 'HEALTHY', + }, + }, + { + set: { + field: 'summaryUpdatedAt', + value: '{{{_ingest.timestamp}}}', + }, + }, + { + set: { + field: 'spaceId', + value: spaceId, + }, }, + ], + _meta: { + description: `Ingest pipeline for SLO summary data [id: ${slo.id}, revision: ${slo.revision}]`, + version: SLO_RESOURCES_VERSION, + managed: true, + managed_by: 'observability', }, - ], - _meta: { - description: 'SLO summary ingest pipeline', - version: SLO_RESOURCES_VERSION, - managed: true, - managed_by: 'observability', - }, -}); + }; +}; diff --git a/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts b/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts index ac052a6b8f4d3..2aa9ee09a073d 100644 --- a/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts +++ b/x-pack/plugins/observability/server/lib/rules/custom_threshold/custom_threshold_executor.ts @@ -99,6 +99,7 @@ export const createCustomThresholdExecutor = ({ getAlertByAlertUuid, getAlertStartedDate, searchSourceClient, + alertFactory: baseAlertFactory, } = services; const alertFactory: CustomThresholdAlertFactory = ( @@ -177,8 +178,17 @@ export const createCustomThresholdExecutor = ({ const hasGroups = !isEqual(groups, [UNGROUPED_FACTORY_KEY]); let scheduledActionsCount = 0; + const alertLimit = baseAlertFactory.alertLimit.getValue(); + let hasReachedLimit = false; + // The key of `groups` is the alert instance ID. for (const group of groups) { + if (scheduledActionsCount >= alertLimit) { + // need to set this so that warning is displayed in the UI and in the logs + hasReachedLimit = true; + break; // once limit is reached, we break out of the loop and don't schedule any more alerts + } + // AND logic; all criteria must be across the threshold const shouldAlertFire = alertResults.every((result) => result[group]?.shouldFire); // AND logic; because we need to evaluate all criteria, if one of them reports no data then the @@ -296,6 +306,8 @@ export const createCustomThresholdExecutor = ({ }); } } + + baseAlertFactory.alertLimit.setLimitReached(hasReachedLimit); const { getRecoveredAlerts } = services.alertFactory.done(); const recoveredAlerts = getRecoveredAlerts(); diff --git a/x-pack/plugins/observability/server/plugin.ts b/x-pack/plugins/observability/server/plugin.ts index 6726b8abfe178..932016b02a410 100644 --- a/x-pack/plugins/observability/server/plugin.ts +++ b/x-pack/plugins/observability/server/plugin.ts @@ -18,21 +18,21 @@ import { Plugin, PluginInitializerContext, } from '@kbn/core/server'; -import { LOG_EXPLORER_LOCATOR_ID, LogExplorerLocatorParams } from '@kbn/deeplinks-observability'; +import { LogExplorerLocatorParams, LOG_EXPLORER_LOCATOR_ID } from '@kbn/deeplinks-observability'; import { PluginSetupContract as FeaturesSetup } from '@kbn/features-plugin/server'; import { hiddenTypes as filesSavedObjectTypes } from '@kbn/files-plugin/server/saved_objects'; import type { GuidedOnboardingPluginSetup } from '@kbn/guided-onboarding-plugin/server'; import { i18n } from '@kbn/i18n'; -import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; -import { SharePluginSetup } from '@kbn/share-plugin/server'; -import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { ApmRuleType, ES_QUERY_ID, METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; +import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import { SharePluginSetup } from '@kbn/share-plugin/server'; +import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; +import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { ObservabilityConfig } from '.'; import { casesFeatureId, observabilityFeatureId, sloFeatureId } from '../common'; import { SLO_BURN_RATE_RULE_TYPE_ID } from '../common/constants'; @@ -52,11 +52,7 @@ import { getObservabilityServerRouteRepository } from './routes/get_global_obser import { registerRoutes } from './routes/register_routes'; import { slo, SO_SLO_TYPE } from './saved_objects'; import { threshold } from './saved_objects/threshold'; -import { - DefaultResourceInstaller, - DefaultSLOInstaller, - DefaultSummaryTransformInstaller, -} from './services/slo'; +import { DefaultResourceInstaller, DefaultSLOInstaller } from './services/slo'; import { uiSettings } from './ui_settings'; @@ -75,6 +71,7 @@ interface PluginSetup { interface PluginStart { alerting: PluginStartContract; + spaces?: SpacesPluginStart; } const sloRuleTypes = [SLO_BURN_RATE_RULE_TYPE_ID]; @@ -350,6 +347,7 @@ export class ObservabilityPlugin implements Plugin { ...plugins, core, }, + spaces: pluginStart.spaces, ruleDataService, getRulesClientWithRequest: pluginStart.alerting.getRulesClientWithRequest, }, @@ -360,15 +358,7 @@ export class ObservabilityPlugin implements Plugin { const esInternalClient = coreStart.elasticsearch.client.asInternalUser; const sloResourceInstaller = new DefaultResourceInstaller(esInternalClient, this.logger); - const sloSummaryInstaller = new DefaultSummaryTransformInstaller( - esInternalClient, - this.logger - ); - const sloInstaller = new DefaultSLOInstaller( - sloResourceInstaller, - sloSummaryInstaller, - this.logger - ); + const sloInstaller = new DefaultSLOInstaller(sloResourceInstaller, this.logger); sloInstaller.install(); }); diff --git a/x-pack/plugins/observability/server/routes/register_routes.ts b/x-pack/plugins/observability/server/routes/register_routes.ts index 7726e54793d32..92980f20c4646 100644 --- a/x-pack/plugins/observability/server/routes/register_routes.ts +++ b/x-pack/plugins/observability/server/routes/register_routes.ts @@ -14,6 +14,7 @@ import { parseEndpoint, routeValidationObject, } from '@kbn/server-route-repository'; +import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import axios from 'axios'; import * as t from 'io-ts'; import { ObservabilityConfig } from '..'; @@ -33,6 +34,7 @@ export interface RegisterRoutesDependencies { pluginsSetup: { core: CoreSetup; }; + spaces?: SpacesPluginStart; ruleDataService: RuleDataPluginService; getRulesClientWithRequest: (request: KibanaRequest) => RulesClientApi; } diff --git a/x-pack/plugins/observability/server/routes/slo/route.ts b/x-pack/plugins/observability/server/routes/slo/route.ts index ade3f1714ddfb..7ad4b7c36dcc7 100644 --- a/x-pack/plugins/observability/server/routes/slo/route.ts +++ b/x-pack/plugins/observability/server/routes/slo/route.ts @@ -19,12 +19,14 @@ import { getSLOInstancesParamsSchema, getSLOParamsSchema, manageSLOParamsSchema, + resetSLOParamsSchema, updateSLOParamsSchema, } from '@kbn/slo-schema'; import type { IndicatorTypes } from '../../domain/models'; import { CreateSLO, DefaultSummaryClient, + DefaultSummaryTransformManager, DefaultTransformManager, DeleteSLO, DeleteSLOInstances, @@ -41,15 +43,17 @@ import { GetPreviewData } from '../../services/slo/get_preview_data'; import { GetSLOInstances } from '../../services/slo/get_slo_instances'; import { DefaultHistoricalSummaryClient } from '../../services/slo/historical_summary_client'; import { ManageSLO } from '../../services/slo/manage_slo'; +import { ResetSLO } from '../../services/slo/reset_slo'; import { DefaultSummarySearchClient } from '../../services/slo/summary_search_client'; +import { DefaultSummaryTransformGenerator } from '../../services/slo/summary_transform_generator/summary_transform_generator'; import { ApmTransactionDurationTransformGenerator, ApmTransactionErrorRateTransformGenerator, HistogramTransformGenerator, KQLCustomTransformGenerator, MetricCustomTransformGenerator, - TransformGenerator, TimesliceMetricTransformGenerator, + TransformGenerator, } from '../../services/slo/transform_generators'; import type { ObservabilityRequestHandlerContext } from '../../types'; import { createObservabilityServerRoute } from '../create_observability_server_route'; @@ -79,14 +83,30 @@ const createSLORoute = createObservabilityServerRoute({ access: 'public', }, params: createSLOParamsSchema, - handler: async ({ context, params, logger }) => { + handler: async ({ context, params, logger, dependencies, request }) => { await assertPlatinumLicense(context); + const spaceId = + (await dependencies.spaces?.spacesService?.getActiveSpace(request))?.id ?? 'default'; + const esClient = (await context.core).elasticsearch.client.asCurrentUser; const soClient = (await context.core).savedObjects.client; const repository = new KibanaSavedObjectsSLORepository(soClient); const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); - const createSLO = new CreateSLO(esClient, repository, transformManager); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const createSLO = new CreateSLO( + esClient, + repository, + transformManager, + summaryTransformManager, + logger, + spaceId + ); const response = await createSLO.execute(params.body); @@ -101,15 +121,30 @@ const updateSLORoute = createObservabilityServerRoute({ access: 'public', }, params: updateSLOParamsSchema, - handler: async ({ context, params, logger }) => { + handler: async ({ context, request, params, logger, dependencies }) => { await assertPlatinumLicense(context); + const spaceId = + (await dependencies.spaces?.spacesService?.getActiveSpace(request))?.id ?? 'default'; const esClient = (await context.core).elasticsearch.client.asCurrentUser; const soClient = (await context.core).savedObjects.client; const repository = new KibanaSavedObjectsSLORepository(soClient); const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); - const updateSLO = new UpdateSLO(repository, transformManager, esClient); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const updateSLO = new UpdateSLO( + repository, + transformManager, + summaryTransformManager, + esClient, + logger, + spaceId + ); const response = await updateSLO.execute(params.path.id, params.body); @@ -140,7 +175,19 @@ const deleteSLORoute = createObservabilityServerRoute({ const repository = new KibanaSavedObjectsSLORepository(soClient); const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); - const deleteSLO = new DeleteSLO(repository, transformManager, esClient, rulesClient); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const deleteSLO = new DeleteSLO( + repository, + transformManager, + summaryTransformManager, + esClient, + rulesClient + ); await deleteSLO.execute(params.path.id); }, @@ -183,7 +230,13 @@ const enableSLORoute = createObservabilityServerRoute({ const repository = new KibanaSavedObjectsSLORepository(soClient); const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); - const manageSLO = new ManageSLO(repository, transformManager); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const manageSLO = new ManageSLO(repository, transformManager, summaryTransformManager); const response = await manageSLO.enable(params.path.id); @@ -206,7 +259,13 @@ const disableSLORoute = createObservabilityServerRoute({ const repository = new KibanaSavedObjectsSLORepository(soClient); const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); - const manageSLO = new ManageSLO(repository, transformManager); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const manageSLO = new ManageSLO(repository, transformManager, summaryTransformManager); const response = await manageSLO.disable(params.path.id); @@ -214,6 +273,44 @@ const disableSLORoute = createObservabilityServerRoute({ }, }); +const resetSLORoute = createObservabilityServerRoute({ + endpoint: 'POST /api/observability/slos/{id}/_reset 2023-10-31', + options: { + tags: ['access:slo_write'], + access: 'public', + }, + params: resetSLOParamsSchema, + handler: async ({ context, request, params, logger, dependencies }) => { + await assertPlatinumLicense(context); + + const spaceId = + (await dependencies.spaces?.spacesService?.getActiveSpace(request))?.id ?? 'default'; + const soClient = (await context.core).savedObjects.client; + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + + const repository = new KibanaSavedObjectsSLORepository(soClient); + const transformManager = new DefaultTransformManager(transformGenerators, esClient, logger); + const summaryTransformManager = new DefaultSummaryTransformManager( + new DefaultSummaryTransformGenerator(), + esClient, + logger + ); + + const resetSLO = new ResetSLO( + esClient, + repository, + transformManager, + summaryTransformManager, + logger, + spaceId + ); + + const response = await resetSLO.execute(params.path.id); + + return response; + }, +}); + const findSLORoute = createObservabilityServerRoute({ endpoint: 'GET /api/observability/slos 2023-10-31', options: { @@ -221,13 +318,16 @@ const findSLORoute = createObservabilityServerRoute({ access: 'public', }, params: findSLOParamsSchema, - handler: async ({ context, params, logger }) => { + handler: async ({ context, request, params, logger, dependencies }) => { await assertPlatinumLicense(context); + const spaceId = + (await dependencies.spaces?.spacesService?.getActiveSpace(request))?.id ?? 'default'; + const soClient = (await context.core).savedObjects.client; const esClient = (await context.core).elasticsearch.client.asCurrentUser; const repository = new KibanaSavedObjectsSLORepository(soClient); - const summarySearchClient = new DefaultSummarySearchClient(esClient, logger); + const summarySearchClient = new DefaultSummarySearchClient(esClient, logger, spaceId); const findSLO = new FindSLO(repository, summarySearchClient); const response = await findSLO.execute(params?.query ?? {}); @@ -253,10 +353,9 @@ const deleteSloInstancesRoute = createObservabilityServerRoute({ }); const findSloDefinitionsRoute = createObservabilityServerRoute({ - endpoint: 'GET /internal/observability/slos/_definitions', + endpoint: 'GET /api/observability/slos/_definitions 2023-10-31', options: { tags: ['access:slo_read'], - access: 'internal', }, params: findSloDefinitionsParamsSchema, handler: async ({ context, params }) => { @@ -266,7 +365,7 @@ const findSloDefinitionsRoute = createObservabilityServerRoute({ const repository = new KibanaSavedObjectsSLORepository(soClient); const findSloDefinitions = new FindSLODefinitions(repository); - const response = await findSloDefinitions.execute(params.query.search); + const response = await findSloDefinitions.execute(params?.query ?? {}); return response; }, @@ -395,4 +494,5 @@ export const sloRouteRepository = { ...getSloBurnRates, ...getPreviewData, ...getSLOInstancesRoute, + ...resetSLORoute, }; diff --git a/x-pack/plugins/observability/server/saved_objects/slo.ts b/x-pack/plugins/observability/server/saved_objects/slo.ts index 41cb509d83755..058596e160fd7 100644 --- a/x-pack/plugins/observability/server/saved_objects/slo.ts +++ b/x-pack/plugins/observability/server/saved_objects/slo.ts @@ -17,7 +17,6 @@ type StoredSLOBefore890 = StoredSLO & { isCalendar?: boolean; }; }; - const migrateSlo890: SavedObjectMigrationFn = (doc) => { const { timeWindow, ...other } = doc.attributes; return { @@ -38,6 +37,21 @@ export const slo: SavedObjectsType = { name: SO_SLO_TYPE, hidden: false, namespaceType: 'multiple-isolated', + switchToModelVersionAt: '8.10.0', + modelVersions: { + 1: { + changes: [ + { type: 'mappings_addition', addedMappings: { version: { type: 'long' } } }, + { + type: 'data_backfill', + backfillFn: (doc) => { + // we explicitely set the version to 1, so we know which SLOs requires a migration to the following version. + return { attributes: { version: doc.attributes.version ?? 1 } }; + }, + }, + ], + }, + }, mappings: { dynamic: false, properties: { @@ -53,6 +67,7 @@ export const slo: SavedObjectsType = { budgetingMethod: { type: 'keyword' }, enabled: { type: 'boolean' }, tags: { type: 'keyword' }, + version: { type: 'long' }, }, }, management: { diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap index e66f1f8124a11..8c2cfc3b0d1f5 100644 --- a/x-pack/plugins/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap @@ -1,6 +1,144 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreateSLO happy path calls the expected services 1`] = ` +Array [ + Object { + "_meta": Object { + "description": "Ingest pipeline for SLO summary data [id: unique-id, revision: 1]", + "managed": true, + "managed_by": "observability", + "version": 3, + }, + "description": "Ingest pipeline for SLO summary data [id: unique-id, revision: 1]", + "id": ".slo-observability.summary.pipeline-unique-id-1", + "processors": Array [ + Object { + "set": Object { + "description": "Set errorBudgetEstimated field", + "field": "errorBudgetEstimated", + "value": false, + }, + }, + Object { + "set": Object { + "description": "Set isTempDoc field", + "field": "isTempDoc", + "value": false, + }, + }, + Object { + "set": Object { + "description": "Set groupBy field", + "field": "slo.groupBy", + "value": "*", + }, + }, + Object { + "set": Object { + "description": "Set name field", + "field": "slo.name", + "value": "irrelevant", + }, + }, + Object { + "set": Object { + "description": "Set description field", + "field": "slo.description", + "value": "irrelevant", + }, + }, + Object { + "set": Object { + "description": "Set tags field", + "field": "slo.tags", + "value": Array [], + }, + }, + Object { + "set": Object { + "description": "Set indicator.type field", + "field": "slo.indicator.type", + "value": "sli.apm.transactionErrorRate", + }, + }, + Object { + "set": Object { + "description": "Set budgetingMethod field", + "field": "slo.budgetingMethod", + "value": "occurrences", + }, + }, + Object { + "set": Object { + "description": "Set timeWindow.duration field", + "field": "slo.timeWindow.duration", + "value": "7d", + }, + }, + Object { + "set": Object { + "description": "Set timeWindow.type field", + "field": "slo.timeWindow.type", + "value": "rolling", + }, + }, + Object { + "set": Object { + "description": "Set objective.target field", + "field": "slo.objective.target", + "value": 0.99, + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 0', set status to NO_DATA", + "field": "status", + "if": "ctx.statusCode == 0", + "value": "NO_DATA", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 1', set statusLabel to VIOLATED", + "field": "status", + "if": "ctx.statusCode == 1", + "value": "VIOLATED", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 2', set status to DEGRADING", + "field": "status", + "if": "ctx.statusCode == 2", + "value": "DEGRADING", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 4', set status to HEALTHY", + "field": "status", + "if": "ctx.statusCode == 4", + "value": "HEALTHY", + }, + }, + Object { + "set": Object { + "field": "summaryUpdatedAt", + "value": "{{{_ingest.timestamp}}}", + }, + }, + Object { + "set": Object { + "field": "spaceId", + "value": "some-space", + }, + }, + ], + }, +] +`; + +exports[`CreateSLO happy path calls the expected services 2`] = ` Array [ Object { "document": Object { @@ -25,6 +163,11 @@ Array [ }, "instanceId": "*", "name": "irrelevant", + "objective": Object { + "target": 0.99, + "timesliceTarget": null, + "timesliceWindow": null, + }, "revision": 1, "tags": Array [], "timeWindow": Object { @@ -32,6 +175,7 @@ Array [ "type": "rolling", }, }, + "spaceId": "some-space", "status": "NO_DATA", "statusCode": 0, "totalEvents": 0, @@ -41,7 +185,7 @@ Array [ }, }, "id": "slo-unique-id", - "index": ".slo-observability.summary-v2.temp", + "index": ".slo-observability.summary-v3.temp", "refresh": true, }, ] diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/delete_slo.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/delete_slo.test.ts.snap new file mode 100644 index 0000000000000..3edfb0cd194b0 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/delete_slo.test.ts.snap @@ -0,0 +1,177 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`DeleteSLO happy path removes all resources associatde to the slo 1`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "irrelevant", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 2`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 3`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 4`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 5`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 6`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "id": ".slo-observability.summary.pipeline-irrelevant-1", + }, + Object { + "ignore": Array [ + 404, + ], + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 7`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "index": ".slo-observability.sli-v3*", + "query": Object { + "match": Object { + "slo.id": "irrelevant", + }, + }, + "wait_for_completion": false, + }, + ], + Array [ + Object { + "index": ".slo-observability.summary-v3*", + "query": Object { + "match": Object { + "slo.id": "irrelevant", + }, + }, + "refresh": true, + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 8`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "filter": "alert.attributes.params.sloId:irrelevant", + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`DeleteSLO happy path removes all resources associatde to the slo 9`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "irrelevant", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap index be3b681db0af8..8ad9792a22b24 100644 --- a/x-pack/plugins/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap @@ -11,7 +11,7 @@ Array [ }, }, }, - "index": ".slo-observability.sli-v2*", + "index": ".slo-observability.sli-v3*", "query": Object { "bool": Object { "filter": Array [ diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/manage_slo.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/manage_slo.test.ts.snap new file mode 100644 index 0000000000000..aff53e4882818 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/manage_slo.test.ts.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ManageSLO Disable disables the slo when enabled 1`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ManageSLO Disable disables the slo when enabled 2`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ManageSLO Enable enables the slo when disabled 1`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ManageSLO Enable enables the slo when disabled 2`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/reset_slo.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/reset_slo.test.ts.snap new file mode 100644 index 0000000000000..9ad1d09bd1ef8 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/reset_slo.test.ts.snap @@ -0,0 +1,489 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ResetSLO resets all associated resources 1`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 2`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 3`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 4`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 5`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "index": ".slo-observability.sli-v3*", + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "term": Object { + "slo.id": "irrelevant", + }, + }, + ], + }, + }, + "refresh": true, + }, + ], + Array [ + Object { + "index": ".slo-observability.summary-v3*", + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "term": Object { + "slo.id": "irrelevant", + }, + }, + ], + }, + }, + "refresh": true, + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 6`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "budgetingMethod": "occurrences", + "createdAt": 2023-01-01T00:00:00.000Z, + "description": "irrelevant", + "enabled": true, + "groupBy": "*", + "id": "irrelevant", + "indicator": Object { + "params": Object { + "environment": "irrelevant", + "index": "metrics-apm*", + "service": "irrelevant", + "threshold": 500, + "transactionName": "irrelevant", + "transactionType": "irrelevant", + }, + "type": "sli.apm.transactionDuration", + }, + "name": "irrelevant", + "objective": Object { + "target": 0.999, + }, + "revision": 1, + "settings": Object { + "frequency": Duration { + "unit": "m", + "value": 1, + }, + "syncDelay": Duration { + "unit": "m", + "value": 1, + }, + }, + "tags": Array [ + "critical", + "k8s", + ], + "timeWindow": Object { + "duration": Duration { + "unit": "d", + "value": 7, + }, + "type": "rolling", + }, + "updatedAt": 2023-01-01T00:00:00.000Z, + "version": 1, + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 7`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 8`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "_meta": Object { + "description": "Ingest pipeline for SLO summary data [id: irrelevant, revision: 1]", + "managed": true, + "managed_by": "observability", + "version": 3, + }, + "description": "Ingest pipeline for SLO summary data [id: irrelevant, revision: 1]", + "id": ".slo-observability.summary.pipeline-irrelevant-1", + "processors": Array [ + Object { + "set": Object { + "description": "Set errorBudgetEstimated field", + "field": "errorBudgetEstimated", + "value": false, + }, + }, + Object { + "set": Object { + "description": "Set isTempDoc field", + "field": "isTempDoc", + "value": false, + }, + }, + Object { + "set": Object { + "description": "Set groupBy field", + "field": "slo.groupBy", + "value": "*", + }, + }, + Object { + "set": Object { + "description": "Set name field", + "field": "slo.name", + "value": "irrelevant", + }, + }, + Object { + "set": Object { + "description": "Set description field", + "field": "slo.description", + "value": "irrelevant", + }, + }, + Object { + "set": Object { + "description": "Set tags field", + "field": "slo.tags", + "value": Array [ + "critical", + "k8s", + ], + }, + }, + Object { + "set": Object { + "description": "Set indicator.type field", + "field": "slo.indicator.type", + "value": "sli.apm.transactionDuration", + }, + }, + Object { + "set": Object { + "description": "Set budgetingMethod field", + "field": "slo.budgetingMethod", + "value": "occurrences", + }, + }, + Object { + "set": Object { + "description": "Set timeWindow.duration field", + "field": "slo.timeWindow.duration", + "value": "7d", + }, + }, + Object { + "set": Object { + "description": "Set timeWindow.type field", + "field": "slo.timeWindow.type", + "value": "rolling", + }, + }, + Object { + "set": Object { + "description": "Set objective.target field", + "field": "slo.objective.target", + "value": 0.999, + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 0', set status to NO_DATA", + "field": "status", + "if": "ctx.statusCode == 0", + "value": "NO_DATA", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 1', set statusLabel to VIOLATED", + "field": "status", + "if": "ctx.statusCode == 1", + "value": "VIOLATED", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 2', set status to DEGRADING", + "field": "status", + "if": "ctx.statusCode == 2", + "value": "DEGRADING", + }, + }, + Object { + "set": Object { + "description": "if 'statusCode == 4', set status to HEALTHY", + "field": "status", + "if": "ctx.statusCode == 4", + "value": "HEALTHY", + }, + }, + Object { + "set": Object { + "field": "summaryUpdatedAt", + "value": "{{{_ingest.timestamp}}}", + }, + }, + Object { + "set": Object { + "field": "spaceId", + "value": "some-space", + }, + }, + ], + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 9`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "budgetingMethod": "occurrences", + "createdAt": 2023-01-01T00:00:00.000Z, + "description": "irrelevant", + "enabled": true, + "groupBy": "*", + "id": "irrelevant", + "indicator": Object { + "params": Object { + "environment": "irrelevant", + "index": "metrics-apm*", + "service": "irrelevant", + "threshold": 500, + "transactionName": "irrelevant", + "transactionType": "irrelevant", + }, + "type": "sli.apm.transactionDuration", + }, + "name": "irrelevant", + "objective": Object { + "target": 0.999, + }, + "revision": 1, + "settings": Object { + "frequency": Duration { + "unit": "m", + "value": 1, + }, + "syncDelay": Duration { + "unit": "m", + "value": 1, + }, + }, + "tags": Array [ + "critical", + "k8s", + ], + "timeWindow": Object { + "duration": Duration { + "unit": "d", + "value": 7, + }, + "type": "rolling", + }, + "updatedAt": 2023-01-01T00:00:00.000Z, + "version": 1, + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 10`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-irrelevant-1", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`ResetSLO resets all associated resources 11`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "document": Object { + "errorBudgetConsumed": 0, + "errorBudgetEstimated": false, + "errorBudgetInitial": 0.0010000000000000009, + "errorBudgetRemaining": 1, + "goodEvents": 0, + "isTempDoc": true, + "service": Object { + "environment": null, + "name": null, + }, + "sliValue": -1, + "slo": Object { + "budgetingMethod": "occurrences", + "description": "irrelevant", + "groupBy": "*", + "id": "irrelevant", + "indicator": Object { + "type": "sli.apm.transactionDuration", + }, + "instanceId": "*", + "name": "irrelevant", + "objective": Object { + "target": 0.999, + "timesliceTarget": null, + "timesliceWindow": null, + }, + "revision": 1, + "tags": Array [ + "critical", + "k8s", + ], + "timeWindow": Object { + "duration": "7d", + "type": "rolling", + }, + }, + "spaceId": "some-space", + "status": "NO_DATA", + "statusCode": 0, + "totalEvents": 0, + "transaction": Object { + "name": null, + "type": null, + }, + }, + "id": "slo-irrelevant", + "index": ".slo-observability.summary-v3.temp", + "refresh": true, + }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, + }, + ], +} +`; diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap index ea94e840aac0e..daf5e47a0a66c 100644 --- a/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap @@ -3,7 +3,7 @@ exports[`Summary Search Client returns the summary documents without duplicate temporary summary documents 1`] = ` Array [ Object { - "index": ".slo-observability.summary-v2*", + "index": ".slo-observability.summary-v3*", "query": Object { "bool": Object { "filter": Array [ diff --git a/x-pack/plugins/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap b/x-pack/plugins/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap index ae7a966951f7c..c1f0099d24343 100644 --- a/x-pack/plugins/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap @@ -1,51 +1,88 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UpdateSLO index a temporary summary document 1`] = ` -Array [ - Object { - "document": Object { - "errorBudgetConsumed": 0, - "errorBudgetEstimated": false, - "errorBudgetInitial": 0.0010000000000000009, - "errorBudgetRemaining": 1, - "goodEvents": 0, - "isTempDoc": true, - "service": Object { - "environment": null, - "name": null, +exports[`UpdateSLO when error happens during the update restores the previous SLO definition in the repository 1`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-original-id-2", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`UpdateSLO when error happens during the update restores the previous SLO definition in the repository 2`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-summary-original-id-2", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`UpdateSLO when error happens during the update restores the previous SLO definition in the repository 3`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-original-id-2", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`UpdateSLO when error happens during the update restores the previous SLO definition in the repository 4`] = ` +[MockFunction] { + "calls": Array [ + Array [ + "slo-original-id-2", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], +} +`; + +exports[`UpdateSLO when error happens during the update restores the previous SLO definition in the repository 5`] = ` +[MockFunction] { + "calls": Array [ + Array [ + Object { + "id": ".slo-observability.summary.pipeline-original-id-2", }, - "sliValue": -1, - "slo": Object { - "budgetingMethod": "occurrences", - "description": "irrelevant", - "groupBy": "*", - "id": "unique-id", - "indicator": Object { - "type": "sli.apm.transactionErrorRate", - }, - "instanceId": "*", - "name": "irrelevant", - "revision": 2, - "tags": Array [ - "critical", - "k8s", + Object { + "ignore": Array [ + 404, ], - "timeWindow": Object { - "duration": "7d", - "type": "rolling", - }, - }, - "status": "NO_DATA", - "statusCode": 0, - "totalEvents": 0, - "transaction": Object { - "name": null, - "type": null, }, + ], + ], + "results": Array [ + Object { + "type": "return", + "value": Promise {}, }, - "id": "slo-unique-id", - "index": ".slo-observability.summary-v2.temp", - "refresh": true, - }, -] + ], +} `; diff --git a/x-pack/plugins/observability/server/services/slo/create_slo.test.ts b/x-pack/plugins/observability/server/services/slo/create_slo.test.ts index bd34d652e5fa4..fe8de00589db6 100644 --- a/x-pack/plugins/observability/server/services/slo/create_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/create_slo.test.ts @@ -5,25 +5,45 @@ * 2.0. */ -import { ElasticsearchClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import { + ElasticsearchClientMock, + elasticsearchServiceMock, + loggingSystemMock, +} from '@kbn/core/server/mocks'; +import { MockedLogger } from '@kbn/logging-mocks'; import { CreateSLO } from './create_slo'; import { fiveMinute, oneMinute } from './fixtures/duration'; import { createAPMTransactionErrorRateIndicator, createSLOParams } from './fixtures/slo'; -import { createSLORepositoryMock, createTransformManagerMock } from './mocks'; +import { + createSLORepositoryMock, + createSummaryTransformManagerMock, + createTransformManagerMock, +} from './mocks'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; describe('CreateSLO', () => { let esClientMock: ElasticsearchClientMock; + let loggerMock: jest.Mocked; let mockRepository: jest.Mocked; let mockTransformManager: jest.Mocked; + let mockSummaryTransformManager: jest.Mocked; let createSLO: CreateSLO; beforeEach(() => { esClientMock = elasticsearchServiceMock.createElasticsearchClient(); + loggerMock = loggingSystemMock.createLogger(); mockRepository = createSLORepositoryMock(); mockTransformManager = createTransformManagerMock(); - createSLO = new CreateSLO(esClientMock, mockRepository, mockTransformManager); + mockSummaryTransformManager = createSummaryTransformManagerMock(); + createSLO = new CreateSLO( + esClientMock, + mockRepository, + mockTransformManager, + mockSummaryTransformManager, + loggerMock, + 'some-space' + ); }); describe('happy path', () => { @@ -32,7 +52,8 @@ describe('CreateSLO', () => { id: 'unique-id', indicator: createAPMTransactionErrorRateIndicator(), }); - mockTransformManager.install.mockResolvedValue('slo-transform-id'); + mockTransformManager.install.mockResolvedValue('slo-id-revision'); + mockSummaryTransformManager.install.mockResolvedValue('slo-summary-id-revision'); const response = await createSLO.execute(sloParams); @@ -47,18 +68,21 @@ describe('CreateSLO', () => { revision: 1, tags: [], enabled: true, + version: 2, createdAt: expect.any(Date), updatedAt: expect.any(Date), }), { throwOnConflict: true } ); - expect(mockTransformManager.install).toHaveBeenCalledWith( - expect.objectContaining({ ...sloParams, id: 'unique-id' }) - ); - expect(mockTransformManager.preview).toHaveBeenCalledWith('slo-transform-id'); - expect(mockTransformManager.start).toHaveBeenCalledWith('slo-transform-id'); - expect(response).toEqual(expect.objectContaining({ id: 'unique-id' })); + + expect(mockTransformManager.install).toHaveBeenCalled(); + expect(mockTransformManager.start).toHaveBeenCalled(); + expect(esClientMock.ingest.putPipeline.mock.calls[0]).toMatchSnapshot(); + expect(mockSummaryTransformManager.install).toHaveBeenCalled(); + expect(mockSummaryTransformManager.start).toHaveBeenCalled(); expect(esClientMock.index.mock.calls[0]).toMatchSnapshot(); + + expect(response).toEqual(expect.objectContaining({ id: 'unique-id' })); }); it('overrides the default values when provided', async () => { @@ -93,32 +117,20 @@ describe('CreateSLO', () => { }); describe('unhappy path', () => { - it('deletes the SLO when transform installation fails', async () => { - mockTransformManager.install.mockRejectedValue(new Error('Transform install error')); - const sloParams = createSLOParams({ indicator: createAPMTransactionErrorRateIndicator() }); - - await expect(createSLO.execute(sloParams)).rejects.toThrowError('Transform install error'); - expect(mockRepository.deleteById).toBeCalled(); - }); - - it('removes the transform and deletes the SLO when transform preview fails', async () => { - mockTransformManager.install.mockResolvedValue('slo-transform-id'); - mockTransformManager.preview.mockRejectedValue(new Error('Transform preview error')); + it('rollbacks new resources on failure', async () => { + mockTransformManager.install.mockRejectedValue(new Error('Rollup transform install error')); const sloParams = createSLOParams({ indicator: createAPMTransactionErrorRateIndicator() }); - await expect(createSLO.execute(sloParams)).rejects.toThrowError('Transform preview error'); - expect(mockTransformManager.uninstall).toBeCalledWith('slo-transform-id'); - expect(mockRepository.deleteById).toBeCalled(); - }); - - it('removes the transform and deletes the SLO when transform start fails', async () => { - mockTransformManager.install.mockResolvedValue('slo-transform-id'); - mockTransformManager.start.mockRejectedValue(new Error('Transform start error')); - const sloParams = createSLOParams({ indicator: createAPMTransactionErrorRateIndicator() }); + await expect(createSLO.execute(sloParams)).rejects.toThrowError( + 'Rollup transform install error' + ); - await expect(createSLO.execute(sloParams)).rejects.toThrowError('Transform start error'); - expect(mockTransformManager.uninstall).toBeCalledWith('slo-transform-id'); - expect(mockRepository.deleteById).toBeCalled(); + expect(mockSummaryTransformManager.stop).toHaveBeenCalled(); + expect(mockSummaryTransformManager.uninstall).toHaveBeenCalled(); + expect(mockTransformManager.stop).toHaveBeenCalled(); + expect(mockTransformManager.uninstall).toHaveBeenCalled(); + expect(esClientMock.ingest.deletePipeline).toHaveBeenCalled(); + expect(mockRepository.deleteById).toHaveBeenCalled(); }); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/create_slo.ts b/x-pack/plugins/observability/server/services/slo/create_slo.ts index cebe8188a7cbd..d7e116d983584 100644 --- a/x-pack/plugins/observability/server/services/slo/create_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/create_slo.ts @@ -5,21 +5,32 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { ALL_VALUE, CreateSLOParams, CreateSLOResponse } from '@kbn/slo-schema'; import { v4 as uuidv4 } from 'uuid'; -import { SLO_SUMMARY_TEMP_INDEX_NAME } from '../../../common/slo/constants'; +import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, + getSLOTransformId, + SLO_MODEL_VERSION, + SLO_SUMMARY_TEMP_INDEX_NAME, +} from '../../../common/slo/constants'; +import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; import { Duration, DurationUnit, SLO } from '../../domain/models'; import { validateSLO } from '../../domain/services'; +import { retryTransientEsErrors } from '../../utils/retry'; import { SLORepository } from './slo_repository'; -import { createTempSummaryDocument } from './summary_transform/helpers/create_temp_summary'; +import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; import { TransformManager } from './transform_manager'; export class CreateSLO { constructor( private esClient: ElasticsearchClient, private repository: SLORepository, - private transformManager: TransformManager + private transformManager: TransformManager, + private summaryTransformManager: TransformManager, + private logger: Logger, + private spaceId: string ) {} public async execute(params: CreateSLOParams): Promise { @@ -27,33 +38,48 @@ export class CreateSLO { validateSLO(slo); await this.repository.save(slo, { throwOnConflict: true }); - let sloTransformId; - try { - sloTransformId = await this.transformManager.install(slo); - } catch (err) { - await this.repository.deleteById(slo.id); - throw err; - } + const rollupTransformId = getSLOTransformId(slo.id, slo.revision); + const summaryTransformId = getSLOSummaryTransformId(slo.id, slo.revision); try { - await this.transformManager.preview(sloTransformId); - await this.transformManager.start(sloTransformId); + await this.transformManager.install(slo); + await this.transformManager.start(rollupTransformId); + await retryTransientEsErrors( + () => this.esClient.ingest.putPipeline(getSLOSummaryPipelineTemplate(slo, this.spaceId)), + { logger: this.logger } + ); + + await this.summaryTransformManager.install(slo); + await this.summaryTransformManager.start(summaryTransformId); + + await retryTransientEsErrors( + () => + this.esClient.index({ + index: SLO_SUMMARY_TEMP_INDEX_NAME, + id: `slo-${slo.id}`, + document: createTempSummaryDocument(slo, this.spaceId), + refresh: true, + }), + { logger: this.logger } + ); } catch (err) { - await Promise.all([ - this.transformManager.uninstall(sloTransformId), - this.repository.deleteById(slo.id), - ]); + this.logger.error( + `Cannot install the SLO [id: ${slo.id}, revision: ${slo.revision}]. Rolling back.` + ); + + await this.summaryTransformManager.stop(summaryTransformId); + await this.summaryTransformManager.uninstall(summaryTransformId); + await this.transformManager.stop(rollupTransformId); + await this.transformManager.uninstall(rollupTransformId); + await this.esClient.ingest.deletePipeline( + { id: getSLOSummaryPipelineId(slo.id, slo.revision) }, + { ignore: [404] } + ); + await this.repository.deleteById(slo.id); throw err; } - await this.esClient.index({ - index: SLO_SUMMARY_TEMP_INDEX_NAME, - id: `slo-${slo.id}`, - document: createTempSummaryDocument(slo), - refresh: true, - }); - return this.toResponse(slo); } @@ -72,6 +98,7 @@ export class CreateSLO { createdAt: now, updatedAt: now, groupBy: !!params.groupBy ? params.groupBy : ALL_VALUE, + version: SLO_MODEL_VERSION, }; } diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts b/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts index 8a19890e2ebc2..506151da864d3 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts @@ -9,20 +9,20 @@ import { rulesClientMock } from '@kbn/alerting-plugin/server/rules_client.mock'; import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; import { ElasticsearchClient } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -import { - getSLOTransformId, - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../../common/slo/constants'; import { DeleteSLO } from './delete_slo'; import { createAPMTransactionErrorRateIndicator, createSLO } from './fixtures/slo'; -import { createSLORepositoryMock, createTransformManagerMock } from './mocks'; +import { + createSLORepositoryMock, + createSummaryTransformManagerMock, + createTransformManagerMock, +} from './mocks'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; describe('DeleteSLO', () => { let mockRepository: jest.Mocked; let mockTransformManager: jest.Mocked; + let mockSummaryTransformManager: jest.Mocked; let mockEsClient: jest.Mocked; let mockRulesClient: jest.Mocked; let deleteSLO: DeleteSLO; @@ -30,52 +30,37 @@ describe('DeleteSLO', () => { beforeEach(() => { mockRepository = createSLORepositoryMock(); mockTransformManager = createTransformManagerMock(); + mockSummaryTransformManager = createSummaryTransformManagerMock(); mockEsClient = elasticsearchServiceMock.createElasticsearchClient(); mockRulesClient = rulesClientMock.create(); - deleteSLO = new DeleteSLO(mockRepository, mockTransformManager, mockEsClient, mockRulesClient); + deleteSLO = new DeleteSLO( + mockRepository, + mockTransformManager, + mockSummaryTransformManager, + mockEsClient, + mockRulesClient + ); }); describe('happy path', () => { - it('removes the transform, the roll up data, the associated rules and the SLO from the repository', async () => { - const slo = createSLO({ indicator: createAPMTransactionErrorRateIndicator() }); + it('removes all resources associatde to the slo', async () => { + const slo = createSLO({ + id: 'irrelevant', + indicator: createAPMTransactionErrorRateIndicator(), + }); mockRepository.findById.mockResolvedValueOnce(slo); await deleteSLO.execute(slo.id); - expect(mockRepository.findById).toHaveBeenCalledWith(slo.id); - expect(mockTransformManager.stop).toHaveBeenCalledWith( - getSLOTransformId(slo.id, slo.revision) - ); - expect(mockTransformManager.uninstall).toHaveBeenCalledWith( - getSLOTransformId(slo.id, slo.revision) - ); - expect(mockEsClient.deleteByQuery).toHaveBeenCalledTimes(2); - expect(mockEsClient.deleteByQuery).toHaveBeenNthCalledWith( - 1, - expect.objectContaining({ - index: SLO_DESTINATION_INDEX_PATTERN, - query: { - match: { - 'slo.id': slo.id, - }, - }, - }) - ); - expect(mockEsClient.deleteByQuery).toHaveBeenNthCalledWith( - 2, - expect.objectContaining({ - index: SLO_SUMMARY_DESTINATION_INDEX_PATTERN, - query: { - match: { - 'slo.id': slo.id, - }, - }, - }) - ); - expect(mockRulesClient.bulkDeleteRules).toHaveBeenCalledWith({ - filter: `alert.attributes.params.sloId:${slo.id}`, - }); - expect(mockRepository.deleteById).toHaveBeenCalledWith(slo.id); + expect(mockRepository.findById).toMatchSnapshot(); + expect(mockSummaryTransformManager.stop).toMatchSnapshot(); + expect(mockSummaryTransformManager.uninstall).toMatchSnapshot(); + expect(mockTransformManager.stop).toMatchSnapshot(); + expect(mockTransformManager.uninstall).toMatchSnapshot(); + expect(mockEsClient.ingest.deletePipeline).toMatchSnapshot(); + expect(mockEsClient.deleteByQuery).toMatchSnapshot(); + expect(mockRulesClient.bulkDeleteRules).toMatchSnapshot(); + expect(mockRepository.deleteById).toMatchSnapshot(); }); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo.ts b/x-pack/plugins/observability/server/services/slo/delete_slo.ts index 78c3bffd05417..e3d6663860222 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo.ts @@ -8,10 +8,13 @@ import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; import { ElasticsearchClient } from '@kbn/core/server'; import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, } from '../../../common/slo/constants'; +import { retryTransientEsErrors } from '../../utils/retry'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; @@ -19,6 +22,7 @@ export class DeleteSLO { constructor( private repository: SLORepository, private transformManager: TransformManager, + private summaryTransformManager: TransformManager, private esClient: ElasticsearchClient, private rulesClient: RulesClientApi ) {} @@ -26,9 +30,20 @@ export class DeleteSLO { public async execute(sloId: string): Promise { const slo = await this.repository.findById(sloId); - const sloTransformId = getSLOTransformId(slo.id, slo.revision); - await this.transformManager.stop(sloTransformId); - await this.transformManager.uninstall(sloTransformId); + const summaryTransformId = getSLOSummaryTransformId(slo.id, slo.revision); + await this.summaryTransformManager.stop(summaryTransformId); + await this.summaryTransformManager.uninstall(summaryTransformId); + + const rollupTransformId = getSLOTransformId(slo.id, slo.revision); + await this.transformManager.stop(rollupTransformId); + await this.transformManager.uninstall(rollupTransformId); + + await retryTransientEsErrors(() => + this.esClient.ingest.deletePipeline( + { id: getSLOSummaryPipelineId(slo.id, slo.revision) }, + { ignore: [404] } + ) + ); await this.deleteRollupData(slo.id); await this.deleteSummaryData(slo.id); diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo_instances.test.ts b/x-pack/plugins/observability/server/services/slo/delete_slo_instances.test.ts index 8a9c64a6b441c..ca4eac790bd04 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo_instances.test.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo_instances.test.ts @@ -43,7 +43,7 @@ describe('DeleteSLOInstances', () => { expect(mockEsClient.deleteByQuery).toHaveBeenCalledTimes(2); expect(mockEsClient.deleteByQuery.mock.calls[0][0]).toMatchInlineSnapshot(` Object { - "index": ".slo-observability.sli-v2*", + "index": ".slo-observability.sli-v3*", "query": Object { "bool": Object { "should": Array [ @@ -103,7 +103,7 @@ describe('DeleteSLOInstances', () => { `); expect(mockEsClient.deleteByQuery.mock.calls[1][0]).toMatchInlineSnapshot(` Object { - "index": ".slo-observability.summary-v2*", + "index": ".slo-observability.summary-v3*", "query": Object { "bool": Object { "should": Array [ diff --git a/x-pack/plugins/observability/server/services/slo/find_slo.test.ts b/x-pack/plugins/observability/server/services/slo/find_slo.test.ts index 10436bc0fad54..e8d80ef8e74f5 100644 --- a/x-pack/plugins/observability/server/services/slo/find_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/find_slo.test.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { ALL_VALUE } from '@kbn/slo-schema'; +import { ALL_VALUE, Paginated } from '@kbn/slo-schema'; +import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; import { SLO } from '../../domain/models'; import { FindSLO } from './find_slo'; import { createSLO } from './fixtures/slo'; import { createSLORepositoryMock, createSummarySearchClientMock } from './mocks'; import { SLORepository } from './slo_repository'; -import { Paginated, SLOSummary, SummarySearchClient } from './summary_search_client'; +import { SLOSummary, SummarySearchClient } from './summary_search_client'; describe('FindSLO', () => { let mockRepository: jest.Mocked; @@ -95,6 +96,7 @@ describe('FindSLO', () => { revision: slo.revision, groupBy: slo.groupBy, instanceId: ALL_VALUE, + version: SLO_MODEL_VERSION, }, ], }); @@ -147,7 +149,7 @@ describe('FindSLO', () => { await expect(findSLO.execute({ perPage: '5000' })).resolves.not.toThrow(); await expect(findSLO.execute({ perPage: '5001' })).rejects.toThrowError( - 'perPage limit to 5000' + 'perPage limit set to 5000' ); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/find_slo.ts b/x-pack/plugins/observability/server/services/slo/find_slo.ts index cf8150db3e627..fb90ec86d04d5 100644 --- a/x-pack/plugins/observability/server/services/slo/find_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/find_slo.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { FindSLOParams, FindSLOResponse, findSLOResponseSchema } from '@kbn/slo-schema'; +import { FindSLOParams, FindSLOResponse, findSLOResponseSchema, Pagination } from '@kbn/slo-schema'; import { SLO, SLOWithSummary } from '../../domain/models'; import { IllegalArgumentError } from '../../errors'; import { SLORepository } from './slo_repository'; -import { Pagination, SLOSummary, Sort, SummarySearchClient } from './summary_search_client'; +import { SLOSummary, Sort, SummarySearchClient } from './summary_search_client'; const DEFAULT_PAGE = 1; const DEFAULT_PER_PAGE = 25; @@ -55,7 +55,7 @@ function toPagination(params: FindSLOParams): Pagination { const perPage = Number(params.perPage); if (!isNaN(perPage) && perPage > MAX_PER_PAGE) { - throw new IllegalArgumentError('perPage limit to 5000'); + throw new IllegalArgumentError(`perPage limit set to ${MAX_PER_PAGE}`); } return { diff --git a/x-pack/plugins/observability/server/services/slo/find_slo_definitions.ts b/x-pack/plugins/observability/server/services/slo/find_slo_definitions.ts index 157e5b4be5696..38076d67202d5 100644 --- a/x-pack/plugins/observability/server/services/slo/find_slo_definitions.ts +++ b/x-pack/plugins/observability/server/services/slo/find_slo_definitions.ts @@ -5,14 +5,40 @@ * 2.0. */ -import { FindSloDefinitionsResponse, findSloDefinitionsResponseSchema } from '@kbn/slo-schema'; +import { + FindSLODefinitionsParams, + FindSLODefinitionsResponse, + findSloDefinitionsResponseSchema, + Pagination, +} from '@kbn/slo-schema'; +import { IllegalArgumentError } from '../../errors'; import { SLORepository } from './slo_repository'; +const MAX_PER_PAGE = 1000; +const DEFAULT_PER_PAGE = 100; +const DEFAULT_PAGE = 1; + export class FindSLODefinitions { constructor(private repository: SLORepository) {} - public async execute(search: string): Promise { - const sloList = await this.repository.search(search); - return findSloDefinitionsResponseSchema.encode(sloList); + public async execute(params: FindSLODefinitionsParams): Promise { + const result = await this.repository.search(params.search ?? '', toPagination(params), { + includeOutdatedOnly: params.includeOutdatedOnly === true ? true : false, + }); + return findSloDefinitionsResponseSchema.encode(result); + } +} + +function toPagination(params: FindSLODefinitionsParams): Pagination { + const page = Number(params.page); + const perPage = Number(params.perPage); + + if (!isNaN(perPage) && perPage > MAX_PER_PAGE) { + throw new IllegalArgumentError(`perPage limit set to ${MAX_PER_PAGE}`); } + + return { + page: !isNaN(page) && page >= 1 ? page : DEFAULT_PAGE, + perPage: !isNaN(perPage) && perPage >= 1 ? perPage : DEFAULT_PER_PAGE, + }; } diff --git a/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts b/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts index 2bd320cbb8d65..0f75c83775489 100644 --- a/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts +++ b/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts @@ -15,6 +15,7 @@ import { } from '@kbn/slo-schema'; import { cloneDeep } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; +import { SLO_MODEL_VERSION } from '../../../../common/slo/constants'; import { APMTransactionDurationIndicator, APMTransactionErrorRateIndicator, @@ -139,7 +140,7 @@ export const createHistogramIndicator = ( }, }); -const defaultSLO: Omit = { +const defaultSLO: Omit = { name: 'irrelevant', description: 'irrelevant', timeWindow: sevenDaysRolling(), @@ -190,6 +191,7 @@ export const createSLO = (params: Partial = {}): SLO => { revision: 1, createdAt: now, updatedAt: now, + version: SLO_MODEL_VERSION, ...params, }); }; diff --git a/x-pack/plugins/observability/server/services/slo/get_slo.test.ts b/x-pack/plugins/observability/server/services/slo/get_slo.test.ts index 1a5efccc9eb2a..18fe85cdfb0b1 100644 --- a/x-pack/plugins/observability/server/services/slo/get_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/get_slo.test.ts @@ -6,6 +6,7 @@ */ import { ALL_VALUE } from '@kbn/slo-schema'; +import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; import { createAPMTransactionErrorRateIndicator, createSLO } from './fixtures/slo'; import { GetSLO } from './get_slo'; import { createSummaryClientMock, createSLORepositoryMock } from './mocks'; @@ -84,6 +85,7 @@ describe('GetSLO', () => { revision: slo.revision, groupBy: slo.groupBy, instanceId: ALL_VALUE, + version: SLO_MODEL_VERSION, }); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/index.ts b/x-pack/plugins/observability/server/services/slo/index.ts index 7c99c289ae90b..2a939c56fde4b 100644 --- a/x-pack/plugins/observability/server/services/slo/index.ts +++ b/x-pack/plugins/observability/server/services/slo/index.ts @@ -14,10 +14,10 @@ export * from './get_slo'; export * from './historical_summary_client'; export * from './resource_installer'; export * from './slo_installer'; -export * from './summary_transform/summary_transform_installer'; export * from './sli_client'; export * from './slo_repository'; export * from './transform_manager'; +export * from './summay_transform_manager'; export * from './update_slo'; export * from './summary_client'; export * from './get_slo_instances'; diff --git a/x-pack/plugins/observability/server/services/slo/manage_slo.test.ts b/x-pack/plugins/observability/server/services/slo/manage_slo.test.ts index 78396fa74cbee..bace47b69ff4b 100644 --- a/x-pack/plugins/observability/server/services/slo/manage_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/manage_slo.test.ts @@ -7,19 +7,26 @@ import { createSLO } from './fixtures/slo'; import { ManageSLO } from './manage_slo'; -import { createSLORepositoryMock, createTransformManagerMock } from './mocks'; +import { + createSLORepositoryMock, + createSummaryTransformManagerMock, + createTransformManagerMock, +} from './mocks'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; describe('ManageSLO', () => { let mockRepository: jest.Mocked; let mockTransformManager: jest.Mocked; + let mockSummaryTransformManager: jest.Mocked; let manageSLO: ManageSLO; beforeEach(() => { mockRepository = createSLORepositoryMock(); mockTransformManager = createTransformManagerMock(); - manageSLO = new ManageSLO(mockRepository, mockTransformManager); + mockSummaryTransformManager = createSummaryTransformManagerMock(); + + manageSLO = new ManageSLO(mockRepository, mockTransformManager, mockSummaryTransformManager); }); describe('Enable', () => { @@ -30,16 +37,18 @@ describe('ManageSLO', () => { await manageSLO.enable(slo.id); expect(mockTransformManager.start).not.toHaveBeenCalled(); + expect(mockSummaryTransformManager.start).not.toHaveBeenCalled(); expect(mockRepository.save).not.toHaveBeenCalled(); }); it('enables the slo when disabled', async () => { - const slo = createSLO({ enabled: false }); + const slo = createSLO({ id: 'irrelevant', enabled: false }); mockRepository.findById.mockResolvedValue(slo); await manageSLO.enable(slo.id); - expect(mockTransformManager.start).toHaveBeenCalled(); + expect(mockTransformManager.start).toMatchSnapshot(); + expect(mockSummaryTransformManager.start).toMatchSnapshot(); expect(mockRepository.save).toHaveBeenCalledWith(expect.objectContaining({ enabled: true })); }); }); @@ -52,16 +61,18 @@ describe('ManageSLO', () => { await manageSLO.disable(slo.id); expect(mockTransformManager.stop).not.toHaveBeenCalled(); + expect(mockSummaryTransformManager.stop).not.toHaveBeenCalled(); expect(mockRepository.save).not.toHaveBeenCalled(); }); it('disables the slo when enabled', async () => { - const slo = createSLO({ enabled: true }); + const slo = createSLO({ id: 'irrelevant', enabled: true }); mockRepository.findById.mockResolvedValue(slo); await manageSLO.disable(slo.id); - expect(mockTransformManager.stop).toHaveBeenCalled(); + expect(mockTransformManager.stop).toMatchSnapshot(); + expect(mockSummaryTransformManager.stop).toMatchSnapshot(); expect(mockRepository.save).toHaveBeenCalledWith(expect.objectContaining({ enabled: false })); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/manage_slo.ts b/x-pack/plugins/observability/server/services/slo/manage_slo.ts index b7220f084a64d..9d9fd6eb1705c 100644 --- a/x-pack/plugins/observability/server/services/slo/manage_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/manage_slo.ts @@ -5,12 +5,16 @@ * 2.0. */ -import { getSLOTransformId } from '../../../common/slo/constants'; +import { getSLOSummaryTransformId, getSLOTransformId } from '../../../common/slo/constants'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; export class ManageSLO { - constructor(private repository: SLORepository, private transformManager: TransformManager) {} + constructor( + private repository: SLORepository, + private transformManager: TransformManager, + private summaryTransformManager: TransformManager + ) {} async enable(sloId: string) { const slo = await this.repository.findById(sloId); @@ -18,6 +22,7 @@ export class ManageSLO { return; } + await this.summaryTransformManager.start(getSLOSummaryTransformId(slo.id, slo.revision)); await this.transformManager.start(getSLOTransformId(slo.id, slo.revision)); slo.enabled = true; slo.updatedAt = new Date(); @@ -30,6 +35,7 @@ export class ManageSLO { return; } + await this.summaryTransformManager.stop(getSLOSummaryTransformId(slo.id, slo.revision)); await this.transformManager.stop(getSLOTransformId(slo.id, slo.revision)); slo.enabled = false; slo.updatedAt = new Date(); diff --git a/x-pack/plugins/observability/server/services/slo/mocks/index.ts b/x-pack/plugins/observability/server/services/slo/mocks/index.ts index 979c3057d1e8e..eb8db093a7174 100644 --- a/x-pack/plugins/observability/server/services/slo/mocks/index.ts +++ b/x-pack/plugins/observability/server/services/slo/mocks/index.ts @@ -10,7 +10,6 @@ import { SLIClient } from '../sli_client'; import { SLORepository } from '../slo_repository'; import { SummaryClient } from '../summary_client'; import { SummarySearchClient } from '../summary_search_client'; -import { SummaryTransformInstaller } from '../summary_transform/summary_transform_installer'; import { TransformManager } from '../transform_manager'; const createResourceInstallerMock = (): jest.Mocked => { @@ -19,13 +18,17 @@ const createResourceInstallerMock = (): jest.Mocked => { }; }; -const createSummaryTransformInstallerMock = (): jest.Mocked => { +const createTransformManagerMock = (): jest.Mocked => { return { - installAndStart: jest.fn(), + install: jest.fn(), + preview: jest.fn(), + uninstall: jest.fn(), + start: jest.fn(), + stop: jest.fn(), }; }; -const createTransformManagerMock = (): jest.Mocked => { +const createSummaryTransformManagerMock = (): jest.Mocked => { return { install: jest.fn(), preview: jest.fn(), @@ -65,8 +68,8 @@ const createSLIClientMock = (): jest.Mocked => { export { createResourceInstallerMock, - createSummaryTransformInstallerMock, createTransformManagerMock, + createSummaryTransformManagerMock, createSLORepositoryMock, createSummaryClientMock, createSummarySearchClientMock, diff --git a/x-pack/plugins/observability/server/services/slo/reset_slo.test.ts b/x-pack/plugins/observability/server/services/slo/reset_slo.test.ts new file mode 100644 index 0000000000000..feae6695fbd33 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/reset_slo.test.ts @@ -0,0 +1,87 @@ +/* + * 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 { ElasticsearchClient } from '@kbn/core/server'; +import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { MockedLogger } from '@kbn/logging-mocks'; + +import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; +import { createSLO } from './fixtures/slo'; +import { + createSLORepositoryMock, + createSummaryTransformManagerMock, + createTransformManagerMock, +} from './mocks'; +import { ResetSLO } from './reset_slo'; +import { SLORepository } from './slo_repository'; +import { TransformManager } from './transform_manager'; + +const TEST_DATE = new Date('2023-01-01T00:00:00.000Z'); + +describe('ResetSLO', () => { + let mockRepository: jest.Mocked; + let mockTransformManager: jest.Mocked; + let mockSummaryTransformManager: jest.Mocked; + let mockEsClient: jest.Mocked; + let loggerMock: jest.Mocked; + let resetSLO: ResetSLO; + + beforeEach(() => { + loggerMock = loggingSystemMock.createLogger(); + mockRepository = createSLORepositoryMock(); + mockTransformManager = createTransformManagerMock(); + mockEsClient = elasticsearchServiceMock.createElasticsearchClient(); + mockSummaryTransformManager = createSummaryTransformManagerMock(); + resetSLO = new ResetSLO( + mockEsClient, + mockRepository, + mockTransformManager, + mockSummaryTransformManager, + loggerMock, + 'some-space' + ); + jest.useFakeTimers().setSystemTime(TEST_DATE); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + it('resets all associated resources', async () => { + const slo = createSLO({ id: 'irrelevant', version: 1 }); + mockRepository.findById.mockResolvedValueOnce(slo); + mockRepository.save.mockImplementation((v) => Promise.resolve(v)); + + await resetSLO.execute(slo.id); + + // delete existing resources and data + expect(mockSummaryTransformManager.stop).toMatchSnapshot(); + expect(mockSummaryTransformManager.uninstall).toMatchSnapshot(); + + expect(mockTransformManager.stop).toMatchSnapshot(); + expect(mockTransformManager.uninstall).toMatchSnapshot(); + + expect(mockEsClient.deleteByQuery).toMatchSnapshot(); + + // install resources + expect(mockSummaryTransformManager.install).toMatchSnapshot(); + expect(mockSummaryTransformManager.start).toMatchSnapshot(); + + expect(mockEsClient.ingest.putPipeline).toMatchSnapshot(); + + expect(mockTransformManager.install).toMatchSnapshot(); + expect(mockTransformManager.start).toMatchSnapshot(); + + expect(mockEsClient.index).toMatchSnapshot(); + + expect(mockRepository.save).toHaveBeenCalledWith({ + ...slo, + version: SLO_MODEL_VERSION, + updatedAt: expect.anything(), + }); + }); +}); diff --git a/x-pack/plugins/observability/server/services/slo/reset_slo.ts b/x-pack/plugins/observability/server/services/slo/reset_slo.ts new file mode 100644 index 0000000000000..8c4a374761979 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/reset_slo.ts @@ -0,0 +1,130 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { resetSLOResponseSchema } from '@kbn/slo-schema'; +import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, + getSLOTransformId, + SLO_DESTINATION_INDEX_PATTERN, + SLO_MODEL_VERSION, + SLO_SUMMARY_DESTINATION_INDEX_PATTERN, + SLO_SUMMARY_TEMP_INDEX_NAME, +} from '../../../common/slo/constants'; +import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; +import { retryTransientEsErrors } from '../../utils/retry'; +import { SLORepository } from './slo_repository'; +import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; +import { TransformManager } from './transform_manager'; + +export class ResetSLO { + constructor( + private esClient: ElasticsearchClient, + private repository: SLORepository, + private transformManager: TransformManager, + private summaryTransformManager: TransformManager, + private logger: Logger, + private spaceId: string + ) {} + + public async execute(sloId: string) { + const slo = await this.repository.findById(sloId); + + const summaryTransformId = getSLOSummaryTransformId(slo.id, slo.revision); + await this.summaryTransformManager.stop(summaryTransformId); + await this.summaryTransformManager.uninstall(summaryTransformId); + + const rollupTransformId = getSLOTransformId(slo.id, slo.revision); + await this.transformManager.stop(rollupTransformId); + await this.transformManager.uninstall(rollupTransformId); + + await Promise.all([this.deleteRollupData(slo.id), this.deleteSummaryData(slo.id)]); + + try { + await this.transformManager.install(slo); + await this.transformManager.start(rollupTransformId); + await retryTransientEsErrors( + () => this.esClient.ingest.putPipeline(getSLOSummaryPipelineTemplate(slo, this.spaceId)), + { logger: this.logger } + ); + + await this.summaryTransformManager.install(slo); + await this.summaryTransformManager.start(summaryTransformId); + + await retryTransientEsErrors( + () => + this.esClient.index({ + index: SLO_SUMMARY_TEMP_INDEX_NAME, + id: `slo-${slo.id}`, + document: createTempSummaryDocument(slo, this.spaceId), + refresh: true, + }), + { logger: this.logger } + ); + } catch (err) { + this.logger.error( + `Cannot reset the SLO [id: ${slo.id}, revision: ${slo.revision}]. Rolling back.` + ); + + await this.summaryTransformManager.stop(summaryTransformId); + await this.summaryTransformManager.uninstall(summaryTransformId); + await this.transformManager.stop(rollupTransformId); + await this.transformManager.uninstall(rollupTransformId); + await this.esClient.ingest.deletePipeline( + { id: getSLOSummaryPipelineId(slo.id, slo.revision) }, + { ignore: [404] } + ); + + throw err; + } + + const updatedSlo = await this.repository.save({ + ...slo, + version: SLO_MODEL_VERSION, + updatedAt: new Date(), + }); + + return resetSLOResponseSchema.encode(updatedSlo); + } + + /** + * Deleting all SLI rollup data matching the sloId. All revision will be deleted in case of + * residual documents. + * + * @param sloId + */ + private async deleteRollupData(sloId: string): Promise { + await this.esClient.deleteByQuery({ + index: SLO_DESTINATION_INDEX_PATTERN, + refresh: true, + query: { + bool: { + filter: [{ term: { 'slo.id': sloId } }], + }, + }, + }); + } + + /** + * Deleting the summary documents matching the sloId. All revision will be deleted in case of + * residual documents. + * + * @param sloId + */ + private async deleteSummaryData(sloId: string): Promise { + await this.esClient.deleteByQuery({ + index: SLO_SUMMARY_DESTINATION_INDEX_PATTERN, + refresh: true, + query: { + bool: { + filter: [{ term: { 'slo.id': sloId } }], + }, + }, + }); + } +} diff --git a/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts b/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts index 6634b3bc052af..6fe98ebf8f6b2 100644 --- a/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts +++ b/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts @@ -15,7 +15,6 @@ import { SLO_SUMMARY_COMPONENT_TEMPLATE_MAPPINGS_NAME, SLO_SUMMARY_COMPONENT_TEMPLATE_SETTINGS_NAME, SLO_SUMMARY_INDEX_TEMPLATE_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, } from '../../../common/slo/constants'; import { DefaultResourceInstaller } from './resource_installer'; @@ -54,14 +53,10 @@ describe('resourceInstaller', () => { expect.objectContaining({ name: SLO_SUMMARY_INDEX_TEMPLATE_NAME }) ); - expect(mockClusterClient.ingest.putPipeline).toHaveBeenCalledTimes(2); + expect(mockClusterClient.ingest.putPipeline).toHaveBeenCalledTimes(1); expect(mockClusterClient.ingest.putPipeline).toHaveBeenNthCalledWith( 1, expect.objectContaining({ id: SLO_INGEST_PIPELINE_NAME }) ); - expect(mockClusterClient.ingest.putPipeline).toHaveBeenNthCalledWith( - 2, - expect.objectContaining({ id: SLO_SUMMARY_INGEST_PIPELINE_NAME }) - ); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/resource_installer.ts b/x-pack/plugins/observability/server/services/slo/resource_installer.ts index 2975e07333599..c639f4cc6c3d7 100644 --- a/x-pack/plugins/observability/server/services/slo/resource_installer.ts +++ b/x-pack/plugins/observability/server/services/slo/resource_installer.ts @@ -28,13 +28,11 @@ import { SLO_SUMMARY_DESTINATION_INDEX_NAME, SLO_SUMMARY_INDEX_TEMPLATE_NAME, SLO_SUMMARY_INDEX_TEMPLATE_PATTERN, - SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TEMP_INDEX_NAME, } from '../../../common/slo/constants'; import { getSLOIndexTemplate } from '../../assets/index_templates/slo_index_templates'; import { getSLOSummaryIndexTemplate } from '../../assets/index_templates/slo_summary_index_templates'; import { getSLOPipelineTemplate } from '../../assets/ingest_templates/slo_pipeline_template'; -import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; import { retryTransientEsErrors } from '../../utils/retry'; export interface ResourceInstaller { @@ -87,10 +85,6 @@ export class DefaultResourceInstaller implements ResourceInstaller { await this.createOrUpdateIngestPipelineTemplate( getSLOPipelineTemplate(SLO_INGEST_PIPELINE_NAME, SLO_INGEST_PIPELINE_INDEX_NAME_PREFIX) ); - - await this.createOrUpdateIngestPipelineTemplate( - getSLOSummaryPipelineTemplate(SLO_SUMMARY_INGEST_PIPELINE_NAME) - ); } catch (err) { this.logger.error(`Error installing resources shared for SLO: ${err.message}`); throw err; diff --git a/x-pack/plugins/observability/server/services/slo/slo_installer.test.ts b/x-pack/plugins/observability/server/services/slo/slo_installer.test.ts index 6bd9f798c6234..92d0865ec5c9f 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_installer.test.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_installer.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { MockedLogger } from '@kbn/logging-mocks'; -import { createResourceInstallerMock, createSummaryTransformInstallerMock } from './mocks'; +import { createResourceInstallerMock } from './mocks'; import { DefaultSLOInstaller } from './slo_installer'; describe('SLO Installer', () => { @@ -19,16 +19,10 @@ describe('SLO Installer', () => { it.skip('handles concurrent installation', async () => { const resourceInstaller = createResourceInstallerMock(); - const summaryTransformInstaller = createSummaryTransformInstallerMock(); - const service = new DefaultSLOInstaller( - resourceInstaller, - summaryTransformInstaller, - loggerMock - ); + const service = new DefaultSLOInstaller(resourceInstaller, loggerMock); await Promise.all([service.install(), service.install()]); expect(resourceInstaller.ensureCommonResourcesInstalled).toHaveBeenCalledTimes(1); - expect(summaryTransformInstaller.installAndStart).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/slo_installer.ts b/x-pack/plugins/observability/server/services/slo/slo_installer.ts index bdee31f62912d..9484ecd907d9f 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_installer.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_installer.ts @@ -6,7 +6,7 @@ */ import { Logger } from '@kbn/core/server'; -import { ResourceInstaller, SummaryTransformInstaller } from '.'; +import { ResourceInstaller } from '.'; export interface SLOInstaller { install(): Promise; @@ -15,11 +15,7 @@ export interface SLOInstaller { export class DefaultSLOInstaller implements SLOInstaller { private isInstalling: boolean = false; - constructor( - private sloResourceInstaller: ResourceInstaller, - private sloSummaryInstaller: SummaryTransformInstaller, - private logger: Logger - ) {} + constructor(private sloResourceInstaller: ResourceInstaller, private logger: Logger) {} public async install() { if (this.isInstalling) { @@ -32,9 +28,8 @@ export class DefaultSLOInstaller implements SLOInstaller { installTimeout = setTimeout(() => (this.isInstalling = false), 60000); await this.sloResourceInstaller.ensureCommonResourcesInstalled(); - await this.sloSummaryInstaller.installAndStart(); } catch (error) { - this.logger.error('Failed to install SLO common resources and summary transforms'); + this.logger.error('Failed to install SLO common resources'); } finally { this.isInstalling = false; clearTimeout(installTimeout); diff --git a/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts b/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts index 4b61bff04ea6f..65248d487a392 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_repository.test.ts @@ -8,6 +8,7 @@ import { SavedObjectsClientContract, SavedObjectsFindResponse } from '@kbn/core/server'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { sloSchema } from '@kbn/slo-schema'; +import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; import { SLO, StoredSLO } from '../../domain/models'; import { SLOIdConflict, SLONotFound } from '../../errors'; import { SO_SLO_TYPE } from '../../saved_objects'; @@ -164,19 +165,42 @@ describe('KibanaSavedObjectsSLORepository', () => { expect(soClientMock.delete).toHaveBeenCalledWith(SO_SLO_TYPE, SOME_SLO.id); }); - it('searches by name', async () => { - const repository = new KibanaSavedObjectsSLORepository(soClientMock); - soClientMock.find.mockResolvedValueOnce(soFindResponse([SOME_SLO, ANOTHER_SLO])); + describe('search', () => { + it('searches by name', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(soFindResponse([SOME_SLO, ANOTHER_SLO])); - const results = await repository.search(SOME_SLO.name); + const results = await repository.search(SOME_SLO.name, { page: 1, perPage: 100 }); - expect(results).toEqual([SOME_SLO, ANOTHER_SLO]); - expect(soClientMock.find).toHaveBeenCalledWith({ - type: SO_SLO_TYPE, - page: 1, - perPage: 25, - search: SOME_SLO.name, - searchFields: ['name'], + expect(results.results).toEqual([SOME_SLO, ANOTHER_SLO]); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 100, + search: SOME_SLO.name, + searchFields: ['name'], + }); + }); + + it('searches only the outdated ones', async () => { + const repository = new KibanaSavedObjectsSLORepository(soClientMock); + soClientMock.find.mockResolvedValueOnce(soFindResponse([SOME_SLO, ANOTHER_SLO])); + + const results = await repository.search( + SOME_SLO.name, + { page: 1, perPage: 100 }, + { includeOutdatedOnly: true } + ); + + expect(results.results).toEqual([SOME_SLO, ANOTHER_SLO]); + expect(soClientMock.find).toHaveBeenCalledWith({ + type: SO_SLO_TYPE, + page: 1, + perPage: 100, + search: SOME_SLO.name, + searchFields: ['name'], + filter: `slo.attributes.version < ${SLO_MODEL_VERSION}`, + }); }); }); }); diff --git a/x-pack/plugins/observability/server/services/slo/slo_repository.ts b/x-pack/plugins/observability/server/services/slo/slo_repository.ts index cc595ed0b0099..be6c9266b9e90 100644 --- a/x-pack/plugins/observability/server/services/slo/slo_repository.ts +++ b/x-pack/plugins/observability/server/services/slo/slo_repository.ts @@ -7,10 +7,11 @@ import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsErrorHelpers } from '@kbn/core-saved-objects-server'; -import { sloSchema } from '@kbn/slo-schema'; +import { Paginated, Pagination, sloSchema } from '@kbn/slo-schema'; import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; import * as t from 'io-ts'; +import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; import { SLO, StoredSLO } from '../../domain/models'; import { SLOIdConflict, SLONotFound } from '../../errors'; import { SO_SLO_TYPE } from '../../saved_objects'; @@ -20,7 +21,11 @@ export interface SLORepository { findAllByIds(ids: string[]): Promise; findById(id: string): Promise; deleteById(id: string): Promise; - search(search: string): Promise; + search( + search: string, + pagination: Pagination, + options?: { includeOutdatedOnly?: boolean } + ): Promise>; } export class KibanaSavedObjectsSLORepository implements SLORepository { @@ -99,19 +104,28 @@ export class KibanaSavedObjectsSLORepository implements SLORepository { } } - async search(search: string): Promise { - try { - const response = await this.soClient.find({ - type: SO_SLO_TYPE, - page: 1, - perPage: 25, - search, - searchFields: ['name'], - }); - return response.saved_objects.map((slo) => toSLO(slo.attributes)); - } catch (err) { - throw err; - } + async search( + search: string, + pagination: Pagination, + options: { includeOutdatedOnly?: boolean } = { includeOutdatedOnly: false } + ): Promise> { + const response = await this.soClient.find({ + type: SO_SLO_TYPE, + page: pagination.page, + perPage: pagination.perPage, + search, + searchFields: ['name'], + ...(!!options.includeOutdatedOnly && { + filter: `slo.attributes.version < ${SLO_MODEL_VERSION}`, + }), + }); + + return { + total: response.total, + perPage: response.per_page, + page: response.page, + results: response.saved_objects.map((slo) => toSLO(slo.attributes)), + }; } } @@ -121,7 +135,13 @@ function toStoredSLO(slo: SLO): StoredSLO { function toSLO(storedSLO: StoredSLO): SLO { return pipe( - sloSchema.decode(storedSLO), + sloSchema.decode({ + ...storedSLO, + // version was added in 8.12.0. This is a safeguard against SO migration issue. + // if not present, we considered the version to be 1, e.g. not migrated. + // We would need to call the _reset api on this SLO. + version: storedSLO.version ?? 1, + }), fold(() => { throw new Error('Invalid Stored SLO'); }, t.identity) diff --git a/x-pack/plugins/observability/server/services/slo/summary_search_client.test.ts b/x-pack/plugins/observability/server/services/slo/summary_search_client.test.ts index fc53bf1e7181b..256aa9164ea3b 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_search_client.test.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_search_client.test.ts @@ -7,17 +7,13 @@ import { ElasticsearchClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { loggerMock } from '@kbn/logging-mocks'; +import { Pagination } from '@kbn/slo-schema/src/models/pagination'; import { aHitFromSummaryIndex, aHitFromTempSummaryIndex, aSummaryDocument, } from './fixtures/summary_search_document'; -import { - DefaultSummarySearchClient, - Pagination, - Sort, - SummarySearchClient, -} from './summary_search_client'; +import { DefaultSummarySearchClient, Sort, SummarySearchClient } from './summary_search_client'; const defaultSort: Sort = { field: 'sli_value', @@ -34,7 +30,7 @@ describe('Summary Search Client', () => { beforeEach(() => { esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - service = new DefaultSummarySearchClient(esClientMock, loggerMock.create()); + service = new DefaultSummarySearchClient(esClientMock, loggerMock.create(), 'some-space'); }); it('returns an empty response on error', async () => { @@ -74,10 +70,7 @@ describe('Summary Search Client', () => { const SLO_ID3 = 'slo-three'; const SLO_ID4 = 'slo-four'; const SLO_ID5 = 'slo-five'; - esClientMock.count.mockResolvedValue({ - count: 8, - _shards: { failed: 0, successful: 1, total: 1 }, - }); + esClientMock.search.mockResolvedValue({ took: 0, timed_out: false, @@ -89,7 +82,7 @@ describe('Summary Search Client', () => { }, hits: { total: { - value: 6, + value: 8, relation: 'eq', }, max_score: 1, diff --git a/x-pack/plugins/observability/server/services/slo/summary_search_client.ts b/x-pack/plugins/observability/server/services/slo/summary_search_client.ts index 2361e8dd3678e..9715d727f6fc5 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_search_client.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_search_client.ts @@ -6,9 +6,10 @@ */ import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { ALL_VALUE } from '@kbn/slo-schema'; +import { ALL_VALUE, Paginated, Pagination } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; import _ from 'lodash'; +import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { SLOId, Status, Summary } from '../../domain/models'; import { toHighPrecision } from '../../utils/number'; @@ -30,13 +31,6 @@ interface EsSummaryDocument { isTempDoc: boolean; } -export interface Paginated { - total: number; - page: number; - perPage: number; - results: T[]; -} - export interface SLOSummary { id: SLOId; instanceId: string; @@ -49,17 +43,16 @@ export interface Sort { direction: 'asc' | 'desc'; } -export interface Pagination { - page: number; - perPage: number; -} - export interface SummarySearchClient { search(kqlQuery: string, sort: Sort, pagination: Pagination): Promise>; } export class DefaultSummarySearchClient implements SummarySearchClient { - constructor(private esClient: ElasticsearchClient, private logger: Logger) {} + constructor( + private esClient: ElasticsearchClient, + private logger: Logger, + private spaceId: string + ) {} async search( kqlQuery: string, @@ -67,18 +60,14 @@ export class DefaultSummarySearchClient implements SummarySearchClient { pagination: Pagination ): Promise> { try { - const { count: total } = await this.esClient.count({ - index: SLO_SUMMARY_DESTINATION_INDEX_PATTERN, - query: getElastichsearchQueryOrThrow(kqlQuery), - }); - - if (total === 0) { - return { total: 0, perPage: pagination.perPage, page: pagination.page, results: [] }; - } - const summarySearch = await this.esClient.search({ index: SLO_SUMMARY_DESTINATION_INDEX_PATTERN, - query: getElastichsearchQueryOrThrow(kqlQuery), + track_total_hits: true, + query: { + bool: { + filter: [{ term: { spaceId: this.spaceId } }, getElastichsearchQueryOrThrow(kqlQuery)], + }, + }, sort: { // non-temp first, then temp documents isTempDoc: { @@ -92,6 +81,11 @@ export class DefaultSummarySearchClient implements SummarySearchClient { size: pagination.perPage * 2, // twice as much as we return, in case they are all duplicate temp/non-temp summary }); + const total = (summarySearch.hits.total as SearchTotalHits).value ?? 0; + if (total === 0) { + return { total: 0, perPage: pagination.perPage, page: pagination.page, results: [] }; + } + const [tempSummaryDocuments, summaryDocuments] = _.partition( summarySearch.hits.hits, (doc) => !!doc._source?.isTempDoc diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/__snapshots__/summary_transform_installer.test.ts.snap b/x-pack/plugins/observability/server/services/slo/summary_transform/__snapshots__/summary_transform_installer.test.ts.snap deleted file mode 100644 index 5161c5e5cb51b..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/__snapshots__/summary_transform_installer.test.ts.snap +++ /dev/null @@ -1,1192 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Summary Transform Installer installs only the missing summary transforms 1`] = ` -Array [ - Array [ - Object { - "_meta": Object { - "managed": true, - "managed_by": "observability", - "version": 3, - }, - "description": "Summarize every SLO with timeslices budgeting method and a 7 days rolling time window", - "dest": Object { - "index": ".slo-observability.summary-v2", - "pipeline": ".slo-observability.summary.pipeline", - }, - "frequency": "1m", - "pivot": Object { - "aggregations": Object { - "_objectiveTarget": Object { - "max": Object { - "field": "slo.objective.target", - }, - }, - "errorBudgetConsumed": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetInitial": "errorBudgetInitial", - "sliValue": "sliValue", - }, - "script": "if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }", - }, - }, - "errorBudgetInitial": Object { - "bucket_script": Object { - "buckets_path": Object { - "objectiveTarget": "_objectiveTarget", - }, - "script": "1 - params.objectiveTarget", - }, - }, - "errorBudgetRemaining": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetConsummed": "errorBudgetConsumed", - }, - "script": "1 - params.errorBudgetConsummed", - }, - }, - "goodEvents": Object { - "sum": Object { - "field": "slo.isGoodSlice", - }, - }, - "sliValue": Object { - "bucket_script": Object { - "buckets_path": Object { - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - }, - "script": "if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }", - }, - }, - "statusCode": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetRemaining": "errorBudgetRemaining", - "objectiveTarget": "_objectiveTarget", - "sliValue": "sliValue", - }, - "script": Object { - "source": "if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }", - }, - }, - }, - "totalEvents": Object { - "value_count": Object { - "field": "slo.isGoodSlice", - }, - }, - }, - "group_by": Object { - "errorBudgetEstimated": Object { - "terms": Object { - "field": "errorBudgetEstimated", - }, - }, - "isTempDoc": Object { - "terms": Object { - "field": "isTempDoc", - }, - }, - "service.environment": Object { - "terms": Object { - "field": "service.environment", - "missing_bucket": true, - }, - }, - "service.name": Object { - "terms": Object { - "field": "service.name", - "missing_bucket": true, - }, - }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, - "slo.id": Object { - "terms": Object { - "field": "slo.id", - }, - }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, - "slo.instanceId": Object { - "terms": Object { - "field": "slo.instanceId", - }, - }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.revision": Object { - "terms": Object { - "field": "slo.revision", - }, - }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, - "transaction.name": Object { - "terms": Object { - "field": "transaction.name", - "missing_bucket": true, - }, - }, - "transaction.type": Object { - "terms": Object { - "field": "transaction.type", - "missing_bucket": true, - }, - }, - }, - }, - "settings": Object { - "deduce_mappings": false, - "unattended": true, - }, - "source": Object { - "index": ".slo-observability.sli-v2*", - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "gte": "now-7d/m", - "lte": "now/m", - }, - }, - }, - Object { - "term": Object { - "slo.budgetingMethod": "timeslices", - }, - }, - Object { - "term": Object { - "slo.timeWindow.type": "rolling", - }, - }, - Object { - "term": Object { - "slo.timeWindow.duration": "7d", - }, - }, - ], - }, - }, - "runtime_mappings": Object { - "errorBudgetEstimated": Object { - "script": "emit(false)", - "type": "boolean", - }, - "isTempDoc": Object { - "script": "emit(false)", - "type": "boolean", - }, - }, - }, - "sync": Object { - "time": Object { - "delay": "125s", - "field": "@timestamp", - }, - }, - "transform_id": "slo-summary-timeslices-7d-rolling", - }, - Object { - "ignore": Array [ - 409, - ], - }, - ], - Array [ - Object { - "_meta": Object { - "managed": true, - "managed_by": "observability", - "version": 3, - }, - "description": "Summarize every SLO with timeslices budgeting method and a 30 days rolling time window", - "dest": Object { - "index": ".slo-observability.summary-v2", - "pipeline": ".slo-observability.summary.pipeline", - }, - "frequency": "1m", - "pivot": Object { - "aggregations": Object { - "_objectiveTarget": Object { - "max": Object { - "field": "slo.objective.target", - }, - }, - "errorBudgetConsumed": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetInitial": "errorBudgetInitial", - "sliValue": "sliValue", - }, - "script": "if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }", - }, - }, - "errorBudgetInitial": Object { - "bucket_script": Object { - "buckets_path": Object { - "objectiveTarget": "_objectiveTarget", - }, - "script": "1 - params.objectiveTarget", - }, - }, - "errorBudgetRemaining": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetConsummed": "errorBudgetConsumed", - }, - "script": "1 - params.errorBudgetConsummed", - }, - }, - "goodEvents": Object { - "sum": Object { - "field": "slo.isGoodSlice", - }, - }, - "sliValue": Object { - "bucket_script": Object { - "buckets_path": Object { - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - }, - "script": "if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }", - }, - }, - "statusCode": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetRemaining": "errorBudgetRemaining", - "objectiveTarget": "_objectiveTarget", - "sliValue": "sliValue", - }, - "script": Object { - "source": "if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }", - }, - }, - }, - "totalEvents": Object { - "value_count": Object { - "field": "slo.isGoodSlice", - }, - }, - }, - "group_by": Object { - "errorBudgetEstimated": Object { - "terms": Object { - "field": "errorBudgetEstimated", - }, - }, - "isTempDoc": Object { - "terms": Object { - "field": "isTempDoc", - }, - }, - "service.environment": Object { - "terms": Object { - "field": "service.environment", - "missing_bucket": true, - }, - }, - "service.name": Object { - "terms": Object { - "field": "service.name", - "missing_bucket": true, - }, - }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, - "slo.id": Object { - "terms": Object { - "field": "slo.id", - }, - }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, - "slo.instanceId": Object { - "terms": Object { - "field": "slo.instanceId", - }, - }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.revision": Object { - "terms": Object { - "field": "slo.revision", - }, - }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, - "transaction.name": Object { - "terms": Object { - "field": "transaction.name", - "missing_bucket": true, - }, - }, - "transaction.type": Object { - "terms": Object { - "field": "transaction.type", - "missing_bucket": true, - }, - }, - }, - }, - "settings": Object { - "deduce_mappings": false, - "unattended": true, - }, - "source": Object { - "index": ".slo-observability.sli-v2*", - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "gte": "now-30d/m", - "lte": "now/m", - }, - }, - }, - Object { - "term": Object { - "slo.budgetingMethod": "timeslices", - }, - }, - Object { - "term": Object { - "slo.timeWindow.type": "rolling", - }, - }, - Object { - "term": Object { - "slo.timeWindow.duration": "30d", - }, - }, - ], - }, - }, - "runtime_mappings": Object { - "errorBudgetEstimated": Object { - "script": "emit(false)", - "type": "boolean", - }, - "isTempDoc": Object { - "script": "emit(false)", - "type": "boolean", - }, - }, - }, - "sync": Object { - "time": Object { - "delay": "125s", - "field": "@timestamp", - }, - }, - "transform_id": "slo-summary-timeslices-30d-rolling", - }, - Object { - "ignore": Array [ - 409, - ], - }, - ], - Array [ - Object { - "_meta": Object { - "managed": true, - "managed_by": "observability", - "version": 3, - }, - "description": "Summarize every SLO with timeslices budgeting method and a 90 days rolling time window", - "dest": Object { - "index": ".slo-observability.summary-v2", - "pipeline": ".slo-observability.summary.pipeline", - }, - "frequency": "1m", - "pivot": Object { - "aggregations": Object { - "_objectiveTarget": Object { - "max": Object { - "field": "slo.objective.target", - }, - }, - "errorBudgetConsumed": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetInitial": "errorBudgetInitial", - "sliValue": "sliValue", - }, - "script": "if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }", - }, - }, - "errorBudgetInitial": Object { - "bucket_script": Object { - "buckets_path": Object { - "objectiveTarget": "_objectiveTarget", - }, - "script": "1 - params.objectiveTarget", - }, - }, - "errorBudgetRemaining": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetConsummed": "errorBudgetConsumed", - }, - "script": "1 - params.errorBudgetConsummed", - }, - }, - "goodEvents": Object { - "sum": Object { - "field": "slo.isGoodSlice", - }, - }, - "sliValue": Object { - "bucket_script": Object { - "buckets_path": Object { - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - }, - "script": "if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }", - }, - }, - "statusCode": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetRemaining": "errorBudgetRemaining", - "objectiveTarget": "_objectiveTarget", - "sliValue": "sliValue", - }, - "script": Object { - "source": "if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }", - }, - }, - }, - "totalEvents": Object { - "value_count": Object { - "field": "slo.isGoodSlice", - }, - }, - }, - "group_by": Object { - "errorBudgetEstimated": Object { - "terms": Object { - "field": "errorBudgetEstimated", - }, - }, - "isTempDoc": Object { - "terms": Object { - "field": "isTempDoc", - }, - }, - "service.environment": Object { - "terms": Object { - "field": "service.environment", - "missing_bucket": true, - }, - }, - "service.name": Object { - "terms": Object { - "field": "service.name", - "missing_bucket": true, - }, - }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, - "slo.id": Object { - "terms": Object { - "field": "slo.id", - }, - }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, - "slo.instanceId": Object { - "terms": Object { - "field": "slo.instanceId", - }, - }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.revision": Object { - "terms": Object { - "field": "slo.revision", - }, - }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, - "transaction.name": Object { - "terms": Object { - "field": "transaction.name", - "missing_bucket": true, - }, - }, - "transaction.type": Object { - "terms": Object { - "field": "transaction.type", - "missing_bucket": true, - }, - }, - }, - }, - "settings": Object { - "deduce_mappings": false, - "unattended": true, - }, - "source": Object { - "index": ".slo-observability.sli-v2*", - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "gte": "now-90d/m", - "lte": "now/m", - }, - }, - }, - Object { - "term": Object { - "slo.budgetingMethod": "timeslices", - }, - }, - Object { - "term": Object { - "slo.timeWindow.type": "rolling", - }, - }, - Object { - "term": Object { - "slo.timeWindow.duration": "90d", - }, - }, - ], - }, - }, - "runtime_mappings": Object { - "errorBudgetEstimated": Object { - "script": "emit(false)", - "type": "boolean", - }, - "isTempDoc": Object { - "script": "emit(false)", - "type": "boolean", - }, - }, - }, - "sync": Object { - "time": Object { - "delay": "125s", - "field": "@timestamp", - }, - }, - "transform_id": "slo-summary-timeslices-90d-rolling", - }, - Object { - "ignore": Array [ - 409, - ], - }, - ], - Array [ - Object { - "_meta": Object { - "managed": true, - "managed_by": "observability", - "version": 3, - }, - "description": "Summarize every SLO with timeslices budgeting method and a weekly calendar aligned time window", - "dest": Object { - "index": ".slo-observability.summary-v2", - "pipeline": ".slo-observability.summary.pipeline", - }, - "frequency": "1m", - "pivot": Object { - "aggregations": Object { - "_objectiveTarget": Object { - "max": Object { - "field": "slo.objective.target", - }, - }, - "_sliceDurationInSeconds": Object { - "max": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "_totalSlicesInPeriod": Object { - "bucket_script": Object { - "buckets_path": Object { - "sliceDurationInSeconds": "_sliceDurationInSeconds", - }, - "script": "Math.ceil(7 * 24 * 60 * 60 / params.sliceDurationInSeconds)", - }, - }, - "errorBudgetConsumed": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetInitial": "errorBudgetInitial", - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - "totalSlicesInPeriod": "_totalSlicesInPeriod", - }, - "script": "if (params.totalEvents == 0) { return 0 } else { return (params.totalEvents - params.goodEvents) / (params.totalSlicesInPeriod * params.errorBudgetInitial) }", - }, - }, - "errorBudgetInitial": Object { - "bucket_script": Object { - "buckets_path": Object { - "objective": "_objectiveTarget", - }, - "script": "1 - params.objective", - }, - }, - "errorBudgetRemaining": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetConsumed": "errorBudgetConsumed", - }, - "script": "1 - params.errorBudgetConsumed", - }, - }, - "goodEvents": Object { - "sum": Object { - "field": "slo.isGoodSlice", - }, - }, - "sliValue": Object { - "bucket_script": Object { - "buckets_path": Object { - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - }, - "script": "if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }", - }, - }, - "statusCode": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetRemaining": "errorBudgetRemaining", - "objective": "_objectiveTarget", - "sliValue": "sliValue", - }, - "script": "if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }", - }, - }, - "totalEvents": Object { - "value_count": Object { - "field": "slo.isGoodSlice", - }, - }, - }, - "group_by": Object { - "errorBudgetEstimated": Object { - "terms": Object { - "field": "errorBudgetEstimated", - }, - }, - "isTempDoc": Object { - "terms": Object { - "field": "isTempDoc", - }, - }, - "service.environment": Object { - "terms": Object { - "field": "service.environment", - "missing_bucket": true, - }, - }, - "service.name": Object { - "terms": Object { - "field": "service.name", - "missing_bucket": true, - }, - }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, - "slo.id": Object { - "terms": Object { - "field": "slo.id", - }, - }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, - "slo.instanceId": Object { - "terms": Object { - "field": "slo.instanceId", - }, - }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.revision": Object { - "terms": Object { - "field": "slo.revision", - }, - }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, - "transaction.name": Object { - "terms": Object { - "field": "transaction.name", - "missing_bucket": true, - }, - }, - "transaction.type": Object { - "terms": Object { - "field": "transaction.type", - "missing_bucket": true, - }, - }, - }, - }, - "settings": Object { - "deduce_mappings": false, - "unattended": true, - }, - "source": Object { - "index": ".slo-observability.sli-v2*", - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "gte": "now/w", - "lte": "now/m", - }, - }, - }, - Object { - "term": Object { - "slo.budgetingMethod": "timeslices", - }, - }, - Object { - "term": Object { - "slo.timeWindow.type": "calendarAligned", - }, - }, - Object { - "term": Object { - "slo.timeWindow.duration": "1w", - }, - }, - ], - }, - }, - "runtime_mappings": Object { - "errorBudgetEstimated": Object { - "script": "emit(false)", - "type": "boolean", - }, - "isTempDoc": Object { - "script": "emit(false)", - "type": "boolean", - }, - }, - }, - "sync": Object { - "time": Object { - "delay": "125s", - "field": "@timestamp", - }, - }, - "transform_id": "slo-summary-timeslices-weekly-aligned", - }, - Object { - "ignore": Array [ - 409, - ], - }, - ], - Array [ - Object { - "_meta": Object { - "managed": true, - "managed_by": "observability", - "version": 3, - }, - "description": "Summarize every SLO with timeslices budgeting method and a monthly calendar aligned time window", - "dest": Object { - "index": ".slo-observability.summary-v2", - "pipeline": ".slo-observability.summary.pipeline", - }, - "frequency": "1m", - "pivot": Object { - "aggregations": Object { - "_objectiveTarget": Object { - "max": Object { - "field": "slo.objective.target", - }, - }, - "_sliceDurationInSeconds": Object { - "max": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "_totalSlicesInPeriod": Object { - "bucket_script": Object { - "buckets_path": Object { - "sliceDurationInSeconds": "_sliceDurationInSeconds", - }, - "script": Object { - "source": " - Date d = new Date(); - Instant instant = Instant.ofEpochMilli(d.getTime()); - LocalDateTime now = LocalDateTime.ofInstant(instant, ZoneOffset.UTC); - LocalDateTime startOfMonth = now - .withDayOfMonth(1) - .withHour(0) - .withMinute(0) - .withSecond(0); - LocalDateTime startOfNextMonth = startOfMonth.plusMonths(1); - double sliceDurationInMinutes = params.sliceDurationInSeconds / 60; - - return Math.ceil(Duration.between(startOfMonth, startOfNextMonth).toMinutes() / sliceDurationInMinutes); - ", - }, - }, - }, - "errorBudgetConsumed": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetInitial": "errorBudgetInitial", - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - "totalSlicesInPeriod": "_totalSlicesInPeriod", - }, - "script": "if (params.totalEvents == 0) { return 0 } else { return (params.totalEvents - params.goodEvents) / (params.totalSlicesInPeriod * params.errorBudgetInitial) }", - }, - }, - "errorBudgetInitial": Object { - "bucket_script": Object { - "buckets_path": Object { - "objective": "_objectiveTarget", - }, - "script": "1 - params.objective", - }, - }, - "errorBudgetRemaining": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetConsumed": "errorBudgetConsumed", - }, - "script": "1 - params.errorBudgetConsumed", - }, - }, - "goodEvents": Object { - "sum": Object { - "field": "slo.isGoodSlice", - }, - }, - "sliValue": Object { - "bucket_script": Object { - "buckets_path": Object { - "goodEvents": "goodEvents", - "totalEvents": "totalEvents", - }, - "script": "if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }", - }, - }, - "statusCode": Object { - "bucket_script": Object { - "buckets_path": Object { - "errorBudgetRemaining": "errorBudgetRemaining", - "objective": "_objectiveTarget", - "sliValue": "sliValue", - }, - "script": "if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }", - }, - }, - "totalEvents": Object { - "value_count": Object { - "field": "slo.isGoodSlice", - }, - }, - }, - "group_by": Object { - "errorBudgetEstimated": Object { - "terms": Object { - "field": "errorBudgetEstimated", - }, - }, - "isTempDoc": Object { - "terms": Object { - "field": "isTempDoc", - }, - }, - "service.environment": Object { - "terms": Object { - "field": "service.environment", - "missing_bucket": true, - }, - }, - "service.name": Object { - "terms": Object { - "field": "service.name", - "missing_bucket": true, - }, - }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, - "slo.id": Object { - "terms": Object { - "field": "slo.id", - }, - }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, - "slo.instanceId": Object { - "terms": Object { - "field": "slo.instanceId", - }, - }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.revision": Object { - "terms": Object { - "field": "slo.revision", - }, - }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, - "transaction.name": Object { - "terms": Object { - "field": "transaction.name", - "missing_bucket": true, - }, - }, - "transaction.type": Object { - "terms": Object { - "field": "transaction.type", - "missing_bucket": true, - }, - }, - }, - }, - "settings": Object { - "deduce_mappings": false, - "unattended": true, - }, - "source": Object { - "index": ".slo-observability.sli-v2*", - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "gte": "now/M", - "lte": "now/m", - }, - }, - }, - Object { - "term": Object { - "slo.budgetingMethod": "timeslices", - }, - }, - Object { - "term": Object { - "slo.timeWindow.type": "calendarAligned", - }, - }, - Object { - "term": Object { - "slo.timeWindow.duration": "1M", - }, - }, - ], - }, - }, - "runtime_mappings": Object { - "errorBudgetEstimated": Object { - "script": "emit(false)", - "type": "boolean", - }, - "isTempDoc": Object { - "script": "emit(false)", - "type": "boolean", - }, - }, - }, - "sync": Object { - "time": Object { - "delay": "125s", - "field": "@timestamp", - }, - }, - "transform_id": "slo-summary-timeslices-monthly-aligned", - }, - Object { - "ignore": Array [ - 409, - ], - }, - ], -] -`; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.test.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.test.ts deleted file mode 100644 index be79f9d796142..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.test.ts +++ /dev/null @@ -1,103 +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 { - ElasticsearchClientMock, - elasticsearchServiceMock, - loggingSystemMock, -} from '@kbn/core/server/mocks'; -import { MockedLogger } from '@kbn/logging-mocks'; -import { DefaultSummaryTransformInstaller } from './summary_transform_installer'; -import { ALL_TRANSFORM_TEMPLATES } from './templates'; - -describe('Summary Transform Installer', () => { - let esClientMock: ElasticsearchClientMock; - let loggerMock: jest.Mocked; - - beforeEach(() => { - esClientMock = elasticsearchServiceMock.createElasticsearchClient(); - loggerMock = loggingSystemMock.createLogger(); - }); - - it('skips the installation when latest version already installed', async () => { - esClientMock.transform.getTransform.mockResolvedValue({ - count: ALL_TRANSFORM_TEMPLATES.length, - // @ts-ignore - transforms: ALL_TRANSFORM_TEMPLATES.map((transform) => ({ - id: transform.transform_id, - _meta: transform._meta, - })), - }); - const installer = new DefaultSummaryTransformInstaller(esClientMock, loggerMock); - - await installer.installAndStart(); - - expect(esClientMock.transform.stopTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.deleteTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.putTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.startTransform).not.toHaveBeenCalled(); - }); - - it('installs every summary transforms when none are already installed', async () => { - esClientMock.transform.getTransform.mockResolvedValue({ count: 0, transforms: [] }); - const installer = new DefaultSummaryTransformInstaller(esClientMock, loggerMock); - - await installer.installAndStart(); - - const nbOfTransforms = ALL_TRANSFORM_TEMPLATES.length; - - expect(esClientMock.transform.stopTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.deleteTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.putTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.startTransform).toHaveBeenCalledTimes(nbOfTransforms); - }); - - it('desinstalls previous summary transforms prior to installing the new ones', async () => { - esClientMock.transform.getTransform.mockResolvedValue({ - count: ALL_TRANSFORM_TEMPLATES.length, - // @ts-ignore - transforms: ALL_TRANSFORM_TEMPLATES.map((transform) => ({ - id: transform.transform_id, - _meta: { ...transform._meta, version: -1 }, - })), - }); - const installer = new DefaultSummaryTransformInstaller(esClientMock, loggerMock); - - await installer.installAndStart(); - - const nbOfTransforms = ALL_TRANSFORM_TEMPLATES.length; - - expect(esClientMock.transform.stopTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.deleteTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.putTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.startTransform).toHaveBeenCalledTimes(nbOfTransforms); - }); - - it('installs only the missing summary transforms', async () => { - const occurrencesSummaryTransforms = ALL_TRANSFORM_TEMPLATES.filter((transform) => - transform.transform_id.includes('-occurrences-') - ); - esClientMock.transform.getTransform.mockResolvedValue({ - count: occurrencesSummaryTransforms.length, - // @ts-ignore - transforms: occurrencesSummaryTransforms.map((transform) => ({ - id: transform.transform_id, - _meta: transform._meta, - })), - }); - const installer = new DefaultSummaryTransformInstaller(esClientMock, loggerMock); - - await installer.installAndStart(); - - const nbOfTransforms = ALL_TRANSFORM_TEMPLATES.length - occurrencesSummaryTransforms.length; - - expect(esClientMock.transform.stopTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.deleteTransform).not.toHaveBeenCalled(); - expect(esClientMock.transform.putTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.startTransform).toHaveBeenCalledTimes(nbOfTransforms); - expect(esClientMock.transform.putTransform.mock.calls).toMatchSnapshot(); - }); -}); diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts deleted file mode 100644 index 0a51338615b42..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts +++ /dev/null @@ -1,105 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import type { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../common/slo/constants'; -import { retryTransientEsErrors } from '../../../utils/retry'; -import { ALL_TRANSFORM_TEMPLATES } from './templates'; - -export interface SummaryTransformInstaller { - installAndStart(): Promise; -} - -export class DefaultSummaryTransformInstaller implements SummaryTransformInstaller { - constructor(private esClient: ElasticsearchClient, private logger: Logger) {} - - public async installAndStart(): Promise { - const allTransformIds = ALL_TRANSFORM_TEMPLATES.map((transform) => transform.transform_id); - const summaryTransforms = await this.execute(() => - this.esClient.transform.getTransform( - { transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}*`, allow_no_match: true }, - { ignore: [404] } - ) - ); - const alreadyInstalled = - summaryTransforms.count === allTransformIds.length && - summaryTransforms.transforms.every( - (transform) => transform._meta?.version === SLO_SUMMARY_TRANSFORMS_VERSION - ) && - summaryTransforms.transforms.every((transform) => allTransformIds.includes(transform.id)); - - if (alreadyInstalled) { - this.logger.info(`SLO summary transforms already installed - skipping`); - return; - } - - for (const transformTemplate of ALL_TRANSFORM_TEMPLATES) { - const transformId = transformTemplate.transform_id; - const transform = summaryTransforms.transforms.find((t) => t.id === transformId); - - const transformAlreadyInstalled = - !!transform && transform._meta?.version === SLO_SUMMARY_TRANSFORMS_VERSION; - const previousTransformAlreadyInstalled = - !!transform && transform._meta?.version !== SLO_SUMMARY_TRANSFORMS_VERSION; - - if (transformAlreadyInstalled) { - this.logger.info(`SLO summary transform [${transformId}] already installed - skipping`); - continue; - } - - if (previousTransformAlreadyInstalled) { - await this.deletePreviousTransformVersion(transformId); - } - - await this.installTransform(transformId, transformTemplate); - await this.startTransform(transformId); - } - - this.logger.info(`SLO summary transforms installed and started`); - } - - private async installTransform( - transformId: string, - transformTemplate: TransformPutTransformRequest - ) { - this.logger.info(`Installing SLO summary transform [${transformId}]`); - await this.execute(() => - this.esClient.transform.putTransform(transformTemplate, { ignore: [409] }) - ); - } - - private async deletePreviousTransformVersion(transformId: string) { - this.logger.info(`Deleting previous SLO summary transform [${transformId}]`); - await this.execute(() => - this.esClient.transform.stopTransform( - { transform_id: transformId, allow_no_match: true, force: true }, - { ignore: [409, 404] } - ) - ); - await this.execute(() => - this.esClient.transform.deleteTransform( - { transform_id: transformId, force: true }, - { ignore: [409, 404] } - ) - ); - } - - private async startTransform(transformId: string) { - this.logger.info(`Starting SLO summary transform [${transformId}]`); - await this.execute(() => - this.esClient.transform.startTransform({ transform_id: transformId }, { ignore: [409] }) - ); - } - - private async execute(esCall: () => Promise): Promise { - return await retryTransientEsErrors(esCall, { logger: this.logger }); - } -} diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/common.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/common.ts deleted file mode 100644 index c99a6c2be9d3c..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/common.ts +++ /dev/null @@ -1,100 +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. - */ - -export const groupBy = { - 'slo.id': { - terms: { - field: 'slo.id', - }, - }, - 'slo.revision': { - terms: { - field: 'slo.revision', - }, - }, - 'slo.groupBy': { - terms: { - field: 'slo.groupBy', - }, - }, - 'slo.instanceId': { - terms: { - field: 'slo.instanceId', - }, - }, - 'slo.name': { - terms: { - field: 'slo.name', - }, - }, - 'slo.description': { - terms: { - field: 'slo.description', - }, - }, - 'slo.tags': { - terms: { - field: 'slo.tags', - }, - }, - 'slo.indicator.type': { - terms: { - field: 'slo.indicator.type', - }, - }, - 'slo.budgetingMethod': { - terms: { - field: 'slo.budgetingMethod', - }, - }, - 'slo.timeWindow.duration': { - terms: { - field: 'slo.timeWindow.duration', - }, - }, - 'slo.timeWindow.type': { - terms: { - field: 'slo.timeWindow.type', - }, - }, - errorBudgetEstimated: { - terms: { - field: 'errorBudgetEstimated', - }, - }, - // Differentiate the temporary document from the summary one - isTempDoc: { - terms: { - field: 'isTempDoc', - }, - }, - // optional fields: only specified for APM indicators. Must include missing_bucket:true - 'service.name': { - terms: { - field: 'service.name', - missing_bucket: true, - }, - }, - 'service.environment': { - terms: { - field: 'service.environment', - missing_bucket: true, - }, - }, - 'transaction.name': { - terms: { - field: 'transaction.name', - missing_bucket: true, - }, - }, - 'transaction.type': { - terms: { - field: 'transaction.type', - missing_bucket: true, - }, - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/index.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/index.ts deleted file mode 100644 index 68c42db91e923..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/index.ts +++ /dev/null @@ -1,30 +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 { SUMMARY_OCCURRENCES_7D_ROLLING } from './summary_occurrences_7d_rolling'; -import { SUMMARY_OCCURRENCES_30D_ROLLING } from './summary_occurrences_30d_rolling'; -import { SUMMARY_OCCURRENCES_90D_ROLLING } from './summary_occurrences_90d_rolling'; -import { SUMMARY_TIMESLICES_7D_ROLLING } from './summary_timeslices_7d_rolling'; -import { SUMMARY_TIMESLICES_30D_ROLLING } from './summary_timeslices_30d_rolling'; -import { SUMMARY_TIMESLICES_90D_ROLLING } from './summary_timeslices_90d_rolling'; -import { SUMMARY_OCCURRENCES_WEEKLY_ALIGNED } from './summary_occurrences_weekly_aligned'; -import { SUMMARY_OCCURRENCES_MONTHLY_ALIGNED } from './summary_occurrences_monthly_aligned'; -import { SUMMARY_TIMESLICES_WEEKLY_ALIGNED } from './summary_timeslices_weekly_aligned'; -import { SUMMARY_TIMESLICES_MONTHLY_ALIGNED } from './summary_timeslices_monthly_aligned'; - -export const ALL_TRANSFORM_TEMPLATES = [ - SUMMARY_OCCURRENCES_7D_ROLLING, - SUMMARY_OCCURRENCES_30D_ROLLING, - SUMMARY_OCCURRENCES_90D_ROLLING, - SUMMARY_OCCURRENCES_WEEKLY_ALIGNED, - SUMMARY_OCCURRENCES_MONTHLY_ALIGNED, - SUMMARY_TIMESLICES_7D_ROLLING, - SUMMARY_TIMESLICES_30D_ROLLING, - SUMMARY_TIMESLICES_90D_ROLLING, - SUMMARY_TIMESLICES_WEEKLY_ALIGNED, - SUMMARY_TIMESLICES_MONTHLY_ALIGNED, -]; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts deleted file mode 100644 index 9fb34a38051f7..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_OCCURRENCES_30D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}occurrences-30d-rolling`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-30d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'occurrences', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '30d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.numerator', - }, - }, - totalEvents: { - sum: { - field: 'slo.denominator', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with occurrences budgeting method and a 30 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts deleted file mode 100644 index 9ceb6cd4290a0..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_OCCURRENCES_7D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}occurrences-7d-rolling`, - dest: { - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-7d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'occurrences', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '7d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.numerator', - }, - }, - totalEvents: { - sum: { - field: 'slo.denominator', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with occurrences budgeting method and a 7 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts deleted file mode 100644 index d0f1729f77225..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_OCCURRENCES_90D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}occurrences-90d-rolling`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-90d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'occurrences', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '90d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.numerator', - }, - }, - totalEvents: { - sum: { - field: 'slo.denominator', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with occurrences budgeting method and a 90 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts deleted file mode 100644 index a5b2a70932a5e..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts +++ /dev/null @@ -1,151 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_OCCURRENCES_MONTHLY_ALIGNED: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}occurrences-monthly-aligned`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(true)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now/M', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'occurrences', - }, - }, - { - term: { - 'slo.timeWindow.type': 'calendarAligned', - }, - }, - { - term: { - 'slo.timeWindow.duration': '1M', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - goodEvents: { - sum: { - field: 'slo.numerator', - }, - }, - totalEvents: { - sum: { - field: 'slo.denominator', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objective: '_objectiveTarget', - }, - script: '1 - params.objective', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsumed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsumed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objective: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - description: - 'Summarize every SLO with occurrences budgeting method and a monthly calendar aligned time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts deleted file mode 100644 index 43ed92704c119..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts +++ /dev/null @@ -1,151 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_OCCURRENCES_WEEKLY_ALIGNED: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}occurrences-weekly-aligned`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(true)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now/w', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'occurrences', - }, - }, - { - term: { - 'slo.timeWindow.type': 'calendarAligned', - }, - }, - { - term: { - 'slo.timeWindow.duration': '1w', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - goodEvents: { - sum: { - field: 'slo.numerator', - }, - }, - totalEvents: { - sum: { - field: 'slo.denominator', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objective: '_objectiveTarget', - }, - script: '1 - params.objective', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsumed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsumed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objective: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - description: - 'Summarize every SLO with occurrences budgeting method and a weekly calendar aligned time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts deleted file mode 100644 index 5d1c6c48f8f1f..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_TIMESLICES_30D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}timeslices-30d-rolling`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-30d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'timeslices', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '30d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.isGoodSlice', - }, - }, - totalEvents: { - value_count: { - field: 'slo.isGoodSlice', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with timeslices budgeting method and a 30 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts deleted file mode 100644 index a9256955ac08a..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_TIMESLICES_7D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}timeslices-7d-rolling`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-7d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'timeslices', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '7d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.isGoodSlice', - }, - }, - totalEvents: { - value_count: { - field: 'slo.isGoodSlice', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with timeslices budgeting method and a 7 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts deleted file mode 100644 index f922bd210e253..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts +++ /dev/null @@ -1,153 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_TIMESLICES_90D_ROLLING: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}timeslices-90d-rolling`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now-90d/m', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'timeslices', - }, - }, - { - term: { - 'slo.timeWindow.type': 'rolling', - }, - }, - { - term: { - 'slo.timeWindow.duration': '90d', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - goodEvents: { - sum: { - field: 'slo.isGoodSlice', - }, - }, - totalEvents: { - value_count: { - field: 'slo.isGoodSlice', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objectiveTarget: '_objectiveTarget', - }, - script: '1 - params.objectiveTarget', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsummed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsummed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objectiveTarget: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: { - source: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objectiveTarget) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - }, - description: - 'Summarize every SLO with timeslices budgeting method and a 90 days rolling time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts deleted file mode 100644 index 3b39d9acd3372..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts +++ /dev/null @@ -1,181 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_TIMESLICES_MONTHLY_ALIGNED: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}timeslices-monthly-aligned`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now/M', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'timeslices', - }, - }, - { - term: { - 'slo.timeWindow.type': 'calendarAligned', - }, - }, - { - term: { - 'slo.timeWindow.duration': '1M', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - _sliceDurationInSeconds: { - max: { - field: 'slo.objective.sliceDurationInSeconds', - }, - }, - _totalSlicesInPeriod: { - bucket_script: { - buckets_path: { - sliceDurationInSeconds: '_sliceDurationInSeconds', - }, - script: { - source: ` - Date d = new Date(); - Instant instant = Instant.ofEpochMilli(d.getTime()); - LocalDateTime now = LocalDateTime.ofInstant(instant, ZoneOffset.UTC); - LocalDateTime startOfMonth = now - .withDayOfMonth(1) - .withHour(0) - .withMinute(0) - .withSecond(0); - LocalDateTime startOfNextMonth = startOfMonth.plusMonths(1); - double sliceDurationInMinutes = params.sliceDurationInSeconds / 60; - - return Math.ceil(Duration.between(startOfMonth, startOfNextMonth).toMinutes() / sliceDurationInMinutes); - `, - }, - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - goodEvents: { - sum: { - field: 'slo.isGoodSlice', - }, - }, - totalEvents: { - value_count: { - field: 'slo.isGoodSlice', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objective: '_objectiveTarget', - }, - script: '1 - params.objective', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - totalSlicesInPeriod: '_totalSlicesInPeriod', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.totalEvents == 0) { return 0 } else { return (params.totalEvents - params.goodEvents) / (params.totalSlicesInPeriod * params.errorBudgetInitial) }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsumed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsumed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objective: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - description: - 'Summarize every SLO with timeslices budgeting method and a monthly calendar aligned time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts deleted file mode 100644 index 3cae5f9bcd9b1..0000000000000 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts +++ /dev/null @@ -1,166 +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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { - SLO_DESTINATION_INDEX_PATTERN, - SLO_SUMMARY_DESTINATION_INDEX_NAME, - SLO_SUMMARY_INGEST_PIPELINE_NAME, - SLO_SUMMARY_TRANSFORMS_VERSION, - SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../../common/slo/constants'; -import { groupBy } from './common'; - -export const SUMMARY_TIMESLICES_WEEKLY_ALIGNED: TransformPutTransformRequest = { - transform_id: `${SLO_SUMMARY_TRANSFORM_NAME_PREFIX}timeslices-weekly-aligned`, - dest: { - index: SLO_SUMMARY_DESTINATION_INDEX_NAME, - pipeline: SLO_SUMMARY_INGEST_PIPELINE_NAME, - }, - source: { - index: SLO_DESTINATION_INDEX_PATTERN, - runtime_mappings: { - errorBudgetEstimated: { - type: 'boolean', - script: 'emit(false)', - }, - isTempDoc: { - type: 'boolean', - script: 'emit(false)', - }, - }, - query: { - bool: { - filter: [ - { - range: { - '@timestamp': { - gte: 'now/w', - lte: 'now/m', - }, - }, - }, - { - term: { - 'slo.budgetingMethod': 'timeslices', - }, - }, - { - term: { - 'slo.timeWindow.type': 'calendarAligned', - }, - }, - { - term: { - 'slo.timeWindow.duration': '1w', - }, - }, - ], - }, - }, - }, - pivot: { - group_by: groupBy, - aggregations: { - _sliceDurationInSeconds: { - max: { - field: 'slo.objective.sliceDurationInSeconds', - }, - }, - _totalSlicesInPeriod: { - bucket_script: { - buckets_path: { - sliceDurationInSeconds: '_sliceDurationInSeconds', - }, - script: 'Math.ceil(7 * 24 * 60 * 60 / params.sliceDurationInSeconds)', - }, - }, - _objectiveTarget: { - max: { - field: 'slo.objective.target', - }, - }, - goodEvents: { - sum: { - field: 'slo.isGoodSlice', - }, - }, - totalEvents: { - value_count: { - field: 'slo.isGoodSlice', - }, - }, - sliValue: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - }, - script: - 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', - }, - }, - errorBudgetInitial: { - bucket_script: { - buckets_path: { - objective: '_objectiveTarget', - }, - script: '1 - params.objective', - }, - }, - errorBudgetConsumed: { - bucket_script: { - buckets_path: { - goodEvents: 'goodEvents', - totalEvents: 'totalEvents', - totalSlicesInPeriod: '_totalSlicesInPeriod', - errorBudgetInitial: 'errorBudgetInitial', - }, - script: - 'if (params.totalEvents == 0) { return 0 } else { return (params.totalEvents - params.goodEvents) / (params.totalSlicesInPeriod * params.errorBudgetInitial) }', - }, - }, - errorBudgetRemaining: { - bucket_script: { - buckets_path: { - errorBudgetConsumed: 'errorBudgetConsumed', - }, - script: '1 - params.errorBudgetConsumed', - }, - }, - statusCode: { - bucket_script: { - buckets_path: { - sliValue: 'sliValue', - objective: '_objectiveTarget', - errorBudgetRemaining: 'errorBudgetRemaining', - }, - script: - 'if (params.sliValue == -1) { return 0 } else if (params.sliValue >= params.objective) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }', - }, - }, - }, - }, - description: - 'Summarize every SLO with timeslices budgeting method and a weekly calendar aligned time window', - frequency: '1m', - sync: { - time: { - field: '@timestamp', - delay: '125s', - }, - }, - settings: { - deduce_mappings: false, - unattended: true, - }, - _meta: { - version: SLO_SUMMARY_TRANSFORMS_VERSION, - managed: true, - managed_by: 'observability', - }, -}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/common.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/common.ts new file mode 100644 index 0000000000000..743ba333c8f98 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/common.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ALL_VALUE } from '@kbn/slo-schema'; +import { SLO } from '../../../../domain/models/slo'; + +export const getGroupBy = (slo: SLO) => { + const groupings = + slo.groupBy !== '' && slo.groupBy !== ALL_VALUE + ? [slo.groupBy].flat().reduce((acc, field) => { + return { + ...acc, + [`slo.groupings.${field}`]: { + terms: { + field: `slo.groupings.${field}`, + }, + }, + }; + }, {}) + : {}; + + return { + 'slo.id': { + terms: { + field: 'slo.id', + }, + }, + 'slo.revision': { + terms: { + field: 'slo.revision', + }, + }, + 'slo.instanceId': { + terms: { + field: 'slo.instanceId', + }, + }, + ...groupings, + // optional fields: only specified for APM indicators. Must include missing_bucket:true + 'service.name': { + terms: { + field: 'service.name', + missing_bucket: true, + }, + }, + 'service.environment': { + terms: { + field: 'service.environment', + missing_bucket: true, + }, + }, + 'transaction.name': { + terms: { + field: 'transaction.name', + missing_bucket: true, + }, + }, + 'transaction.type': { + terms: { + field: 'transaction.type', + missing_bucket: true, + }, + }, + }; +}; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts new file mode 100644 index 0000000000000..2647e296f5544 --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts @@ -0,0 +1,136 @@ +/* + * 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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; +import { SLO } from '../../../../domain/models'; +import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, + SLO_DESTINATION_INDEX_PATTERN, + SLO_RESOURCES_VERSION, + SLO_SUMMARY_DESTINATION_INDEX_NAME, +} from '../../../../../common/slo/constants'; +import { getGroupBy } from './common'; + +export function generateSummaryTransformForOccurrences(slo: SLO): TransformPutTransformRequest { + return { + transform_id: getSLOSummaryTransformId(slo.id, slo.revision), + dest: { + pipeline: getSLOSummaryPipelineId(slo.id, slo.revision), + index: SLO_SUMMARY_DESTINATION_INDEX_NAME, + }, + source: { + index: SLO_DESTINATION_INDEX_PATTERN, + query: { + bool: { + filter: [ + { + range: { + '@timestamp': { + gte: `now-${slo.timeWindow.duration.format()}/m`, + lte: 'now/m', + }, + }, + }, + { + term: { + 'slo.id': slo.id, + }, + }, + { + term: { + 'slo.revision': slo.revision, + }, + }, + ], + }, + }, + }, + pivot: { + group_by: getGroupBy(slo), + aggregations: { + goodEvents: { + sum: { + field: 'slo.numerator', + }, + }, + totalEvents: { + sum: { + field: 'slo.denominator', + }, + }, + sliValue: { + bucket_script: { + buckets_path: { + goodEvents: 'goodEvents', + totalEvents: 'totalEvents', + }, + script: + 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', + }, + }, + errorBudgetInitial: { + bucket_script: { + buckets_path: {}, + script: `1 - ${slo.objective.target}`, + }, + }, + errorBudgetConsumed: { + bucket_script: { + buckets_path: { + sliValue: 'sliValue', + errorBudgetInitial: 'errorBudgetInitial', + }, + script: + 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', + }, + }, + errorBudgetRemaining: { + bucket_script: { + buckets_path: { + errorBudgetConsumed: 'errorBudgetConsumed', + }, + script: '1 - params.errorBudgetConsumed', + }, + }, + statusCode: { + bucket_script: { + buckets_path: { + sliValue: 'sliValue', + errorBudgetRemaining: 'errorBudgetRemaining', + }, + script: { + source: `if (params.sliValue == -1) { return 0 } else if (params.sliValue >= ${slo.objective.target}) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }`, + }, + }, + }, + latestSliTimestamp: { + max: { + field: '@timestamp', + }, + }, + }, + }, + description: `Summarise the rollup data of SLO: ${slo.name} [id: ${slo.id}, revision: ${slo.revision}].`, + frequency: '1m', + sync: { + time: { + field: 'event.ingested', + delay: '65s', + }, + }, + settings: { + deduce_mappings: false, + unattended: true, + }, + _meta: { + version: SLO_RESOURCES_VERSION, + managed: true, + managed_by: 'observability', + }, + }; +} diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts new file mode 100644 index 0000000000000..6f5c27e5f869a --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts @@ -0,0 +1,166 @@ +/* + * 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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; +import { DurationUnit, SLO } from '../../../../domain/models'; +import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, + SLO_DESTINATION_INDEX_PATTERN, + SLO_RESOURCES_VERSION, + SLO_SUMMARY_DESTINATION_INDEX_NAME, +} from '../../../../../common/slo/constants'; +import { getGroupBy } from './common'; + +export function generateSummaryTransformForTimeslicesAndCalendarAligned( + slo: SLO +): TransformPutTransformRequest { + const isWeeklyAligned = slo.timeWindow.duration.unit === DurationUnit.Week; + const sliceDurationInSeconds = slo.objective.timesliceWindow!.asSeconds(); + + return { + transform_id: getSLOSummaryTransformId(slo.id, slo.revision), + dest: { + pipeline: getSLOSummaryPipelineId(slo.id, slo.revision), + index: SLO_SUMMARY_DESTINATION_INDEX_NAME, + }, + source: { + index: SLO_DESTINATION_INDEX_PATTERN, + query: { + bool: { + filter: [ + { + range: { + '@timestamp': { + gte: isWeeklyAligned ? `now/w` : `now/M`, + lte: 'now/m', + }, + }, + }, + { + term: { + 'slo.id': slo.id, + }, + }, + { + term: { + 'slo.revision': slo.revision, + }, + }, + ], + }, + }, + }, + pivot: { + group_by: getGroupBy(slo), + aggregations: { + _totalSlicesInPeriod: { + bucket_script: { + buckets_path: {}, + script: { + source: ` + if (${isWeeklyAligned} == true) { + return Math.ceil(7 * 24 * 60 * 60 / ${sliceDurationInSeconds}); + } else { + Date d = new Date(); + Instant instant = Instant.ofEpochMilli(d.getTime()); + LocalDateTime now = LocalDateTime.ofInstant(instant, ZoneOffset.UTC); + LocalDateTime startOfMonth = now + .withDayOfMonth(1) + .withHour(0) + .withMinute(0) + .withSecond(0); + LocalDateTime startOfNextMonth = startOfMonth.plusMonths(1); + double sliceDurationInMinutes = ${sliceDurationInSeconds} / 60; + + return Math.ceil(Duration.between(startOfMonth, startOfNextMonth).toMinutes() / sliceDurationInMinutes); + } + `, + }, + }, + }, + goodEvents: { + sum: { + field: 'slo.isGoodSlice', + }, + }, + totalEvents: { + value_count: { + field: 'slo.isGoodSlice', + }, + }, + sliValue: { + bucket_script: { + buckets_path: { + goodEvents: 'goodEvents', + totalEvents: 'totalEvents', + }, + script: + 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', + }, + }, + errorBudgetInitial: { + bucket_script: { + buckets_path: {}, + script: `1 - ${slo.objective.target}`, + }, + }, + errorBudgetConsumed: { + bucket_script: { + buckets_path: { + goodEvents: 'goodEvents', + totalEvents: 'totalEvents', + totalSlicesInPeriod: '_totalSlicesInPeriod', + errorBudgetInitial: 'errorBudgetInitial', + }, + script: + 'if (params.totalEvents == 0) { return 0 } else { return (params.totalEvents - params.goodEvents) / (params.totalSlicesInPeriod * params.errorBudgetInitial) }', + }, + }, + errorBudgetRemaining: { + bucket_script: { + buckets_path: { + errorBudgetConsumed: 'errorBudgetConsumed', + }, + script: '1 - params.errorBudgetConsumed', + }, + }, + statusCode: { + bucket_script: { + buckets_path: { + sliValue: 'sliValue', + errorBudgetRemaining: 'errorBudgetRemaining', + }, + script: `if (params.sliValue == -1) { return 0 } else if (params.sliValue >= ${slo.objective.target}) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }`, + }, + }, + latestSliTimestamp: { + max: { + field: '@timestamp', + }, + }, + }, + }, + description: `Summarise the rollup data of SLO: ${slo.name} [id: ${slo.id}, revision: ${slo.revision}].`, + frequency: '1m', + sync: { + time: { + field: 'event.ingested', + delay: '65s', + }, + }, + settings: { + deduce_mappings: false, + unattended: true, + }, + _meta: { + version: SLO_RESOURCES_VERSION, + managed: true, + managed_by: 'observability', + }, + }; +} diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts new file mode 100644 index 0000000000000..a6212f671997b --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts @@ -0,0 +1,138 @@ +/* + * 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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; +import { SLO } from '../../../../domain/models'; +import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, + SLO_DESTINATION_INDEX_PATTERN, + SLO_RESOURCES_VERSION, + SLO_SUMMARY_DESTINATION_INDEX_NAME, +} from '../../../../../common/slo/constants'; +import { getGroupBy } from './common'; + +export function generateSummaryTransformForTimeslicesAndRolling( + slo: SLO +): TransformPutTransformRequest { + return { + transform_id: getSLOSummaryTransformId(slo.id, slo.revision), + dest: { + pipeline: getSLOSummaryPipelineId(slo.id, slo.revision), + index: SLO_SUMMARY_DESTINATION_INDEX_NAME, + }, + source: { + index: SLO_DESTINATION_INDEX_PATTERN, + query: { + bool: { + filter: [ + { + range: { + '@timestamp': { + gte: `now-${slo.timeWindow.duration.format()}/m`, + lte: 'now/m', + }, + }, + }, + { + term: { + 'slo.id': slo.id, + }, + }, + { + term: { + 'slo.revision': slo.revision, + }, + }, + ], + }, + }, + }, + pivot: { + group_by: getGroupBy(slo), + aggregations: { + goodEvents: { + sum: { + field: 'slo.isGoodSlice', + }, + }, + totalEvents: { + value_count: { + field: 'slo.isGoodSlice', + }, + }, + sliValue: { + bucket_script: { + buckets_path: { + goodEvents: 'goodEvents', + totalEvents: 'totalEvents', + }, + script: + 'if (params.totalEvents == 0) { return -1 } else if (params.goodEvents >= params.totalEvents) { return 1 } else { return params.goodEvents / params.totalEvents }', + }, + }, + errorBudgetInitial: { + bucket_script: { + buckets_path: {}, + script: `1 - ${slo.objective.target}`, + }, + }, + errorBudgetConsumed: { + bucket_script: { + buckets_path: { + sliValue: 'sliValue', + errorBudgetInitial: 'errorBudgetInitial', + }, + script: + 'if (params.sliValue == -1) { return 0 } else { return (1 - params.sliValue) / params.errorBudgetInitial }', + }, + }, + errorBudgetRemaining: { + bucket_script: { + buckets_path: { + errorBudgetConsumed: 'errorBudgetConsumed', + }, + script: '1 - params.errorBudgetConsumed', + }, + }, + statusCode: { + bucket_script: { + buckets_path: { + sliValue: 'sliValue', + errorBudgetRemaining: 'errorBudgetRemaining', + }, + script: { + source: `if (params.sliValue == -1) { return 0 } else if (params.sliValue >= ${slo.objective.target}) { return 4 } else if (params.errorBudgetRemaining > 0) { return 2 } else { return 1 }`, + }, + }, + }, + latestSliTimestamp: { + max: { + field: '@timestamp', + }, + }, + }, + }, + description: `Summarise the rollup data of SLO: ${slo.name} [id: ${slo.id}, revision: ${slo.revision}].`, + frequency: '1m', + sync: { + time: { + field: 'event.ingested', + delay: '65s', + }, + }, + settings: { + deduce_mappings: false, + unattended: true, + }, + _meta: { + version: SLO_RESOURCES_VERSION, + managed: true, + managed_by: 'observability', + }, + }; +} diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/helpers/create_temp_summary.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts similarity index 80% rename from x-pack/plugins/observability/server/services/slo/summary_transform/helpers/create_temp_summary.ts rename to x-pack/plugins/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts index 9b4a15f2bf51f..166ca0198dbb8 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/helpers/create_temp_summary.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts @@ -8,7 +8,7 @@ import { ALL_VALUE } from '@kbn/slo-schema'; import { SLO } from '../../../../domain/models'; -export function createTempSummaryDocument(slo: SLO) { +export function createTempSummaryDocument(slo: SLO, spaceId: string) { return { service: { environment: null, @@ -33,6 +33,11 @@ export function createTempSummaryDocument(slo: SLO) { id: slo.id, budgetingMethod: slo.budgetingMethod, revision: slo.revision, + objective: { + target: slo.objective.target, + timesliceTarget: slo.objective.timesliceTarget ?? null, + timesliceWindow: slo.objective.timesliceWindow?.format() ?? null, + }, tags: slo.tags, }, goodEvents: 0, @@ -45,5 +50,6 @@ export function createTempSummaryDocument(slo: SLO) { statusCode: 0, status: 'NO_DATA', isTempDoc: true, + spaceId, }; } diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts new file mode 100644 index 0000000000000..7710515f6538a --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts @@ -0,0 +1,30 @@ +/* + * 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 { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; +import { SLO } from '../../../domain/models'; +import { generateSummaryTransformForOccurrences } from './generators/occurrences'; +import { generateSummaryTransformForTimeslicesAndRolling } from './generators/timeslices_rolling'; +import { generateSummaryTransformForTimeslicesAndCalendarAligned } from './generators/timeslices_calendar_aligned'; + +export interface SummaryTransformGenerator { + generate(slo: SLO): TransformPutTransformRequest; +} + +export class DefaultSummaryTransformGenerator implements SummaryTransformGenerator { + public generate(slo: SLO): TransformPutTransformRequest { + if (slo.budgetingMethod === 'occurrences') { + return generateSummaryTransformForOccurrences(slo); + } else if (slo.budgetingMethod === 'timeslices' && slo.timeWindow.type === 'rolling') { + return generateSummaryTransformForTimeslicesAndRolling(slo); + } else if (slo.budgetingMethod === 'timeslices' && slo.timeWindow.type === 'calendarAligned') { + return generateSummaryTransformForTimeslicesAndCalendarAligned(slo); + } + + throw new Error('Not supported SLO'); + } +} diff --git a/x-pack/plugins/observability/server/services/slo/summay_transform_manager.ts b/x-pack/plugins/observability/server/services/slo/summay_transform_manager.ts new file mode 100644 index 0000000000000..bc22f801c9fcc --- /dev/null +++ b/x-pack/plugins/observability/server/services/slo/summay_transform_manager.ts @@ -0,0 +1,99 @@ +/* + * 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 { ElasticsearchClient, Logger } from '@kbn/core/server'; + +import { SLO } from '../../domain/models'; +import { SecurityException } from '../../errors'; +import { retryTransientEsErrors } from '../../utils/retry'; +import { SummaryTransformGenerator } from './summary_transform_generator/summary_transform_generator'; +import { TransformManager } from './transform_manager'; + +type TransformId = string; + +export class DefaultSummaryTransformManager implements TransformManager { + constructor( + private generator: SummaryTransformGenerator, + private esClient: ElasticsearchClient, + private logger: Logger + ) {} + + async install(slo: SLO): Promise { + const transformParams = this.generator.generate(slo); + try { + await retryTransientEsErrors(() => this.esClient.transform.putTransform(transformParams), { + logger: this.logger, + }); + } catch (err) { + this.logger.error(`Cannot create summary transform for SLO [${slo.id}]`); + if (err.meta?.body?.error?.type === 'security_exception') { + throw new SecurityException(err.meta.body.error.reason); + } + + throw err; + } + + return transformParams.transform_id; + } + + async preview(transformId: string): Promise { + try { + await retryTransientEsErrors( + () => this.esClient.transform.previewTransform({ transform_id: transformId }), + { logger: this.logger } + ); + } catch (err) { + this.logger.error(`Cannot preview SLO summary transform [${transformId}]`); + throw err; + } + } + + async start(transformId: TransformId): Promise { + try { + await retryTransientEsErrors( + () => + this.esClient.transform.startTransform({ transform_id: transformId }, { ignore: [409] }), + { logger: this.logger } + ); + } catch (err) { + this.logger.error(`Cannot start SLO summary transform [${transformId}]`); + throw err; + } + } + + async stop(transformId: TransformId): Promise { + try { + await retryTransientEsErrors( + () => + this.esClient.transform.stopTransform( + { transform_id: transformId, wait_for_completion: true, force: true }, + { ignore: [404] } + ), + { logger: this.logger } + ); + } catch (err) { + this.logger.error(`Cannot stop SLO summary transform [${transformId}]`); + throw err; + } + } + + async uninstall(transformId: TransformId): Promise { + try { + await retryTransientEsErrors( + () => + this.esClient.transform.deleteTransform( + { transform_id: transformId, force: true }, + { ignore: [404] } + ), + { logger: this.logger } + ); + } catch (err) { + this.logger.error(`Cannot delete SLO summary transform [${transformId}]`); + throw err; + } + } +} diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap index d5ac57c80e40d..4fa12cae3e12e 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap @@ -190,66 +190,21 @@ Object { "field": "service.environment", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, } `; @@ -304,66 +259,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, } `; @@ -413,66 +323,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -527,66 +392,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.type": Object { "terms": Object { "field": "transaction.type", @@ -600,12 +420,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -660,71 +480,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -794,33 +564,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.apm.transactionDuration')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -830,48 +576,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -880,7 +590,7 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -889,12 +599,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -940,66 +650,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -1069,33 +734,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('occurrences')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.apm.transactionDuration')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -1105,42 +746,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.999)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -1149,6 +760,6 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap index c8d687383b513..515980a9dee54 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap @@ -178,66 +178,21 @@ Object { "field": "service.environment", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, } `; @@ -288,66 +243,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, } `; @@ -393,66 +303,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -503,66 +368,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.type": Object { "terms": Object { "field": "transaction.type", @@ -576,12 +396,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -629,71 +449,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -759,33 +529,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.apm.transactionErrorRate')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -795,48 +541,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -845,7 +555,7 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -854,12 +564,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -898,66 +608,21 @@ Object { "field": "service.name", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, "transaction.name": Object { "terms": Object { "field": "transaction.name", @@ -1023,33 +688,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('occurrences')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.apm.transactionErrorRate')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -1059,42 +700,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.999)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -1103,6 +714,6 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap index cdbdd8c527043..0b50f3ef5c52c 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap @@ -77,12 +77,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -151,71 +151,21 @@ Object { "fixed_interval": "2m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -253,33 +203,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.histogram.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -289,48 +215,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -339,7 +229,7 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -348,12 +238,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -413,66 +303,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -510,33 +355,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('occurrences')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.histogram.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -546,42 +367,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.999)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -590,6 +381,6 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap index 27da87629465d..0b5dc06be0a58 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap @@ -118,12 +118,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -166,71 +166,21 @@ Object { "fixed_interval": "2m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -268,33 +218,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.kql.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -304,48 +230,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -354,7 +244,7 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -363,12 +253,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -402,66 +292,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -499,33 +344,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('occurrences')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.kql.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -535,42 +356,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.999)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -579,6 +370,6 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap index 55ed414bd2ec7..ed5ee454a5596 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap @@ -117,12 +117,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -203,71 +203,21 @@ Object { "fixed_interval": "2m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -305,33 +255,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.metric.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -341,48 +267,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -391,7 +281,7 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -400,12 +290,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -477,66 +367,21 @@ Object { "fixed_interval": "1m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -574,33 +419,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('occurrences')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.metric.custom')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -610,42 +431,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.999)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -654,7 +445,7 @@ Object { "field": "log_timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap index e2698ba3e1793..48ebb4de1e8d6 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap @@ -33,12 +33,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -173,71 +173,21 @@ Object { "fixed_interval": "2m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -272,33 +222,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.metric.timeslice')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -308,48 +234,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -358,7 +248,7 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; @@ -367,12 +257,12 @@ Object { "_meta": Object { "managed": true, "managed_by": "observability", - "version": 2, + "version": 3, }, - "description": "Rolled-up SLI data for SLO: irrelevant", + "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { - "index": ".slo-observability.sli-v2", - "pipeline": ".slo-observability.sli.pipeline", + "index": ".slo-observability.sli-v3", + "pipeline": ".slo-observability.sli.pipeline-v3", }, "frequency": "1m", "pivot": Object { @@ -507,71 +397,21 @@ Object { "fixed_interval": "2m", }, }, - "slo.budgetingMethod": Object { - "terms": Object { - "field": "slo.budgetingMethod", - }, - }, - "slo.description": Object { - "terms": Object { - "field": "slo.description", - }, - }, - "slo.groupBy": Object { - "terms": Object { - "field": "slo.groupBy", - }, - }, "slo.id": Object { "terms": Object { "field": "slo.id", }, }, - "slo.indicator.type": Object { - "terms": Object { - "field": "slo.indicator.type", - }, - }, "slo.instanceId": Object { "terms": Object { "field": "slo.instanceId", }, }, - "slo.name": Object { - "terms": Object { - "field": "slo.name", - }, - }, - "slo.objective.sliceDurationInSeconds": Object { - "terms": Object { - "field": "slo.objective.sliceDurationInSeconds", - }, - }, - "slo.objective.target": Object { - "terms": Object { - "field": "slo.objective.target", - }, - }, "slo.revision": Object { "terms": Object { "field": "slo.revision", }, }, - "slo.tags": Object { - "terms": Object { - "field": "slo.tags", - }, - }, - "slo.timeWindow.duration": Object { - "terms": Object { - "field": "slo.timeWindow.duration", - }, - }, - "slo.timeWindow.type": Object { - "terms": Object { - "field": "slo.timeWindow.type", - }, - }, }, }, "settings": Object { @@ -606,33 +446,9 @@ Object { }, }, "runtime_mappings": Object { - "slo.budgetingMethod": Object { - "script": Object { - "source": "emit('timeslices')", - }, - "type": "keyword", - }, - "slo.description": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.groupBy": Object { - "script": Object { - "source": "emit('*')", - }, - "type": "keyword", - }, "slo.id": Object { "script": Object { - "source": Any, - }, - "type": "keyword", - }, - "slo.indicator.type": Object { - "script": Object { - "source": "emit('sli.metric.timeslice')", + "source": "emit('irrelevant')", }, "type": "keyword", }, @@ -642,48 +458,12 @@ Object { }, "type": "keyword", }, - "slo.name": Object { - "script": Object { - "source": "emit('irrelevant')", - }, - "type": "keyword", - }, - "slo.objective.sliceDurationInSeconds": Object { - "script": Object { - "source": "emit(120)", - }, - "type": "long", - }, - "slo.objective.target": Object { - "script": Object { - "source": "emit(0.98)", - }, - "type": "double", - }, "slo.revision": Object { "script": Object { "source": "emit(1)", }, "type": "long", }, - "slo.tags": Object { - "script": Object { - "source": "emit('critical,k8s')", - }, - "type": "keyword", - }, - "slo.timeWindow.duration": Object { - "script": Object { - "source": "emit('7d')", - }, - "type": "keyword", - }, - "slo.timeWindow.type": Object { - "script": Object { - "source": "emit('rolling')", - }, - "type": "keyword", - }, }, }, "sync": Object { @@ -692,6 +472,6 @@ Object { "field": "@timestamp", }, }, - "transform_id": Any, + "transform_id": "slo-irrelevant-1", } `; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts index f19ee083a3115..6b5491e487191 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts @@ -17,32 +17,20 @@ const generator = new ApmTransactionDurationTransformGenerator(); describe('APM Transaction Duration Transform Generator', () => { it('returns the expected transform params with every specified indicator params', () => { - const slo = createSLO({ indicator: createAPMTransactionDurationIndicator() }); + const slo = createSLO({ id: 'irrelevant', indicator: createAPMTransactionDurationIndicator() }); const transform = generator.getTransformParams(slo); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${slo.id}-${slo.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${slo.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${slo.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', () => { const slo = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: createAPMTransactionDurationIndicator(), }); const transform = generator.getTransformParams(slo); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it("does not include the query filter when params are '*'", () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts index 54f72f1961588..9934f5ea27a51 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts @@ -17,32 +17,23 @@ const generator = new ApmTransactionErrorRateTransformGenerator(); describe('APM Transaction Error Rate Transform Generator', () => { it('returns the expected transform params with every specified indicator params', async () => { - const slo = createSLO({ indicator: createAPMTransactionErrorRateIndicator() }); + const slo = createSLO({ + id: 'irrelevant', + indicator: createAPMTransactionErrorRateIndicator(), + }); const transform = generator.getTransformParams(slo); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${slo.id}-${slo.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${slo.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${slo.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', async () => { const slo = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: createAPMTransactionErrorRateIndicator(), }); const transform = generator.getTransformParams(slo); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it("does not include the query filter when params are '*'", async () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.test.ts index fdf0bc27563fe..77ef70e75ca5f 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.test.ts @@ -30,6 +30,7 @@ describe('Histogram Transform Generator', () => { }); expect(() => generator.getTransformParams(anSLO)).toThrow(/Invalid KQL: foo:/); }); + it('throws when the total filter is invalid', () => { const anSLO = createSLO({ indicator: createHistogramIndicator({ @@ -42,6 +43,7 @@ describe('Histogram Transform Generator', () => { }); expect(() => generator.getTransformParams(anSLO)).toThrow(/Invalid KQL: foo:/); }); + it('throws when the query_filter is invalid', () => { const anSLO = createSLO({ indicator: createHistogramIndicator({ filter: '{ kql.query: invalid' }), @@ -51,32 +53,20 @@ describe('Histogram Transform Generator', () => { }); it('returns the expected transform params with every specified indicator params', async () => { - const anSLO = createSLO({ indicator: createHistogramIndicator() }); + const anSLO = createSLO({ id: 'irrelevant', indicator: createHistogramIndicator() }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${anSLO.id}-${anSLO.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${anSLO.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${anSLO.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', async () => { const anSLO = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: createHistogramIndicator(), }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it('filters the source using the kql query', async () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.test.ts index dd4511ec44bfd..1512bb5a655ab 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.test.ts @@ -37,32 +37,20 @@ describe('KQL Custom Transform Generator', () => { }); it('returns the expected transform params with every specified indicator params', async () => { - const anSLO = createSLO({ indicator: createKQLCustomIndicator() }); + const anSLO = createSLO({ id: 'irrelevant', indicator: createKQLCustomIndicator() }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${anSLO.id}-${anSLO.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${anSLO.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${anSLO.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', async () => { const anSLO = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: createKQLCustomIndicator(), }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it('filters the source using the kql query', async () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.test.ts index 69685bad0c09e..9ebacde28f0ed 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.test.ts @@ -69,32 +69,20 @@ describe('Metric Custom Transform Generator', () => { }); it('returns the expected transform params with every specified indicator params', async () => { - const anSLO = createSLO({ indicator: createMetricCustomIndicator() }); + const anSLO = createSLO({ id: 'irrelevant', indicator: createMetricCustomIndicator() }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${anSLO.id}-${anSLO.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${anSLO.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${anSLO.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', async () => { const anSLO = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: createMetricCustomIndicator(), }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it('filters the source using the kql query', async () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.test.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.test.ts index aa21f7e0ceb0e..7d221c25c27ed 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.test.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.test.ts @@ -70,33 +70,22 @@ describe('Timeslice Metric Transform Generator', () => { it('returns the expected transform params with every specified indicator params', async () => { const anSLO = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: everythingIndicator, }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); - expect(transform.transform_id).toEqual(`slo-${anSLO.id}-${anSLO.revision}`); - expect(transform.source.runtime_mappings!['slo.id']).toMatchObject({ - script: { source: `emit('${anSLO.id}')` }, - }); - expect(transform.source.runtime_mappings!['slo.revision']).toMatchObject({ - script: { source: `emit(${anSLO.revision})` }, - }); + expect(transform).toMatchSnapshot(); }); it('returns the expected transform params for timeslices slo', async () => { const anSLO = createSLOWithTimeslicesBudgetingMethod({ + id: 'irrelevant', indicator: everythingIndicator, }); const transform = generator.getTransformParams(anSLO); - expect(transform).toMatchSnapshot({ - transform_id: expect.any(String), - source: { runtime_mappings: { 'slo.id': { script: { source: expect.any(String) } } } }, - }); + expect(transform).toMatchSnapshot(); }); it('filters the source using the kql query', async () => { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/transform_generator.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/transform_generator.ts index 42572e61b38ab..7085f69b76422 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/transform_generator.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/transform_generator.ts @@ -32,12 +32,6 @@ export abstract class TransformGenerator { source: `emit(${slo.revision})`, }, }, - 'slo.groupBy': { - type: 'keyword', - script: { - source: `emit('${!!slo.groupBy ? slo.groupBy : ALL_VALUE}')`, - }, - }, ...(mustIncludeAllInstanceId && { 'slo.instanceId': { type: 'keyword', @@ -46,67 +40,11 @@ export abstract class TransformGenerator { }, }, }), - 'slo.name': { - type: 'keyword', - script: { - source: `emit('${slo.name}')`, - }, - }, - 'slo.description': { - type: 'keyword', - script: { - source: `emit('${slo.description}')`, - }, - }, - 'slo.tags': { - type: 'keyword', - script: { - source: `emit('${slo.tags}')`, - }, - }, - 'slo.indicator.type': { - type: 'keyword', - script: { - source: `emit('${slo.indicator.type}')`, - }, - }, - 'slo.objective.target': { - type: 'double', - script: { - source: `emit(${slo.objective.target})`, - }, - }, - ...(slo.objective.timesliceWindow && { - 'slo.objective.sliceDurationInSeconds': { - type: 'long', - script: { - source: `emit(${slo.objective.timesliceWindow!.asSeconds()})`, - }, - }, - }), - 'slo.budgetingMethod': { - type: 'keyword', - script: { - source: `emit('${slo.budgetingMethod}')`, - }, - }, - 'slo.timeWindow.duration': { - type: 'keyword', - script: { - source: `emit('${slo.timeWindow.duration.format()}')`, - }, - }, - 'slo.timeWindow.type': { - type: 'keyword', - script: { - source: `emit('${slo.timeWindow.type}')`, - }, - }, }; } public buildDescription(slo: SLO): string { - return `Rolled-up SLI data for SLO: ${slo.name}`; + return `Rolled-up SLI data for SLO: ${slo.name} [id: ${slo.id}, revision: ${slo.revision}]`; } public buildCommonGroupBy( @@ -119,27 +57,27 @@ export abstract class TransformGenerator { fixedInterval = slo.objective.timesliceWindow!.format(); } - const instanceIdField = - slo.groupBy !== '' && slo.groupBy !== ALL_VALUE ? slo.groupBy : 'slo.instanceId'; + const groupings = + slo.groupBy !== '' && slo.groupBy !== ALL_VALUE + ? [slo.groupBy].flat().reduce( + (acc, field) => { + return { + ...acc, + [`slo.groupings.${field}`]: { + terms: { + field, + }, + }, + }; + }, + { 'slo.instanceId': { terms: { field: slo.groupBy } } } + ) + : { 'slo.instanceId': { terms: { field: 'slo.instanceId' } } }; return { 'slo.id': { terms: { field: 'slo.id' } }, 'slo.revision': { terms: { field: 'slo.revision' } }, - 'slo.groupBy': { terms: { field: 'slo.groupBy' } }, - 'slo.instanceId': { terms: { field: instanceIdField } }, - 'slo.name': { terms: { field: 'slo.name' } }, - 'slo.description': { terms: { field: 'slo.description' } }, - 'slo.tags': { terms: { field: 'slo.tags' } }, - 'slo.indicator.type': { terms: { field: 'slo.indicator.type' } }, - 'slo.objective.target': { terms: { field: 'slo.objective.target' } }, - ...(slo.objective.timesliceWindow && { - 'slo.objective.sliceDurationInSeconds': { - terms: { field: 'slo.objective.sliceDurationInSeconds' }, - }, - }), - 'slo.budgetingMethod': { terms: { field: 'slo.budgetingMethod' } }, - 'slo.timeWindow.duration': { terms: { field: 'slo.timeWindow.duration' } }, - 'slo.timeWindow.type': { terms: { field: 'slo.timeWindow.type' } }, + ...groupings, ...extraGroupByFields, // @timestamp field defined in the destination index '@timestamp': { diff --git a/x-pack/plugins/observability/server/services/slo/update_slo.test.ts b/x-pack/plugins/observability/server/services/slo/update_slo.test.ts index 1fb6550e12c47..a8642cfa921f2 100644 --- a/x-pack/plugins/observability/server/services/slo/update_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/update_slo.test.ts @@ -6,11 +6,13 @@ */ import { ElasticsearchClient } from '@kbn/core/server'; -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { MockedLogger } from '@kbn/logging-mocks'; import { UpdateSLOParams } from '@kbn/slo-schema'; -import { cloneDeep, pick, omit } from 'lodash'; +import { cloneDeep, omit, pick } from 'lodash'; import { + getSLOSummaryTransformId, getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, @@ -22,7 +24,12 @@ import { createSLO, createSLOWithTimeslicesBudgetingMethod, } from './fixtures/slo'; -import { createSLORepositoryMock, createTransformManagerMock } from './mocks'; +import { weeklyCalendarAligned } from './fixtures/time_window'; +import { + createSLORepositoryMock, + createSummaryTransformManagerMock, + createTransformManagerMock, +} from './mocks'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; import { UpdateSLO } from './update_slo'; @@ -31,13 +38,24 @@ describe('UpdateSLO', () => { let mockRepository: jest.Mocked; let mockTransformManager: jest.Mocked; let mockEsClient: jest.Mocked; + let loggerMock: jest.Mocked; + let mockSummaryTransformManager: jest.Mocked; let updateSLO: UpdateSLO; beforeEach(() => { mockRepository = createSLORepositoryMock(); mockTransformManager = createTransformManagerMock(); + loggerMock = loggingSystemMock.createLogger(); + mockSummaryTransformManager = createSummaryTransformManagerMock(); mockEsClient = elasticsearchServiceMock.createElasticsearchClient(); - updateSLO = new UpdateSLO(mockRepository, mockTransformManager, mockEsClient); + updateSLO = new UpdateSLO( + mockRepository, + mockTransformManager, + mockSummaryTransformManager, + mockEsClient, + loggerMock, + 'some-space' + ); }); describe('when the update payload does not change the original SLO', () => { @@ -45,12 +63,18 @@ describe('UpdateSLO', () => { expect(mockTransformManager.stop).not.toBeCalled(); expect(mockTransformManager.uninstall).not.toBeCalled(); expect(mockTransformManager.install).not.toBeCalled(); - expect(mockTransformManager.preview).not.toBeCalled(); expect(mockTransformManager.start).not.toBeCalled(); + + expect(mockSummaryTransformManager.stop).not.toBeCalled(); + expect(mockSummaryTransformManager.uninstall).not.toBeCalled(); + expect(mockSummaryTransformManager.install).not.toBeCalled(); + expect(mockSummaryTransformManager.start).not.toBeCalled(); + expect(mockEsClient.deleteByQuery).not.toBeCalled(); + expect(mockEsClient.ingest.putPipeline).not.toBeCalled(); } - it('returns early with a full identical SLO payload', async () => { + it('returns early with a fully identical SLO payload', async () => { const slo = createSLO(); mockRepository.findById.mockResolvedValueOnce(slo); const updatePayload: UpdateSLOParams = omit(cloneDeep(slo), [ @@ -58,6 +82,7 @@ describe('UpdateSLO', () => { 'revision', 'createdAt', 'updatedAt', + 'version', 'enabled', ]); @@ -157,111 +182,116 @@ describe('UpdateSLO', () => { }); }); - it('updates the settings correctly', async () => { - const slo = createSLO(); - mockRepository.findById.mockResolvedValueOnce(slo); + describe('handles breaking changes', () => { + it('consideres a settings change as a breaking change', async () => { + const slo = createSLO(); + mockRepository.findById.mockResolvedValueOnce(slo); - const newSettings = { ...slo.settings, timestamp_field: 'newField' }; - await updateSLO.execute(slo.id, { settings: newSettings }); + const newSettings = { ...slo.settings, timestamp_field: 'newField' }; + await updateSLO.execute(slo.id, { settings: newSettings }); + + expectDeletionOfOriginalSLOResources(slo); + expect(mockRepository.save).toHaveBeenCalledWith( + expect.objectContaining({ + ...slo, + settings: newSettings, + revision: 2, + updatedAt: expect.anything(), + }) + ); + expectInstallationOfUpdatedSLOResources(); + }); - expectDeletionOfOriginalSLO(slo); - expect(mockRepository.save).toBeCalledWith( - expect.objectContaining({ - ...slo, - settings: newSettings, - revision: 2, - updatedAt: expect.anything(), - }) - ); - expectInstallationOfNewSLOTransform(); - }); + it('consideres a budgeting method change as a breaking change', async () => { + const slo = createSLO({ budgetingMethod: 'occurrences' }); + mockRepository.findById.mockResolvedValueOnce(slo); - it('updates the budgeting method correctly', async () => { - const slo = createSLO({ budgetingMethod: 'occurrences' }); - mockRepository.findById.mockResolvedValueOnce(slo); - - await updateSLO.execute(slo.id, { - budgetingMethod: 'timeslices', - objective: { - target: slo.objective.target, - timesliceTarget: 0.9, - timesliceWindow: oneMinute(), - }, + await updateSLO.execute(slo.id, { + budgetingMethod: 'timeslices', + objective: { + target: slo.objective.target, + timesliceTarget: 0.9, + timesliceWindow: oneMinute(), + }, + }); + + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); }); - expectDeletionOfOriginalSLO(slo); - expectInstallationOfNewSLOTransform(); - }); + it('consideres a timeWindow change as a breaking change', async () => { + const slo = createSLOWithTimeslicesBudgetingMethod(); + mockRepository.findById.mockResolvedValueOnce(slo); - it('updates the timeslice target correctly', async () => { - const slo = createSLOWithTimeslicesBudgetingMethod(); - mockRepository.findById.mockResolvedValueOnce(slo); + await updateSLO.execute(slo.id, { + timeWindow: weeklyCalendarAligned(), + }); - await updateSLO.execute(slo.id, { - objective: { - target: slo.objective.target, - timesliceTarget: 0.1, - timesliceWindow: slo.objective.timesliceWindow, - }, + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); }); - expectDeletionOfOriginalSLO(slo); - expectInstallationOfNewSLOTransform(); - }); + it('consideres a timeslice target change as a breaking change', async () => { + const slo = createSLOWithTimeslicesBudgetingMethod(); + mockRepository.findById.mockResolvedValueOnce(slo); - it('consideres a timeslice window change as a breaking change', async () => { - const slo = createSLOWithTimeslicesBudgetingMethod(); - mockRepository.findById.mockResolvedValueOnce(slo); + await updateSLO.execute(slo.id, { + objective: { + target: slo.objective.target, + timesliceTarget: 0.1, + timesliceWindow: slo.objective.timesliceWindow, + }, + }); - await updateSLO.execute(slo.id, { - objective: { - target: slo.objective.target, - timesliceTarget: slo.objective.timesliceTarget, - timesliceWindow: fiveMinute(), - }, + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); }); - expectDeletionOfOriginalSLO(slo); - expectInstallationOfNewSLOTransform(); - }); + it('consideres a timeslice window change as a breaking change', async () => { + const slo = createSLOWithTimeslicesBudgetingMethod(); + mockRepository.findById.mockResolvedValueOnce(slo); - it('index a temporary summary document', async () => { - const slo = createSLO({ - id: 'unique-id', - indicator: createAPMTransactionErrorRateIndicator({ environment: 'development' }), + await updateSLO.execute(slo.id, { + objective: { + target: slo.objective.target, + timesliceTarget: slo.objective.timesliceTarget, + timesliceWindow: fiveMinute(), + }, + }); + + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); }); - mockRepository.findById.mockResolvedValueOnce(slo); - const newIndicator = createAPMTransactionErrorRateIndicator({ environment: 'production' }); - await updateSLO.execute(slo.id, { indicator: newIndicator }); + it('consideres an indicator change as a breaking change', async () => { + const slo = createSLOWithTimeslicesBudgetingMethod(); + mockRepository.findById.mockResolvedValueOnce(slo); - expect(mockEsClient.index.mock.calls[0]).toMatchSnapshot(); - }); + await updateSLO.execute(slo.id, { + indicator: createAPMTransactionErrorRateIndicator(), + }); - it('removes the original data from the original SLO', async () => { - const slo = createSLO({ - indicator: createAPMTransactionErrorRateIndicator({ environment: 'development' }), + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); }); - mockRepository.findById.mockResolvedValueOnce(slo); - const newIndicator = createAPMTransactionErrorRateIndicator({ environment: 'production' }); - await updateSLO.execute(slo.id, { indicator: newIndicator }); + it('consideres a groupBy change as a breaking change', async () => { + const slo = createSLOWithTimeslicesBudgetingMethod(); + mockRepository.findById.mockResolvedValueOnce(slo); - expect(mockRepository.save).toBeCalledWith( - expect.objectContaining({ - ...slo, - indicator: newIndicator, - revision: 2, - updatedAt: expect.anything(), - }) - ); - expectInstallationOfNewSLOTransform(); - expectDeletionOfOriginalSLO(slo); + await updateSLO.execute(slo.id, { + groupBy: 'new-field', + }); + + expectInstallationOfUpdatedSLOResources(); + expectDeletionOfOriginalSLOResources(slo); + }); }); - describe('when error happens during the transform installation step', () => { + describe('when error happens during the update', () => { it('restores the previous SLO definition in the repository', async () => { const slo = createSLO({ + id: 'original-id', indicator: createAPMTransactionErrorRateIndicator({ environment: 'development' }), }); mockRepository.findById.mockResolvedValueOnce(slo); @@ -274,47 +304,38 @@ describe('UpdateSLO', () => { ); expect(mockRepository.save).toHaveBeenCalledWith(slo); - expect(mockTransformManager.preview).not.toHaveBeenCalled(); - expect(mockTransformManager.start).not.toHaveBeenCalled(); - expect(mockTransformManager.stop).not.toHaveBeenCalled(); - expect(mockTransformManager.uninstall).not.toHaveBeenCalled(); - expect(mockEsClient.deleteByQuery).not.toHaveBeenCalled(); + + // these calls are related to the updated slo + expect(mockSummaryTransformManager.stop).toMatchSnapshot(); + expect(mockSummaryTransformManager.uninstall).toMatchSnapshot(); + expect(mockTransformManager.stop).toMatchSnapshot(); + expect(mockTransformManager.uninstall).toMatchSnapshot(); + expect(mockEsClient.ingest.deletePipeline).toMatchSnapshot(); }); }); - describe('when error happens during the transform start step', () => { - it('removes the new transform and restores the previous SLO definition in the repository', async () => { - const slo = createSLO({ - indicator: createAPMTransactionErrorRateIndicator({ environment: 'development' }), - }); - mockRepository.findById.mockResolvedValueOnce(slo); - mockTransformManager.start.mockRejectedValueOnce(new Error('Transform start error')); - - const newIndicator = createAPMTransactionErrorRateIndicator({ environment: 'production' }); + function expectInstallationOfUpdatedSLOResources() { + expect(mockTransformManager.install).toHaveBeenCalled(); + expect(mockTransformManager.start).toHaveBeenCalled(); - await expect(updateSLO.execute(slo.id, { indicator: newIndicator })).rejects.toThrowError( - 'Transform start error' - ); + expect(mockEsClient.ingest.putPipeline).toHaveBeenCalled(); - expect(mockTransformManager.uninstall).toHaveBeenCalledWith( - getSLOTransformId(slo.id, slo.revision + 1) - ); - expect(mockRepository.save).toHaveBeenCalledWith(slo); - expect(mockTransformManager.stop).not.toHaveBeenCalled(); - expect(mockEsClient.deleteByQuery).not.toHaveBeenCalled(); - }); - }); + expect(mockSummaryTransformManager.install).toHaveBeenCalled(); + expect(mockSummaryTransformManager.start).toHaveBeenCalled(); - function expectInstallationOfNewSLOTransform() { - expect(mockTransformManager.install).toBeCalled(); - expect(mockTransformManager.preview).toBeCalled(); - expect(mockTransformManager.start).toBeCalled(); + expect(mockEsClient.index).toHaveBeenCalled(); } - function expectDeletionOfOriginalSLO(originalSlo: SLO) { + function expectDeletionOfOriginalSLOResources(originalSlo: SLO) { const transformId = getSLOTransformId(originalSlo.id, originalSlo.revision); - expect(mockTransformManager.stop).toBeCalledWith(transformId); - expect(mockTransformManager.uninstall).toBeCalledWith(transformId); + expect(mockTransformManager.stop).toHaveBeenCalledWith(transformId); + expect(mockTransformManager.uninstall).toHaveBeenCalledWith(transformId); + + const summaryTransformId = getSLOSummaryTransformId(originalSlo.id, originalSlo.revision); + expect(mockSummaryTransformManager.stop).toHaveBeenCalledWith(summaryTransformId); + expect(mockSummaryTransformManager.uninstall).toHaveBeenCalledWith(summaryTransformId); + + expect(mockEsClient.ingest.deletePipeline).toHaveBeenCalled(); expect(mockEsClient.deleteByQuery).toHaveBeenCalledTimes(2); expect(mockEsClient.deleteByQuery).toHaveBeenNthCalledWith( diff --git a/x-pack/plugins/observability/server/services/slo/update_slo.ts b/x-pack/plugins/observability/server/services/slo/update_slo.ts index 0d039c93c1ab0..1a73d54decbee 100644 --- a/x-pack/plugins/observability/server/services/slo/update_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/update_slo.ts @@ -5,26 +5,33 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { UpdateSLOParams, UpdateSLOResponse, updateSLOResponseSchema } from '@kbn/slo-schema'; -import { isEqual } from 'lodash'; +import { isEqual, pick } from 'lodash'; import { + getSLOSummaryPipelineId, + getSLOSummaryTransformId, getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_TEMP_INDEX_NAME, } from '../../../common/slo/constants'; +import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; import { SLO } from '../../domain/models'; import { validateSLO } from '../../domain/services'; +import { retryTransientEsErrors } from '../../utils/retry'; import { SLORepository } from './slo_repository'; -import { createTempSummaryDocument } from './summary_transform/helpers/create_temp_summary'; +import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; import { TransformManager } from './transform_manager'; export class UpdateSLO { constructor( private repository: SLORepository, private transformManager: TransformManager, - private esClient: ElasticsearchClient + private summaryTransformManager: TransformManager, + private esClient: ElasticsearchClient, + private logger: Logger, + private spaceId: string ) {} public async execute(sloId: string, params: UpdateSLOParams): Promise { @@ -37,42 +44,81 @@ export class UpdateSLO { return this.toResponse(originalSlo); } + const fields = [ + 'indicator', + 'groupBy', + 'timeWindow', + 'objective', + 'budgetingMethod', + 'settings', + ]; + const requireRevisionBump = !isEqual(pick(originalSlo, fields), pick(updatedSlo, fields)); + updatedSlo = Object.assign(updatedSlo, { updatedAt: new Date(), - revision: originalSlo.revision + 1, + revision: requireRevisionBump ? originalSlo.revision + 1 : originalSlo.revision, }); validateSLO(updatedSlo); - - const updatedSloTransformId = getSLOTransformId(updatedSlo.id, updatedSlo.revision); await this.repository.save(updatedSlo); - try { - await this.transformManager.install(updatedSlo); - } catch (err) { - await this.repository.save(originalSlo); - throw err; + if (!requireRevisionBump) { + // At this point, we still need to update the summary pipeline to include the changes (name, desc, tags, ...) in the summary index + await retryTransientEsErrors( + () => + this.esClient.ingest.putPipeline(getSLOSummaryPipelineTemplate(updatedSlo, this.spaceId)), + { logger: this.logger } + ); + + return this.toResponse(updatedSlo); } + const updatedRollupTransformId = getSLOTransformId(updatedSlo.id, updatedSlo.revision); + const updatedSummaryTransformId = getSLOSummaryTransformId(updatedSlo.id, updatedSlo.revision); + try { - await this.transformManager.preview(updatedSloTransformId); - await this.transformManager.start(updatedSloTransformId); + await this.transformManager.install(updatedSlo); + await this.transformManager.start(updatedRollupTransformId); + + await retryTransientEsErrors( + () => + this.esClient.ingest.putPipeline(getSLOSummaryPipelineTemplate(updatedSlo, this.spaceId)), + { logger: this.logger } + ); + + await this.summaryTransformManager.install(updatedSlo); + await this.summaryTransformManager.start(updatedSummaryTransformId); + + await retryTransientEsErrors( + () => + this.esClient.index({ + index: SLO_SUMMARY_TEMP_INDEX_NAME, + id: `slo-${updatedSlo.id}`, + document: createTempSummaryDocument(updatedSlo, this.spaceId), + refresh: true, + }), + { logger: this.logger } + ); } catch (err) { - await Promise.all([ - this.transformManager.uninstall(updatedSloTransformId), - this.repository.save(originalSlo), - ]); + this.logger.error( + `Cannot update the SLO [id: ${updatedSlo.id}, revision: ${updatedSlo.revision}]. Rolling back.` + ); + + // Restore the previous slo definition + await this.repository.save(originalSlo); + // delete the created resources for the updated slo + await this.summaryTransformManager.stop(updatedSummaryTransformId); + await this.summaryTransformManager.uninstall(updatedSummaryTransformId); + await this.transformManager.stop(updatedRollupTransformId); + await this.transformManager.uninstall(updatedRollupTransformId); + await this.esClient.ingest.deletePipeline( + { id: getSLOSummaryPipelineId(updatedSlo.id, updatedSlo.revision) }, + { ignore: [404] } + ); throw err; } - await this.esClient.index({ - index: SLO_SUMMARY_TEMP_INDEX_NAME, - id: `slo-${updatedSlo.id}`, - document: createTempSummaryDocument(updatedSlo), - refresh: true, - }); - await this.deleteOriginalSLO(originalSlo); return this.toResponse(updatedSlo); @@ -80,9 +126,21 @@ export class UpdateSLO { private async deleteOriginalSLO(originalSlo: SLO) { try { - const originalSloTransformId = getSLOTransformId(originalSlo.id, originalSlo.revision); - await this.transformManager.stop(originalSloTransformId); - await this.transformManager.uninstall(originalSloTransformId); + const originalRollupTransformId = getSLOTransformId(originalSlo.id, originalSlo.revision); + await this.transformManager.stop(originalRollupTransformId); + await this.transformManager.uninstall(originalRollupTransformId); + + const originalSummaryTransformId = getSLOSummaryTransformId( + originalSlo.id, + originalSlo.revision + ); + await this.summaryTransformManager.stop(originalSummaryTransformId); + await this.summaryTransformManager.uninstall(originalSummaryTransformId); + + await this.esClient.ingest.deletePipeline( + { id: getSLOSummaryPipelineId(originalSlo.id, originalSlo.revision) }, + { ignore: [404] } + ); } catch (err) { // Any errors here should not prevent moving forward. // Worst case we keep rolling up data for the previous revision number. diff --git a/x-pack/plugins/observability_log_explorer/common/index.ts b/x-pack/plugins/observability_log_explorer/common/index.ts index f7639f742e67e..f94c83117e7e8 100644 --- a/x-pack/plugins/observability_log_explorer/common/index.ts +++ b/x-pack/plugins/observability_log_explorer/common/index.ts @@ -10,3 +10,5 @@ export { SingleDatasetLocatorDefinition, AllDatasetsLocatorDefinition, } from './locators'; +export { OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY, urlSchemaV1 } from './url_schema'; +export { deepCompactObject } from './utils/deep_compact_object'; diff --git a/x-pack/plugins/observability_log_explorer/common/locators/all_datasets/all_datasets_locator.ts b/x-pack/plugins/observability_log_explorer/common/locators/all_datasets/all_datasets_locator.ts index 17c8b2ae02047..41cf67546c78d 100644 --- a/x-pack/plugins/observability_log_explorer/common/locators/all_datasets/all_datasets_locator.ts +++ b/x-pack/plugins/observability_log_explorer/common/locators/all_datasets/all_datasets_locator.ts @@ -23,11 +23,10 @@ export class AllDatasetsLocatorDefinition implements LocatorDefinition { const { useHash } = this.deps; - const index = AllDatasetSelection.create().toDataviewSpec().id; return constructLocatorPath({ + datasetSelection: AllDatasetSelection.create().toPlainSelection(), locatorParams: params, - index, useHash, }); }; diff --git a/x-pack/plugins/observability_log_explorer/common/locators/locators.test.ts b/x-pack/plugins/observability_log_explorer/common/locators/locators.test.ts index d26ff4e133ea6..ff12691e8c2fd 100644 --- a/x-pack/plugins/observability_log_explorer/common/locators/locators.test.ts +++ b/x-pack/plugins/observability_log_explorer/common/locators/locators.test.ts @@ -5,13 +5,11 @@ * 2.0. */ -import { FilterStateStore } from '@kbn/es-query'; -import { getStatesFromKbnUrl } from '@kbn/kibana-utils-plugin/public'; +import { OBSERVABILITY_LOG_EXPLORER_APP_ID } from '@kbn/deeplinks-observability'; import { AllDatasetsLocatorParams, SingleDatasetLocatorParams, } from '@kbn/deeplinks-observability/locators'; -import { OBSERVABILITY_LOG_EXPLORER } from '@kbn/deeplinks-observability'; import { AllDatasetsLocatorDefinition } from './all_datasets/all_datasets_locator'; import { SingleDatasetLocatorDefinition } from './single_dataset'; import { DatasetLocatorDependencies } from './types'; @@ -38,8 +36,8 @@ describe('Observability Logs Explorer Locators', () => { const location = await allDatasetsLocator.getLocation({}); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: '/?_a=(index:BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA)', + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: '/?pageState=(datasetSelection:(selectionType:all),v:1)', state: {}, }); }); @@ -53,8 +51,8 @@ describe('Observability Logs Explorer Locators', () => { const location = await allDatasetsLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: '/?_g=(time:(from:now-30m,to:now))&_a=(index:BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA)', + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: '/?pageState=(datasetSelection:(selectionType:all),time:(from:now-30m,to:now),v:1)', state: {}, }); }); @@ -70,8 +68,8 @@ describe('Observability Logs Explorer Locators', () => { const location = await allDatasetsLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: '/?_a=(index:BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA,query:(language:kuery,query:foo))', + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: '/?pageState=(datasetSelection:(selectionType:all),query:(language:kuery,query:foo),v:1)', state: {}, }); }); @@ -88,29 +86,28 @@ describe('Observability Logs Explorer Locators', () => { const location = await allDatasetsLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: '/?_g=(refreshInterval:(pause:!f,value:666))&_a=(index:BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA)', + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: '/?pageState=(datasetSelection:(selectionType:all),refreshInterval:(pause:!f,value:666),v:1)', state: {}, }); }); - it('should allow specifiying columns and sort', async () => { + it('should allow specifiying columns', async () => { const params: AllDatasetsLocatorParams = { columns: ['_source'], - sort: [['timestamp, asc']] as string[][], }; const { allDatasetsLocator } = await setup(); const location = await allDatasetsLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_a=(columns:!(_source),index:BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA,sort:!(!('timestamp,%20asc')))`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(columns:!((field:_source)),datasetSelection:(selectionType:all),v:1)`, state: {}, }); }); - it('should allow specifiying filters', async () => { + it('should allow specifying filters', async () => { const params: AllDatasetsLocatorParams = { filters: [ { @@ -119,9 +116,6 @@ describe('Observability Logs Explorer Locators', () => { disabled: false, negate: false, }, - $state: { - store: FilterStateStore.APP_STATE, - }, }, { meta: { @@ -129,47 +123,16 @@ describe('Observability Logs Explorer Locators', () => { disabled: false, negate: false, }, - $state: { - store: FilterStateStore.GLOBAL_STATE, - }, }, ], }; const { allDatasetsLocator } = await setup(); - const { path } = await allDatasetsLocator.getLocation(params); - - const { _a, _g } = getStatesFromKbnUrl(path, ['_a', '_g'], { getFromHashQuery: false }); + const location = await allDatasetsLocator.getLocation(params); - expect(_a).toEqual({ - filters: [ - { - $state: { - store: 'appState', - }, - meta: { - alias: 'foo', - disabled: false, - negate: false, - }, - }, - ], - index: 'BQZwpgNmDGAuCWB7AdgFQJ4AcwC4CGEEAlEA', - }); - expect(_g).toEqual({ - filters: [ - { - $state: { - store: 'globalState', - }, - meta: { - alias: 'bar', - disabled: false, - negate: false, - }, - }, - ], - }); + expect(location.path).toMatchInlineSnapshot( + `"/?pageState=(datasetSelection:(selectionType:all),filters:!((meta:(alias:foo,disabled:!f,negate:!f)),(meta:(alias:bar,disabled:!f,negate:!f))),v:1)"` + ); }); }); @@ -184,8 +147,8 @@ describe('Observability Logs Explorer Locators', () => { }); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_a=(index:BQZwpgNmDGAuCWB7AdgLmAEwIay%2BW6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA)`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),v:1)`, state: {}, }); }); @@ -201,8 +164,8 @@ describe('Observability Logs Explorer Locators', () => { const location = await singleDatasetLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_g=(time:(from:now-30m,to:now))&_a=(index:BQZwpgNmDGAuCWB7AdgLmAEwIay%2BW6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA)`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),time:(from:now-30m,to:now),v:1)`, state: {}, }); }); @@ -221,8 +184,8 @@ describe('Observability Logs Explorer Locators', () => { const location = await singleDatasetLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_a=(index:BQZwpgNmDGAuCWB7AdgLmAEwIay%2BW6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA,query:(language:kuery,query:foo))`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),query:(language:kuery,query:foo),v:1)`, state: {}, }); }); @@ -241,26 +204,25 @@ describe('Observability Logs Explorer Locators', () => { const location = await singleDatasetLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_g=(refreshInterval:(pause:!f,value:666))&_a=(index:BQZwpgNmDGAuCWB7AdgLmAEwIay%2BW6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA)`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),refreshInterval:(pause:!f,value:666),v:1)`, state: {}, }); }); - it('should allow specifiying columns and sort', async () => { + it('should allow specifiying columns', async () => { const params: SingleDatasetLocatorParams = { integration, dataset, columns: ['_source'], - sort: [['timestamp, asc']] as string[][], }; const { singleDatasetLocator } = await setup(); const location = await singleDatasetLocator.getLocation(params); expect(location).toMatchObject({ - app: OBSERVABILITY_LOG_EXPLORER, - path: `/?_a=(columns:!(_source),index:BQZwpgNmDGAuCWB7AdgLmAEwIay%2BW6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA,sort:!(!('timestamp,%20asc')))`, + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path: `/?pageState=(columns:!((field:_source)),datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),v:1)`, state: {}, }); }); @@ -276,9 +238,6 @@ describe('Observability Logs Explorer Locators', () => { disabled: false, negate: false, }, - $state: { - store: FilterStateStore.APP_STATE, - }, }, { meta: { @@ -286,48 +245,16 @@ describe('Observability Logs Explorer Locators', () => { disabled: false, negate: false, }, - $state: { - store: FilterStateStore.GLOBAL_STATE, - }, }, ], }; const { singleDatasetLocator } = await setup(); - const { path } = await singleDatasetLocator.getLocation(params); - - const { _a, _g } = getStatesFromKbnUrl(path, ['_a', '_g'], { getFromHashQuery: false }); + const location = await singleDatasetLocator.getLocation(params); - expect(_a).toEqual({ - filters: [ - { - $state: { - store: 'appState', - }, - meta: { - alias: 'foo', - disabled: false, - negate: false, - }, - }, - ], - index: - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtLGCLHQFRvkA0CsUqjzAJScipVABUmsYeChwkycQE8ADmQCuyAE5NEEAG5gMgoA', - }); - expect(_g).toEqual({ - filters: [ - { - $state: { - store: 'globalState', - }, - meta: { - alias: 'bar', - disabled: false, - negate: false, - }, - }, - ], - }); + expect(location.path).toMatchInlineSnapshot( + `"/?pageState=(datasetSelection:(selection:(dataset:(name:'logs-test-*-*',title:test),name:Test),selectionType:unresolved),filters:!((meta:(alias:foo,disabled:!f,negate:!f)),(meta:(alias:bar,disabled:!f,negate:!f))),v:1)"` + ); }); }); }); diff --git a/x-pack/plugins/observability_log_explorer/common/locators/single_dataset/single_dataset_locator.ts b/x-pack/plugins/observability_log_explorer/common/locators/single_dataset/single_dataset_locator.ts index 632d0d8d93de6..7f1ed847a9094 100644 --- a/x-pack/plugins/observability_log_explorer/common/locators/single_dataset/single_dataset_locator.ts +++ b/x-pack/plugins/observability_log_explorer/common/locators/single_dataset/single_dataset_locator.ts @@ -35,11 +35,9 @@ export class SingleDatasetLocatorDefinition }, }); - const index = unresolvedDatasetSelection.toDataviewSpec().id; - return constructLocatorPath({ + datasetSelection: unresolvedDatasetSelection.toPlainSelection(), locatorParams: params, - index, useHash, }); }; diff --git a/x-pack/plugins/observability_log_explorer/common/locators/types.ts b/x-pack/plugins/observability_log_explorer/common/locators/types.ts index a181fdce10a02..25228c1f56c04 100644 --- a/x-pack/plugins/observability_log_explorer/common/locators/types.ts +++ b/x-pack/plugins/observability_log_explorer/common/locators/types.ts @@ -5,16 +5,6 @@ * 2.0. */ -import { AggregateQuery, Filter, Query } from '@kbn/es-query'; - -export interface AppState { - index?: string; - query?: Query | AggregateQuery; - filters?: Filter[]; - columns?: string[]; - sort?: string[][]; -} - export interface DatasetLocatorDependencies { useHash: boolean; } diff --git a/x-pack/plugins/observability_log_explorer/common/locators/utils/construct_locator_path.ts b/x-pack/plugins/observability_log_explorer/common/locators/utils/construct_locator_path.ts new file mode 100644 index 0000000000000..57c5cb018a77d --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/common/locators/utils/construct_locator_path.ts @@ -0,0 +1,89 @@ +/* + * 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 { + DatasetLocatorParams, + FilterControls, + ListFilterControl, +} from '@kbn/deeplinks-observability/locators'; +import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/common'; +import { + AvailableControlPanels, + availableControlsPanels, + DatasetSelectionPlain, +} from '@kbn/log-explorer-plugin/common'; +import { OBSERVABILITY_LOG_EXPLORER_APP_ID } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY, urlSchemaV1 } from '../../url_schema'; +import { deepCompactObject } from '../../utils/deep_compact_object'; + +type ControlsPageState = NonNullable; + +interface LocatorPathConstructionParams { + datasetSelection: DatasetSelectionPlain; + locatorParams: DatasetLocatorParams; + useHash: boolean; +} + +export const constructLocatorPath = async (params: LocatorPathConstructionParams) => { + const { + datasetSelection, + locatorParams: { filterControls, filters, query, refreshInterval, timeRange, columns, origin }, + useHash, + } = params; + + const pageState = urlSchemaV1.urlSchemaRT.encode( + deepCompactObject({ + v: 1, + datasetSelection, + filters, + query, + refreshInterval, + time: timeRange, + columns: columns?.map((field) => ({ field })), + controls: getControlsPageStateFromFilterControlsParams(filterControls ?? {}), + }) + ); + + const path = setStateToKbnUrl( + OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY, + pageState, + { useHash, storeInHashQuery: false }, + '/' + ); + + return { + app: OBSERVABILITY_LOG_EXPLORER_APP_ID, + path, + state: { + ...(origin ? { origin } : {}), + }, + }; +}; + +const getControlsPageStateFromFilterControlsParams = ( + filterControls: FilterControls +): ControlsPageState => ({ + ...(filterControls.namespace != null + ? getFilterControlPageStateFromListFilterControlsParams( + availableControlsPanels.NAMESPACE, + filterControls.namespace + ) + : {}), +}); + +const getFilterControlPageStateFromListFilterControlsParams = ( + controlId: AvailableControlPanels[keyof AvailableControlPanels], + listFilterControl: ListFilterControl +): ControlsPageState => ({ + [controlId]: { + mode: listFilterControl.mode, + selection: { + type: 'options', + selectedOptions: listFilterControl.values, + }, + }, +}); diff --git a/x-pack/plugins/observability_log_explorer/common/locators/utils/helpers.ts b/x-pack/plugins/observability_log_explorer/common/locators/utils/helpers.ts deleted file mode 100644 index 5a93709e76522..0000000000000 --- a/x-pack/plugins/observability_log_explorer/common/locators/utils/helpers.ts +++ /dev/null @@ -1,62 +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 { GlobalQueryStateFromUrl } from '@kbn/data-plugin/public'; -import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/common'; -import { DatasetLocatorParams } from '@kbn/deeplinks-observability/locators'; -import { AppState } from '../types'; - -interface LocatorPathCosntructionParams { - locatorParams: DatasetLocatorParams; - index: string; - useHash: boolean; -} - -export const constructLocatorPath = async (params: LocatorPathCosntructionParams) => { - const { isFilterPinned } = await import('@kbn/es-query'); - - const { - locatorParams: { filters, query, refreshInterval, timeRange, columns, sort, origin }, - index, - useHash, - } = params; - const appState: AppState = {}; - const queryState: GlobalQueryStateFromUrl = {}; - - // App state - if (index) appState.index = index; - if (query) appState.query = query; - if (filters && filters.length) appState.filters = filters?.filter((f) => !isFilterPinned(f)); - if (columns) appState.columns = columns; - if (sort) appState.sort = sort; - - // Global State - if (timeRange) queryState.time = timeRange; - if (filters && filters.length) queryState.filters = filters?.filter((f) => isFilterPinned(f)); - if (refreshInterval) queryState.refreshInterval = refreshInterval; - - let path = '/'; - - if (Object.keys(queryState).length) { - path = setStateToKbnUrl( - '_g', - queryState, - { useHash, storeInHashQuery: false }, - path - ); - } - - path = setStateToKbnUrl('_a', appState, { useHash, storeInHashQuery: false }, path); - - return { - app: 'observability-log-explorer', - path, - state: { - ...(origin ? { origin } : {}), - }, - }; -}; diff --git a/x-pack/plugins/observability_log_explorer/common/locators/utils/index.ts b/x-pack/plugins/observability_log_explorer/common/locators/utils/index.ts index 6c315f929b9bb..6e5aad44fbe9a 100644 --- a/x-pack/plugins/observability_log_explorer/common/locators/utils/index.ts +++ b/x-pack/plugins/observability_log_explorer/common/locators/utils/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './helpers'; +export * from './construct_locator_path'; diff --git a/x-pack/plugins/observability_log_explorer/common/url_schema/common.ts b/x-pack/plugins/observability_log_explorer/common/url_schema/common.ts new file mode 100644 index 0000000000000..fa3b3f72383d1 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/common/url_schema/common.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY = 'pageState'; diff --git a/x-pack/plugins/observability_log_explorer/common/url_schema/index.ts b/x-pack/plugins/observability_log_explorer/common/url_schema/index.ts new file mode 100644 index 0000000000000..d8f53e47b6058 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/common/url_schema/index.ts @@ -0,0 +1,9 @@ +/* + * 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 { OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY } from './common'; +export * as urlSchemaV1 from './url_schema_v1'; diff --git a/x-pack/plugins/observability_log_explorer/common/url_schema/url_schema_v1.ts b/x-pack/plugins/observability_log_explorer/common/url_schema/url_schema_v1.ts new file mode 100644 index 0000000000000..c4f611466a4f6 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/common/url_schema/url_schema_v1.ts @@ -0,0 +1,122 @@ +/* + * 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 { availableControlsPanels, datasetSelectionPlainRT } from '@kbn/log-explorer-plugin/common'; +import * as rt from 'io-ts'; + +export const columnRT = rt.intersection([ + rt.strict({ + field: rt.string, + }), + rt.exact( + rt.partial({ + width: rt.number, + }) + ), +]); + +export const columnsRT = rt.array(columnRT); + +export const optionsListControlRT = rt.strict({ + mode: rt.keyof({ + exclude: null, + include: null, + }), + selection: rt.union([ + rt.strict({ + type: rt.literal('exists'), + }), + rt.strict({ + type: rt.literal('options'), + selectedOptions: rt.array(rt.string), + }), + ]), +}); + +export const controlsRT = rt.exact( + rt.partial({ + [availableControlsPanels.NAMESPACE]: optionsListControlRT, + }) +); + +export const filterMetaRT = rt.partial({ + alias: rt.union([rt.string, rt.null]), + disabled: rt.boolean, + negate: rt.boolean, + controlledBy: rt.string, + group: rt.string, + index: rt.string, + isMultiIndex: rt.boolean, + type: rt.string, + key: rt.string, + params: rt.any, + value: rt.any, +}); + +export const filterRT = rt.intersection([ + rt.strict({ + meta: filterMetaRT, + }), + rt.exact( + rt.partial({ + query: rt.UnknownRecord, + }) + ), +]); + +export const filtersRT = rt.array(filterRT); + +const queryRT = rt.union([ + rt.strict({ + language: rt.string, + query: rt.union([rt.string, rt.record(rt.string, rt.unknown)]), + }), + rt.strict({ + sql: rt.string, + }), + rt.strict({ + esql: rt.string, + }), +]); + +const timeRangeRT = rt.intersection([ + rt.strict({ + from: rt.string, + to: rt.string, + }), + rt.exact( + rt.partial({ + mode: rt.keyof({ + absolute: null, + relative: null, + }), + }) + ), +]); + +const refreshIntervalRT = rt.strict({ + pause: rt.boolean, + value: rt.number, +}); + +export const urlSchemaRT = rt.exact( + rt.partial({ + v: rt.literal(1), + breakdownField: rt.union([rt.string, rt.null]), + columns: columnsRT, + datasetSelection: datasetSelectionPlainRT, + filters: filtersRT, + query: queryRT, + refreshInterval: refreshIntervalRT, + rowHeight: rt.number, + rowsPerPage: rt.number, + time: timeRangeRT, + controls: controlsRT, + }) +); + +export type UrlSchema = rt.TypeOf; diff --git a/x-pack/plugins/observability_log_explorer/common/utils/deep_compact_object.ts b/x-pack/plugins/observability_log_explorer/common/utils/deep_compact_object.ts new file mode 100644 index 0000000000000..eed8b1b83e1f4 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/common/utils/deep_compact_object.ts @@ -0,0 +1,15 @@ +/* + * 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, isPlainObject, isUndefined } from 'lodash'; + +export const deepCompactObject = >(obj: Value): Value => + Object.fromEntries( + Object.entries(obj) + .map(([key, value]) => [key, isPlainObject(value) ? deepCompactObject(value) : value]) + .filter(([, value]) => !isUndefined(value) && !(isPlainObject(value) && isEmpty(value))) + ); diff --git a/x-pack/plugins/observability_log_explorer/public/applications/observability_log_explorer.tsx b/x-pack/plugins/observability_log_explorer/public/applications/observability_log_explorer.tsx index 8a49db7536350..a823ad1a840cd 100644 --- a/x-pack/plugins/observability_log_explorer/public/applications/observability_log_explorer.tsx +++ b/x-pack/plugins/observability_log_explorer/public/applications/observability_log_explorer.tsx @@ -10,12 +10,13 @@ import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { Route, Router, Routes } from '@kbn/shared-ux-router'; import React from 'react'; import ReactDOM from 'react-dom'; -import { DatasetQualityRoute, ObservablityLogExplorerMainRoute } from '../routes/main'; +import { DatasetQualityRoute, ObservabilityLogExplorerMainRoute } from '../routes/main'; import { ObservabilityLogExplorerAppMountParameters, ObservabilityLogExplorerPluginStart, ObservabilityLogExplorerStartDeps, } from '../types'; +import { KbnUrlStateStorageFromRouterProvider } from '../utils/kbn_url_state_context'; import { useKibanaContextForPluginProvider } from '../utils/use_kibana'; export const renderObservabilityLogExplorer = ( @@ -59,26 +60,25 @@ export const ObservabilityLogExplorerApp = ({ const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider( core, plugins, - pluginStart + pluginStart, + appParams ); return ( - - - } - /> - } - /> - - + + + + } /> + } + /> + + + ); diff --git a/x-pack/plugins/observability_log_explorer/public/components/discover_link.tsx b/x-pack/plugins/observability_log_explorer/public/components/discover_link.tsx new file mode 100644 index 0000000000000..2d12de11731c0 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/components/discover_link.tsx @@ -0,0 +1,111 @@ +/* + * 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 { EuiHeaderLink } from '@elastic/eui'; +import { DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; +import { DiscoverStart } from '@kbn/discover-plugin/public'; +import { hydrateDatasetSelection } from '@kbn/log-explorer-plugin/common'; +import { getDiscoverColumnsFromDisplayOptions } from '@kbn/log-explorer-plugin/public'; +import { MatchedStateFromActor } from '@kbn/xstate-utils'; +import { useActor } from '@xstate/react'; +import React, { useMemo } from 'react'; +import { discoverLinkTitle } from '../../common/translations'; +import { + ObservabilityLogExplorerService, + useObservabilityLogExplorerPageStateContext, +} from '../state_machines/observability_log_explorer/src'; +import { getRouterLinkProps } from '../utils/get_router_link_props'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; + +export const ConnectedDiscoverLink = React.memo(() => { + const { + services: { discover }, + } = useKibanaContextForPlugin(); + + const [pageState] = useActor(useObservabilityLogExplorerPageStateContext()); + + if (pageState.matches({ initialized: 'validLogExplorerState' })) { + return ; + } else { + return ; + } +}); + +type InitializedPageState = MatchedStateFromActor< + ObservabilityLogExplorerService, + { initialized: 'validLogExplorerState' } +>; + +export const DiscoverLinkForValidState = React.memo( + ({ + discover, + pageState: { + context: { logExplorerState }, + }, + }: { + discover: DiscoverStart; + pageState: InitializedPageState; + }) => { + const discoverLinkParams = useMemo( + () => ({ + breakdownField: logExplorerState.chart.breakdownField ?? undefined, + columns: getDiscoverColumnsFromDisplayOptions(logExplorerState), + filters: logExplorerState.filters, + query: logExplorerState.query, + refreshInterval: logExplorerState.refreshInterval, + timeRange: logExplorerState.time, + dataViewSpec: hydrateDatasetSelection(logExplorerState.datasetSelection).toDataviewSpec(), + }), + [logExplorerState] + ); + + return ; + } +); + +export const DiscoverLinkForUnknownState = React.memo(() => ( + + {discoverLinkTitle} + +)); + +export const DiscoverLink = React.memo( + ({ + discover, + discoverLinkParams, + }: { + discover: DiscoverStart; + discoverLinkParams: DiscoverAppLocatorParams; + }) => { + const discoverUrl = discover.locator?.getRedirectUrl(discoverLinkParams); + + const navigateToDiscover = () => { + discover.locator?.navigate(discoverLinkParams); + }; + + const discoverLinkProps = getRouterLinkProps({ + href: discoverUrl, + onClick: navigateToDiscover, + }); + + return ( + + {discoverLinkTitle} + + ); + } +); diff --git a/x-pack/plugins/observability_log_explorer/public/components/feedback_link.tsx b/x-pack/plugins/observability_log_explorer/public/components/feedback_link.tsx new file mode 100644 index 0000000000000..efd37f8ccd3d4 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/components/feedback_link.tsx @@ -0,0 +1,26 @@ +/* + * 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 { EuiHeaderLink } from '@elastic/eui'; +import { LOG_EXPLORER_FEEDBACK_LINK } from '@kbn/observability-shared-plugin/common'; +import React from 'react'; +import { feedbackLinkTitle } from '../../common/translations'; + +export const FeedbackLink = React.memo(() => { + return ( + + {feedbackLinkTitle} + + ); +}); diff --git a/x-pack/plugins/observability_log_explorer/public/components/log_explorer_top_nav_menu.tsx b/x-pack/plugins/observability_log_explorer/public/components/log_explorer_top_nav_menu.tsx index c627f0760bb2d..6a76caae25406 100644 --- a/x-pack/plugins/observability_log_explorer/public/components/log_explorer_top_nav_menu.tsx +++ b/x-pack/plugins/observability_log_explorer/public/components/log_explorer_top_nav_menu.tsx @@ -5,74 +5,39 @@ * 2.0. */ -import React, { useEffect, useState } from 'react'; -import deepEqual from 'fast-deep-equal'; -import useObservable from 'react-use/lib/useObservable'; -import { type BehaviorSubject, distinctUntilChanged, filter, take } from 'rxjs'; -import styled from '@emotion/styled'; -import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; import { EuiBetaBadge, - EuiButton, EuiHeader, - EuiHeaderLink, EuiHeaderLinks, EuiHeaderSection, EuiHeaderSectionItem, } from '@elastic/eui'; -import { LogExplorerStateContainer } from '@kbn/log-explorer-plugin/public'; -import { - OBSERVABILITY_ONBOARDING_LOCATOR, - ObservabilityOnboardingLocatorParams, -} from '@kbn/deeplinks-observability/locators'; -import { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; -import { toMountPoint } from '@kbn/react-kibana-mount'; import { css } from '@emotion/react'; -import { LOG_EXPLORER_FEEDBACK_LINK } from '@kbn/observability-shared-plugin/common'; +import styled from '@emotion/styled'; +import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { euiThemeVars } from '@kbn/ui-theme'; import { LogExplorerTabs } from '@kbn/discover-plugin/public'; -import { PluginKibanaContextValue } from '../utils/use_kibana'; -import { - betaBadgeDescription, - betaBadgeTitle, - discoverLinkTitle, - feedbackLinkTitle, - onboardingLinkTitle, -} from '../../common/translations'; -import { getRouterLinkProps } from '../utils/get_router_link_props'; -import { ObservabilityLogExplorerAppMountParameters } from '../types'; - -interface LogExplorerTopNavMenuProps { - setHeaderActionMenu: ObservabilityLogExplorerAppMountParameters['setHeaderActionMenu']; - services: KibanaReactContextValue['services']; - state$: BehaviorSubject; - theme$: ObservabilityLogExplorerAppMountParameters['theme$']; -} - -export const LogExplorerTopNavMenu = ({ - setHeaderActionMenu, - services, - state$, - theme$, -}: LogExplorerTopNavMenuProps) => { - const { serverless } = services; - - return Boolean(serverless) ? ( - - ) : ( - - ); +import React, { useEffect, useState } from 'react'; +import useObservable from 'react-use/lib/useObservable'; +import { filter, take } from 'rxjs'; +import { betaBadgeDescription, betaBadgeTitle } from '../../common/translations'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; +import { ConnectedDiscoverLink } from './discover_link'; +import { FeedbackLink } from './feedback_link'; +import { ConnectedOnboardingLink } from './onboarding_link'; + +export const LogExplorerTopNavMenu = () => { + const { + services: { serverless }, + } = useKibanaContextForPlugin(); + + return Boolean(serverless) ? : ; }; -const ServerlessTopNav = ({ - services, - state$, -}: Pick) => { +const ServerlessTopNav = () => { + const { services } = useKibanaContextForPlugin(); + return ( @@ -97,38 +62,40 @@ const ServerlessTopNav = ({ - + - + ); }; -const StatefulTopNav = ({ - setHeaderActionMenu, - services, - state$, - theme$, -}: LogExplorerTopNavMenuProps) => { +const StatefulTopNav = () => { + const { + services: { + appParams: { setHeaderActionMenu }, + chrome, + i18n, + theme, + }, + } = useKibanaContextForPlugin(); + /** * Since the breadcrumbsAppendExtension might be set only during a plugin start (e.g. search session) * we retrieve the latest valid extension in order to restore it once we unmount the beta badge. */ const [previousAppendExtension$] = useState(() => - services.chrome.getBreadcrumbsAppendExtension$().pipe(filter(Boolean), take(1)) + chrome.getBreadcrumbsAppendExtension$().pipe(filter(Boolean), take(1)) ); const previousAppendExtension = useObservable(previousAppendExtension$); useEffect(() => { - const { chrome, i18n, theme } = services; - if (chrome) { chrome.setBreadcrumbsAppendExtension({ content: toMountPoint( @@ -161,15 +128,15 @@ const StatefulTopNav = ({ chrome.setBreadcrumbsAppendExtension(previousAppendExtension); } }; - }, [services, previousAppendExtension]); + }, [chrome, i18n, previousAppendExtension, theme]); return ( - + - - + + @@ -177,113 +144,8 @@ const StatefulTopNav = ({ ); }; -const DiscoverLink = React.memo( - ({ services, state$ }: Pick) => { - const discoverLinkParams = useDiscoverLinkParams(state$); - const discoverUrl = services.discover.locator?.getRedirectUrl(discoverLinkParams); - - const navigateToDiscover = () => { - services.discover.locator?.navigate(discoverLinkParams); - }; - - const discoverLinkProps = getRouterLinkProps({ - href: discoverUrl, - onClick: navigateToDiscover, - }); - - return ( - - {discoverLinkTitle} - - ); - } -); - -const OnboardingLink = React.memo(({ services }: Pick) => { - const locator = services.share.url.locators.get( - OBSERVABILITY_ONBOARDING_LOCATOR - ); - - const onboardingUrl = locator?.useUrl({}); - - const navigateToOnboarding = () => { - locator?.navigate({}); - }; - - const onboardingLinkProps = getRouterLinkProps({ - href: onboardingUrl, - onClick: navigateToOnboarding, - }); - - return ( - - {onboardingLinkTitle} - - ); -}); - -const FeedbackLink = React.memo(() => { - return ( - - {feedbackLinkTitle} - - ); -}); - const VerticalRule = styled.span` width: 1px; height: 20px; background-color: ${euiThemeVars.euiColorLightShade}; `; - -const useDiscoverLinkParams = (state$: BehaviorSubject) => { - const { appState, logExplorerState } = useObservable( - state$.pipe( - distinctUntilChanged((prev, curr) => { - if (!prev.appState || !curr.appState) return false; - return deepEqual( - [ - prev.appState.columns, - prev.appState.sort, - prev.appState.filters, - prev.appState.index, - prev.appState.query, - ], - [ - curr.appState.columns, - curr.appState.sort, - curr.appState.filters, - curr.appState.index, - curr.appState.query, - ] - ); - }) - ), - { appState: {}, logExplorerState: {} } - ); - - return { - columns: appState?.columns, - sort: appState?.sort, - filters: appState?.filters, - query: appState?.query, - dataViewSpec: logExplorerState?.datasetSelection?.selection.dataset.toDataviewSpec(), - }; -}; diff --git a/x-pack/plugins/observability_log_explorer/public/components/onboarding_link.tsx b/x-pack/plugins/observability_log_explorer/public/components/onboarding_link.tsx new file mode 100644 index 0000000000000..abdc585c22768 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/components/onboarding_link.tsx @@ -0,0 +1,56 @@ +/* + * 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 { EuiButton } from '@elastic/eui'; +import { + ObservabilityOnboardingLocatorParams, + OBSERVABILITY_ONBOARDING_LOCATOR, +} from '@kbn/deeplinks-observability/locators'; +import { BrowserUrlService } from '@kbn/share-plugin/public'; +import React from 'react'; +import { onboardingLinkTitle } from '../../common/translations'; +import { getRouterLinkProps } from '../utils/get_router_link_props'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; + +export const ConnectedOnboardingLink = React.memo(() => { + const { + services: { + share: { url }, + }, + } = useKibanaContextForPlugin(); + + return ; +}); + +export const OnboardingLink = React.memo(({ urlService }: { urlService: BrowserUrlService }) => { + const locator = urlService.locators.get( + OBSERVABILITY_ONBOARDING_LOCATOR + ); + + const onboardingUrl = locator?.useUrl({}); + + const navigateToOnboarding = () => { + locator?.navigate({}); + }; + + const onboardingLinkProps = getRouterLinkProps({ + href: onboardingUrl, + onClick: navigateToOnboarding, + }); + + return ( + + {onboardingLinkTitle} + + ); +}); diff --git a/x-pack/plugins/observability_log_explorer/public/components/page_template.tsx b/x-pack/plugins/observability_log_explorer/public/components/page_template.tsx index d128c6e8a7779..5b57333dd8c86 100644 --- a/x-pack/plugins/observability_log_explorer/public/components/page_template.tsx +++ b/x-pack/plugins/observability_log_explorer/public/components/page_template.tsx @@ -7,23 +7,27 @@ import { EuiPageSectionProps } from '@elastic/eui'; import { css } from '@emotion/react'; -import type { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public'; import React from 'react'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; export const ObservabilityLogExplorerPageTemplate = ({ children, - observabilityShared, pageProps, }: React.PropsWithChildren<{ - observabilityShared: ObservabilitySharedPluginStart; pageProps?: EuiPageSectionProps; -}>) => ( - - {children} - -); +}>) => { + const { + services: { observabilityShared }, + } = useKibanaContextForPlugin(); + + return ( + + {children} + + ); +}; const fullHeightContentStyles = css` display: flex; diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx index 53d34a71a7237..7983c6ed39433 100644 --- a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx @@ -13,6 +13,9 @@ import type { LogAIAssistantDocument } from '@kbn/logs-shared-plugin/public'; import React, { useMemo } from 'react'; import { useKibanaContextForPlugin } from '../utils/use_kibana'; +type RenderFlyoutContentCustomization = + Required['flyout']['renderContent']; + const ObservabilityLogAIAssistant = ({ doc }: LogExplorerFlyoutContentProps) => { const { services } = useKibanaContextForPlugin(); const { LogAIAssistant } = services.logsShared; @@ -22,19 +25,17 @@ const ObservabilityLogAIAssistant = ({ doc }: LogExplorerFlyoutContentProps) => return ; }; -export const renderFlyoutContent: Required['flyout']['renderContent'] = ( - renderPreviousContent, - props -) => { - return ( - <> - {renderPreviousContent()} - - - - - ); -}; +export const renderFlyoutContent: RenderFlyoutContentCustomization = + (renderPreviousContent) => (props) => { + return ( + <> + {renderPreviousContent(props)} + + + + + ); + }; /** * Utils diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts index a86b47e92cf01..02909efed0d81 100644 --- a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts @@ -5,11 +5,18 @@ * 2.0. */ -import { LogExplorerCustomizations } from '@kbn/log-explorer-plugin/public'; +import { CreateLogExplorerController } from '@kbn/log-explorer-plugin/public'; import { renderFlyoutContent } from './flyout_content'; -export const createLogExplorerCustomizations = (): LogExplorerCustomizations => ({ - flyout: { - renderContent: renderFlyoutContent, - }, -}); +export const createLogExplorerControllerWithCustomizations = + (createLogExplorerController: CreateLogExplorerController): CreateLogExplorerController => + (args) => + createLogExplorerController({ + ...args, + customizations: { + ...args.customizations, + flyout: { + renderContent: renderFlyoutContent, + }, + }, + }); diff --git a/x-pack/plugins/observability_log_explorer/public/plugin.ts b/x-pack/plugins/observability_log_explorer/public/plugin.ts index 5b5a640e2a6ae..6af6484e883b5 100644 --- a/x-pack/plugins/observability_log_explorer/public/plugin.ts +++ b/x-pack/plugins/observability_log_explorer/public/plugin.ts @@ -13,15 +13,14 @@ import { Plugin, PluginInitializerContext, } from '@kbn/core/public'; -import { OBSERVABILITY_LOG_EXPLORER } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_LOG_EXPLORER_APP_ID } from '@kbn/deeplinks-observability'; import { + AllDatasetsLocatorDefinition, ObservabilityLogExplorerLocators, SingleDatasetLocatorDefinition, - AllDatasetsLocatorDefinition, } from '../common/locators'; import { type ObservabilityLogExplorerConfig } from '../common/plugin_config'; import { logExplorerAppTitle } from '../common/translations'; -import { renderObservabilityLogExplorer } from './applications/observability_log_explorer'; import type { ObservabilityLogExplorerAppMountParameters, ObservabilityLogExplorerPluginSetup, @@ -48,7 +47,7 @@ export class ObservabilityLogExplorerPlugin const useHash = core.uiSettings.get('state:storeInSessionStorage'); core.application.register({ - id: OBSERVABILITY_LOG_EXPLORER, + id: OBSERVABILITY_LOG_EXPLORER_APP_ID, title: logExplorerAppTitle, category: DEFAULT_APP_CATEGORIES.observability, euiIconType: 'logoLogging', @@ -59,6 +58,9 @@ export class ObservabilityLogExplorerPlugin keywords: ['logs', 'log', 'explorer', 'logs explorer'], mount: async (appMountParams: ObservabilityLogExplorerAppMountParameters) => { const [coreStart, pluginsStart, ownPluginStart] = await core.getStartServices(); + const { renderObservabilityLogExplorer } = await import( + './applications/observability_log_explorer' + ); return renderObservabilityLogExplorer( coreStart, diff --git a/x-pack/plugins/observability_log_explorer/public/routes/main/dataset_quality_route.tsx b/x-pack/plugins/observability_log_explorer/public/routes/main/dataset_quality_route.tsx index b76a462eba25d..a58df53c7b1a7 100644 --- a/x-pack/plugins/observability_log_explorer/public/routes/main/dataset_quality_route.tsx +++ b/x-pack/plugins/observability_log_explorer/public/routes/main/dataset_quality_route.tsx @@ -19,7 +19,7 @@ export interface DatasetQualityRouteProps { export const DatasetQualityRoute = ({ core }: DatasetQualityRouteProps) => { const { services } = useKibanaContextForPlugin(); - const { observabilityShared, serverless, datasetQuality: DatasetQuality } = services; + const { serverless, datasetQuality: DatasetQuality } = services; const breadcrumb: EuiBreadcrumb[] = [ { text: datasetQualityAppTitle, @@ -29,13 +29,8 @@ export const DatasetQualityRoute = ({ core }: DatasetQualityRouteProps) => { useBreadcrumbs(breadcrumb, core.chrome, serverless); return ( - <> - - - - + + + ); }; diff --git a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx index e17f92a46c23b..333d79bc6dd3c 100644 --- a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx +++ b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx @@ -4,52 +4,106 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -import { CoreStart } from '@kbn/core/public'; -import React, { useMemo, useState } from 'react'; -import { BehaviorSubject } from 'rxjs'; +import { EuiEmptyPrompt, EuiLoadingLogo } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { + LogExplorerController, + LogExplorerPluginStart, +} from '@kbn/log-explorer-plugin/public'; +import { useActor } from '@xstate/react'; +import React, { useMemo } from 'react'; import { LogExplorerTopNavMenu } from '../../components/log_explorer_top_nav_menu'; import { ObservabilityLogExplorerPageTemplate } from '../../components/page_template'; +import { createLogExplorerControllerWithCustomizations } from '../../log_explorer_customizations'; +import { + ObservabilityLogExplorerPageStateProvider, + useObservabilityLogExplorerPageStateContext, +} from '../../state_machines/observability_log_explorer/src'; +import { LazyOriginInterpreter } from '../../state_machines/origin_interpreter/src/lazy_component'; +import { ObservabilityLogExplorerHistory } from '../../types'; import { noBreadcrumbs, useBreadcrumbs } from '../../utils/breadcrumbs'; +import { useKbnUrlStateStorageFromRouterContext } from '../../utils/kbn_url_state_context'; import { useKibanaContextForPlugin } from '../../utils/use_kibana'; -import { ObservabilityLogExplorerAppMountParameters } from '../../types'; -import { LazyOriginInterpreter } from '../../state_machines/origin_interpreter/src/lazy_component'; -import { createLogExplorerCustomizations } from '../../log_explorer_customizations'; -export interface ObservablityLogExplorerMainRouteProps { - appParams: ObservabilityLogExplorerAppMountParameters; - core: CoreStart; -} - -export const ObservablityLogExplorerMainRoute = ({ - appParams, - core, -}: ObservablityLogExplorerMainRouteProps) => { + +export const ObservabilityLogExplorerMainRoute = () => { const { services } = useKibanaContextForPlugin(); - const { logExplorer, observabilityShared, serverless } = services; - useBreadcrumbs(noBreadcrumbs, core.chrome, serverless); + const { logExplorer, serverless, chrome, notifications, appParams } = services; + const { history } = appParams; - const { history, setHeaderActionMenu, theme$ } = appParams; + useBreadcrumbs(noBreadcrumbs, chrome, serverless); - const [state$] = useState(() => new BehaviorSubject({})); + const urlStateStorageContainer = useKbnUrlStateStorageFromRouterContext(); - const customizations = useMemo(() => createLogExplorerCustomizations(), []); + const createLogExplorerController = useMemo( + () => createLogExplorerControllerWithCustomizations(logExplorer.createLogExplorerController), + [logExplorer.createLogExplorerController] + ); return ( - <> - + + + + + ); +}; + +const ConnectedContent = React.memo(() => { + const { + services: { + appParams: { history }, + logExplorer, + }, + } = useKibanaContextForPlugin(); + + const [state] = useActor(useObservabilityLogExplorerPageStateContext()); + + if (state.matches('initialized')) { + return ( + - - - ; + } +}); + +const InitializingContent = React.memo(() => ( + + } + title={ + + } + /> + +)); + +const InitializedContent = React.memo( + ({ + history, + logExplorer, + logExplorerController, + }: { + history: ObservabilityLogExplorerHistory; + logExplorer: LogExplorerPluginStart; + logExplorerController: LogExplorerController; + }) => { + return ( + + - - ); -}; + ); + } +); diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/controller_service.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/controller_service.ts new file mode 100644 index 0000000000000..05e2b1ba03922 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/controller_service.ts @@ -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 type { CreateLogExplorerController } from '@kbn/log-explorer-plugin/public'; +import type { InvokeCreator } from 'xstate'; +import type { ObservabilityLogExplorerContext, ObservabilityLogExplorerEvent } from './types'; + +export const createController = + ({ + createLogExplorerController, + }: { + createLogExplorerController: CreateLogExplorerController; + }): InvokeCreator => + (context, event) => + (send) => { + createLogExplorerController({ + initialState: context.initialLogExplorerState, + }).then((controller) => { + send({ + type: 'CONTROLLER_CREATED', + controller, + }); + }); + }; + +export const subscribeToLogExplorerState: InvokeCreator< + ObservabilityLogExplorerContext, + ObservabilityLogExplorerEvent +> = (context, event) => (send) => { + if (!('controller' in context)) { + throw new Error('Failed to subscribe to controller: no controller in context'); + } + + const { controller } = context; + + const subscription = controller.state$.subscribe({ + next: (state) => { + send({ type: 'LOG_EXPLORER_STATE_CHANGED', state }); + }, + }); + + controller.service.start(); + + return () => { + subscription.unsubscribe(); + controller.service.stop(); + }; +}; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/defaults.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/defaults.ts new file mode 100644 index 0000000000000..5e8c1eb5d3e2e --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/defaults.ts @@ -0,0 +1,12 @@ +/* + * 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 { CommonObservabilityLogExplorerContext } from './types'; + +export const DEFAULT_CONTEXT: CommonObservabilityLogExplorerContext = { + initialLogExplorerState: {}, +}; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/index.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/index.ts new file mode 100644 index 0000000000000..88b4fdbbd5d86 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/index.ts @@ -0,0 +1,10 @@ +/* + * 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 * from './provider'; +export * from './state_machine'; +export * from './types'; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/notifications.tsx b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/notifications.tsx new file mode 100644 index 0000000000000..050420de8875c --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/notifications.tsx @@ -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 { IToasts } from '@kbn/core-notifications-browser'; +import { mountReactNode } from '@kbn/core-mount-utils-browser-internal'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; + +export const createRequestFeedbackNotifier = (toasts: IToasts) => () => { + toasts.addInfo({ + title: i18n.translate('xpack.observabilityLogExplorer.feedbackToast.title', { + defaultMessage: 'Tell us what you think!', + }), + text: mountReactNode(<>), + iconType: 'editorComment', + }); +}; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/provider.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/provider.ts new file mode 100644 index 0000000000000..bfceafb1872df --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/provider.ts @@ -0,0 +1,30 @@ +/* + * 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 { getDevToolsOptions } from '@kbn/xstate-utils'; +import { useInterpret } from '@xstate/react'; +import createContainer from 'constate'; +import { + createObservabilityLogExplorerStateMachine, + ObservabilityLogExplorerStateMachineDependencies, +} from './state_machine'; + +export const useObservabilityLogExplorerPageState = ( + deps: ObservabilityLogExplorerStateMachineDependencies +) => { + const observabilityLogExplorerPageStateService = useInterpret( + () => createObservabilityLogExplorerStateMachine(deps), + { devTools: getDevToolsOptions() } + ); + + return observabilityLogExplorerPageStateService; +}; + +export const [ + ObservabilityLogExplorerPageStateProvider, + useObservabilityLogExplorerPageStateContext, +] = createContainer(useObservabilityLogExplorerPageState); diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/state_machine.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/state_machine.ts new file mode 100644 index 0000000000000..ecf77d069e08f --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/state_machine.ts @@ -0,0 +1,173 @@ +/* + * 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 { IToasts } from '@kbn/core-notifications-browser'; +import { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import { CreateLogExplorerController } from '@kbn/log-explorer-plugin/public'; +import { actions, createMachine, InterpreterFrom } from 'xstate'; +import { TimefilterContract } from '@kbn/data-plugin/public'; +import { DEFAULT_CONTEXT } from './defaults'; +import { + ObservabilityLogExplorerContext, + ObservabilityLogExplorerEvent, + ObservabilityLogExplorerTypeState, +} from './types'; +import { initializeFromUrl, updateUrlFromLogExplorerState } from './url_state_storage_service'; +import { createController, subscribeToLogExplorerState } from './controller_service'; +import { initializeFromTimeFilterService } from './time_filter_service'; + +export const createPureObservabilityLogExplorerStateMachine = ( + initialContext: ObservabilityLogExplorerContext +) => + /** @xstate-layout N4IgpgJg5mDOIC5QHkBGswCcBuBDVAlgDYEAuAngDID2UAogB4AOR1mWAdAK4B2BfpArhIAvSAGIA2gAYAuolBNqsMgWo8FIBogDMOjgFYAbAEZpAdgCcRgwBYAHAcsGANCHK7bHWztsGTRjomevbmRpYAvhFuaBg4+MRkVLSMLGyc-KrCBCL8UABimNQAtgAqBMVg+cSkWADKWNgEAMZg4gCSAHLtpe0AgpTtAFp0ACIA+vkASsgAsuO9s3ST7ZSldFPjdRsAau0AwnQy8kggSiqC6praCAC0ZvrhRua24Tp2jiZuHggATEb2Dj-aQ2PQmcEGSFRGLoRoJEgUGj0ZisdiYDiZQTZXI8ApFYoAVUwRA63V6A2GY0mM3mBKmlGOmnOqiupxutx0Rg49ksv2kBl+9hMQp0oV+30QBnsXgsAX8lhevx0lki0RAsThhARyWRaTRHGa7Fwglx+3UpCKRCIWHE+2QnVKM0olA2432UzofXWo0Zp2Zlw0bMQt0FHCMAN85jC9k5tl+cYlCFCJg4QRMxnM0lsZkcRmh6th8S1SSRqVRGQEQlEkG4PAA1jxqAB3HillHpTB1UjGtqUZAAcXGdAAGgAFPsezZ1Upe5b7AASfU6-bGvsUyhZgdANyVBg4JmzRl+UtFFks9nsiYh0n3tn59lM-2FNnzGqLiURKXb+sxVZyNbwEgIDbPV6m7WpxD7QcR3HZBJy2Gd1jdRdl1XOQmQ3ANrklUxDFCSxDwVX4TAIq9BXMIFnnTc9gXseMojVRsIDgTQ3zwYtP11ctMAwi41C3LRg3TFMnheN4Pn8RN7h0CjpDk6QDyFcxiOkX5VRhOJ2I-HUyw7Wtf2xSBeM3bCEAot4LyFHl42cEEpNsSxDHkkwlTMKwH2cV9Cy07UQO4jFK2xPJChKcpKmqIhak7RoWjAYysKDO57Bvayswc0EDxeMiuVscwdEFAUBRci9fi8zT4RLL9QPRAzRGC-EiSIeL+NMjkuXeNT3PDF5fFcdxEDjFNlNBSxwQvXKdDKzVtL8vTDTAY08jNHgLWoK0sGa1lt2DTkOGsJUHNGuSSJ8RMXhTEw8t8S61LkpwpvfXyqv82r-wgTaBPZOjvGSz49F5RxzEvfqEDMdMwzvBwAnMAwoxIh6fMqri9NesQIFrBtm1bZ6Oy7HsPta3wfukP7lQKoGr2fDhpEsTllNCAwdAUya1TYirON0n9AurdHAIIYCcbRPHagJxKjBp-cDCzA9LDuqxLEph9qdp55yMZhSDAYiIgA */ + createMachine< + ObservabilityLogExplorerContext, + ObservabilityLogExplorerEvent, + ObservabilityLogExplorerTypeState + >( + { + context: initialContext, + predictableActionArguments: true, + id: 'ObservabilityLogExplorer', + initial: 'uninitialized', + states: { + uninitialized: { + always: 'initializingFromTimeFilterService', + }, + initializingFromTimeFilterService: { + invoke: { + src: 'initializeFromTimeFilterService', + }, + on: { + INITIALIZED_FROM_TIME_FILTER_SERVICE: { + target: 'initializingFromUrl', + actions: ['storeInitialTimeFilter'], + }, + }, + }, + initializingFromUrl: { + invoke: { + src: 'initializeFromUrl', + }, + on: { + INITIALIZED_FROM_URL: { + target: '#creatingController', + actions: ['storeInitialUrlState'], + }, + }, + }, + creatingController: { + id: 'creatingController', + invoke: { + src: 'createController', + }, + on: { + CONTROLLER_CREATED: { + target: 'initialized', + actions: ['storeController'], + }, + }, + }, + initialized: { + invoke: { + src: 'subscribeToLogExplorerState', + }, + + states: { + unknownLogExplorerState: { + on: { + LOG_EXPLORER_STATE_CHANGED: { + target: 'validLogExplorerState', + actions: ['storeLogExplorerState', 'updateUrlFromLogExplorerState'], + }, + }, + }, + + validLogExplorerState: { + on: { + LOG_EXPLORER_STATE_CHANGED: { + actions: ['storeLogExplorerState', 'updateUrlFromLogExplorerState'], + target: 'validLogExplorerState', + internal: true, + }, + }, + }, + }, + + initial: 'unknownLogExplorerState', + }, + }, + }, + { + actions: { + storeController: actions.assign((context, event) => { + return 'controller' in event && event.type === 'CONTROLLER_CREATED' + ? { controller: event.controller } + : {}; + }), + storeInitialTimeFilter: actions.assign((context, event) => { + return 'time' in event && + 'refreshInterval' in event && + event.type === 'INITIALIZED_FROM_TIME_FILTER_SERVICE' + ? { + initialLogExplorerState: { + ...('initialLogExplorerState' in context ? context.initialLogExplorerState : {}), + ...{ time: event.time, refreshInterval: event.refreshInterval }, + }, + } + : {}; + }), + storeInitialUrlState: actions.assign((context, event) => { + return 'stateFromUrl' in event && event.type === 'INITIALIZED_FROM_URL' + ? { + initialLogExplorerState: { + ...('initialLogExplorerState' in context ? context.initialLogExplorerState : {}), + ...event.stateFromUrl, + }, + } + : {}; + }), + storeLogExplorerState: actions.assign((context, event) => { + return 'state' in event && event.type === 'LOG_EXPLORER_STATE_CHANGED' + ? { logExplorerState: event.state } + : {}; + }), + }, + guards: {}, + } + ); + +export interface ObservabilityLogExplorerStateMachineDependencies { + createLogExplorerController: CreateLogExplorerController; + initialContext?: ObservabilityLogExplorerContext; + timeFilterService: TimefilterContract; + toasts: IToasts; + urlStateStorageContainer: IKbnUrlStateStorage; +} + +export const createObservabilityLogExplorerStateMachine = ({ + initialContext = DEFAULT_CONTEXT, + toasts, + urlStateStorageContainer, + createLogExplorerController, + timeFilterService, +}: ObservabilityLogExplorerStateMachineDependencies) => + createPureObservabilityLogExplorerStateMachine(initialContext).withConfig({ + actions: { + updateUrlFromLogExplorerState: updateUrlFromLogExplorerState({ urlStateStorageContainer }), + }, + services: { + createController: createController({ createLogExplorerController }), + initializeFromTimeFilterService: initializeFromTimeFilterService({ timeFilterService }), + initializeFromUrl: initializeFromUrl({ urlStateStorageContainer, toastsService: toasts }), + subscribeToLogExplorerState, + }, + }); + +export type ObservabilityLogExplorerService = InterpreterFrom< + typeof createObservabilityLogExplorerStateMachine +>; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/time_filter_service.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/time_filter_service.ts new file mode 100644 index 0000000000000..97b23a6b5198f --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/time_filter_service.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 { TimefilterContract } from '@kbn/data-plugin/public'; +import { InvokeCreator } from 'xstate'; +import { ObservabilityLogExplorerContext, ObservabilityLogExplorerEvent } from './types'; + +export const initializeFromTimeFilterService = + ({ + timeFilterService, + }: { + timeFilterService: TimefilterContract; + }): InvokeCreator => + (_context, _event) => + (send) => { + const time = timeFilterService.getTime(); + const refreshInterval = timeFilterService.getRefreshInterval(); + + send({ + type: 'INITIALIZED_FROM_TIME_FILTER_SERVICE', + time, + refreshInterval, + }); + }; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/types.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/types.ts new file mode 100644 index 0000000000000..be039af61708f --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/types.ts @@ -0,0 +1,64 @@ +/* + * 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 { QueryState } from '@kbn/data-plugin/common'; +import { + LogExplorerController, + LogExplorerPublicState, + LogExplorerPublicStateUpdate, +} from '@kbn/log-explorer-plugin/public'; + +export type ObservabilityLogExplorerContext = ObservabilityLogExplorerTypeState['context']; + +export interface CommonObservabilityLogExplorerContext { + initialLogExplorerState: LogExplorerPublicStateUpdate; +} + +export interface WithLogExplorerState { + logExplorerState: LogExplorerPublicState; +} + +export interface WithController { + controller: LogExplorerController; +} + +export type ObservabilityLogExplorerEvent = + | { + type: 'INITIALIZED_FROM_URL'; + stateFromUrl?: LogExplorerPublicStateUpdate; + } + | { + type: 'INITIALIZED_FROM_TIME_FILTER_SERVICE'; + time: QueryState['time']; + refreshInterval: QueryState['refreshInterval']; + } + | { + type: 'CONTROLLER_CREATED'; + controller: LogExplorerController; + } + | { + type: 'LOG_EXPLORER_STATE_CHANGED'; + state: LogExplorerPublicState; + }; + +export type ObservabilityLogExplorerTypeState = + | { + value: + | 'uninitialized' + | 'initializingFromUrl' + | 'initializingFromTimeFilterService' + | 'creatingController'; + context: CommonObservabilityLogExplorerContext; + } + | { + value: 'initialized' | { initialized: 'unknownLogExplorerState' }; + context: CommonObservabilityLogExplorerContext & WithController; + } + | { + value: { initialized: 'validLogExplorerState' }; + context: CommonObservabilityLogExplorerContext & WithLogExplorerState & WithController; + }; diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_schema_v1.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_schema_v1.ts new file mode 100644 index 0000000000000..353d55ea94324 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_schema_v1.ts @@ -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 { LogExplorerPublicStateUpdate } from '@kbn/log-explorer-plugin/public'; +import * as rt from 'io-ts'; +import { deepCompactObject, urlSchemaV1 } from '../../../../common'; + +export const getStateFromUrlValue = ( + urlValue: urlSchemaV1.UrlSchema +): LogExplorerPublicStateUpdate => + deepCompactObject({ + chart: { + breakdownField: urlValue.breakdownField, + }, + controls: urlValue.controls, + datasetSelection: urlValue.datasetSelection, + filters: urlValue.filters, + grid: { + columns: urlValue.columns, + rows: { + rowHeight: urlValue.rowHeight, + rowsPerPage: urlValue.rowsPerPage, + }, + }, + query: urlValue.query, + refreshInterval: urlValue.refreshInterval, + time: urlValue.time, + }); + +export const getUrlValueFromState = (state: LogExplorerPublicStateUpdate): urlSchemaV1.UrlSchema => + deepCompactObject({ + breakdownField: state.chart?.breakdownField, + columns: state.grid?.columns, + controls: state.controls, + datasetSelection: state.datasetSelection, + filters: state.filters, + query: state.query, + refreshInterval: state.refreshInterval, + rowHeight: state.grid?.rows?.rowHeight, + rowsPerPage: state.grid?.rows?.rowsPerPage, + time: state.time, + v: 1, + }); + +const stateFromUrlSchemaRT = new rt.Type< + LogExplorerPublicStateUpdate, + urlSchemaV1.UrlSchema, + urlSchemaV1.UrlSchema +>( + 'stateFromUrlSchemaRT', + rt.never.is, + (urlSchema, context) => rt.success(getStateFromUrlValue(urlSchema)), + getUrlValueFromState +); + +export const stateFromUntrustedUrlRT = urlSchemaV1.urlSchemaRT.pipe(stateFromUrlSchemaRT); diff --git a/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_state_storage_service.ts b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_state_storage_service.ts new file mode 100644 index 0000000000000..2eef22e0e5269 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/state_machines/observability_log_explorer/src/url_state_storage_service.ts @@ -0,0 +1,72 @@ +/* + * 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 { IToasts } from '@kbn/core-notifications-browser'; +import { createPlainError, formatErrors } from '@kbn/io-ts-utils'; +import { IKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import * as Either from 'fp-ts/lib/Either'; +import * as rt from 'io-ts'; +import { InvokeCreator } from 'xstate'; +import { OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY } from '../../../../common'; +import type { ObservabilityLogExplorerContext, ObservabilityLogExplorerEvent } from './types'; +import * as urlSchemaV1 from './url_schema_v1'; + +interface ObservabilityLogExplorerUrlStateDependencies { + toastsService: IToasts; + urlStateStorageContainer: IKbnUrlStateStorage; +} + +export const updateUrlFromLogExplorerState = + ({ urlStateStorageContainer }: { urlStateStorageContainer: IKbnUrlStateStorage }) => + (context: ObservabilityLogExplorerContext, event: ObservabilityLogExplorerEvent) => { + if (!('logExplorerState' in context)) { + return; + } + + // we want to write in the newest schema + const encodedUrlStateValues = urlSchemaV1.stateFromUntrustedUrlRT.encode( + context.logExplorerState + ); + + urlStateStorageContainer.set(OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY, encodedUrlStateValues, { + replace: true, + }); + }; + +export const initializeFromUrl = + ({ + toastsService, + urlStateStorageContainer, + }: ObservabilityLogExplorerUrlStateDependencies): InvokeCreator< + ObservabilityLogExplorerContext, + ObservabilityLogExplorerEvent + > => + (_context, _event) => + (send) => { + const urlStateValues = + urlStateStorageContainer.get(OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY) ?? undefined; + + // in the future we'll have to more schema versions to the union + const stateValuesE = rt + .union([rt.undefined, urlSchemaV1.stateFromUntrustedUrlRT]) + .decode(urlStateValues); + + if (Either.isLeft(stateValuesE)) { + withNotifyOnErrors(toastsService).onGetError( + createPlainError(formatErrors(stateValuesE.left)) + ); + send({ + type: 'INITIALIZED_FROM_URL', + stateFromUrl: undefined, + }); + } else { + send({ + type: 'INITIALIZED_FROM_URL', + stateFromUrl: stateValuesE.right, + }); + } + }; diff --git a/x-pack/plugins/observability_log_explorer/public/utils/breadcrumbs.tsx b/x-pack/plugins/observability_log_explorer/public/utils/breadcrumbs.tsx index 55b4b9359fd0b..9de71eb8069d7 100644 --- a/x-pack/plugins/observability_log_explorer/public/utils/breadcrumbs.tsx +++ b/x-pack/plugins/observability_log_explorer/public/utils/breadcrumbs.tsx @@ -7,14 +7,14 @@ import { EuiBreadcrumb } from '@elastic/eui'; import type { ChromeStart } from '@kbn/core-chrome-browser'; -import type { ServerlessPluginStart } from '@kbn/serverless/public'; -import { useEffect } from 'react'; -import { useLinkProps } from '@kbn/observability-shared-plugin/public'; import { LOGS_APP_ID, - OBSERVABILITY_LOG_EXPLORER, + OBSERVABILITY_LOG_EXPLORER_APP_ID, OBSERVABILITY_OVERVIEW_APP_ID, } from '@kbn/deeplinks-observability'; +import { useLinkProps } from '@kbn/observability-shared-plugin/public'; +import type { ServerlessPluginStart } from '@kbn/serverless/public'; +import { useEffect } from 'react'; import { logExplorerAppTitle, logsAppTitle, @@ -28,7 +28,7 @@ export const useBreadcrumbs = ( ) => { const observabilityLinkProps = useLinkProps({ app: OBSERVABILITY_OVERVIEW_APP_ID }); const logsLinkProps = useLinkProps({ app: LOGS_APP_ID }); - const logExplorerLinkProps = useLinkProps({ app: OBSERVABILITY_LOG_EXPLORER }); + const logExplorerLinkProps = useLinkProps({ app: OBSERVABILITY_LOG_EXPLORER_APP_ID }); useEffect(() => { setBreadcrumbs( diff --git a/x-pack/plugins/observability_log_explorer/public/utils/kbn_url_state_context.ts b/x-pack/plugins/observability_log_explorer/public/utils/kbn_url_state_context.ts new file mode 100644 index 0000000000000..167af63d0d9e6 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/utils/kbn_url_state_context.ts @@ -0,0 +1,35 @@ +/* + * 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 { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import createContainer from 'constate'; +import { useState } from 'react'; +import { useKibanaContextForPlugin } from './use_kibana'; + +const useKbnUrlStateStorageFromRouter = () => { + const { + services: { + appParams: { history }, + notifications: { toasts }, + uiSettings, + }, + } = useKibanaContextForPlugin(); + + const [urlStateStorage] = useState(() => + createKbnUrlStateStorage({ + history, + useHash: uiSettings.get('state:storeInSessionStorage'), + useHashQuery: false, + ...withNotifyOnErrors(toasts), + }) + ); + + return urlStateStorage; +}; + +export const [KbnUrlStateStorageFromRouterProvider, useKbnUrlStateStorageFromRouterContext] = + createContainer(useKbnUrlStateStorageFromRouter); diff --git a/x-pack/plugins/observability_log_explorer/public/utils/use_kibana.tsx b/x-pack/plugins/observability_log_explorer/public/utils/use_kibana.tsx index d8b2235586e55..bf18f5b6d1b2e 100644 --- a/x-pack/plugins/observability_log_explorer/public/utils/use_kibana.tsx +++ b/x-pack/plugins/observability_log_explorer/public/utils/use_kibana.tsx @@ -12,21 +12,29 @@ import { useKibana, } from '@kbn/kibana-react-plugin/public'; import { useMemo } from 'react'; -import { ObservabilityLogExplorerPluginStart, ObservabilityLogExplorerStartDeps } from '../types'; +import { + ObservabilityLogExplorerAppMountParameters, + ObservabilityLogExplorerPluginStart, + ObservabilityLogExplorerStartDeps, +} from '../types'; export type PluginKibanaContextValue = CoreStart & ObservabilityLogExplorerStartDeps & - ObservabilityLogExplorerPluginStart; + ObservabilityLogExplorerPluginStart & { + appParams: ObservabilityLogExplorerAppMountParameters; + }; export const createKibanaContextForPlugin = ( core: CoreStart, plugins: ObservabilityLogExplorerStartDeps, - pluginStart: ObservabilityLogExplorerPluginStart + pluginStart: ObservabilityLogExplorerPluginStart, + appParams: ObservabilityLogExplorerAppMountParameters ) => createKibanaReactContext({ ...core, ...plugins, ...pluginStart, + appParams, }); export const useKibanaContextForPlugin = @@ -35,11 +43,12 @@ export const useKibanaContextForPlugin = export const useKibanaContextForPluginProvider = ( core: CoreStart, plugins: ObservabilityLogExplorerStartDeps, - pluginStart: ObservabilityLogExplorerPluginStart + pluginStart: ObservabilityLogExplorerPluginStart, + appParams: ObservabilityLogExplorerAppMountParameters ) => { const { Provider } = useMemo( - () => createKibanaContextForPlugin(core, plugins, pluginStart), - [core, pluginStart, plugins] + () => createKibanaContextForPlugin(core, plugins, pluginStart, appParams), + [appParams, core, pluginStart, plugins] ); return Provider; diff --git a/x-pack/plugins/observability_log_explorer/tsconfig.json b/x-pack/plugins/observability_log_explorer/tsconfig.json index 24327c31c26a3..be61fb9926a8c 100644 --- a/x-pack/plugins/observability_log_explorer/tsconfig.json +++ b/x-pack/plugins/observability_log_explorer/tsconfig.json @@ -11,31 +11,31 @@ ".storybook/**/*.tsx" ], "kbn_references": [ + "@kbn/config-schema", "@kbn/core", - "@kbn/log-explorer-plugin", - "@kbn/i18n", - "@kbn/react-kibana-context-render", - "@kbn/shared-ux-router", - "@kbn/observability-shared-plugin", + "@kbn/core-chrome-browser", + "@kbn/core-mount-utils-browser-internal", + "@kbn/core-notifications-browser", "@kbn/data-plugin", + "@kbn/dataset-quality-plugin", + "@kbn/deeplinks-observability", + "@kbn/discover-plugin", + "@kbn/i18n", + "@kbn/i18n-react", + "@kbn/io-ts-utils", "@kbn/kibana-react-plugin", - "@kbn/serverless", - "@kbn/core-chrome-browser", - "@kbn/config-schema", "@kbn/kibana-utils-plugin", - "@kbn/discover-plugin", - "@kbn/es-query", + "@kbn/log-explorer-plugin", + "@kbn/logs-shared-plugin", + "@kbn/observability-shared-plugin", + "@kbn/react-kibana-context-render", "@kbn/react-kibana-mount", + "@kbn/serverless", "@kbn/share-plugin", - "@kbn/io-ts-utils", - "@kbn/deeplinks-observability", - "@kbn/core-notifications-browser", - "@kbn/core-mount-utils-browser-internal", - "@kbn/xstate-utils", + "@kbn/shared-ux-router", "@kbn/shared-ux-utility", "@kbn/ui-theme", - "@kbn/logs-shared-plugin", - "@kbn/dataset-quality-plugin" + "@kbn/xstate-utils" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/profiling/public/routing/index.tsx b/x-pack/plugins/profiling/public/routing/index.tsx index 9df36e393c389..8c244167e2baf 100644 --- a/x-pack/plugins/profiling/public/routing/index.tsx +++ b/x-pack/plugins/profiling/public/routing/index.tsx @@ -37,18 +37,6 @@ import { StorageExplorerView } from '../views/storage_explorer'; import { RouteBreadcrumb } from './route_breadcrumb'; const routes = { - '/settings': { - element: ( - - - - ), - }, '/': { element: ( ), children: { + '/settings': { + element: ( + + + + ), + }, '/add-data-instructions': { - element: , + element: ( + + + + ), params: t.type({ query: t.type({ selectedTab: t.union([ diff --git a/x-pack/plugins/profiling/public/views/add_data_view/index.tsx b/x-pack/plugins/profiling/public/views/add_data_view/index.tsx index 27e3ac639757a..bf6e161d3cbcf 100644 --- a/x-pack/plugins/profiling/public/views/add_data_view/index.tsx +++ b/x-pack/plugins/profiling/public/views/add_data_view/index.tsx @@ -272,15 +272,15 @@ docker.elastic.co/observability/profiling-agent:${stackVersion} /root/pf-host-ag {`sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch cat < /etc/yum.repos.d/elastic.repo - [elastic-${majorVersion}.x] - name=Elastic repository for ${majorVersion}.x packages - baseurl=https://artifacts.elastic.co/packages/${majorVersion}.x/yum - gpgcheck=1 - gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch - enabled=1 - autorefresh=1 - type=rpm-md - EOF`} +[elastic-${majorVersion}.x] +name=Elastic repository for ${majorVersion}.x packages +baseurl=https://artifacts.elastic.co/packages/${majorVersion}.x/yum +gpgcheck=1 +gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch +enabled=1 +autorefresh=1 +type=rpm-md +EOF`} ), }, diff --git a/x-pack/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts b/x-pack/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts index 81f13d070ddcd..5e2119a1243f9 100644 --- a/x-pack/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts +++ b/x-pack/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { EuiPageHeaderContentProps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TypeOf } from '@kbn/typed-react-router-config'; import { TopNType } from '@kbn/profiling-utils'; @@ -18,7 +17,7 @@ export function getStackTracesTabs({ profilingRouter, }: TypeOf & { profilingRouter: StatefulProfilingRouter; -}): Required['tabs'] { +}) { return [ { label: i18n.translate('xpack.profiling.stackTracesView.threadsTabLabel', { diff --git a/x-pack/plugins/profiling/public/views/stack_traces_view/index.tsx b/x-pack/plugins/profiling/public/views/stack_traces_view/index.tsx index d5a2c3a851f8f..ece12c6527cb7 100644 --- a/x-pack/plugins/profiling/public/views/stack_traces_view/index.tsx +++ b/x-pack/plugins/profiling/public/views/stack_traces_view/index.tsx @@ -21,6 +21,7 @@ import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_te import { StackedBarChart } from '../../components/stacked_bar_chart'; import { getStackTracesTabs } from './get_stack_traces_tabs'; import { getTracesViewRouteParams } from './utils'; +import { RouteBreadcrumb } from '../../routing/route_breadcrumb'; export function StackTracesView() { const routePath = useProfilingRoutePath(); @@ -41,6 +42,7 @@ export function StackTracesView() { query, profilingRouter, }); + const selectedTab = tabs.find((tab) => tab.isSelected); const { services: { fetchTopN }, @@ -89,102 +91,104 @@ export function StackTracesView() { } return ( - - - - - - - { - profilingRouter.push(routePath, { - path, - query: { - ...query, - displayAs: nextValue, - }, - }); - }} - options={[ - { - id: StackTracesDisplayOption.StackTraces, - iconType: 'visLine', - label: i18n.translate( - 'xpack.profiling.stackTracesView.stackTracesCountButton', - { - defaultMessage: 'Stack traces', - } - ), - }, - { - id: StackTracesDisplayOption.Percentage, - iconType: 'percent', - label: i18n.translate('xpack.profiling.stackTracesView.percentagesButton', { - defaultMessage: 'Percentages', - }), - }, - ]} - legend={i18n.translate('xpack.profiling.stackTracesView.displayOptionLegend', { - defaultMessage: 'Display option', - })} - /> - - - - { + + + + + + + + { profilingRouter.push(routePath, { path, query: { ...query, - rangeFrom: nextRange.rangeFrom, - rangeTo: nextRange.rangeTo, + displayAs: nextValue, }, }); }} - showFrames={topNType === TopNType.Traces} - onClick={topNType === TopNType.Threads ? onStackedBarClick : undefined} + options={[ + { + id: StackTracesDisplayOption.StackTraces, + iconType: 'visLine', + label: i18n.translate( + 'xpack.profiling.stackTracesView.stackTracesCountButton', + { + defaultMessage: 'Stack traces', + } + ), + }, + { + id: StackTracesDisplayOption.Percentage, + iconType: 'percent', + label: i18n.translate('xpack.profiling.stackTracesView.percentagesButton', { + defaultMessage: 'Percentages', + }), + }, + ]} + legend={i18n.translate('xpack.profiling.stackTracesView.displayOptionLegend', { + defaultMessage: 'Display option', + })} /> - - - - - - - - - - - {(data?.charts.length ?? 0) > limit && ( - - { - profilingRouter.push(routePath, { - path, - query: { - ...query, - limit: limit + 10, - }, - }); - }} - > - {i18n.translate('xpack.profiling.stackTracesView.showMoreButton', { - defaultMessage: 'Show more', - })} - + + + + { + profilingRouter.push(routePath, { + path, + query: { + ...query, + rangeFrom: nextRange.rangeFrom, + rangeTo: nextRange.rangeTo, + }, + }); + }} + showFrames={topNType === TopNType.Traces} + onClick={topNType === TopNType.Threads ? onStackedBarClick : undefined} + /> + + + + + + + + + - )} - - + {(data?.charts.length ?? 0) > limit && ( + + { + profilingRouter.push(routePath, { + path, + query: { + ...query, + limit: limit + 10, + }, + }); + }} + > + {i18n.translate('xpack.profiling.stackTracesView.showMoreButton', { + defaultMessage: 'Show more', + })} + + + )} + + + ); } diff --git a/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts b/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts index 926949bf9cd7f..fffa55ccbe514 100644 --- a/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts +++ b/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts @@ -7,7 +7,12 @@ import semverLte from 'semver/functions/lte'; -const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.12.0'; +function parseSemver(semver: string) { + return semver.includes('-') ? semver.substring(0, semver.indexOf('-')) : semver; +} + +const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.13.0'; export function isEndpointPackageV2(version: string) { - return semverLte(MIN_ENDPOINT_PACKAGE_V2_VERSION, version); + const parsedVersion = parseSemver(version); + return semverLte(MIN_ENDPOINT_PACKAGE_V2_VERSION, parsedVersion); } diff --git a/x-pack/plugins/security_solution/common/asset_criticality/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/constants.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts diff --git a/x-pack/plugins/security_solution/common/asset_criticality/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts diff --git a/x-pack/plugins/security_solution/common/asset_criticality/indices.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/indices.ts similarity index 100% rename from x-pack/plugins/security_solution/common/asset_criticality/indices.ts rename to x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/indices.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/after_keys.test.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.test.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/after_keys.test.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.test.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/after_keys.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/after_keys.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/after_keys.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/constants.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/constants.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/identifier_types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/identifier_types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/identifier_types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/identifier_types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/index.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/indices.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/indices.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/indices.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/indices.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/range.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/range.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/range.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/range.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_calculation/request_schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_calculation/request_schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_preview/request_schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_score_preview/request_schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/index.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/index.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/index.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.test.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.test.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.test.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.test.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/schema.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/schema.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_weights/types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/risk_weights/types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/risk_weights/types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/types.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/types.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/types.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/types.ts diff --git a/x-pack/plugins/security_solution/common/risk_engine/utils.ts b/x-pack/plugins/security_solution/common/entity_analytics/risk_engine/utils.ts similarity index 100% rename from x-pack/plugins/security_solution/common/risk_engine/utils.ts rename to x-pack/plugins/security_solution/common/entity_analytics/risk_engine/utils.ts diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts index efbf12b3e5e90..f33eb664628a1 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts @@ -8,7 +8,7 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import type { Inspect, Maybe, SortField } from '../../../common'; -import type { RiskInputs } from '../../../../risk_engine'; +import type { RiskInputs } from '../../../../entity_analytics/risk_engine'; export interface HostsRiskScoreStrategyResponse extends IEsSearchResponse { inspect?: Maybe; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts index b5e0c62526a61..783533b3e49ff 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/common/index.ts @@ -11,7 +11,7 @@ import { RiskScoreEntity, getRiskScoreLatestIndex, getRiskScoreTimeSeriesIndex, -} from '../../../../risk_engine'; +} from '../../../../entity_analytics/risk_engine'; export { RiskQueries } from '../../../../api/search_strategy'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts index 4e3aaa69129fc..e8af897c51cea 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskScoreEntity } from '../../../../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../../../../common/entity_analytics/risk_engine'; import { renderHook } from '@testing-library/react-hooks'; import { wrapper } from '../../../mocks'; import { useLensAttributes } from '../../../use_lens_attributes'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx index 9eefb96be62c9..1533e3d0a2a56 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx @@ -500,106 +500,112 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ - - - {errorSubmitting != null && ( - <> - } + {errorSubmitting != null && ( + <> + + {i18n.SUBMIT_ERROR_DISMISS_MESSAGE} + + - {i18n.SUBMIT_ERROR_DISMISS_MESSAGE} - - - {i18n.SUBMIT_ERROR_DISMISS_BUTTON} - - - - - )} - - - - - {listType !== ExceptionListTypeEnum.ENDPOINT && !sharedListToAddTo?.length && ( - <> - - - - )} - - -

{i18n.COMMENTS_SECTION_TITLE(newComment ? 1 : 0)}

- - } - initialIsOpen={!!newComment} - newCommentValue={newComment} - newCommentOnChange={setComment} - setCommentError={setCommentError} - /> - {listType !== ExceptionListTypeEnum.ENDPOINT && ( - <> - - - - )} - {showAlertCloseOptions && ( - <> - - - - )} - + {i18n.SUBMIT_ERROR_DISMISS_BUTTON} + + + + + )} + + + + + {listType !== ExceptionListTypeEnum.ENDPOINT && !sharedListToAddTo?.length && ( + <> + + + + )} + + +

{i18n.COMMENTS_SECTION_TITLE(newComment ? 1 : 0)}

+ + } + initialIsOpen={!!newComment} + newCommentValue={newComment} + newCommentOnChange={setComment} + setCommentError={setCommentError} + /> + {listType !== ExceptionListTypeEnum.ENDPOINT && ( + <> + + + + )} + {showAlertCloseOptions && ( + <> + + + + )} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx index 6d2526cdbf239..8c27b5da22450 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx @@ -370,8 +370,8 @@ const EditExceptionFlyoutComponent: React.FC = ({ - {isLoading && } + {isLoading && } { const [isImportModalVisible, showImportModal, hideImportModal] = useBoolState(); @@ -72,8 +70,6 @@ const RulesPageComponent: React.FC = () => { } = useListsConfig(); const loading = userInfoLoading || listsConfigLoading; - const isEsqlRuleTypeEnabled = useIsEsqlRuleTypeEnabled(); - if ( redirectToDetections( isSignalIndexExists, @@ -89,18 +85,6 @@ const RulesPageComponent: React.FC = () => { return null; } - const addNewRuleButton = ( - - {i18n.ADD_NEW_RULE} - - ); - return ( <> @@ -155,11 +139,15 @@ const RulesPageComponent: React.FC = () => {
- {isEsqlRuleTypeEnabled ? ( - {addNewRuleButton} - ) : ( - addNewRuleButton - )} + + {i18n.ADD_NEW_RULE} +
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx index f022560f9f50c..fc55b8b60df5e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx @@ -51,6 +51,7 @@ interface RiskScoreFieldProps { idAria: string; indices: DataViewBase; isDisabled: boolean; + isActive: boolean; placeholder?: string; } @@ -60,6 +61,7 @@ export const RiskScoreField = ({ idAria, indices, isDisabled, + isActive, placeholder, }: RiskScoreFieldProps) => { const { value, isMappingChecked, mapping } = field.value; @@ -147,29 +149,39 @@ export const RiskScoreField = ({ return ( - - - + { + // TODO: https://github.com/elastic/kibana/issues/161456 + // The About step page contains EuiRange component which does not work properly within memoized parents. + // EUI team suggested not to memoize EuiRange/EuiDualRange: https://github.com/elastic/eui/issues/6846 + // Workaround: We force EuiRange re-rendering by removing/adding it into the DOM. + // NOTE: We should remove this workaround once EUI team fixed EuiRange. + // Related ticket: https://github.com/elastic/kibana/issues/160561 + } + {isActive && ( + + + + )} = ({ dataTestSubj: 'detectionEngineStepAboutRuleRiskScore', idAria: 'detectionEngineStepAboutRuleRiskScore', isDisabled: isLoading || indexPatternLoading, + isActive, indices: indexPattern, }} /> diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts index 95769bdbf5f9c..13408e349007d 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts @@ -23,7 +23,7 @@ import type { InitRiskEngineResponse, DisableRiskEngineResponse, } from '../../../server/lib/entity_analytics/types'; -import type { RiskScorePreviewRequestSchema } from '../../../common/risk_engine/risk_score_preview/request_schema'; +import type { RiskScorePreviewRequestSchema } from '../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; import type { EntityAnalyticsPrivileges } from '../../../common/api/entity_analytics/common'; /** diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts index 0d5667d7df813..84360372ff876 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_preview_risk_scores.ts @@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query'; import dateMath from '@kbn/datemath'; import { fetchRiskScorePreview } from '../api'; -import type { RiskScorePreviewRequestSchema } from '../../../../common/risk_engine/risk_score_preview/request_schema'; +import type { RiskScorePreviewRequestSchema } from '../../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; export const useRiskScorePreview = ({ data_view_id: dataViewId, diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts index 504ed59a40423..ed591213b2dcf 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_risk_engine_status.ts @@ -7,7 +7,7 @@ import { useQuery, useQueryClient } from '@tanstack/react-query'; import { useCallback } from 'react'; import { fetchRiskEngineStatus } from '../api'; -import { RiskEngineStatus } from '../../../../common/risk_engine/types'; +import { RiskEngineStatus } from '../../../../common/entity_analytics/risk_engine/types'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; const FETCH_RISK_ENGINE_STATUS = ['GET', 'FETCH_RISK_ENGINE_STATUS']; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts index 8e2b5edfb1248..76f57281e9f93 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_engine_privileges_callout/use_missing_risk_engine_privileges.ts @@ -11,7 +11,7 @@ import { useRiskEnginePrivileges } from '../../api/hooks/use_risk_engine_privile import { RISK_ENGINE_REQUIRED_ES_CLUSTER_PRIVILEGES, RISK_ENGINE_REQUIRED_ES_INDEX_PRIVILEGES, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; const getMissingIndexPrivileges = ( privileges: EntityAnalyticsPrivileges['privileges']['elasticsearch']['index'] diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx index b5ccc1b8daa63..c93196a6336e5 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx @@ -36,7 +36,7 @@ import { useRiskEngineStatus } from '../api/hooks/use_risk_engine_status'; import { useInitRiskEngineMutation } from '../api/hooks/use_init_risk_engine_mutation'; import { useEnableRiskEngineMutation } from '../api/hooks/use_enable_risk_engine_mutation'; import { useDisableRiskEngineMutation } from '../api/hooks/use_disable_risk_engine_mutation'; -import { RiskEngineStatus, MAX_SPACES_COUNT } from '../../../common/risk_engine'; +import { RiskEngineStatus, MAX_SPACES_COUNT } from '../../../common/entity_analytics/risk_engine'; import { RiskInformationFlyout } from '../../explore/components/risk_score/risk_information'; import { useOnOpenCloseHandler } from '../../helper_hooks'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx index 74c7aa4dcbdea..ea499717e8341 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import type { BoolQuery, TimeRange, Query } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; -import { RiskScoreEntity, type RiskScore } from '../../../common/risk_engine'; +import { RiskScoreEntity, type RiskScore } from '../../../common/entity_analytics/risk_engine'; import { RiskScorePreviewTable } from './risk_score_preview_table'; import * as i18n from '../translations'; import { useRiskScorePreview } from '../api/hooks/use_preview_risk_scores'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx index 12b162d467132..05fa3c18809a6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_table.tsx @@ -12,7 +12,10 @@ import type { RiskSeverity } from '../../../common/search_strategy'; import { RiskScoreLevel } from '../../explore/components/risk_score/severity/common'; import { HostDetailsLink, UserDetailsLink } from '../../common/components/links'; -import { RiskScoreEntity, type RiskScore as IRiskScore } from '../../../common/risk_engine'; +import { + RiskScoreEntity, + type RiskScore as IRiskScore, +} from '../../../common/entity_analytics/risk_engine'; type RiskScoreColumn = EuiBasicTableColumn & { field: keyof IRiskScore; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js b/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js new file mode 100644 index 0000000000000..ab3868717aa54 --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/jest.config.js @@ -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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/plugins/security_solution/public/entity_analytics'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/entity_analytics', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/plugins/security_solution/public/entity_analytics/**/*.{ts,tsx}', + ], + moduleNameMapper: require('../../server/__mocks__/module_name_map'), +}; diff --git a/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts index 424e88c9850c3..105036bd1be33 100644 --- a/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts @@ -5,7 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import type { RiskScoreEntity } from '../../../../../common/risk_engine'; +import type { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import { getRiskEntityTranslation } from '../translations'; export const BETA = i18n.translate('xpack.securitySolution.riskScore.technicalPreviewLabel', { diff --git a/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx index e0bcae1b06d29..4223acb1f44d4 100644 --- a/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors_alerts/index.tsx @@ -13,8 +13,8 @@ import type { Filter } from '@kbn/es-query'; import { HeaderSection } from '../../../../common/components/header_section'; import * as i18n from './translations'; -import type { RiskInputs } from '../../../../../common/risk_engine'; -import { RiskScoreEntity } from '../../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../../common/entity_analytics/risk_engine'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import type { HostRiskScore, UserRiskScore } from '../../../../../common/search_strategy'; import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../common/constants'; import { AlertsTableComponent } from '../../../../detections/components/alerts_table'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx index 93396e7dea03a..a5138dc035dc8 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.test.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { SimpleRiskInput } from '../../../../common/risk_engine'; -import { RiskCategories } from '../../../../common/risk_engine'; +import type { SimpleRiskInput } from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { fireEvent, render } from '@testing-library/react'; import React from 'react'; import { RiskInputsPanel } from '.'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx index 544dca9df62a8..34b81d26e8888 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/content.tsx @@ -12,7 +12,7 @@ import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; import { get } from 'lodash/fp'; import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; -import type { RiskInputs } from '../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../common/entity_analytics/risk_engine'; import { ActionColumn } from './components/action_column'; import { PreferenceFormattedDate } from '../../../common/components/formatted_date'; import { RiskInputsUtilityBar } from './components/utility_bar'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx index 386ec25bfeaf8..de926204236ba 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/risk_inputs_left/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; -import type { RiskInputs } from '../../../../common/risk_engine'; +import type { RiskInputs } from '../../../../common/entity_analytics/risk_engine'; import { RiskInputsPanelContent } from './content'; export interface RiskInputsPanelProps extends Record { diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx index 763a6377a9d67..c4eaa36273166 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/shared/components/risk_summary.tsx @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n'; import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; import { ONE_WEEK_IN_HOURS } from '../../../../timelines/components/side_panel/new_user_detail/constants'; import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; -import { RiskScoreEntity } from '../../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine'; import type { RiskScoreState } from '../../../../explore/containers/risk_score'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; import { getRiskScoreSummaryAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_summary'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx index bdac0653c5b7e..ff9add6011d05 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx @@ -17,7 +17,7 @@ import { useGlobalTime } from '../../../common/containers/use_global_time'; import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider'; import { buildUserNamesFilter } from '../../../../common/search_strategy'; import { useRiskScore } from '../../../explore/containers/risk_score'; -import { RiskScoreEntity } from '../../../../common/risk_engine'; +import { RiskScoreEntity } from '../../../../common/entity_analytics/risk_engine'; import { FlyoutLoading } from '../../shared/components/flyout_loading'; import { RiskInputsPanelKey } from '../risk_inputs_left'; import { FlyoutNavigation } from '../../shared/components/flyout_navigation'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts index bfd1a9a802199..d677f79ca4322 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts @@ -8,7 +8,7 @@ import type { RiskScoreState } from '../../../../explore/containers/risk_score'; import type { RiskScoreEntity, UserRiskScore } from '../../../../../common/search_strategy'; import { RiskSeverity } from '../../../../../common/search_strategy'; -import { RiskCategories } from '../../../../../common/risk_engine'; +import { RiskCategories } from '../../../../../common/entity_analytics/risk_engine'; const userRiskScore: UserRiskScore = { '@timestamp': '626569200000', diff --git a/x-pack/plugins/security_solution/public/overview/components/common.tsx b/x-pack/plugins/security_solution/public/overview/components/common.tsx index 7ffcc7e5a95e3..f9068a4507b75 100644 --- a/x-pack/plugins/security_solution/public/overview/components/common.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/common.tsx @@ -9,7 +9,7 @@ import { EuiButtonIcon, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eu import React, { useCallback, useState } from 'react'; import * as i18n from './translations'; import { RiskScoreDocLink } from '../../explore/components/risk_score/risk_score_onboarding/risk_score_doc_link'; -import type { RiskScoreEntity } from '../../../common/risk_engine'; +import type { RiskScoreEntity } from '../../../common/entity_analytics/risk_engine'; export const RiskScoreInfoTooltip: React.FC<{ toolTipContent: React.ReactNode; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/deprecation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/deprecation.ts index 8e956e0e48aa6..46a9af76da4f0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/deprecation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/deprecation.ts @@ -16,7 +16,8 @@ import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../common/consta * @returns string */ export const buildDeprecatedBulkEndpointMessage = (path: string) => { - const docsLink = getDocLinks({ kibanaBranch: 'main' }).siem.ruleApiOverview; + const docsLink = getDocLinks({ kibanaBranch: 'main', buildFlavor: 'traditional' }).siem + .ruleApiOverview; return `Deprecated endpoint: ${path} API is deprecated since v8.2. Please use the ${DETECTION_ENGINE_RULES_BULK_ACTION} API instead. See ${docsLink} for more detail.`; }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts index 6bb003df0fa85..afddfd6893240 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts @@ -8,7 +8,7 @@ import type { Logger, ElasticsearchClient } from '@kbn/core/server'; import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; import type { AssetCriticalityRecord } from '../../../../common/api/entity_analytics/asset_criticality'; import { createOrUpdateIndex } from '../utils/create_or_update_index'; -import { getAssetCriticalityIndex } from '../../../../common/asset_criticality'; +import { getAssetCriticalityIndex } from '../../../../common/entity_analytics/asset_criticality'; import { assetCriticalityFieldMap } from './configurations'; interface AssetCriticalityClientOpts { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts index 434fa3d0d952d..7c77ca722ea78 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/get_user_asset_criticality_privileges.ts @@ -8,7 +8,7 @@ import type { KibanaRequest } from '@kbn/core/server'; import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { checkAndFormatPrivileges } from '../utils/check_and_format_privileges'; -import { ASSET_CRITICALITY_REQUIRED_ES_INDEX_PRIVILEGES } from '../../../../common/asset_criticality'; +import { ASSET_CRITICALITY_REQUIRED_ES_INDEX_PRIVILEGES } from '../../../../common/entity_analytics/asset_criticality'; export const getUserAssetCriticalityPrivileges = async ( request: KibanaRequest, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts index 8eb5a28cb0721..03920c099000f 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_user_risk_engine_privileges.ts @@ -10,7 +10,7 @@ import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { RISK_ENGINE_REQUIRED_ES_CLUSTER_PRIVILEGES, RISK_ENGINE_REQUIRED_ES_INDEX_PRIVILEGES, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; import { checkAndFormatPrivileges } from '../utils/check_and_format_privileges'; export const getUserRiskEnginePrivileges = async ( diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts index e649fa24b2139..88c911a6d7789 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts @@ -7,12 +7,12 @@ import type { Logger, ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; -import type { InitRiskEngineResult } from '../../../../common/risk_engine'; +import type { InitRiskEngineResult } from '../../../../common/entity_analytics/risk_engine'; import { RiskEngineStatus, MAX_SPACES_COUNT, RiskScoreEntity, -} from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; import { removeLegacyTransforms, getLegacyTransforms } from '../utils/transforms'; import { updateSavedObjectAttribute, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts index 4b0d298ca4201..20db1f8d61735 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.mock.ts @@ -9,7 +9,7 @@ import { ALERT_RISK_SCORE, ALERT_RULE_NAME, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { RiskCategories } from '../../../../common/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import type { CalculateRiskScoreAggregations, CalculateScoresResponse, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts index 996adec9c4908..a877bfd0f8e60 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.ts @@ -22,8 +22,8 @@ import type { IdentifierType, RiskWeights, RiskScore, -} from '../../../../common/risk_engine'; -import { RiskCategories } from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { withSecuritySpan } from '../../../utils/with_security_span'; import { getAfterKeyForIdentifierType, getFieldForIdentifierAgg } from './helpers'; import { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts index 4ed0533292246..2077a152e07b4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/configurations.ts @@ -5,8 +5,11 @@ * 2.0. */ import type { FieldMap } from '@kbn/alerts-as-data-utils'; -import type { IdentifierType } from '../../../../common/risk_engine'; -import { RiskScoreEntity, riskScoreBaseIndexName } from '../../../../common/risk_engine'; +import type { IdentifierType } from '../../../../common/entity_analytics/risk_engine'; +import { + RiskScoreEntity, + riskScoreBaseIndexName, +} from '../../../../common/entity_analytics/risk_engine'; import type { IIndexPatternString } from '../utils/create_datastream'; const commonRiskFields: FieldMap = { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts index 617b2c5a03c10..59b8b0535f97d 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/helpers.ts @@ -5,7 +5,11 @@ * 2.0. */ -import type { AfterKey, AfterKeys, IdentifierType } from '../../../../common/risk_engine'; +import type { + AfterKey, + AfterKeys, + IdentifierType, +} from '../../../../common/entity_analytics/risk_engine'; import type { CalculateAndPersistScoresResponse } from '../types'; export const getFieldForIdentifierAgg = (identifierType: IdentifierType): string => diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts index 8e859449bb32d..e43b44ab01894 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts @@ -7,7 +7,7 @@ import type { BulkOperationContainer } from '@elastic/elasticsearch/lib/api/types'; import type { Logger, ElasticsearchClient } from '@kbn/core/server'; -import type { IdentifierType, RiskScore } from '../../../../common/risk_engine'; +import type { IdentifierType, RiskScore } from '../../../../common/entity_analytics/risk_engine'; interface WriterBulkResponse { errors: string[]; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts index 0b8cea72d25c2..54a2dc9f78c82 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_data_client.ts @@ -24,7 +24,7 @@ import { import { createDataStream } from '../utils/create_datastream'; import type { RiskEngineDataWriter as Writer } from './risk_engine_data_writer'; import { RiskEngineDataWriter } from './risk_engine_data_writer'; -import { getRiskScoreLatestIndex } from '../../../../common/risk_engine'; +import { getRiskScoreLatestIndex } from '../../../../common/entity_analytics/risk_engine'; import { getLatestTransformId, createTransform } from '../utils/transforms'; import { getRiskInputsIndex } from './get_risk_inputs_index'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts index 68b5b55dbda42..e72852f6ea47a 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.mock.ts @@ -6,7 +6,7 @@ */ import type { RiskScoreService } from './risk_score_service'; -import type { RiskScore } from '../../../../common/risk_engine'; +import type { RiskScore } from '../../../../common/entity_analytics/risk_engine'; const createRiskScoreMock = (overrides: Partial = {}): RiskScore => ({ '@timestamp': '2023-02-15T00:15:19.231Z', diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts index 40b3ee800b1bd..86bdc0d0e6be0 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskWeightTypes, RiskCategories } from '../../../../common/risk_engine'; +import { RiskWeightTypes, RiskCategories } from '../../../../common/entity_analytics/risk_engine'; import { buildCategoryAssignment, buildCategoryWeights, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts index 225887f2dce55..f0af4360b8631 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_weights.ts @@ -12,8 +12,8 @@ import type { RiskCategoryRiskWeight, RiskWeight, RiskWeights, -} from '../../../../common/risk_engine'; -import { RiskCategories, RiskWeightTypes } from '../../../../common/risk_engine'; +} from '../../../../common/entity_analytics/risk_engine'; +import { RiskCategories, RiskWeightTypes } from '../../../../common/entity_analytics/risk_engine'; const RISK_CATEGORIES = Object.values(RiskCategories); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts index bb77d999aef4b..1822c038b7d1d 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/calculation.ts @@ -13,7 +13,7 @@ import { DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_CALCULATION_URL, } from '../../../../../common/constants'; -import { riskScoreCalculationRequestSchema } from '../../../../../common/risk_engine/risk_score_calculation/request_schema'; +import { riskScoreCalculationRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_calculation/request_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts index 09f6335077c86..9a525a5bae0d5 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.test.ts @@ -8,7 +8,10 @@ import { loggerMock } from '@kbn/logging-mocks'; import { RISK_SCORE_PREVIEW_URL } from '../../../../../common/constants'; -import { RiskCategories, RiskWeightTypes } from '../../../../../common/risk_engine'; +import { + RiskCategories, + RiskWeightTypes, +} from '../../../../../common/entity_analytics/risk_engine'; import { serverMock, requestContextMock, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts index eaf54cf5e5dea..13f3ee8a9df07 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/preview.ts @@ -14,7 +14,7 @@ import { DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_PREVIEW_URL, } from '../../../../../common/constants'; -import { riskScorePreviewRequestSchema } from '../../../../../common/risk_engine/risk_score_preview/request_schema'; +import { riskScorePreviewRequestSchema } from '../../../../../common/entity_analytics/risk_engine/risk_score_preview/request_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts index b2db9b348b55e..0fbb0ef2c8652 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/helpers.ts @@ -14,7 +14,7 @@ import { } from '@kbn/core/server'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/server'; -import type { Range } from '../../../../../common/risk_engine'; +import type { Range } from '../../../../../common/entity_analytics/risk_engine'; export const convertDateToISOString = (dateString: string): string => { const date = datemath.parse(dateString); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts index 61a733907fb38..a1539167bbaf4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/tasks/risk_scoring_task.ts @@ -18,7 +18,7 @@ import type { TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; -import type { AfterKeys, IdentifierType } from '../../../../../common/risk_engine'; +import type { AfterKeys, IdentifierType } from '../../../../../common/entity_analytics/risk_engine'; import type { StartPlugins } from '../../../../plugin'; import { type RiskScoreService, riskScoreServiceFactory } from '../risk_score_service'; import { RiskEngineDataClient } from '../../risk_engine/risk_engine_data_client'; @@ -31,7 +31,7 @@ import { } from './state'; import { INTERVAL, SCOPE, TIMEOUT, TYPE, VERSION } from './constants'; import { buildScopedInternalSavedObjectsClientUnsafe, convertRangeToISO } from './helpers'; -import { RiskScoreEntity } from '../../../../../common/risk_engine/types'; +import { RiskScoreEntity } from '../../../../../common/entity_analytics/risk_engine/types'; import { RISK_SCORE_EXECUTION_SUCCESS_EVENT, RISK_SCORE_EXECUTION_ERROR_EVENT, diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts index e767db0fe2318..acdb1982011d2 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts @@ -14,7 +14,7 @@ import type { Range, RiskEngineStatus, RiskScore, -} from '../../../common/risk_engine'; +} from '../../../common/entity_analytics/risk_engine'; export interface CalculateScoresParams { afterKeys: AfterKeys; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index ec01a2800dff8..4841ec9fed73d 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -109,7 +109,10 @@ import { import { AppFeaturesService } from './lib/app_features_service/app_features_service'; import { registerRiskScoringTask } from './lib/entity_analytics/risk_score/tasks/risk_scoring_task'; import { registerProtectionUpdatesNoteRoutes } from './endpoint/routes/protection_updates_note'; -import { latestRiskScoreIndexPattern, allRiskScoreIndexPattern } from '../common/risk_engine'; +import { + latestRiskScoreIndexPattern, + allRiskScoreIndexPattern, +} from '../common/entity_analytics/risk_engine'; import { isEndpointPackageV2 } from '../common/endpoint/utils/package_v2'; export type { SetupPlugins, StartPlugins, PluginSetup, PluginStart } from './plugin_contract'; diff --git a/x-pack/plugins/serverless_search/public/application/components/index_documents/documents.tsx b/x-pack/plugins/serverless_search/public/application/components/index_documents/documents.tsx new file mode 100644 index 0000000000000..8d719485973e4 --- /dev/null +++ b/x-pack/plugins/serverless_search/public/application/components/index_documents/documents.tsx @@ -0,0 +1,76 @@ +/* + * 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, { useEffect, useState } from 'react'; + +import { + DocumentList, + DocumentsOverview, + INDEX_DOCUMENTS_META_DEFAULT, +} from '@kbn/search-index-documents'; + +import { i18n } from '@kbn/i18n'; +import { useIndexDocumentSearch } from '../../hooks/api/use_index_documents'; +import { useIndexMappings } from '../../hooks/api/use_index_mappings'; + +const DEFAULT_PAGINATION = { + pageIndex: INDEX_DOCUMENTS_META_DEFAULT.pageIndex, + pageSize: INDEX_DOCUMENTS_META_DEFAULT.pageSize, + totalItemCount: INDEX_DOCUMENTS_META_DEFAULT.totalItemCount, +}; + +interface IndexDocumentsProps { + indexName: string; +} + +export const IndexDocuments: React.FC = ({ indexName }) => { + const [pagination, setPagination] = useState(DEFAULT_PAGINATION); + const [searchQuery, setSearchQuery] = useState(''); + const searchQueryCallback = (query: string) => { + setSearchQuery(query); + }; + const { results: indexDocuments, meta: documentsMeta } = useIndexDocumentSearch( + indexName, + pagination, + searchQuery + ); + + const { data: mappingData } = useIndexMappings(indexName); + + const docs = indexDocuments?.data ?? []; + + useEffect(() => { + setSearchQuery(''); + setPagination(DEFAULT_PAGINATION); + }, [indexName]); + return ( + + {docs.length === 0 && + i18n.translate('xpack.serverlessSearch.indexManagementTab.documents.noMappings', { + defaultMessage: 'No documents found for index', + })} + {docs?.length > 0 && ( + setPagination({ ...pagination, pageIndex })} + setDocsPerPage={(pageSize) => setPagination({ ...pagination, pageSize })} + /> + )} + + } + /> + ); +}; diff --git a/x-pack/plugins/serverless_search/public/application/components/index_documents/documents_tab.tsx b/x-pack/plugins/serverless_search/public/application/components/index_documents/documents_tab.tsx new file mode 100644 index 0000000000000..c71089b5f3b83 --- /dev/null +++ b/x-pack/plugins/serverless_search/public/application/components/index_documents/documents_tab.tsx @@ -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 { IndexDetailsTab } from '@kbn/index-management-plugin/common/constants'; +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { ServerlessSearchPluginStartDependencies } from '../../../types'; +import { IndexDocuments } from './documents'; + +export const createIndexOverviewContent = ( + core: CoreStart, + services: ServerlessSearchPluginStartDependencies +): IndexDetailsTab => { + return { + id: 'documents', + name: ( + + ), + order: 11, + renderTabContent: ({ index }) => { + const queryClient = new QueryClient(); + return ( + + + + + + + ); + }, + }; +}; diff --git a/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_documents.tsx b/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_documents.tsx new file mode 100644 index 0000000000000..7c95376b295d8 --- /dev/null +++ b/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_documents.tsx @@ -0,0 +1,47 @@ +/* + * 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 { Pagination } from '@elastic/eui'; +import { SearchHit } from '@kbn/es-types'; +import { pageToPagination, Paginate } from '@kbn/search-index-documents'; +import { useQuery } from '@tanstack/react-query'; +import { useKibanaServices } from '../use_kibana'; + +interface IndexDocuments { + meta: Pagination; + results: Paginate; +} +const DEFAULT_PAGINATION = { + from: 0, + has_more_hits_than_total: false, + size: 10, + total: 0, +}; +export const useIndexDocumentSearch = ( + indexName: string, + pagination: Omit, + searchQuery?: string +) => { + const { http } = useKibanaServices(); + const response = useQuery({ + queryKey: ['fetchIndexDocuments', pagination, searchQuery], + queryFn: async () => + http.post(`/internal/serverless_search/indices/${indexName}/search`, { + body: JSON.stringify({ + searchQuery, + }), + query: { + page: pagination.pageIndex, + size: pagination.pageSize, + }, + }), + }); + return { + results: response?.data?.results, + meta: pageToPagination(response?.data?.results?._meta?.page ?? DEFAULT_PAGINATION), + }; +}; diff --git a/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_mappings.tsx b/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_mappings.tsx new file mode 100644 index 0000000000000..28ee739bc6700 --- /dev/null +++ b/x-pack/plugins/serverless_search/public/application/hooks/api/use_index_mappings.tsx @@ -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 { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; +import { useQuery } from '@tanstack/react-query'; +import { useKibanaServices } from '../use_kibana'; + +export const useIndexMappings = (indexName: string) => { + const { http } = useKibanaServices(); + return useQuery({ + queryKey: ['fetchIndexMappings'], + queryFn: async () => + http.fetch( + `/internal/serverless_search/mappings/${indexName}` + ), + }); +}; diff --git a/x-pack/plugins/serverless_search/public/plugin.ts b/x-pack/plugins/serverless_search/public/plugin.ts index 4203925650385..f82af8390c9fc 100644 --- a/x-pack/plugins/serverless_search/public/plugin.ts +++ b/x-pack/plugins/serverless_search/public/plugin.ts @@ -24,6 +24,7 @@ import { ServerlessSearchPluginStart, ServerlessSearchPluginStartDependencies, } from './types'; +import { createIndexOverviewContent } from './application/components/index_documents/documents_tab'; export class ServerlessSearchPlugin implements @@ -80,14 +81,14 @@ export class ServerlessSearchPlugin return await renderApp(element, coreStart, { history, ...services }); }, }); - return {}; } public start( core: CoreStart, - { serverless, management, cloud, indexManagement }: ServerlessSearchPluginStartDependencies + services: ServerlessSearchPluginStartDependencies ): ServerlessSearchPluginStart { + const { serverless, management, cloud, indexManagement } = services; serverless.setProjectHome('/app/elasticsearch'); serverless.setSideNavComponent(createComponent(core, { serverless, cloud })); management.setIsSidebarEnabled(false); @@ -96,6 +97,10 @@ export class ServerlessSearchPlugin hideLinksTo: [appIds.MAINTENANCE_WINDOWS], }); indexManagement?.extensionsService.setIndexMappingsContent(createIndexMappingsContent(core)); + indexManagement?.extensionsService.addIndexDetailsTab( + createIndexOverviewContent(core, services) + ); + return {}; } diff --git a/x-pack/plugins/serverless_search/server/plugin.ts b/x-pack/plugins/serverless_search/server/plugin.ts index 6e6a90735ee23..e533ae6023380 100644 --- a/x-pack/plugins/serverless_search/server/plugin.ts +++ b/x-pack/plugins/serverless_search/server/plugin.ts @@ -28,6 +28,7 @@ import type { } from './types'; import { registerConnectorsRoutes } from './routes/connectors_routes'; import { registerTelemetryUsageCollector } from './collectors/connectors/telemetry'; +import { registerMappingRoutes } from './routes/mapping_routes'; export interface RouteDependencies { http: CoreSetup['http']; @@ -93,6 +94,7 @@ export class ServerlessSearchPlugin registerApiKeyRoutes(dependencies); registerConnectorsRoutes(dependencies); registerIndicesRoutes(dependencies); + registerMappingRoutes(dependencies); }); if (usageCollection) { diff --git a/x-pack/plugins/serverless_search/server/routes/indices_routes.ts b/x-pack/plugins/serverless_search/server/routes/indices_routes.ts index 9cac99f30ab31..7f165f13218f1 100644 --- a/x-pack/plugins/serverless_search/server/routes/indices_routes.ts +++ b/x-pack/plugins/serverless_search/server/routes/indices_routes.ts @@ -8,6 +8,8 @@ import { IndicesIndexState } from '@elastic/elasticsearch/lib/api/types'; import { schema } from '@kbn/config-schema'; +import { fetchSearchResults } from '@kbn/search-index-documents/lib'; +import { DEFAULT_DOCS_PER_PAGE } from '@kbn/search-index-documents/types'; import { fetchIndices } from '../lib/indices/fetch_indices'; import { RouteDependencies } from '../plugin'; @@ -72,6 +74,45 @@ export const registerIndicesRoutes = ({ router, security }: RouteDependencies) = }); } ); + + router.post( + { + path: '/internal/serverless_search/indices/{index_name}/search', + validate: { + body: schema.object({ + searchQuery: schema.string({ + defaultValue: '', + }), + }), + params: schema.object({ + index_name: schema.string(), + }), + query: schema.object({ + page: schema.number({ defaultValue: 0, min: 0 }), + size: schema.number({ + defaultValue: DEFAULT_DOCS_PER_PAGE, + min: 0, + }), + }), + }, + }, + async (context, request, response) => { + const client = (await context.core).elasticsearch.client.asCurrentUser; + const indexName = decodeURIComponent(request.params.index_name); + const searchQuery = request.body.searchQuery; + const { page = 0, size = DEFAULT_DOCS_PER_PAGE } = request.query; + const from = page * size; + + const searchResults = await fetchSearchResults(client, indexName, searchQuery, from, size); + + return response.ok({ + body: { + results: searchResults, + }, + headers: { 'content-type': 'application/json' }, + }); + } + ); }; function isHidden(index?: IndicesIndexState): boolean { diff --git a/x-pack/plugins/serverless_search/server/routes/mapping_routes.ts b/x-pack/plugins/serverless_search/server/routes/mapping_routes.ts new file mode 100644 index 0000000000000..bb6e22a1bd8fe --- /dev/null +++ b/x-pack/plugins/serverless_search/server/routes/mapping_routes.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 { schema } from '@kbn/config-schema'; +import { RouteDependencies } from '../plugin'; + +export const registerMappingRoutes = ({ router }: RouteDependencies) => { + router.get( + { + path: '/internal/serverless_search/mappings/{index_name}', + validate: { + params: schema.object({ + index_name: schema.string(), + }), + }, + }, + async (context, request, response) => { + const { client } = (await context.core).elasticsearch; + const mapping = await client.asCurrentUser.indices.getMapping({ + expand_wildcards: ['open'], + index: request.params.index_name, + }); + return response.ok({ + body: mapping[request.params.index_name], + headers: { 'content-type': 'application/json' }, + }); + } + ); +}; diff --git a/x-pack/plugins/serverless_search/tsconfig.json b/x-pack/plugins/serverless_search/tsconfig.json index 6e00a0f988c2d..e8cad3756b974 100644 --- a/x-pack/plugins/serverless_search/tsconfig.json +++ b/x-pack/plugins/serverless_search/tsconfig.json @@ -30,6 +30,7 @@ "@kbn/management-cards-navigation", "@kbn/core-elasticsearch-server", "@kbn/search-api-panels", + "@kbn/search-index-documents", "@kbn/serverless-search-settings", "@kbn/core-lifecycle-browser", "@kbn/react-kibana-context-theme", @@ -39,5 +40,6 @@ "@kbn/kibana-utils-plugin", "@kbn/index-management-plugin", "@kbn/usage-collection-plugin", + "@kbn/es-types", ] } diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts index 59e52d8cf6539..643b52202162b 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts @@ -7,7 +7,7 @@ import { act } from 'react-dom/test-utils'; -import { setupEnvironment, pageHelpers, nextTick } from './helpers'; +import { setupEnvironment, pageHelpers } from './helpers'; import { API_BASE_PATH } from '../../common'; import { PolicyForm } from '../../public/application/components/policy_form'; import { PolicyFormTestBed } from './helpers/policy_form.helpers'; @@ -39,12 +39,10 @@ describe('', () => { features: [{ name: 'kibana' }, { name: 'tasks' }], }); - testBed = await setup(httpSetup); - await act(async () => { - await nextTick(); - testBed.component.update(); + testBed = await setup(httpSetup); }); + testBed.component.update(); }); test('should set the correct page title', () => { @@ -64,12 +62,10 @@ describe('', () => { repositories: [{ name: 'this-is-a-new-repository' }], }); - testBed = await setup(httpSetup); - await act(async () => { - await nextTick(); - testBed.component.update(); + testBed = await setup(httpSetup); }); + testBed.component.update(); }); test('should show repository-not-found warning', () => { @@ -99,10 +95,7 @@ describe('', () => { test('should use the same Form component as the "" section', async () => { testBedPolicyAdd = await setupPolicyAdd(httpSetup); - await act(async () => { - await nextTick(); - testBedPolicyAdd.component.update(); - }); + testBedPolicyAdd.component.update(); const formEdit = testBed.component.find(PolicyForm); const formAdd = testBedPolicyAdd.component.find(PolicyForm); @@ -118,6 +111,28 @@ describe('', () => { expect(nameInput.props().disabled).toEqual(true); }); + test('should disable the repo and snapshot fields for managed policies', async () => { + httpRequestsMockHelpers.setGetPolicyResponse(POLICY_EDIT.name, { + policy: { + ...POLICY_EDIT, + isManagedPolicy: true, + }, + }); + + await act(async () => { + testBed = await setup(httpSetup); + }); + testBed.component.update(); + + const { find } = testBed; + + const snapshotInput = find('snapshotNameInput'); + expect(snapshotInput.props().disabled).toEqual(true); + + const repoSelect = find('repositorySelect'); + expect(repoSelect.props().disabled).toEqual(true); + }); + describe('form payload', () => { it('should send the correct payload with changed values', async () => { const { form, actions } = testBed; @@ -138,10 +153,7 @@ describe('', () => { form.setInputValue('expireAfterUnitSelect', EXPIRE_AFTER_UNIT); actions.clickNextButton(); - await act(async () => { - actions.clickSubmitButton(); - await nextTick(); - }); + actions.clickSubmitButton(); const { name, isManagedPolicy, schedule, repository, retention } = POLICY_EDIT; @@ -182,10 +194,7 @@ describe('', () => { form.setInputValue('expireAfterValueInput', EXPIRE_AFTER_VALUE); actions.clickNextButton(); - await act(async () => { - actions.clickSubmitButton(); - await nextTick(); - }); + actions.clickSubmitButton(); const { name, isManagedPolicy, schedule, repository, retention, snapshotName } = POLICY_EDIT; diff --git a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx index e98e0eaf52a8c..137296595dc43 100644 --- a/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/components/policy_form/steps/step_logistics.tsx @@ -273,6 +273,7 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ }} fullWidth data-test-subj="repositorySelect" + disabled={policy?.isManagedPolicy && isEditing} /> ); }; @@ -342,6 +343,7 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ } )} data-test-subj="snapshotNameInput" + disabled={policy?.isManagedPolicy && isEditing} /> diff --git a/x-pack/plugins/stack_connectors/common/experimental_features.ts b/x-pack/plugins/stack_connectors/common/experimental_features.ts index 4ac02dd9f06db..5e114524e0b19 100644 --- a/x-pack/plugins/stack_connectors/common/experimental_features.ts +++ b/x-pack/plugins/stack_connectors/common/experimental_features.ts @@ -16,7 +16,7 @@ export const allowedExperimentalValues = Object.freeze({ sentinelOneConnectorOn: false, }); -type ExperimentalConfigKeys = Array; +export type ExperimentalConfigKeys = Array; type Mutable = { -readonly [P in keyof T]: T[P] }; const allowedKeys = Object.keys(allowedExperimentalValues) as Readonly; diff --git a/x-pack/plugins/task_manager/server/task.ts b/x-pack/plugins/task_manager/server/task.ts index b00f06b6a2395..c71f8b42185ca 100644 --- a/x-pack/plugins/task_manager/server/task.ts +++ b/x-pack/plugins/task_manager/server/task.ts @@ -49,6 +49,7 @@ export type SuccessfulRunResult = { */ state: Record; taskRunError?: DecoratedError; + skipAttempts?: number; } & ( | // ensure a SuccessfulRunResult can either specify a new `runAt` or a new `schedule`, but not both { diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts index 90209f90877f8..393721f0fd814 100644 --- a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts +++ b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts @@ -2430,6 +2430,7 @@ describe('TaskManagerRunner', () => { asOk({ state: {}, taskRunError, + skipAttempts: 20, }) ); }); diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.ts index 191401b33b429..9c9ad88c1dfc5 100644 --- a/x-pack/plugins/task_manager/server/task_running/task_runner.ts +++ b/x-pack/plugins/task_manager/server/task_running/task_runner.ts @@ -349,13 +349,23 @@ export class TaskManagerRunner implements TaskRunner { } } - const result = taskParamsValidation?.error + const hasSkipError = !isUndefined(taskParamsValidation?.error); + let shouldSkip = false; + let shouldKeepSkipAttempts = false; + + if (hasSkipError) { + const reachedMaxSkipAttempts = this.hasReachedMaxSkipAttempts(modifiedContext.taskInstance); + shouldSkip = !reachedMaxSkipAttempts; + shouldKeepSkipAttempts = reachedMaxSkipAttempts; + } + + const result = shouldSkip ? taskParamsValidation : await this.executionContext.withContext(ctx, () => withSpan({ name: 'run', type: 'task manager' }, () => this.task!.run()) ); - const validatedResult = this.validateResult(result); + const validatedResult = this.validateResult(shouldKeepSkipAttempts, result); const processedResult = await withSpan({ name: 'process result', type: 'task manager' }, () => this.processResult(validatedResult, stopTaskTimer()) ); @@ -383,8 +393,7 @@ export class TaskManagerRunner implements TaskRunner { private validateTaskParams({ taskInstance }: RunContext) { let error; - const { state, taskType, params, id, numSkippedRuns = 0 } = taskInstance; - const { max_attempts: maxAttempts } = this.requeueInvalidTasksConfig; + const { state, taskType, params, id } = taskInstance; try { const paramsSchema = this.definition.paramsSchema; @@ -393,13 +402,7 @@ export class TaskManagerRunner implements TaskRunner { } } catch (err) { this.logger.warn(`Task (${taskType}/${id}) has a validation error: ${err.message}`); - if (numSkippedRuns < maxAttempts) { - error = createSkipError(err); - } else { - this.logger.warn( - `Task Manager has reached the max skip attempts for task ${taskType}/${id}` - ); - } + error = createSkipError(err); } return { ...(error ? { error } : {}), state }; @@ -418,8 +421,7 @@ export class TaskManagerRunner implements TaskRunner { private async validateIndirectTaskParams({ taskInstance }: RunContext) { let error; - const { state, taskType, id, numSkippedRuns = 0 } = taskInstance; - const { max_attempts: maxAttempts } = this.requeueInvalidTasksConfig; + const { state, taskType, id } = taskInstance; const indirectParamsSchema = this.definition.indirectParamsSchema; if (this.task?.loadIndirectParams && !!indirectParamsSchema) { @@ -433,13 +435,7 @@ export class TaskManagerRunner implements TaskRunner { this.logger.warn( `Task (${taskType}/${id}) has a validation error in its indirect params: ${err.message}` ); - if (numSkippedRuns < maxAttempts) { - error = createSkipError(err); - } else { - this.logger.warn( - `Task Manager has reached the max skip attempts for task ${taskType}/${id}` - ); - } + error = createSkipError(err); } } } @@ -577,11 +573,17 @@ export class TaskManagerRunner implements TaskRunner { } private validateResult( + shouldKeepSkipAttempts: boolean, result?: SuccessfulRunResult | FailedRunResult | void ): Result { return isFailedRunResult(result) ? asErr({ ...result, error: result.error }) - : asOk(result || EMPTY_RUN_RESULT); + : asOk({ + ...(result || EMPTY_RUN_RESULT), + ...(shouldKeepSkipAttempts + ? { skipAttempts: this.requeueInvalidTasksConfig.max_attempts } + : {}), + }); } private async releaseClaimAndIncrementAttempts(): Promise> { @@ -685,14 +687,14 @@ export class TaskManagerRunner implements TaskRunner { state, attempts = 0, skipAttempts, - }: SuccessfulRunResult & { attempts: number; skipAttempts: number }) => { + }: SuccessfulRunResult & { attempts: number }) => { const { startedAt, schedule, numSkippedRuns } = this.instance.task; const { taskRunError } = unwrap(result); let requeueInvalidTaskAttempts = skipAttempts || numSkippedRuns || 0; // Alerting TaskRunner returns SuccessResult even though there is an error // therefore we use "taskRunError" to be sure that there wasn't any error - if (isUndefined(skipAttempts) && taskRunError === undefined) { + if (isUndefined(skipAttempts) && isUndefined(taskRunError)) { requeueInvalidTaskAttempts = 0; } @@ -861,6 +863,18 @@ export class TaskManagerRunner implements TaskRunner { ? this.definition.maxAttempts : this.defaultMaxAttempts; } + + private hasReachedMaxSkipAttempts(taskInstance: ConcreteTaskInstance) { + const { taskType, id, numSkippedRuns = 0 } = taskInstance; + const { max_attempts: maxAttempts } = this.requeueInvalidTasksConfig; + + if (numSkippedRuns >= maxAttempts) { + this.logger.warn(`Task Manager has reached the max skip attempts for task ${taskType}/${id}`); + return true; + } + + return false; + } } function sanitizeInstance(instance: ConcreteTaskInstance): ConcreteTaskInstance { diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 777d78acb192f..a7098dae6a150 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -2865,6 +2865,12 @@ "description": "Total number of services utilizing the opentelemetry/swift agent within the last day" } }, + "opentelemetry/android": { + "type": "long", + "_meta": { + "description": "Total number of services utilizing the opentelemetry/android agent within the last day" + } + }, "opentelemetry/webjs": { "type": "long", "_meta": { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 512a0f74eaec4..b129680ed6c91 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -22087,7 +22087,6 @@ "xpack.lens.config.configFlyoutCallout": "ES|QL propose actuellement des options de configuration limitées", "xpack.lens.config.editLabel": "Modifier la configuration", "xpack.lens.config.editLinkLabel": "Modifier dans Lens", - "xpack.lens.config.experimentalLabel": "Version d'évaluation technique", "xpack.lens.configPanel.addLayerButton": "Ajouter un calque", "xpack.lens.configPanel.experimentalLabel": "Version d'évaluation technique", "xpack.lens.configPanel.loadFromLibrary": "Charger depuis la bibliothèque", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6dfa6e3ab9bab..1606d64b05224 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -22102,7 +22102,6 @@ "xpack.lens.config.configFlyoutCallout": "現在、ES|QLでは、構成オプションは限られています。", "xpack.lens.config.editLabel": "構成の編集", "xpack.lens.config.editLinkLabel": "Lensで編集", - "xpack.lens.config.experimentalLabel": "テクニカルプレビュー", "xpack.lens.configPanel.addLayerButton": "レイヤーを追加", "xpack.lens.configPanel.experimentalLabel": "テクニカルプレビュー", "xpack.lens.configPanel.loadFromLibrary": "ライブラリから読み込み", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 4547de925cb33..dfaaa19f0959d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -22101,7 +22101,6 @@ "xpack.lens.config.configFlyoutCallout": "ES|QL 当前提供的配置选项数量有限", "xpack.lens.config.editLabel": "编辑配置", "xpack.lens.config.editLinkLabel": "在 Lens 中编辑", - "xpack.lens.config.experimentalLabel": "技术预览", "xpack.lens.configPanel.addLayerButton": "添加图层", "xpack.lens.configPanel.experimentalLabel": "技术预览", "xpack.lens.configPanel.loadFromLibrary": "从库中加载", diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 4a5c665911495..88f3cce226a70 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -10,6 +10,8 @@ import getPort from 'get-port'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { FtrConfigProviderContext, findTestPluginPaths } from '@kbn/test'; import { getAllExternalServiceSimulatorPaths } from '@kbn/actions-simulators-plugin/server/plugin'; +import { ExperimentalConfigKeys } from '@kbn/stack-connectors-plugin/common/experimental_features'; +import { SENTINELONE_CONNECTOR_ID } from '@kbn/stack-connectors-plugin/common/sentinelone/constants'; import { services } from './services'; import { getTlsWebhookServerUrls } from './lib/get_tls_webhook_servers'; @@ -29,6 +31,7 @@ interface CreateTestConfigOptions { useDedicatedTaskRunner: boolean; enableFooterInEmail?: boolean; maxScheduledPerMinute?: number; + experimentalFeatures?: ExperimentalConfigKeys; } // test.not-enabled is specifically not enabled @@ -48,6 +51,7 @@ const enabledActionTypes = [ '.resilient', '.gen-ai', '.d3security', + SENTINELONE_CONNECTOR_ID, '.slack', '.slack_api', '.tines', @@ -85,6 +89,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) useDedicatedTaskRunner, enableFooterInEmail = true, maxScheduledPerMinute, + experimentalFeatures = [], } = options; return async ({ readConfigFile }: FtrConfigProviderContext) => { @@ -344,6 +349,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) '--xpack.task_manager.allow_reading_invalid_state=false', '--xpack.task_manager.requeue_invalid_tasks.enabled=true', '--xpack.actions.queued.max=500', + `--xpack.stack_connectors.enableExperimental=${JSON.stringify(experimentalFeatures)}`, ], }, }; diff --git a/x-pack/test/alerting_api_integration/common/lib/log_supertest_errors.ts b/x-pack/test/alerting_api_integration/common/lib/log_supertest_errors.ts new file mode 100644 index 0000000000000..d8b0034606293 --- /dev/null +++ b/x-pack/test/alerting_api_integration/common/lib/log_supertest_errors.ts @@ -0,0 +1,66 @@ +/* + * 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 SuperTest from 'supertest'; +import { ToolingLog } from '@kbn/tooling-log'; + +export interface LogErrorDetailsInterface { + (this: SuperTest.Test, err: Error & { response?: any }): SuperTest.Test; + ignoreCodes: ( + codes: number[] + ) => (this: SuperTest.Test, err: Error & { response?: SuperTest.Response }) => SuperTest.Test; +} + +/** + * Creates a logger that can be used with `supertest` to log details around errors + * + * @param log + * + * @example + * const errorLogger = createSupertestErrorLogger(log); + * supertestWithoutAuth + * .post(`some/url`) + * .on('error', errorLogger) //<< Add logger to `error` event + * .send({}) + */ +export const createSupertestErrorLogger = (log: ToolingLog): LogErrorDetailsInterface => { + /** + * Utility for use with `supertest` that logs errors with details returned by the API + * @param err + */ + const logErrorDetails: LogErrorDetailsInterface = function (err) { + if (err.response && (err.response.body || err.response.text)) { + let outputData = + 'RESPONSE:\n' + err.response.body + ? JSON.stringify(err.response.body, null, 2) + : err.response.text; + + if (err.response.request) { + const { url = '', method = '', _data = '' } = err.response.request; + + outputData += `\nREQUEST: + ${method} ${url} + ${JSON.stringify(_data, null, 2)} + `; + } + + log.error(outputData); + } + + return this ?? err; + }; + logErrorDetails.ignoreCodes = (codes) => { + return function (err) { + if (err.response && err.response.status && !codes.includes(err.response.status)) { + return logErrorDetails.call(this, err); + } + return this; + }; + }; + + return logErrorDetails; +}; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts index f999da061b90b..8f52f7c40d005 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts @@ -16,4 +16,5 @@ export default createTestConfig('security_and_spaces', { publicBaseUrl: true, testFiles: [require.resolve('./tests')], useDedicatedTaskRunner: true, + experimentalFeatures: ['sentinelOneConnectorOn'], }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts index 7aed7501bc012..56e99c4c2d5e4 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts @@ -16,4 +16,5 @@ export default createTestConfig('security_and_spaces', { publicBaseUrl: true, testFiles: [require.resolve('./tests')], useDedicatedTaskRunner: false, + experimentalFeatures: ['sentinelOneConnectorOn'], }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/bulk_enqueue.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/bulk_enqueue.ts index 589f31656736c..599f370122358 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/bulk_enqueue.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/bulk_enqueue.ts @@ -133,7 +133,8 @@ export default function ({ getService }: FtrProviderContext) { connectorId, outcome: 'failure', message: `action execution failure: test.system-action-kibana-privileges:${connectorId}: ${name}`, - errorMessage: 'Unauthorized to execute actions', + errorMessage: + 'Unauthorized to execute a "test.system-action-kibana-privileges" action', startDate, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts index e6336b7092087..77dce4971e9ed 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts @@ -16,4 +16,5 @@ export default createTestConfig('security_and_spaces', { publicBaseUrl: true, testFiles: [require.resolve('.')], useDedicatedTaskRunner: true, + experimentalFeatures: ['sentinelOneConnectorOn'], }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/sentinelone.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/sentinelone.ts new file mode 100644 index 0000000000000..87ec7de447945 --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/sentinelone.ts @@ -0,0 +1,240 @@ +/* + * 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 { + SENTINELONE_CONNECTOR_ID, + SUB_ACTION, +} from '@kbn/stack-connectors-plugin/common/sentinelone/constants'; +import { FeaturesPrivileges, Role } from '@kbn/security-plugin/common'; +import SuperTest from 'supertest'; +import expect from '@kbn/expect'; +import { getUrlPrefix } from '../../../../../common/lib'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; +import { createSupertestErrorLogger } from '../../../../../common/lib/log_supertest_errors'; + +// eslint-disable-next-line import/no-default-export +export default function createSentinelOneTests({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const securityService = getService('security'); + const log = getService('log'); + const logErrorDetails = createSupertestErrorLogger(log); + + describe('SentinelOne', () => { + describe('sub-actions authz', () => { + interface CreatedUser { + username: string; + password: string; + deleteUser: () => Promise; + } + + // SentinelOne supported sub-actions + const s1SubActions = [ + SUB_ACTION.KILL_PROCESS, + SUB_ACTION.GET_AGENTS, + SUB_ACTION.ISOLATE_HOST, + SUB_ACTION.RELEASE_HOST, + SUB_ACTION.GET_REMOTE_SCRIPT_STATUS, + SUB_ACTION.GET_REMOTE_SCRIPT_RESULTS, + ]; + + let connectorId: string; + + const createUser = async ({ + username, + password = 'changeme', + kibanaFeatures = { actions: ['all'] }, + }: { + username: string; + password?: string; + kibanaFeatures?: FeaturesPrivileges; + }): Promise => { + const role: Role = { + name: username, + elasticsearch: { + cluster: [], + indices: [], + run_as: [], + }, + kibana: [ + { + base: [], + feature: { + // Important: Saved Objects Managemnt should be set to `all` to ensure that authz + // is not defaulted to the check done against SO's for SentinelOne + savedObjectsManagement: ['all'], + ...kibanaFeatures, + }, + spaces: ['*'], + }, + ], + }; + + await securityService.role.create(role.name, { + kibana: role.kibana, + elasticsearch: role.elasticsearch, + }); + + await securityService.user.create(username, { + password: 'changeme', + full_name: role.name, + roles: [role.name], + }); + + return { + username, + password, + deleteUser: async () => { + await securityService.user.delete(role.name); + await securityService.role.delete(role.name); + }, + }; + }; + + before(async () => { + const response = await supertest + .post(`${getUrlPrefix('default')}/api/actions/connector`) + .set('kbn-xsrf', 'foo') + .on('error', logErrorDetails) + .send({ + name: 'My sub connector', + connector_type_id: SENTINELONE_CONNECTOR_ID, + config: { url: 'https://some.non.existent.com' }, + secrets: { token: 'abc-123' }, + }) + .expect(200); + + connectorId = response.body.id; + }); + + after(async () => { + if (connectorId) { + await supertest + .delete(`${getUrlPrefix('default')}/api/actions/connector/${connectorId}`) + .set('kbn-xsrf', 'true') + .send() + .expect(({ ok, status }) => { + // Should cover all success codes (ex. 204 (no content), 200, etc...) + if (!ok) { + throw new Error( + `Expected delete to return a status code in the 200, but got ${status}` + ); + } + }); + + connectorId = ''; + } + }); + + const executeSubAction = async ({ + subAction, + subActionParams, + expectedHttpCode = 200, + username = 'elastic', + password = 'changeme', + errorLogger = logErrorDetails, + }: { + supertest: SuperTest.SuperTest; + subAction: string; + subActionParams: Record; + expectedHttpCode?: number; + username?: string; + password?: string; + errorLogger?: (err: any) => void; + }) => { + return supertestWithoutAuth + .post(`${getUrlPrefix('default')}/api/actions/connector/${connectorId}/_execute`) + .set('kbn-xsrf', 'foo') + .on('error', errorLogger) + .auth(username, password) + .send({ + params: { + subAction, + subActionParams, + }, + }) + .expect(expectedHttpCode); + }; + + describe('and user has NO privileges', () => { + let user: CreatedUser; + + before(async () => { + user = await createUser({ + username: 'read_access_user', + kibanaFeatures: { actions: ['read'] }, + }); + }); + + after(async () => { + if (user) { + await user.deleteUser(); + } + }); + + for (const s1SubAction of s1SubActions) { + it(`should deny execute of ${s1SubAction}`, async () => { + const execRes = await executeSubAction({ + supertest: supertestWithoutAuth, + subAction: s1SubAction, + subActionParams: {}, + username: user.username, + password: user.password, + expectedHttpCode: 403, + errorLogger: logErrorDetails.ignoreCodes([403]), + }); + + expect(execRes.body).to.eql({ + statusCode: 403, + error: 'Forbidden', + message: 'Unauthorized to execute a ".sentinelone" action', + }); + }); + } + }); + + describe('and user has proper privileges', () => { + let user: CreatedUser; + + before(async () => { + user = await createUser({ + username: 'all_access_user', + }); + }); + + after(async () => { + if (user) { + await user.deleteUser(); + // @ts-expect-error + user = undefined; + } + }); + + for (const s1SubAction of s1SubActions) { + it(`should allow execute of ${s1SubAction}`, async () => { + const { + // eslint-disable-next-line @typescript-eslint/naming-convention + body: { status, message, connector_id }, + } = await executeSubAction({ + supertest: supertestWithoutAuth, + subAction: s1SubAction, + subActionParams: {}, + username: user.username, + password: user.password, + }); + + expect({ status, message, connector_id }).to.eql({ + status: 'error', + message: 'an error occurred while running the action', + connector_id: connectorId, + }); + }); + } + }); + }); + }); +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/execute.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/execute.ts index 8433570e08241..d12bc59aca4df 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/execute.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/execute.ts @@ -41,12 +41,13 @@ export default function ({ getService }: FtrProviderContext) { const { user, space } = scenario; describe(scenario.id, () => { it('should handle execute request appropriately', async () => { + const connectorTypeId = 'test.index-record'; const { body: createdAction } = await supertest .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - connector_type_id: 'test.index-record', + connector_type_id: connectorTypeId, config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -78,7 +79,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', - message: 'Unauthorized to execute actions', + message: `Unauthorized to execute a "${connectorTypeId}" action`, }); break; case 'global_read at space1': @@ -161,7 +162,7 @@ export default function ({ getService }: FtrProviderContext) { case 'space_1_all at space2': case 'space_1_all at space1': case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(403); + expect(response.statusCode).to.eql(403, response.text); expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', @@ -184,12 +185,13 @@ export default function ({ getService }: FtrProviderContext) { }); it('should handle execute request appropriately after action is updated', async () => { + const connectorTypeId = 'test.index-record'; const { body: createdAction } = await supertest .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - connector_type_id: 'test.index-record', + connector_type_id: connectorTypeId, config: { unencrypted: `This value shouldn't get encrypted`, }, @@ -235,7 +237,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', - message: 'Unauthorized to execute actions', + message: `Unauthorized to execute a "${connectorTypeId}" action`, }); break; case 'global_read at space1': @@ -286,7 +288,7 @@ export default function ({ getService }: FtrProviderContext) { case 'no_kibana_privileges at space1': case 'space_1_all_alerts_none_actions at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); + expect(response.statusCode).to.eql(403, response.text); expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', @@ -340,12 +342,13 @@ export default function ({ getService }: FtrProviderContext) { }); it('should handle execute request appropriately after changing config properties', async () => { + const connectorTypeId = '.email'; const { body: createdAction } = await supertest .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'test email action', - connector_type_id: '.email', + connector_type_id: connectorTypeId, config: { from: 'email-from-1@example.com', // this host is specifically added to allowedHosts in: @@ -397,7 +400,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', - message: 'Unauthorized to execute actions', + message: `Unauthorized to execute a "${connectorTypeId}" action`, }); break; case 'global_read at space1': @@ -416,12 +419,13 @@ export default function ({ getService }: FtrProviderContext) { let indexedRecord: any; let searchResult: any; const reference = `actions-execute-3:${user.username}`; + const connectorTypeId = 'test.authorization'; const { body: createdAction } = await supertest .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ name: 'My action', - connector_type_id: 'test.authorization', + connector_type_id: connectorTypeId, }) .expect(200); objectRemover.add(space.id, createdAction.id, 'action', 'actions'); @@ -448,7 +452,7 @@ export default function ({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', - message: 'Unauthorized to execute actions', + message: `Unauthorized to execute a "${connectorTypeId}" action`, }); break; case 'global_read at space1': @@ -528,7 +532,7 @@ export default function ({ getService }: FtrProviderContext) { case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(403); + expect(response.statusCode).to.eql(403, response.text); expect(response.body).to.eql({ statusCode: 403, error: 'Forbidden', @@ -542,7 +546,7 @@ export default function ({ getService }: FtrProviderContext) { */ case 'superuser at space1': case 'system_actions at space1': - expect(response.statusCode).to.eql(200); + expect(response.statusCode).to.eql(200, response.text); await validateSystemEventLog({ spaceId: space.id, 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 e9fc2cbeb7c00..dc1876d6e784b 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 @@ -32,6 +32,7 @@ export default function connectorsTests({ loadTestFile, getService }: FtrProvide loadTestFile(require.resolve('./connector_types/es_index_preconfigured')); loadTestFile(require.resolve('./connector_types/opsgenie')); loadTestFile(require.resolve('./connector_types/pagerduty')); + loadTestFile(require.resolve('./connector_types/sentinelone')); loadTestFile(require.resolve('./connector_types/server_log')); loadTestFile(require.resolve('./connector_types/slack_webhook')); loadTestFile(require.resolve('./connector_types/slack_api')); diff --git a/x-pack/test/api_integration/apis/ml/jobs/category_results.ts b/x-pack/test/api_integration/apis/ml/jobs/category_results.ts new file mode 100644 index 0000000000000..74c7fc0643e97 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/jobs/category_results.ts @@ -0,0 +1,243 @@ +/* + * 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 { Job, Datafeed } from '@kbn/ml-plugin/public/shared'; +import { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const esArchiver = getService('esArchiver'); + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + const catJobId = `test_top_cat`; + const catDatafeedId = `datafeed-${catJobId}`; + + const job: Job = { + job_id: catJobId, + description: '', + groups: [], + analysis_config: { + bucket_span: '15m', + detectors: [ + { + function: 'count', + by_field_name: 'mlcategory', + }, + ], + influencers: ['mlcategory'], + per_partition_categorization: { + enabled: false, + stop_on_warn: false, + }, + categorization_field_name: 'field3', + }, + data_description: { + time_field: '@timestamp', + }, + custom_settings: { + created_by: 'categorization-wizard', + }, + analysis_limits: { + model_memory_limit: '11MB', + }, + model_plot_config: { + enabled: false, + annotations_enabled: false, + }, + } as unknown as Job; + + const datafeed: Datafeed = { + datafeed_id: `datafeed-${catJobId}`, + job_id: catJobId, + indices: ['ft_categorization_small'], + query: { + bool: { + must: [ + { + match_all: {}, + }, + ], + }, + }, + runtime_mappings: {}, + } as unknown as Datafeed; + + const expectedTopCategories = { + total: 21, + categories: [ + { + category: { + job_id: catJobId, + category_id: 3, + terms: + 'failed to execute bulk item index index testing-twitter-pycon-realtime doc source n/a actual length max length', + regex: + '.*?failed.+?to.+?execute.+?bulk.+?item.+?index.+?index.+?testing-twitter-pycon-realtime.+?doc.+?source.+?n/a.+?actual.+?length.+?max.+?length.*', + max_matching_length: 1101, + examples: [ + '[0] failed to execute bulk item (index) index {[testing-twitter-pycon-realtime][_doc][1115075670953136128], source[n/a, actual length: [4.9kb], max length: 2kb]}\njava.lang.IllegalArgumentException: Limit of total fields [1000] in index [testing-twitter-pycon-realtime] has been exceeded\n\tat org.elasticsearch.index.mapper.MapperService.checkTotalFieldsLimit(MapperService.java:602) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:506) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:398) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:331) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:315) ~[elasticsearch-7.0.0-SNAPSHOT....', + ], + num_matches: 1, + result_type: 'category_definition', + mlcategory: '3', + }, + }, + { + category: { + job_id: catJobId, + category_id: 4, + terms: 'creating index cause api templates shards mappings doc', + regex: '.*?creating.+?index.+?cause.+?api.+?templates.+?shards.+?mappings.+?doc.*', + max_matching_length: 81, + examples: ['creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]'], + num_matches: 1, + result_type: 'category_definition', + mlcategory: '4', + }, + }, + { + category: { + job_id: catJobId, + category_id: 9, + terms: 'All shards failed for phase query', + regex: '.*?All.+?shards.+?failed.+?for.+?phase.+?query.*', + max_matching_length: 1101, + examples: [ + 'All shards failed for phase: [query]\norg.elasticsearch.ElasticsearchException$1: Result window is too large, from + size must be less than or equal to: [10000] but was [10644]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.\n\tat org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:639) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:137) [elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:259) [elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:105) [elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.action.search.InitialS...', + ], + num_matches: 1, + result_type: 'category_definition', + mlcategory: '9', + }, + }, + { + category: { + job_id: catJobId, + category_id: 8, + terms: 'snapshot pycon-twitter-daily-backup started', + regex: '.*?snapshot.+?pycon-twitter-daily-backup.+?started.*', + max_matching_length: 103, + examples: [ + 'snapshot [pycon-twitter-daily-backup:twitter_backup_2019_04_18/ozb2eoofSN6U0f1rmlNu5w] started', + 'snapshot [pycon-twitter-daily-backup:twitter_backup_2019_04_23/4KHfIKG8RTmZMqqjRT4Uzg] started', + 'snapshot [pycon-twitter-daily-backup:twitter_backup_2019_04_27/DzBfwnv8QgSBAgS_RcmGWQ] started', + 'snapshot [pycon-twitter-daily-backup:twitter_backup_2019_06_09/rcW_Y38MQIOBJXmDZcQR3w] started', + ], + num_matches: 4, + result_type: 'category_definition', + mlcategory: '8', + }, + }, + { + category: { + job_id: catJobId, + category_id: 5, + terms: 'INFO o.e.m.j.JvmGcMonitorService node-1 gc overhead spent collecting in the last', + regex: + '.*?INFO.+?o\\.e\\.m\\.j\\.JvmGcMonitorService.+?node-1.+?gc.+?overhead.+?spent.+?collecting.+?in.+?the.+?last.*', + max_matching_length: 149, + examples: [ + '[2019-04-09T11:35:03,788][INFO ][o.e.m.j.JvmGcMonitorService] [node-1] [gc][1203746] overhead, spent [264ms] collecting in the last [1s]', + '[2019-04-11T07:30:39,130][INFO ][o.e.m.j.JvmGcMonitorService] [node-1] [gc][1361831] overhead, spent [331ms] collecting in the last [1s]', + '[2019-04-12T02:12:49,374][INFO ][o.e.m.j.JvmGcMonitorService] [node-1] [gc][1429140] overhead, spent [269ms] collecting in the last [1s]', + '[2019-07-02T03:50:38,870][INFO ][o.e.m.j.JvmGcMonitorService] [node-1] [gc][8431305] overhead, spent [456ms] collecting in the last [1s]', + ], + num_matches: 4, + result_type: 'category_definition', + mlcategory: '5', + }, + }, + ], + }; + const expectedCategory3 = { + job_id: 'test_top_cat', + category_id: 3, + terms: + 'failed to execute bulk item index index testing-twitter-pycon-realtime doc source n/a actual length max length', + regex: + '.*?failed.+?to.+?execute.+?bulk.+?item.+?index.+?index.+?testing-twitter-pycon-realtime.+?doc.+?source.+?n/a.+?actual.+?length.+?max.+?length.*', + max_matching_length: 1101, + examples: [ + '[0] failed to execute bulk item (index) index {[testing-twitter-pycon-realtime][_doc][1115075670953136128], source[n/a, actual length: [4.9kb], max length: 2kb]}\njava.lang.IllegalArgumentException: Limit of total fields [1000] in index [testing-twitter-pycon-realtime] has been exceeded\n\tat org.elasticsearch.index.mapper.MapperService.checkTotalFieldsLimit(MapperService.java:602) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:506) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:398) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:331) ~[elasticsearch-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]\n\tat org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:315) ~[elasticsearch-7.0.0-SNAPSHOT....', + ], + grok_pattern: + '.*?%{NUMBER:field}.+?failed.+?to.+?execute.+?bulk.+?item.+?index.+?index.+?testing-twitter-pycon-realtime.+?doc.+?%{NUMBER:field2}.+?source.+?n/a.+?actual.+?length.+?max.+?length.+?%{NUMBER:field3}.*', + num_matches: 1, + result_type: 'category_definition', + mlcategory: '3', + }; + + async function runTopCategoriesRequest(jobId: string, count = 5) { + const { body, status } = await supertest + .post(`/internal/ml/jobs/top_categories`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(getCommonRequestHeader('1')) + .send({ jobId, count }); + ml.api.assertResponseStatusCode(200, status, body); + + return body; + } + + async function runGetCategoryRequest( + jobId: string, + categoryId: string, + expectedStatusCode = 200 + ) { + const { body, status } = await supertest + .get(`/internal/ml/anomaly_detectors/${jobId}/results/categories/${categoryId}`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(expectedStatusCode, status, body); + + return body; + } + + describe('Categorization job results', function () { + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/categorization_small'); + await ml.testResources.setKibanaTimeZoneToUTC(); + + await ml.api.createAnomalyDetectionJob(job); + await ml.api.createDatafeed(datafeed); + await ml.api.openAnomalyDetectionJob(job.job_id); + await ml.api.startDatafeed(catDatafeedId, { start: '0', end: String(Date.now()) }); + await ml.api.waitForDatafeedState(catDatafeedId, DATAFEED_STATE.STOPPED); + await ml.api.waitForJobState(catJobId, JOB_STATE.CLOSED); + }); + + after(async () => { + await ml.api.cleanMlIndices(); + await ml.testResources.cleanMLSavedObjects(); + }); + + it('should have the correct top categories', async () => { + const result = await runTopCategoriesRequest(catJobId); + expect(result).to.eql(expectedTopCategories); + }); + + it('should get the correct category', async () => { + const result = await runGetCategoryRequest(catJobId, '3'); + expect(result.count).to.eql(1); + expect(result.categories[0]).to.eql(expectedCategory3); + }); + + it('should not find the category ID', async () => { + await runGetCategoryRequest('no-job', '3', 404); + }); + + it('should not find a category', async () => { + const result = await runGetCategoryRequest(catJobId, '9999'); + expect(result.count).to.eql(0); + expect(result.categories.length).to.eql(0); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/jobs/index.ts b/x-pack/test/api_integration/apis/ml/jobs/index.ts index db77a733bce2f..465c13a4eb6f7 100644 --- a/x-pack/test/api_integration/apis/ml/jobs/index.ts +++ b/x-pack/test/api_integration/apis/ml/jobs/index.ts @@ -26,5 +26,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./jobs')); loadTestFile(require.resolve('./reset')); loadTestFile(require.resolve('./update_groups')); + loadTestFile(require.resolve('./category_results')); }); } diff --git a/x-pack/test/apm_api_integration/tests/error_rate/service_maps.spec.ts b/x-pack/test/apm_api_integration/tests/error_rate/service_maps.spec.ts index 4207d9ea5c4a4..af07dd52adf03 100644 --- a/x-pack/test/apm_api_integration/tests/error_rate/service_maps.spec.ts +++ b/x-pack/test/apm_api_integration/tests/error_rate/service_maps.spec.ts @@ -140,7 +140,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(() => synthtraceEsClient.clean()); - describe('compare latency value between service inventory and service maps', () => { + // FLAKY: https://github.com/elastic/kibana/issues/172772 + describe.skip('compare latency value between service inventory and service maps', () => { before(async () => { [errorTransactionValues, errorRateMetricValues] = await Promise.all([ getErrorRateValues('transaction'), diff --git a/x-pack/test/apm_api_integration/tests/index.ts b/x-pack/test/apm_api_integration/tests/index.ts index 10913f7bdac22..c8eec324f4bd7 100644 --- a/x-pack/test/apm_api_integration/tests/index.ts +++ b/x-pack/test/apm_api_integration/tests/index.ts @@ -26,8 +26,10 @@ function getGlobPattern() { export default function apmApiIntegrationTests({ getService, loadTestFile }: FtrProviderContext) { const registry = getService('registry'); - // FLAKY: https://github.com/elastic/kibana/issues/172772 - describe.skip('APM API tests', function () { + // DO NOT SKIP + // Skipping here will skip the entire apm api test suite + // Instead skip (flaky) tests individually + describe('APM API tests', function () { const filePattern = getGlobPattern(); const tests = globby.sync(filePattern, { cwd }); diff --git a/x-pack/test/apm_api_integration/tests/inspect/inspect.spec.ts b/x-pack/test/apm_api_integration/tests/inspect/inspect.spec.ts index c4e10fb877817..155fbf2d959e4 100644 --- a/x-pack/test/apm_api_integration/tests/inspect/inspect.spec.ts +++ b/x-pack/test/apm_api_integration/tests/inspect/inspect.spec.ts @@ -10,7 +10,7 @@ import { FtrProviderContext } from '../../common/ftr_provider_context'; import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata'; -export default function customLinksTests({ getService }: FtrProviderContext) { +export default function inspectFlagTests({ getService }: FtrProviderContext) { const registry = getService('registry'); const apmApiClient = getService('apmApiClient'); @@ -64,7 +64,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) { }); }); - describe('elasticsearch calls made with internal user are not return', () => { + describe('elasticsearch calls made with internal user should not leak internal queries', () => { it('for custom links', async () => { const { status, body } = await apmApiClient.readUser({ endpoint: 'GET /internal/apm/settings/custom_links', @@ -92,7 +92,9 @@ export default function customLinksTests({ getService }: FtrProviderContext) { }); expect(status).to.be(200); - expect(body._inspect).to.eql([]); + expect(body._inspect?.map((res) => res.stats?.indexPattern.value)).to.eql([ + ['metrics-apm*', 'apm-*'], + ]); }); }); }); diff --git a/x-pack/test/apm_api_integration/tests/settings/agent_configuration/add_agent_config_metrics.ts b/x-pack/test/apm_api_integration/tests/settings/agent_configuration/add_agent_config_metrics.ts index 23980e3636f1b..b2fe4fd609996 100644 --- a/x-pack/test/apm_api_integration/tests/settings/agent_configuration/add_agent_config_metrics.ts +++ b/x-pack/test/apm_api_integration/tests/settings/agent_configuration/add_agent_config_metrics.ts @@ -4,31 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { timerange, observer } from '@kbn/apm-synthtrace-client'; +import { observer } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import { Readable } from 'stream'; -export async function addAgentConfigMetrics({ +export function addAgentConfigEtagMetric({ synthtraceEsClient, - start, - end, + timestamp, etag, }: { synthtraceEsClient: ApmSynthtraceEsClient; - start: number; - end: number; - etag?: string; + timestamp: number; + etag: string; }) { - const agentConfigEvents = [ - timerange(start, end) - .interval('1m') - .rate(1) - .generator((timestamp) => - observer() - .agentConfig() - .etag(etag ?? 'test-etag') - .timestamp(timestamp) - ), - ]; - - await synthtraceEsClient.index(agentConfigEvents); + const agentConfigMetric = observer().agentConfig().etag(etag).timestamp(timestamp); + return synthtraceEsClient.index(Readable.from([agentConfigMetric])); } diff --git a/x-pack/test/apm_api_integration/tests/settings/agent_configuration/agent_configuration.spec.ts b/x-pack/test/apm_api_integration/tests/settings/agent_configuration/agent_configuration.spec.ts index a0d35c74013f1..f9765cc258506 100644 --- a/x-pack/test/apm_api_integration/tests/settings/agent_configuration/agent_configuration.spec.ts +++ b/x-pack/test/apm_api_integration/tests/settings/agent_configuration/agent_configuration.spec.ts @@ -12,9 +12,8 @@ import { omit, orderBy } from 'lodash'; import { AgentConfigurationIntake } from '@kbn/apm-plugin/common/agent_configuration/configuration_types'; import { AgentConfigSearchParams } from '@kbn/apm-plugin/server/routes/settings/agent_configuration/route'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; -import moment from 'moment'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { addAgentConfigMetrics } from './add_agent_config_metrics'; +import { addAgentConfigEtagMetric } from './add_agent_config_metrics'; export default function agentConfigurationTests({ getService }: FtrProviderContext) { const registry = getService('registry'); @@ -396,9 +395,7 @@ export default function agentConfigurationTests({ getService }: FtrProviderConte settings: { transaction_sample_rate: '0.9' }, }; - let agentConfiguration: - | APIReturnType<'GET /api/apm/settings/agent-configuration/view 2023-10-31'> - | undefined; + let agentConfiguration: APIReturnType<'GET /api/apm/settings/agent-configuration/view 2023-10-31'>; before(async () => { log.debug('creating agent configuration'); @@ -412,19 +409,15 @@ export default function agentConfigurationTests({ getService }: FtrProviderConte }); it(`should have 'applied_by_agent=false' when there are no agent config metrics for this etag`, async () => { - expect(agentConfiguration?.applied_by_agent).to.be(false); + expect(agentConfiguration.applied_by_agent).to.be(false); }); describe('when there are agent config metrics for this etag', () => { before(async () => { - const start = new Date().getTime(); - const end = moment(start).add(15, 'minutes').valueOf(); - - await addAgentConfigMetrics({ + await addAgentConfigEtagMetric({ synthtraceEsClient, - start, - end, - etag: agentConfiguration?.etag, + timestamp: Date.now(), + etag: agentConfiguration.etag, }); }); diff --git a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts b/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts index 47c4d7ecd9f7b..7d8cc253fa0e2 100644 --- a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts +++ b/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts @@ -162,14 +162,14 @@ export default function (providerContext: FtrProviderContext) { .expect(400); }); - it('should return a 400 if the policy_id is not a valid policy', async () => { + it('should return a 404 if the policy_id does not exist', async () => { const { body: apiResponse } = await supertest .post(`/api/fleet/enrollment_api_keys`) .set('kbn-xsrf', 'xxx') .send({ policy_id: 'idonotexists', }) - .expect(400); + .expect(404); expect(apiResponse.message).to.be('Agent policy "idonotexists" not found'); }); @@ -223,11 +223,11 @@ export default function (providerContext: FtrProviderContext) { policy_id: 'policy1', name: 'something', }) - .expect(400); + .expect(409); expect(noSpacesDupe).to.eql({ - statusCode: 400, - error: 'Bad Request', + statusCode: 409, + error: 'Conflict', message: 'An enrollment key named something already exists for agent policy policy1', }); @@ -238,10 +238,10 @@ export default function (providerContext: FtrProviderContext) { policy_id: 'policy1', name: 'something else', }) - .expect(400); + .expect(409); expect(hasSpacesDupe).to.eql({ - statusCode: 400, - error: 'Bad Request', + statusCode: 409, + error: 'Conflict', message: 'An enrollment key named something else already exists for agent policy policy1', }); }); diff --git a/x-pack/test/fleet_api_integration/apis/epm/data_views.ts b/x-pack/test/fleet_api_integration/apis/epm/data_views.ts index 1fc5e660dbc57..5a0753fb321b4 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/data_views.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/data_views.ts @@ -51,6 +51,24 @@ export default function (providerContext: FtrProviderContext) { await Promise.all(testPkgs.map((pkg) => uninstallPackage(pkg.name, pkg.version))); }); + describe('with single integration installation', async () => { + it('creates global data views for logs-* and metrics-*', async () => { + await installPackage(testPkgs[0].name, testPkgs[0].version); + const dataViews: any[] = await listDataViews(); + + expect(dataViews).to.have.length(2); + const logsDataView = dataViews.find(({ title }) => title === 'logs-*'); + const metricsDataView = dataViews.find(({ title }) => title === 'metrics-*'); + + expect(logsDataView).to.be.ok(); + expect(metricsDataView).to.be.ok(); + + // Each data view should be available in all spaces + expect(logsDataView.namespaces).to.contain('*'); + expect(metricsDataView.namespaces).to.contain('*'); + }); + }); + describe('with subsequent integration installation', async () => { it('does not recreate managed data views', async () => { await installPackage(testPkgs[0].name, testPkgs[0].version); diff --git a/x-pack/test/functional/apps/discover/saved_queries.ts b/x-pack/test/functional/apps/discover/saved_queries.ts index 66ceb0dd974df..2795ce3beafd6 100644 --- a/x-pack/test/functional/apps/discover/saved_queries.ts +++ b/x-pack/test/functional/apps/discover/saved_queries.ts @@ -5,6 +5,7 @@ * 2.0. */ +import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { @@ -12,6 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const spaces = getService('spaces'); + const toasts = getService('toasts'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -71,6 +73,27 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); await savedQueryManagementComponent.savedQueryMissingOrFail(savedQueryName); }); + + it('updates a saved query', async () => { + // Navigate to Discover & create a saved query + await PageObjects.common.navigateToApp('discover'); + await queryBar.setQuery('response:200'); + await savedQueryManagementComponent.saveNewQuery(savedQueryName, '', true, false); + await savedQueryManagementComponent.savedQueryExistOrFail(savedQueryName); + await savedQueryManagementComponent.closeSavedQueryManagementComponent(); + + // Navigate to Discover & create a saved query + await queryBar.setQuery('response:404'); + await savedQueryManagementComponent.updateCurrentlyLoadedQuery('', true, false); + + // Expect to see a success toast + const successToast = await toasts.getToastElement(1); + const successText = await successToast.getVisibleText(); + expect(successText).to.equal(`Your query "${savedQueryName}" was saved`); + + await PageObjects.common.navigateToApp('discover'); + await savedQueryManagementComponent.deleteSavedQuery(savedQueryName); + }); }); }); } diff --git a/x-pack/test/functional/apps/lens/group4/chart_data.ts b/x-pack/test/functional/apps/lens/group4/chart_data.ts index 9bcd237306920..9d43abd4ac650 100644 --- a/x-pack/test/functional/apps/lens/group4/chart_data.ts +++ b/x-pack/test/functional/apps/lens/group4/chart_data.ts @@ -52,19 +52,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { { name: '__other__', value: 5722.77 }, ]; - function assertMatchesExpectedData(state: DebugState) { + function assertMatchesExpectedData(state: DebugState | undefined) { expect( - state.bars![0].bars.map((bar) => ({ + state?.bars![0].bars.map((bar) => ({ x: bar.x, y: Math.floor(bar.y * 100) / 100, })) ).to.eql(expectedData); } - function assertMatchesExpectedPieData(state: DebugState) { + function assertMatchesExpectedPieData(state: DebugState | undefined) { expect( state - .partition![0].partitions.map((partition) => ({ + ?.partition![0].partitions.map((partition) => ({ name: partition.name, value: Math.floor(partition.value * 100) / 100, })) @@ -74,37 +74,33 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should render xy chart', async () => { const data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); - assertMatchesExpectedData(data!); + assertMatchesExpectedData(data); }); it('should render pie chart', async () => { await PageObjects.lens.switchToVisualization('pie'); const data = await PageObjects.lens.getCurrentChartDebugState('partitionVisChart'); - assertMatchesExpectedPieData(data!); + assertMatchesExpectedPieData(data); }); it('should render donut chart', async () => { await PageObjects.lens.switchToVisualization('donut'); const data = await PageObjects.lens.getCurrentChartDebugState('partitionVisChart'); - assertMatchesExpectedPieData(data!); + assertMatchesExpectedPieData(data); }); it('should render treemap chart', async () => { await PageObjects.lens.switchToVisualization('treemap', 'treemap'); const data = await PageObjects.lens.getCurrentChartDebugState('partitionVisChart'); - assertMatchesExpectedPieData(data!); + assertMatchesExpectedPieData(data); }); it('should render heatmap chart', async () => { await PageObjects.lens.switchToVisualization('heatmap', 'heat'); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert axes - expect(debugState.axes!.x[0].labels).to.eql([ + expect(debugState?.axes!.x[0].labels).to.eql([ '97.220.3.248', '169.228.188.120', '78.83.247.30', @@ -112,18 +108,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '93.28.27.24', 'Other', ]); - expect(debugState.axes!.y[0].labels).to.eql(['']); + expect(debugState?.axes!.y[0].labels).to.eql(['']); // assert cells - expect(debugState.heatmap!.cells.length).to.eql(6); + expect(debugState?.heatmap!.cells.length).to.eql(6); // assert legend - expect(debugState.legend!.items).to.eql([ - { color: '#6092c0', key: '5,722.77 - 8,529.22', name: '5,722.77 - 8,529.22' }, - { color: '#a8bfda', key: '8,529.22 - 11,335.66', name: '8,529.22 - 11,335.66' }, - { color: '#ebeff5', key: '11,335.66 - 14,142.11', name: '11,335.66 - 14,142.11' }, - { color: '#ecb385', key: '14,142.11 - 16,948.55', name: '14,142.11 - 16,948.55' }, - { color: '#e7664c', key: '≥ 16,948.55', name: '≥ 16,948.55' }, + expect(debugState?.legend!.items).to.eql([ + { key: '5,722.775 - 8,529.22', name: '5,722.775 - 8,529.22', color: '#6092c0' }, + { key: '8,529.22 - 11,335.665', name: '8,529.22 - 11,335.665', color: '#a8bfda' }, + { key: '11,335.665 - 14,142.11', name: '11,335.665 - 14,142.11', color: '#ebeff5' }, + { key: '14,142.11 - 16,948.555', name: '14,142.11 - 16,948.555', color: '#ecb385' }, + { key: '≥ 16,948.555', name: '≥ 16,948.555', color: '#e7664c' }, ]); }); diff --git a/x-pack/test/functional/apps/lens/group4/tsdb.ts b/x-pack/test/functional/apps/lens/group4/tsdb.ts index 745592a02cb1d..730318f33db97 100644 --- a/x-pack/test/functional/apps/lens/group4/tsdb.ts +++ b/x-pack/test/functional/apps/lens/group4/tsdb.ts @@ -224,13 +224,13 @@ function getDataMapping( return dataStreamMapping; } -function sumFirstNValues(n: number, bars: Array<{ y: number }>): number { +function sumFirstNValues(n: number, bars: Array<{ y: number }> | undefined): number { const indexes = Array(n) .fill(1) .map((_, i) => i); let countSum = 0; for (const index of indexes) { - if (bars[index]) { + if (bars?.[index]) { countSum += bars[index].y; } } @@ -816,29 +816,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.waitForVisualization('xyVisChart'); const data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); - const counterBars = data.bars![0].bars; - const countBars = data.bars![1].bars; + const counterBars = data?.bars![0].bars; + const countBars = data?.bars![1].bars; log.info('Check counter data before the upgrade'); // check there's some data before the upgrade - expect(counterBars[0].y).to.eql(5000); + expect(counterBars?.[0].y).to.eql(5000); log.info('Check counter data after the upgrade'); // check there's some data after the upgrade - expect(counterBars[counterBars.length - 1].y).to.eql(5000); + expect(counterBars?.[counterBars.length - 1].y).to.eql(5000); // due to the flaky nature of exact check here, we're going to relax it // as long as there's data before and after it is ok log.info('Check count before the upgrade'); - const columnsToCheck = countBars.length / 2; + const columnsToCheck = countBars ? countBars.length / 2 : 0; // Before the upgrade the count is N times the indexes expect(sumFirstNValues(columnsToCheck, countBars)).to.be.greaterThan( indexes.length * TEST_DOC_COUNT - 1 ); log.info('Check count after the upgrade'); // later there are only documents for the upgraded stream - expect(sumFirstNValues(columnsToCheck, [...countBars].reverse())).to.be.greaterThan( - TEST_DOC_COUNT - 1 - ); + expect( + sumFirstNValues(columnsToCheck, [...(countBars ?? [])].reverse()) + ).to.be.greaterThan(TEST_DOC_COUNT - 1); }); }); }); @@ -911,8 +911,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.waitForVisualization('xyVisChart'); const data = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); - const bars = data.bars![0].bars; - const columnsToCheck = bars.length / 2; + const bars = data?.bars![0].bars; + const columnsToCheck = bars ? bars.length / 2 : 0; // due to the flaky nature of exact check here, we're going to relax it // as long as there's data before and after it is ok log.info('Check count before the downgrade'); @@ -922,7 +922,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); log.info('Check count after the downgrade'); // later there are only documents for the upgraded stream - expect(sumFirstNValues(columnsToCheck, [...bars].reverse())).to.be.greaterThan( + expect(sumFirstNValues(columnsToCheck, [...(bars ?? [])].reverse())).to.be.greaterThan( TEST_DOC_COUNT - 1 ); }); @@ -952,8 +952,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.waitForVisualization('xyVisChart'); const dataBefore = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); - const barsBefore = dataBefore.bars![0].bars; - expect(barsBefore.some(({ y }) => y)).to.eql(true); + const barsBefore = dataBefore?.bars![0].bars; + expect(barsBefore?.some(({ y }) => y)).to.eql(true); // check after the downgrade await PageObjects.lens.goToTimeRange( @@ -969,8 +969,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.waitForVisualization('xyVisChart'); const dataAfter = await PageObjects.lens.getCurrentChartDebugState('xyVisChart'); - const barsAfter = dataAfter.bars![0].bars; - expect(barsAfter.some(({ y }) => y)).to.eql(true); + const barsAfter = dataAfter?.bars![0].bars; + expect(barsAfter?.some(({ y }) => y)).to.eql(true); }); }); }); diff --git a/x-pack/test/functional/apps/lens/group5/heatmap.ts b/x-pack/test/functional/apps/lens/group5/heatmap.ts index 3e37ce65cc5bc..26e77578f4545 100644 --- a/x-pack/test/functional/apps/lens/group5/heatmap.ts +++ b/x-pack/test/functional/apps/lens/group5/heatmap.ts @@ -40,12 +40,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.lens.switchToVisualization('heatmap', 'heat'); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert axes - expect(debugState.axes!.x[0].labels).to.eql([ + expect(debugState?.axes!.x[0].labels).to.eql([ '97.220.3.248', '169.228.188.120', '78.83.247.30', @@ -53,18 +49,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '93.28.27.24', 'Other', ]); - expect(debugState.axes!.y[0].labels).to.eql(['']); + expect(debugState?.axes!.y[0].labels).to.eql(['']); // assert cells - expect(debugState.heatmap!.cells.length).to.eql(6); + expect(debugState?.heatmap!.cells.length).to.eql(6); // assert legend - expect(debugState.legend!.items).to.eql([ - { key: '5,722.77 - 8,529.22', name: '5,722.77 - 8,529.22', color: '#6092c0' }, - { key: '8,529.22 - 11,335.66', name: '8,529.22 - 11,335.66', color: '#a8bfda' }, - { key: '11,335.66 - 14,142.11', name: '11,335.66 - 14,142.11', color: '#ebeff5' }, - { key: '14,142.11 - 16,948.55', name: '14,142.11 - 16,948.55', color: '#ecb385' }, - { key: '≥ 16,948.55', name: '≥ 16,948.55', color: '#e7664c' }, + expect(debugState?.legend!.items).to.eql([ + { key: '5,722.775 - 8,529.22', name: '5,722.775 - 8,529.22', color: '#6092c0' }, + { key: '8,529.22 - 11,335.665', name: '8,529.22 - 11,335.665', color: '#a8bfda' }, + { key: '11,335.665 - 14,142.11', name: '11,335.665 - 14,142.11', color: '#ebeff5' }, + { key: '14,142.11 - 16,948.555', name: '14,142.11 - 16,948.555', color: '#ecb385' }, + { key: '≥ 16,948.555', name: '≥ 16,948.555', color: '#e7664c' }, ]); }); @@ -80,17 +76,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert legend has changed - expect(debugState.legend!.items).to.eql([ - { key: '7,126 - 8,529.22', name: '7,126 - 8,529.22', color: '#6092c0' }, - { key: '8,529.22 - 11,335.66', name: '8,529.22 - 11,335.66', color: '#a8bfda' }, - { key: '11,335.66 - 14,142.11', name: '11,335.66 - 14,142.11', color: '#ebeff5' }, - { key: '14,142.11 - 16,948.55', name: '14,142.11 - 16,948.55', color: '#ecb385' }, - { key: '≥ 16,948.55', name: '≥ 16,948.55', color: '#e7664c' }, + expect(debugState?.legend!.items).to.eql([ + { key: '7,125.997 - 8,529.22', name: '7,125.997 - 8,529.22', color: '#6092c0' }, + { key: '8,529.22 - 11,335.665', name: '8,529.22 - 11,335.665', color: '#a8bfda' }, + { key: '11,335.665 - 14,142.11', name: '11,335.665 - 14,142.11', color: '#ebeff5' }, + { key: '14,142.11 - 16,948.555', name: '14,142.11 - 16,948.555', color: '#ecb385' }, + { key: '≥ 16,948.555', name: '≥ 16,948.555', color: '#e7664c' }, ]); }); @@ -98,12 +90,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('lnsPalettePanel_dynamicColoring_rangeType_groups_number'); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert legend has changed - expect(debugState.legend!.items).to.eql([ + expect(debugState?.legend!.items).to.eql([ { key: '7,125.99 - 8,529.2', name: '7,125.99 - 8,529.2', color: '#6092c0' }, { key: '8,529.2 - 11,335.66', name: '8,529.2 - 11,335.66', color: '#a8bfda' }, { key: '11,335.66 - 14,142.1', name: '11,335.66 - 14,142.1', color: '#ebeff5' }, @@ -123,12 +111,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert legend has changed - expect(debugState.legend!.items).to.eql([ + expect(debugState?.legend!.items).to.eql([ { key: '0 - 8,529.2', name: '0 - 8,529.2', color: '#6092c0' }, { key: '8,529.2 - 11,335.66', name: '8,529.2 - 11,335.66', color: '#a8bfda' }, { key: '11,335.66 - 14,142.1', name: '11,335.66 - 14,142.1', color: '#ebeff5' }, @@ -137,22 +121,40 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); }); + it('should reflect the apply stop value without rounding', async () => { + // target item is 5722.774804505345 + // so set a value slightly lower which can be rounded + await testSubjects.setValue('lnsPalettePanel_dynamicColoring_range_value_0', '5722.7747', { + clearWithKeyboard: true, + }); + const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); + + // assert legend has a rounded value + expect(debugState?.legend!.items).to.eql([ + { key: '5,722.775 - 8,529.2', name: '5,722.775 - 8,529.2', color: '#6092c0' }, + { key: '8,529.2 - 11,335.66', name: '8,529.2 - 11,335.66', color: '#a8bfda' }, + { key: '11,335.66 - 14,142.1', name: '11,335.66 - 14,142.1', color: '#ebeff5' }, + { key: '14,142.1 - 16,948.55', name: '14,142.1 - 16,948.55', color: '#ecb385' }, + { key: '≥ 16,948.55', name: '≥ 16,948.55', color: '#e7664c' }, + ]); + // assert the cell has the correct coloring despite the legend rounding + expect(debugState?.heatmap!.cells[debugState.heatmap!.cells.length - 1].fill).to.be( + 'rgba(96, 146, 192, 1)' // rgba version of #6092c0 + ); + }); + it('should reset stop numbers when changing palette', async () => { await PageObjects.lens.changePaletteTo('status'); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert legend has changed - expect(debugState.legend!.items).to.eql([ - { key: '5,722.77 - 8,529.22', name: '5,722.77 - 8,529.22', color: '#209280' }, - { key: '8,529.22 - 11,335.66', name: '8,529.22 - 11,335.66', color: '#54b399' }, - { key: '11,335.66 - 14,142.11', name: '11,335.66 - 14,142.11', color: '#d6bf57' }, - { key: '14,142.11 - 16,948.55', name: '14,142.11 - 16,948.55', color: '#e7664c' }, - { key: '≥ 16,948.55', name: '≥ 16,948.55', color: '#cc5642' }, + expect(debugState?.legend!.items).to.eql([ + { key: '5,722.775 - 8,529.22', name: '5,722.775 - 8,529.22', color: '#209280' }, + { key: '8,529.22 - 11,335.665', name: '8,529.22 - 11,335.665', color: '#54b399' }, + { key: '11,335.665 - 14,142.11', name: '11,335.665 - 14,142.11', color: '#d6bf57' }, + { key: '14,142.11 - 16,948.555', name: '14,142.11 - 16,948.555', color: '#e7664c' }, + { key: '≥ 16,948.555', name: '≥ 16,948.555', color: '#cc5642' }, ]); }); @@ -161,17 +163,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert legend has not changed - expect(debugState.legend!.items).to.eql([ - { key: '5,722.77 - 8,529.22', name: '5,722.77 - 8,529.22', color: '#209280' }, - { key: '8,529.22 - 11,335.66', name: '8,529.22 - 11,335.66', color: '#54b399' }, - { key: '11,335.66 - 14,142.11', name: '11,335.66 - 14,142.11', color: '#d6bf57' }, - { key: '14,142.11 - 16,948.55', name: '14,142.11 - 16,948.55', color: '#e7664c' }, - { key: '≥ 16,948.55', name: '≥ 16,948.55', color: '#cc5642' }, + expect(debugState?.legend!.items).to.eql([ + { key: '5,722.775 - 8,529.22', name: '5,722.775 - 8,529.22', color: '#209280' }, + { key: '8,529.22 - 11,335.665', name: '8,529.22 - 11,335.665', color: '#54b399' }, + { key: '11,335.665 - 14,142.11', name: '11,335.665 - 14,142.11', color: '#d6bf57' }, + { key: '14,142.11 - 16,948.555', name: '14,142.11 - 16,948.555', color: '#e7664c' }, + { key: '≥ 16,948.555', name: '≥ 16,948.555', color: '#cc5642' }, ]); }); @@ -183,9 +181,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.selectValue('lnsLeftAxisTitle-select', 'Auto'); const debugState = await PageObjects.lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } + expect(debugState?.axes?.y?.[0].title).to.eql('Average of bytes'); }); }); diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts index ad4b1e123b554..f812b741bd440 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts @@ -56,15 +56,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await lens.waitForVisualization('heatmapChart'); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - // assert axes - expect(debugState.axes!.x[0].labels).to.eql(['win 8', 'win xp', 'win 7', 'ios', 'osx']); - expect(debugState.axes!.y[0].labels).to.eql(['']); - expect(debugState.heatmap!.cells.length).to.eql(5); - expect(debugState.legend!.items).to.eql([ + expect(debugState?.axes!.x[0].labels).to.eql(['win 8', 'win xp', 'win 7', 'ios', 'osx']); + expect(debugState?.axes!.y[0].labels).to.eql(['']); + expect(debugState?.heatmap!.cells.length).to.eql(5); + expect(debugState?.legend!.items).to.eql([ { color: '#006837', key: '1,322 - 1,717.5', @@ -94,13 +90,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await lens.waitForVisualization('heatmapChart'); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - - expect(debugState.axes!.x[0].labels).to.eql(['*']); - expect(debugState.axes!.y[0].labels).to.eql(['win 8', 'win xp', 'win 7', 'ios', 'osx']); - expect(debugState.heatmap!.cells.length).to.eql(5); + expect(debugState?.axes!.x[0].labels).to.eql(['*']); + expect(debugState?.axes!.y[0].labels).to.eql(['win 8', 'win xp', 'win 7', 'ios', 'osx']); + expect(debugState?.heatmap!.cells.length).to.eql(5); }); it('should respect heatmap colors number', async () => { @@ -118,41 +110,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await lens.waitForVisualization('heatmapChart'); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - - expect(debugState.legend!.items).to.eql([ - { - color: '#006837', - key: '1,322 - 1,585.67', - name: '1,322 - 1,585.67', - }, - { - color: '#4CB15D', - key: '1,585.67 - 1,849.33', - name: '1,585.67 - 1,849.33', - }, - { - color: '#B7E075', - key: '1,849.33 - 2,113', - name: '1,849.33 - 2,113', - }, - { - color: '#FEFEBD', - key: '2,113 - 2,376.67', - name: '2,113 - 2,376.67', - }, - { - color: '#FDBF6F', - key: '2,376.67 - 2,640.33', - name: '2,376.67 - 2,640.33', - }, - { - color: '#EA5839', - key: '2,640.33 - 2,904', - name: '2,640.33 - 2,904', - }, + expect(debugState?.legend!.items).to.eql([ + { key: '1,322 - 1,585.667', name: '1,322 - 1,585.667', color: '#006837' }, + { key: '1,585.667 - 1,849.333', name: '1,585.667 - 1,849.333', color: '#4CB15D' }, + { key: '1,849.333 - 2,113', name: '1,849.333 - 2,113', color: '#B7E075' }, + { key: '2,113 - 2,376.667', name: '2,113 - 2,376.667', color: '#FEFEBD' }, + { key: '2,376.667 - 2,640.333', name: '2,376.667 - 2,640.333', color: '#FDBF6F' }, + { key: '2,640.333 - 2,904', name: '2,640.333 - 2,904', color: '#EA5839' }, ]); }); @@ -178,11 +142,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await lens.waitForVisualization('heatmapChart'); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); - if (!debugState) { - throw new Error('Debug state is not available'); - } - - expect(debugState.legend!.items).to.eql([ + expect(debugState?.legend!.items).to.eql([ { color: '#006837', key: '0 - 100', diff --git a/x-pack/test/functional/apps/observability_log_explorer/columns_selection.ts b/x-pack/test/functional/apps/observability_log_explorer/columns_selection.ts index b23fd6813c0f6..5da73c3e5ecb5 100644 --- a/x-pack/test/functional/apps/observability_log_explorer/columns_selection.ts +++ b/x-pack/test/functional/apps/observability_log_explorer/columns_selection.ts @@ -5,7 +5,6 @@ * 2.0. */ import expect from '@kbn/expect'; -import rison from '@kbn/rison'; import { FtrProviderContext } from './config'; const defaultLogColumns = ['@timestamp', 'service.name', 'host.name', 'message']; @@ -39,10 +38,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should restore the table columns from the URL state if exists', async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ - columns: ['service.name', 'host.name', 'message', 'data_stream.namespace'], - }), + pageState: { + columns: [ + { field: 'service.name' }, + { field: 'host.name' }, + { field: 'message' }, + { field: 'data_stream.namespace' }, + ], }, }); diff --git a/x-pack/test/functional/apps/observability_log_explorer/dataset_selection_state.ts b/x-pack/test/functional/apps/observability_log_explorer/dataset_selection_state.ts index 9fc2cca312551..583313ec8cb9a 100644 --- a/x-pack/test/functional/apps/observability_log_explorer/dataset_selection_state.ts +++ b/x-pack/test/functional/apps/observability_log_explorer/dataset_selection_state.ts @@ -5,16 +5,30 @@ * 2.0. */ import expect from '@kbn/expect'; -import rison from '@kbn/rison'; +import { decodeOrThrow, indexPatternRt } from '@kbn/io-ts-utils'; +import { DatasetSelectionPlain } from '@kbn/log-explorer-plugin/common'; import { FtrProviderContext } from './config'; +const azureActivityDatasetSelection: DatasetSelectionPlain = { + selection: { + dataset: { + name: decodeOrThrow(indexPatternRt)('logs-azure.activitylogs-*'), + title: 'activitylogs', + }, + name: 'azure', + title: 'Azure Logs', + version: '1.5.23', + }, + selectionType: 'single', +}; + export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const retry = getService('retry'); const PageObjects = getPageObjects(['common', 'observabilityLogExplorer']); describe('DatasetSelection initialization and update', () => { - describe('when the "index" query param does not exist', () => { + describe('when no dataset selection is given', () => { it('should initialize the "All logs" selection', async () => { await PageObjects.observabilityLogExplorer.navigateTo(); const datasetSelectionTitle = @@ -24,13 +38,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('when the "index" query param exists', () => { - it('should decode and restore the selection from a valid encoded index', async () => { - const azureActivitylogsIndex = - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtFgF4CuATmAHRZzwBu8sAJ5VadAFTkANAlhRU3BPyEiQASklFS8lu2kC55AII6wAAgAyNEFN5hWIJGnIBGDgFYOAJgDM5deCgeFAAVQQAHMgdkaihVIA==='; + describe('when a dataset selection is given', () => { + it('should restore the selection from a valid encoded index', async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: azureActivitylogsIndex }), + pageState: { + datasetSelection: azureActivityDatasetSelection, }, }); @@ -41,10 +53,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should fallback to the "All logs" selection and notify the user of an invalid encoded index', async () => { - const invalidEncodedIndex = 'invalid-encoded-index'; - await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: invalidEncodedIndex }), + await PageObjects.observabilityLogExplorer.navigateToWithUncheckedState({ + pageState: { + v: 1, + datasetSelection: { + selectionType: 'invalid', + }, }, }); @@ -63,12 +77,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText(); expect(allDatasetSelectionTitle).to.be('All logs'); - const azureActivitylogsIndex = - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtFgF4CuATmAHRZzwBu8sAJ5VadAFTkANAlhRU3BPyEiQASklFS8lu2kC55AII6wAAgAyNEFN5hWIJGnIBGDgFYOAJgDM5deCgeFAAVQQAHMgdkaihVIA==='; await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: azureActivitylogsIndex }), - controlPanels: rison.encode({}), + pageState: { + datasetSelection: azureActivityDatasetSelection, }, }); const azureDatasetSelectionTitle = diff --git a/x-pack/test/functional/apps/observability_log_explorer/flyout.ts b/x-pack/test/functional/apps/observability_log_explorer/flyout.ts index b2b71c817255a..11c161b5f4f8d 100644 --- a/x-pack/test/functional/apps/observability_log_explorer/flyout.ts +++ b/x-pack/test/functional/apps/observability_log_explorer/flyout.ts @@ -49,8 +49,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); diff --git a/x-pack/test/functional/apps/observability_log_explorer/flyout_highlights.ts b/x-pack/test/functional/apps/observability_log_explorer/flyout_highlights.ts index 3b71935cd6fbc..11dc71409b463 100644 --- a/x-pack/test/functional/apps/observability_log_explorer/flyout_highlights.ts +++ b/x-pack/test/functional/apps/observability_log_explorer/flyout_highlights.ts @@ -68,8 +68,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -125,8 +130,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -187,8 +197,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -252,8 +267,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index a08b582d98f12..5c7eef4cb9263 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { setTimeout as setTimeoutAsync } from 'timers/promises'; import type { FittingFunction, XYCurveType } from '@kbn/lens-plugin/public'; +import { DebugState } from '@elastic/charts'; import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper'; import { FtrProviderContext } from '../ftr_provider_context'; import { logWrapper } from './log_wrapper'; @@ -1093,9 +1094,9 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont ); }, - async getCurrentChartDebugState(visType: string) { + async getCurrentChartDebugState(visType: string): Promise { await this.waitForVisualization(visType); - return await elasticChart.getChartDebugData('lnsWorkspace'); + return (await elasticChart.getChartDebugData('lnsWorkspace'))!; }, /** diff --git a/x-pack/test/functional/page_objects/observability_log_explorer.ts b/x-pack/test/functional/page_objects/observability_log_explorer.ts index 0b3266465c32e..a61682e62a8cb 100644 --- a/x-pack/test/functional/page_objects/observability_log_explorer.ts +++ b/x-pack/test/functional/page_objects/observability_log_explorer.ts @@ -5,6 +5,10 @@ * 2.0. */ import expect from '@kbn/expect'; +import { + OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY, + urlSchemaV1, +} from '@kbn/observability-log-explorer-plugin/common'; import rison from '@kbn/rison'; import querystring from 'querystring'; import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper'; @@ -101,8 +105,14 @@ const packages: IntegrationPackage[] = [ const initialPackages = packages.slice(0, 3); const additionalPackages = packages.slice(3); -const FROM = '2023-08-03T10:24:14.035Z'; -const TO = '2023-08-03T10:24:14.091Z'; +const defaultPageState: urlSchemaV1.UrlSchema = { + v: 1, + time: { + from: '2023-08-03T10:24:14.035Z', + to: '2023-08-03T10:24:14.091Z', + mode: 'absolute', + }, +}; export function ObservabilityLogExplorerPageObject({ getPageObjects, @@ -117,15 +127,6 @@ export function ObservabilityLogExplorerPageObject({ const testSubjects = getService('testSubjects'); const toasts = getService('toasts'); - type NavigateToAppOptions = Omit< - Parameters[1], - 'search' - > & { - search?: Record; - from?: string; - to?: string; - }; - return { uninstallPackage: ({ name, version }: IntegrationPackage) => { return supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); @@ -208,19 +209,55 @@ export function ObservabilityLogExplorerPageObject({ }; }, - async navigateTo(options: NavigateToAppOptions = {}) { - const { search = {}, from = FROM, to = TO, ...extraOptions } = options; - const composedSearch = querystring.stringify({ - ...search, - _g: rison.encode({ - time: { from, to }, - }), + async navigateTo({ + pageState, + }: { + pageState?: urlSchemaV1.UrlSchema; + } = {}) { + const queryStringParams = querystring.stringify({ + [OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY]: rison.encode( + urlSchemaV1.urlSchemaRT.encode({ + ...defaultPageState, + ...pageState, + }) + ), }); - return await PageObjects.common.navigateToApp('observabilityLogExplorer', { - search: composedSearch, - ...extraOptions, + return await PageObjects.common.navigateToUrlWithBrowserHistory( + 'observabilityLogExplorer', + '/', + queryStringParams, + { + // the check sometimes is too slow for the page so it misses the point + // in time before the app rewrites the URL + ensureCurrentUrl: false, + } + ); + }, + + async navigateToWithUncheckedState({ + pageState: uncheckedPageState, + }: { + pageState?: {}; + } = {}) { + const queryStringParams = querystring.stringify({ + [OBSERVABILITY_LOG_EXPLORER_URL_STATE_KEY]: rison.encode({ + ...uncheckedPageState, + }), }); + + log.info('queryStringParams'); + + return await PageObjects.common.navigateToUrlWithBrowserHistory( + 'observabilityLogExplorer', + '/', + queryStringParams, + { + // the check sometimes is too slow for the page so it misses the point + // in time before the app rewrites the URL + ensureCurrentUrl: false, + } + ); }, getDatasetSelector() { @@ -357,9 +394,7 @@ export function ObservabilityLogExplorerPageObject({ async assertRestoreFailureToastExist() { const successToast = await toasts.getToastElement(1); - expect(await successToast.getVisibleText()).to.contain( - "We couldn't restore your datasets selection" - ); + expect(await successToast.getVisibleText()).to.contain('Error restoring state from URL'); }, assertLoadingSkeletonExists() { diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts index 2d5c8a1815214..c7dc220e96723 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts @@ -315,7 +315,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - describe('Edit rule button', function () { + // FLAKY: https://github.com/elastic/kibana/issues/172941 + // FLAKY: https://github.com/elastic/kibana/issues/173008 + describe.skip('Edit rule button', function () { const ruleName = uuidv4(); const updatedRuleName = `Changed Rule Name ${ruleName}`; diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts index 00c0833746490..6c5f4239436a4 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/skip.ts @@ -55,6 +55,7 @@ export default function ({ getService }: FtrProviderContext) { expect(task.numSkippedRuns).to.eql(2); }); + let newLastRun: string; await retry.try(async () => { const task = await currentTask(createdTask.id); expect(task.attempts).to.eql(0); @@ -63,6 +64,18 @@ export default function ({ getService }: FtrProviderContext) { expect(task.numSkippedRuns).to.eql(2); // keeps rescheduling after skips expect(new Date(task.runAt).getTime()).to.greaterThan(new Date(lastRunAt).getTime()); + newLastRun = task.runAt; + }); + + // should keep running the rule after 2 skips and 1 successful run + await retry.try(async () => { + const task = await currentTask(createdTask.id); + expect(task.attempts).to.eql(0); + expect(task.retryAt).to.eql(null); + // skip attempts remains as it is + expect(task.numSkippedRuns).to.eql(2); + // keeps rescheduling after skips + expect(new Date(task.runAt).getTime()).to.greaterThan(new Date(newLastRun).getTime()); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts index 74e37b4737f71..03f7734e42628 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; import { RISK_SCORE_CALCULATION_URL } from '@kbn/security-solution-plugin/common/constants'; -import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { RiskScore } from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { v4 as uuidv4 } from 'uuid'; import { deleteAllAlerts, diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts index ae1fdb82d0953..e4284cdb5b837 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { ALERT_RISK_SCORE } from '@kbn/rule-data-utils'; import { RISK_SCORE_PREVIEW_URL } from '@kbn/security-solution-plugin/common/constants'; -import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { RiskScore } from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { v4 as uuidv4 } from 'uuid'; import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; import { diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts index 103577482a771..9fa3a0d4f123e 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts @@ -13,7 +13,10 @@ import { v4 as uuidv4 } from 'uuid'; import SuperTest from 'supertest'; import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; -import type { EcsRiskScore, RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; +import type { + EcsRiskScore, + RiskScore, +} from '@kbn/security-solution-plugin/common/entity_analytics/risk_engine'; import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/entity_analytics/risk_engine/saved_object'; import type { KbnClient } from '@kbn/test'; import { diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 0a2b2f4c1c1a9..16a93f0c3b5d5 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -62,14 +62,13 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress | Runs the default Cypress command | | cypress:open:ess | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | | cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:run:ess | Runs all tests tagged as ESS placed in the `e2e` directory excluding `investigations`,`explore` and `detection_response` directories in headless mode | +| cypress:run:entity_analytics:ess | Runs all tests tagged as ESS placed in the `e2e/entity_analytics` directory in headless mode | | cypress:run:cases:ess | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode | | cypress:ess | Runs all ESS tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` | - | cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:rule_management:prebuilt_rules:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:run:respops:ess | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode | -| cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations`, `explore` and `detections_response` directories in headless mode | +| cypress:run:entity_analytics:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | | cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:detection_engine:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine` excluding `e2e/detection_response/detection_engine/exceptions` directory in headless mode | @@ -83,7 +82,7 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | | cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | -| cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations`, `explore` and `rule_management` directories in headless mode using the QA environment and real MKI projects.| +| cypress:run:qa:serverless:entity_analytics | Runs all tests tagged as SERVERLESS placed in the `e2e/entity_analytics` directory in headless mode using the QA environment and real MKI projects.| | cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | | cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | | cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | @@ -123,6 +122,8 @@ If you belong to one of the teams listed in the table, please add new e2e specs | `e2e/detection_response/rule_management` | Detection Rule Management | | `e2e/detection_response/detection_engine` | Detection Engine | | `e2e/ai_assistant` | AI Assistant | +| `e2e/entity_analytics` | Entity Analytics | + ### fixtures/ @@ -219,7 +220,7 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | Script Name | Description | | ----------- | ----------- | | cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations` and `explore` directories in headless mode | +| cypress:entity_analytics:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | | cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts index 42ca93f26587b..1d94d2a2870c7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts @@ -42,7 +42,10 @@ import { } from '../../../../../tasks/alert_assignments'; import { ALERTS_COUNT } from '../../../../../screens/alerts'; -describe('Alert user assignment - ESS & Serverless', { tags: ['@ess', '@serverless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/172611 +// FLAKY: https://github.com/elastic/kibana/issues/172623 +// FLAKY: https://github.com/elastic/kibana/issues/172663 +describe.skip('Alert user assignment - ESS & Serverless', { tags: ['@ess', '@serverless'] }, () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/enable_risk_score_redirect.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/enable_risk_score_redirect.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics_serverless_splash_screen.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics_serverless_splash_screen.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics_serverless_splash_screen.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics_serverless_splash_screen.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 04aff67e6b8ce..6b366061b381c 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -7,7 +7,7 @@ "scripts": { "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore|detection_response|ai_assistant)/**/*.cy.ts'", + "cypress:entity_analytics:run:ess": "yarn cypress:ess --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", @@ -26,8 +26,7 @@ "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", - "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore|detection_response|ai_assistant)/**/*.cy.ts'", - "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", + "cypress:entity_analytics:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:detection_engine:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/detection_engine/!(exceptions)/**/*.cy.ts'", @@ -39,7 +38,7 @@ "cypress:burn:serverless": "yarn cypress:serverless --env burn=2", "cypress:qa:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless_qa.config.ts", "cypress:open:qa:serverless": "yarn cypress:qa:serverless open", - "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore|detection_response|ai_assistant)/**/*.cy.ts'", + "cypress:run:qa:serverless:entity_analytics": "yarn cypress:qa:serverless --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts index c1eed560a2142..f1edd7a45800c 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts @@ -117,8 +117,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.endpoint.navigateToEndpointList(); }); - // FLAKY: https://github.com/elastic/kibana/issues/170357 - describe.skip('when there is data,', () => { + describe('when there is data,', () => { before(async () => { indexedData = await endpointTestResources.loadEndpointData({ numHosts: 3 }); await pageObjects.endpoint.navigateToEndpointList(); diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts index bcc3177846d37..6f00806e67c05 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/responder.ts @@ -82,7 +82,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ); }; - describe('Response Actions Responder', function () { + // FLAKY: https://github.com/elastic/kibana/issues/153071 + describe.skip('Response Actions Responder', function () { targetTags(this, ['@ess', '@serverless']); let indexedData: IndexedHostsAndAlertsResponse; diff --git a/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts b/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts index ae886a0d1a4d5..802cbf8be16fc 100644 --- a/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts @@ -51,19 +51,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { .set('kbn-xsrf', 'true'); }; - // Several flaky tests from this file in serverless, hence @skipInServerless - // - https://github.com/elastic/kibana/issues?q=is%3Aissue+is%3Aopen+X-pack+endpoint+integrations++artifact+entries+list - // https://github.com/elastic/kibana/issues/171475 - // https://github.com/elastic/kibana/issues/171476 - // https://github.com/elastic/kibana/issues/171477 - // https://github.com/elastic/kibana/issues/171478 - // https://github.com/elastic/kibana/issues/171487 - // https://github.com/elastic/kibana/issues/171488 - // https://github.com/elastic/kibana/issues/171489 - // https://github.com/elastic/kibana/issues/171491 - // https://github.com/elastic/kibana/issues/171492 describe('For each artifact list under management', function () { - targetTags(this, ['@ess', '@serverless', '@skipInServerless']); + targetTags(this, ['@ess', '@serverless']); this.timeout(60_000 * 5); let indexedData: IndexedHostsAndAlertsResponse; @@ -225,9 +214,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }; for (const testData of getArtifactsListTestsData()) { - // FLAKY: https://github.com/elastic/kibana/issues/171489 - // FLAKY: https://github.com/elastic/kibana/issues/171475 - describe.skip(`When on the ${testData.title} entries list`, function () { + describe(`When on the ${testData.title} entries list`, function () { beforeEach(async () => { policyInfo = await policyTestResources.createPolicy(); await removeAllArtifacts(); @@ -313,8 +300,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); } - // FLAKY: https://github.com/elastic/kibana/issues/171476 - describe.skip('Should check artifacts are correctly generated when multiple entries', function () { + describe('Should check artifacts are correctly generated when multiple entries', function () { let firstPolicy: PolicyTestResourceInfo; let secondPolicy: PolicyTestResourceInfo; diff --git a/x-pack/test/security_solution_endpoint/services/endpoint.ts b/x-pack/test/security_solution_endpoint/services/endpoint.ts index 1372ffe0139fd..b4b5e5aef96bf 100644 --- a/x-pack/test/security_solution_endpoint/services/endpoint.ts +++ b/x-pack/test/security_solution_endpoint/services/endpoint.ts @@ -9,6 +9,7 @@ import { errors } from '@elastic/elasticsearch'; import { Client } from '@elastic/elasticsearch'; +import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; import { metadataCurrentIndexPattern, metadataTransformPrefix, @@ -94,7 +95,7 @@ export class EndpointTestResources extends FtrService { * @param [options.enableFleetIntegration=true] When set to `true`, Fleet data will also be loaded (ex. Integration Policies, Agent Policies, "fake" Agents) * @param [options.generatorSeed='seed`] The seed to be used by the data generator. Important in order to ensure the same data is generated on very run. * @param [options.waitUntilTransformed=true] If set to `true`, the data loading process will wait until the endpoint hosts metadata is processed by the transform - * @param [options.waitTimeout=60000] If waitUntilTransformed=true, number of ms to wait until timeout + * @param [options.waitTimeout=120000] If waitUntilTransformed=true, number of ms to wait until timeout * @param [options.customIndexFn] If provided, will use this function to generate and index data instead */ async loadEndpointData( @@ -116,7 +117,7 @@ export class EndpointTestResources extends FtrService { enableFleetIntegration = true, generatorSeed = 'seed', waitUntilTransformed = true, - waitTimeout = 60000, + waitTimeout = 120000, customIndexFn, } = options; @@ -197,6 +198,12 @@ export class EndpointTestResources extends FtrService { await this.retry.waitForWithTimeout(`endpoint hosts in ${index}`, timeout, async () => { try { + if (index === METADATA_UNITED_INDEX) { + // United metadata transform occasionally can't find docs in .fleet-agents. + // Running a search on the index first eliminates this issue. + // Replacing the search with a refresh does not resolve flakiness. + await this.esClient.search({ index: AGENTS_INDEX }); + } const searchResponse = await this.esClient.search({ index, size, diff --git a/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts index 3ac6c83938c14..0e118cf88e4b9 100644 --- a/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts +++ b/x-pack/test/security_solution_endpoint_api_int/apis/metadata.ts @@ -47,8 +47,7 @@ export default function ({ getService }: FtrProviderContext) { const endpointTestResources = getService('endpointTestResources'); const log = getService('log'); - // Failing: See https://github.com/elastic/kibana/issues/151854 - describe.skip('test metadata apis', function () { + describe('test metadata apis', function () { targetTags(this, ['@ess', '@serverless']); describe('list endpoints GET route', () => { diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index cd9bde5d36a73..e5c89162f923d 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -2,7 +2,10 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": ["node", "@kbn/ambient-ftr-types"], + "types": [ + "node", + "@kbn/ambient-ftr-types" + ], // there is still a decent amount of JS in this plugin and we are taking // advantage of the fact that TS doesn't know the types of that code and // gives us `any`. Once that code is converted to .ts we can remove this @@ -18,9 +21,18 @@ "../../typings/**/*", "../../packages/kbn-test/types/ftr_globals/**/*" ], - "exclude": ["security_solution_cypress/cypress/**/*", "target/**/*", "*/plugins/**/*", "*/packages/**/*", "*/*/packages/**/*","security_solution_api_integration/**/*" ], + "exclude": [ + "security_solution_cypress/cypress/**/*", + "target/**/*", + "*/plugins/**/*", + "*/packages/**/*", + "*/*/packages/**/*", + "security_solution_api_integration/**/*" + ], "kbn_references": [ - { "path": "../../test/tsconfig.json" }, + { + "path": "../../test/tsconfig.json" + }, "@kbn/core", "@kbn/data-plugin", "@kbn/kibana-usage-collection-plugin", @@ -149,6 +161,9 @@ "@kbn/reporting-export-types-pdf-common", "@kbn/reporting-export-types-png-common", "@kbn/reporting-common", + "@kbn/observability-log-explorer-plugin", + "@kbn/io-ts-utils", + "@kbn/log-explorer-plugin", "@kbn/security-plugin-types-common", ] } diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts index 0ac0bec2250ed..067c24d605e6c 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/data_views/default_index_pattern/default_index_pattern.ts @@ -72,7 +72,7 @@ export default function ({ getService }: FtrProviderContext) { // TODO: The response comes back undefined in Serverless const body = response6.body[serviceKeyId]; const expected = body === undefined ? null : body; - expect(expected).to.be(null); + expect(expected).to.be(''); }); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts index f1c362838d77e..6e486d6d34e5d 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts @@ -102,36 +102,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(debugState).to.not.be.eql(null); expect(debugState.legend!.items).to.eql([ - { - color: '#006837', - key: '1,322 - 1,585.67', - name: '1,322 - 1,585.67', - }, - { - color: '#4CB15D', - key: '1,585.67 - 1,849.33', - name: '1,585.67 - 1,849.33', - }, - { - color: '#B7E075', - key: '1,849.33 - 2,113', - name: '1,849.33 - 2,113', - }, - { - color: '#FEFEBD', - key: '2,113 - 2,376.67', - name: '2,113 - 2,376.67', - }, - { - color: '#FDBF6F', - key: '2,376.67 - 2,640.33', - name: '2,376.67 - 2,640.33', - }, - { - color: '#EA5839', - key: '2,640.33 - 2,904', - name: '2,640.33 - 2,904', - }, + { key: '1,322 - 1,585.667', name: '1,322 - 1,585.667', color: '#006837' }, + { key: '1,585.667 - 1,849.333', name: '1,585.667 - 1,849.333', color: '#4CB15D' }, + { key: '1,849.333 - 2,113', name: '1,849.333 - 2,113', color: '#B7E075' }, + { key: '2,113 - 2,376.667', name: '2,113 - 2,376.667', color: '#FEFEBD' }, + { key: '2,376.667 - 2,640.333', name: '2,376.667 - 2,640.333', color: '#FDBF6F' }, + { key: '2,640.333 - 2,904', name: '2,640.333 - 2,904', color: '#EA5839' }, ]); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/columns_selection.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/columns_selection.ts index a011a00a24f9c..d19cb269891d7 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/columns_selection.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/columns_selection.ts @@ -5,7 +5,6 @@ * 2.0. */ import expect from '@kbn/expect'; -import rison from '@kbn/rison'; import { FtrProviderContext } from '../../../ftr_provider_context'; const defaultLogColumns = ['@timestamp', 'service.name', 'host.name', 'message']; @@ -41,10 +40,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should restore the table columns from the URL state if exists', async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ - columns: ['service.name', 'host.name', 'message', 'data_stream.namespace'], - }), + pageState: { + columns: [ + { field: 'service.name' }, + { field: 'host.name' }, + { field: 'message' }, + { field: 'data_stream.namespace' }, + ], }, }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selection_state.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selection_state.ts index 9f6e978e1f270..36a2451f4115d 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selection_state.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selection_state.ts @@ -5,9 +5,23 @@ * 2.0. */ import expect from '@kbn/expect'; -import rison from '@kbn/rison'; +import { decodeOrThrow, indexPatternRt } from '@kbn/io-ts-utils'; +import { DatasetSelectionPlain } from '@kbn/log-explorer-plugin/common'; import { FtrProviderContext } from '../../../ftr_provider_context'; +const azureActivityDatasetSelection: DatasetSelectionPlain = { + selection: { + dataset: { + name: decodeOrThrow(indexPatternRt)('logs-azure.activitylogs-*'), + title: 'activitylogs', + }, + name: 'azure', + title: 'Azure Logs', + version: '1.5.23', + }, + selectionType: 'single', +}; + export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const retry = getService('retry'); @@ -27,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.svlCommonPage.forceLogout(); }); - describe('when the "index" query param does not exist', () => { + describe('when no dataset selection is given', () => { it('should initialize the "All logs" selection', async () => { await PageObjects.observabilityLogExplorer.navigateTo(); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -38,13 +52,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('when the "index" query param exists', () => { + describe('when a dataset selection is given', () => { it('should decode and restore the selection from a valid encoded index', async () => { - const azureActivitylogsIndex = - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtFgF4CuATmAHRZzwBu8sAJ5VadAFTkANAlhRU3BPyEiQASklFS8lu2kC55AII6wAAgAyNEFN5hWIJGnIBGDgFYOAJgDM5deCgeFAAVQQAHMgdkaihVIA==='; await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: azureActivitylogsIndex }), + pageState: { + datasetSelection: azureActivityDatasetSelection, }, }); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -56,10 +68,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should fallback to the "All logs" selection and notify the user of an invalid encoded index', async () => { - const invalidEncodedIndex = 'invalid-encoded-index'; - await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: invalidEncodedIndex }), + await PageObjects.observabilityLogExplorer.navigateToWithUncheckedState({ + pageState: { + v: 1, + datasetSelection: { + selectionType: 'invalid', + }, }, }); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -80,12 +94,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.observabilityLogExplorer.getDatasetSelectorButtonText(); expect(allDatasetSelectionTitle).to.be('All logs'); - const azureActivitylogsIndex = - 'BQZwpgNmDGAuCWB7AdgLmAEwIay+W6yWAtmKgOQSIDmIAtFgF4CuATmAHRZzwBu8sAJ5VadAFTkANAlhRU3BPyEiQASklFS8lu2kC55AII6wAAgAyNEFN5hWIJGnIBGDgFYOAJgDM5deCgeFAAVQQAHMgdkaihVIA==='; await PageObjects.observabilityLogExplorer.navigateTo({ - search: { - _a: rison.encode({ index: azureActivitylogsIndex }), - controlPanels: rison.encode({}), + pageState: { + datasetSelection: azureActivityDatasetSelection, }, }); await PageObjects.header.waitUntilLoadingHasFinished(); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout.ts index 79f241c8948b6..d33d9e97d18c6 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout.ts @@ -50,8 +50,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout_highlights.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout_highlights.ts index 98a3914fed4e8..dd19471c5620d 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout_highlights.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/flyout_highlights.ts @@ -70,8 +70,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -129,8 +134,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -193,8 +203,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); @@ -260,8 +275,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { await PageObjects.observabilityLogExplorer.navigateTo({ - from: new Date(NOW - 60_000).toISOString(), - to: new Date(NOW + 60_000).toISOString(), + pageState: { + time: { + from: new Date(NOW - 60_000).toISOString(), + to: new Date(NOW + 60_000).toISOString(), + mode: 'absolute', + }, + }, }); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts index 0e7527bc76887..fe0c0c9fea197 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts @@ -22,7 +22,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'svlCommonNavigation', ]); - describe('Header menu', () => { + // Failing: See https://github.com/elastic/kibana/issues/173165 + describe.skip('Header menu', () => { before(async () => { await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await esArchiver.load( diff --git a/x-pack/test_serverless/tsconfig.json b/x-pack/test_serverless/tsconfig.json index af6f6e4b25e99..72039a6ad1368 100644 --- a/x-pack/test_serverless/tsconfig.json +++ b/x-pack/test_serverless/tsconfig.json @@ -2,8 +2,18 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "rootDirs": [".", "../test"], - "types": ["node", "@kbn/ambient-ftr-types", "cypress", "cypress-file-upload", "cypress-real-events", "cypress-recurse"], + "rootDirs": [ + ".", + "../test" + ], + "types": [ + "node", + "@kbn/ambient-ftr-types", + "cypress", + "cypress-file-upload", + "cypress-real-events", + "cypress-recurse" + ], }, "include": [ "**/*", @@ -17,7 +27,9 @@ "*/*/packages/**/*", ], "kbn_references": [ - { "path": "../test/tsconfig.json" }, + { + "path": "../test/tsconfig.json" + }, "@kbn/expect", "@kbn/test", "@kbn/repo-info", @@ -68,6 +80,8 @@ "@kbn/apm-synthtrace-client", "@kbn/reporting-export-types-csv-common", "@kbn/mock-idp-plugin", + "@kbn/io-ts-utils", + "@kbn/log-explorer-plugin", "@kbn/index-management-plugin", ] } diff --git a/yarn.lock b/yarn.lock index 8570e2ccbc841..d1ea07bea6132 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6339,6 +6339,10 @@ version "0.0.0" uid "" +"@kbn/visualization-utils@link:packages/kbn-visualization-utils": + version "0.0.0" + uid "" + "@kbn/visualizations-plugin@link:src/plugins/visualizations": version "0.0.0" uid ""