diff --git a/.ci/Dockerfile b/.ci/Dockerfile
deleted file mode 100644
index 201e17b93c116..0000000000000
--- a/.ci/Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-ARG NODE_VERSION=10.21.0
-
-FROM node:${NODE_VERSION} AS base
-
-RUN apt-get update && \
- apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
- libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
- libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
- libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
- libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-8-jre && \
- rm -rf /var/lib/apt/lists/*
-
-RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
- && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
- && apt-get update \
- && apt-get install -y rsync jq bsdtar google-chrome-stable \
- --no-install-recommends \
- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-RUN LATEST_VAULT_RELEASE=$(curl -s https://api.github.com/repos/hashicorp/vault/tags | jq --raw-output .[0].name[1:]) \
- && curl -L https://releases.hashicorp.com/vault/${LATEST_VAULT_RELEASE}/vault_${LATEST_VAULT_RELEASE}_linux_amd64.zip -o vault.zip \
- && unzip vault.zip \
- && rm vault.zip \
- && chmod +x vault \
- && mv vault /usr/local/bin/vault
-
-RUN groupadd -r kibana && useradd -r -g kibana kibana && mkdir /home/kibana && chown kibana:kibana /home/kibana
-
-COPY ./bash_standard_lib.sh /usr/local/bin/bash_standard_lib.sh
-RUN chmod +x /usr/local/bin/bash_standard_lib.sh
-
-COPY ./runbld /usr/local/bin/runbld
-RUN chmod +x /usr/local/bin/runbld
-
-USER kibana
diff --git a/.ci/runbld_no_junit.yml b/.ci/runbld_no_junit.yml
index 1bcb7e22a2648..67b5002c1c437 100644
--- a/.ci/runbld_no_junit.yml
+++ b/.ci/runbld_no_junit.yml
@@ -3,4 +3,4 @@
profiles:
- ".*": # Match any job
tests:
- junit-filename-pattern: false
+ junit-filename-pattern: "8d8bd494-d909-4e67-a052-7e8b5aaeb5e4" # A bogus path that should never exist
diff --git a/.gitignore b/.gitignore
index 25a8c369bb704..32377ec0f1ffe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,8 +47,6 @@ npm-debug.log*
.tern-project
.nyc_output
.ci/pipeline-library/build/
-.ci/runbld
-.ci/bash_standard_lib.sh
.gradle
# apm plugin
diff --git a/Jenkinsfile b/Jenkinsfile
index 491a1e386deb1..f6f77ccae8427 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -8,7 +8,50 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true, setCommitStatus: true)
ciStats.trackBuild {
catchError {
retryable.enable()
- kibanaPipeline.allCiTasks()
+ parallel([
+ 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
+ 'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
+ 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
+ 'oss-firefoxSmoke': kibanaPipeline.functionalTestProcess('kibana-firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh'),
+ 'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
+ 'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
+ 'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
+ 'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
+ 'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
+ 'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
+ 'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
+ 'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
+ 'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
+ 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
+ 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
+ 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
+ 'oss-accessibility': kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh'),
+ // 'oss-visualRegression': kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh'),
+ ]),
+ 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
+ 'xpack-firefoxSmoke': kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh'),
+ 'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
+ 'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
+ 'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
+ 'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
+ 'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
+ 'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
+ 'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
+ 'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
+ 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
+ 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
+ 'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'),
+ 'xpack-savedObjectsFieldMetrics': kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'),
+ // 'xpack-pageLoadMetrics': kibanaPipeline.functionalTestProcess('xpack-pageLoadMetrics', './test/scripts/jenkins_xpack_page_load_metrics.sh'),
+ 'xpack-securitySolutionCypress': { processNumber ->
+ whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) {
+ kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
+ }
+ },
+
+ // 'xpack-visualRegression': kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh'),
+ ]),
+ ])
}
}
}
diff --git a/docs/images/canvas-add-image.gif b/docs/canvas/images/canvas-add-image.gif
similarity index 100%
rename from docs/images/canvas-add-image.gif
rename to docs/canvas/images/canvas-add-image.gif
diff --git a/docs/images/canvas-add-pages.gif b/docs/canvas/images/canvas-add-pages.gif
similarity index 100%
rename from docs/images/canvas-add-pages.gif
rename to docs/canvas/images/canvas-add-pages.gif
diff --git a/docs/images/canvas-autoplay-interval.png b/docs/canvas/images/canvas-autoplay-interval.png
similarity index 100%
rename from docs/images/canvas-autoplay-interval.png
rename to docs/canvas/images/canvas-autoplay-interval.png
diff --git a/docs/images/canvas-background-color-picker.png b/docs/canvas/images/canvas-background-color-picker.png
similarity index 100%
rename from docs/images/canvas-background-color-picker.png
rename to docs/canvas/images/canvas-background-color-picker.png
diff --git a/docs/images/canvas-change-your-expression-chart-no-legend.png b/docs/canvas/images/canvas-change-your-expression-chart-no-legend.png
similarity index 100%
rename from docs/images/canvas-change-your-expression-chart-no-legend.png
rename to docs/canvas/images/canvas-change-your-expression-chart-no-legend.png
diff --git a/docs/images/canvas-change-your-expression-chart.png b/docs/canvas/images/canvas-change-your-expression-chart.png
similarity index 100%
rename from docs/images/canvas-change-your-expression-chart.png
rename to docs/canvas/images/canvas-change-your-expression-chart.png
diff --git a/docs/images/canvas-chart-element.png b/docs/canvas/images/canvas-chart-element.png
similarity index 100%
rename from docs/images/canvas-chart-element.png
rename to docs/canvas/images/canvas-chart-element.png
diff --git a/docs/images/canvas-create-URL.gif b/docs/canvas/images/canvas-create-URL.gif
similarity index 100%
rename from docs/images/canvas-create-URL.gif
rename to docs/canvas/images/canvas-create-URL.gif
diff --git a/docs/images/canvas-element-select.gif b/docs/canvas/images/canvas-element-select.gif
similarity index 100%
rename from docs/images/canvas-element-select.gif
rename to docs/canvas/images/canvas-element-select.gif
diff --git a/docs/images/canvas-export-workpad.png b/docs/canvas/images/canvas-export-workpad.png
similarity index 100%
rename from docs/images/canvas-export-workpad.png
rename to docs/canvas/images/canvas-export-workpad.png
diff --git a/docs/images/canvas-fullscreen.png b/docs/canvas/images/canvas-fullscreen.png
similarity index 100%
rename from docs/images/canvas-fullscreen.png
rename to docs/canvas/images/canvas-fullscreen.png
diff --git a/docs/images/canvas-functions-can-take-arguments-donut-chart.png b/docs/canvas/images/canvas-functions-can-take-arguments-donut-chart.png
similarity index 100%
rename from docs/images/canvas-functions-can-take-arguments-donut-chart.png
rename to docs/canvas/images/canvas-functions-can-take-arguments-donut-chart.png
diff --git a/docs/images/canvas-functions-can-take-arguments-pie-chart.png b/docs/canvas/images/canvas-functions-can-take-arguments-pie-chart.png
similarity index 100%
rename from docs/images/canvas-functions-can-take-arguments-pie-chart.png
rename to docs/canvas/images/canvas-functions-can-take-arguments-pie-chart.png
diff --git a/docs/images/canvas-generate-pdf.gif b/docs/canvas/images/canvas-generate-pdf.gif
similarity index 100%
rename from docs/images/canvas-generate-pdf.gif
rename to docs/canvas/images/canvas-generate-pdf.gif
diff --git a/docs/images/canvas-gs-example.png b/docs/canvas/images/canvas-gs-example.png
similarity index 100%
rename from docs/images/canvas-gs-example.png
rename to docs/canvas/images/canvas-gs-example.png
diff --git a/docs/images/canvas-image-element.png b/docs/canvas/images/canvas-image-element.png
similarity index 100%
rename from docs/images/canvas-image-element.png
rename to docs/canvas/images/canvas-image-element.png
diff --git a/docs/images/canvas-map-embed.gif b/docs/canvas/images/canvas-map-embed.gif
similarity index 100%
rename from docs/images/canvas-map-embed.gif
rename to docs/canvas/images/canvas-map-embed.gif
diff --git a/docs/images/canvas-metric-element.png b/docs/canvas/images/canvas-metric-element.png
similarity index 100%
rename from docs/images/canvas-metric-element.png
rename to docs/canvas/images/canvas-metric-element.png
diff --git a/docs/images/canvas-refresh-interval.png b/docs/canvas/images/canvas-refresh-interval.png
similarity index 100%
rename from docs/images/canvas-refresh-interval.png
rename to docs/canvas/images/canvas-refresh-interval.png
diff --git a/docs/images/canvas-timefilter-element.png b/docs/canvas/images/canvas-timefilter-element.png
similarity index 100%
rename from docs/images/canvas-timefilter-element.png
rename to docs/canvas/images/canvas-timefilter-element.png
diff --git a/docs/images/canvas-zoom-controls.png b/docs/canvas/images/canvas-zoom-controls.png
similarity index 100%
rename from docs/images/canvas-zoom-controls.png
rename to docs/canvas/images/canvas-zoom-controls.png
diff --git a/docs/images/canvas_element_options.png b/docs/canvas/images/canvas_element_options.png
similarity index 100%
rename from docs/images/canvas_element_options.png
rename to docs/canvas/images/canvas_element_options.png
diff --git a/docs/images/canvas_save_element.png b/docs/canvas/images/canvas_save_element.png
similarity index 100%
rename from docs/images/canvas_save_element.png
rename to docs/canvas/images/canvas_save_element.png
diff --git a/docs/images/settings.png b/docs/dev-tools/console/images/settings.png
similarity index 100%
rename from docs/images/settings.png
rename to docs/dev-tools/console/images/settings.png
diff --git a/docs/images/jenkins/job_view.png b/docs/developer/images/job_view.png
similarity index 100%
rename from docs/images/jenkins/job_view.png
rename to docs/developer/images/job_view.png
diff --git a/docs/images/jenkins/pipeline_steps_view.png b/docs/developer/images/pipeline_steps_view.png
similarity index 100%
rename from docs/images/jenkins/pipeline_steps_view.png
rename to docs/developer/images/pipeline_steps_view.png
diff --git a/docs/developer/testing/interpreting-ci-failures.asciidoc b/docs/developer/testing/interpreting-ci-failures.asciidoc
index bc237928cf5aa..c47a59217d89b 100644
--- a/docs/developer/testing/interpreting-ci-failures.asciidoc
+++ b/docs/developer/testing/interpreting-ci-failures.asciidoc
@@ -17,7 +17,7 @@ Clicking the link next to the check in the conversation tab of a pull request wi
To view the results of a job execution in Jenkins, either click the link in the comment left by `@elasticmachine` or search for the `kibana-ci` check in the list at the bottom of the PR. This link will take you to the top-level page for the specific job execution that failed.
-image::images/jenkins/job_view.png[]
+image::images/job_view.png[]
1. *Git Changes:* the list of commits that were in this build which weren't in the previous build. For Pull Requests this list is calculated by comparing against the most recent Pull Request which was tested, it is not limited to build for this specific Pull Request, so it's not very useful.
2. *Test Results:* A link to the test results screen, and shortcuts to the failed tests. Functional tests capture and store the log output from each specific test, and make it visible at these links. For other test runners only the error message is visible and log output must be tracked down in the *Pipeline Steps*.
@@ -29,6 +29,6 @@ image::images/jenkins/job_view.png[]
To view the logs for a failed specific ciGroup, jest, mocha, type checkers, linters, etc., click on the *Pipeline Steps* link in from the Job page.
-image::images/jenkins/pipeline_steps_view.png[]
+image::images/pipeline_steps_view.png[]
Scroll down the page until you find a failed step *(1)*, and then look up a few lines for the `Branch:` step to see which specific job this is. If this is the job you're looking for click the little terminal icon next to the failed step *(1)* to view the logs for that specific step in the Pipeline.
\ No newline at end of file
diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md
index 7ebd0531619fd..8d4c0c915437e 100644
--- a/docs/development/core/server/kibana-plugin-core-server.md
+++ b/docs/development/core/server/kibana-plugin-core-server.md
@@ -154,7 +154,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [SavedObjectsBulkUpdateResponse](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.md) | |
| [SavedObjectsClientProviderOptions](./kibana-plugin-core-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. |
| [SavedObjectsClientWrapperOptions](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. |
-| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation.Note: this type intentially doesn't include a type definition for defining the dynamic mapping parameter. Saved Object fields should always inherit the dynamic: 'strict' paramater. If you are unsure of the shape of your data use type: 'object', enabled: false instead. |
+| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
| [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
| [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | |
| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md
new file mode 100644
index 0000000000000..b01da3c62fda6
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md)
+
+## SavedObjectsComplexFieldMapping.dynamic property
+
+The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings.
+
+Note: To limit the number of mapping fields Saved Object types should \*never\* use `dynamic: true`.
+
+Signature:
+
+```typescript
+dynamic?: false | 'strict';
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md
new file mode 100644
index 0000000000000..08513aa2a849b
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md)
+
+## SavedObjectsComplexFieldMapping.enabled property
+
+Signature:
+
+```typescript
+enabled?: boolean;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md
index cb81686b424ec..fc262cad54f18 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md
@@ -6,8 +6,6 @@
See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation.
-Note: this type intentially doesn't include a type definition for defining the `dynamic` mapping parameter. Saved Object fields should always inherit the `dynamic: 'strict'` paramater. If you are unsure of the shape of your data use `type: 'object', enabled: false` instead.
-
Signature:
```typescript
@@ -19,6 +17,8 @@ export interface SavedObjectsComplexFieldMapping
| Property | Type | Description |
| --- | --- | --- |
| [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | boolean | |
+| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings.Note: To limit the number of mapping fields Saved Object types should \*never\* use dynamic: true. |
+| [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) | boolean | |
| [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | SavedObjectsMappingProperties | |
| [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | string | |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md
deleted file mode 100644
index c0b556e99ebc3..0000000000000
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md)
-
-## SavedObjectsCoreFieldMapping.enabled property
-
-Signature:
-
-```typescript
-enabled?: boolean;
-```
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
index b9e726eac799d..e9b9c2bcf51b5 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md
@@ -17,7 +17,6 @@ export interface SavedObjectsCoreFieldMapping
| Property | Type | Description |
| --- | --- | --- |
| [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) | boolean | |
-| [enabled](./kibana-plugin-core-server.savedobjectscorefieldmapping.enabled.md) | boolean | |
| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | { [subfield: string]: { type: string; ignore_above?: number; }; } | |
| [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean | |
| [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string | |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md
index 74efa75768f9c..70775760ac77d 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md
@@ -4,7 +4,7 @@
## SavedObjectsTypeMappingDefinition.dynamic property
-The dynamic property of the mapping. either `false` or 'strict'. Defaults to `false`
+The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings.
Signature:
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md
index 77ded4389c0a0..3d3b73880fa7f 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectstypemappingdefinition.md
@@ -41,6 +41,6 @@ const typeDefinition: SavedObjectsTypeMappingDefinition = {
| Property | Type | Description |
| --- | --- | --- |
-| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false | 'strict' | The dynamic property of the mapping. either false or 'strict'. Defaults to false |
+| [dynamic](./kibana-plugin-core-server.savedobjectstypemappingdefinition.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings. |
| [properties](./kibana-plugin-core-server.savedobjectstypemappingdefinition.properties.md) | SavedObjectsMappingProperties | The underlying properties of the type mapping |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md
index a48f4920b3d26..e515c3513df6c 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ui_settings.md
@@ -8,32 +8,33 @@
```typescript
UI_SETTINGS: {
- META_FIELDS: string;
- DOC_HIGHLIGHT: string;
- QUERY_STRING_OPTIONS: string;
- QUERY_ALLOW_LEADING_WILDCARDS: string;
- SEARCH_QUERY_LANGUAGE: string;
- SORT_OPTIONS: string;
- COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string;
- COURIER_SET_REQUEST_PREFERENCE: string;
- COURIER_CUSTOM_REQUEST_PREFERENCE: string;
- COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string;
- COURIER_BATCH_SEARCHES: string;
- SEARCH_INCLUDE_FROZEN: string;
- HISTOGRAM_BAR_TARGET: string;
- HISTOGRAM_MAX_BARS: string;
- HISTORY_LIMIT: string;
- SHORT_DOTS_ENABLE: string;
- FORMAT_DEFAULT_TYPE_MAP: string;
- FORMAT_NUMBER_DEFAULT_PATTERN: string;
- FORMAT_PERCENT_DEFAULT_PATTERN: string;
- FORMAT_BYTES_DEFAULT_PATTERN: string;
- FORMAT_CURRENCY_DEFAULT_PATTERN: string;
- FORMAT_NUMBER_DEFAULT_LOCALE: string;
- TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string;
- TIMEPICKER_QUICK_RANGES: string;
- INDEXPATTERN_PLACEHOLDER: string;
- FILTERS_PINNED_BY_DEFAULT: string;
- FILTERS_EDITOR_SUGGEST_VALUES: string;
+ readonly META_FIELDS: "metaFields";
+ readonly DOC_HIGHLIGHT: "doc_table:highlight";
+ readonly QUERY_STRING_OPTIONS: "query:queryString:options";
+ readonly QUERY_ALLOW_LEADING_WILDCARDS: "query:allowLeadingWildcards";
+ readonly SEARCH_QUERY_LANGUAGE: "search:queryLanguage";
+ readonly SORT_OPTIONS: "sort:options";
+ readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: "courier:ignoreFilterIfFieldNotInIndex";
+ readonly COURIER_SET_REQUEST_PREFERENCE: "courier:setRequestPreference";
+ readonly COURIER_CUSTOM_REQUEST_PREFERENCE: "courier:customRequestPreference";
+ readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: "courier:maxConcurrentShardRequests";
+ readonly COURIER_BATCH_SEARCHES: "courier:batchSearches";
+ readonly SEARCH_INCLUDE_FROZEN: "search:includeFrozen";
+ readonly HISTOGRAM_BAR_TARGET: "histogram:barTarget";
+ readonly HISTOGRAM_MAX_BARS: "histogram:maxBars";
+ readonly HISTORY_LIMIT: "history:limit";
+ readonly SHORT_DOTS_ENABLE: "shortDots:enable";
+ readonly FORMAT_DEFAULT_TYPE_MAP: "format:defaultTypeMap";
+ readonly FORMAT_NUMBER_DEFAULT_PATTERN: "format:number:defaultPattern";
+ readonly FORMAT_PERCENT_DEFAULT_PATTERN: "format:percent:defaultPattern";
+ readonly FORMAT_BYTES_DEFAULT_PATTERN: "format:bytes:defaultPattern";
+ readonly FORMAT_CURRENCY_DEFAULT_PATTERN: "format:currency:defaultPattern";
+ readonly FORMAT_NUMBER_DEFAULT_LOCALE: "format:number:defaultLocale";
+ readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
+ readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
+ readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
+ readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
+ readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
+ readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
}
```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md
index 855cfd11d00ea..e419b64cd43aa 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ui_settings.md
@@ -8,32 +8,33 @@
```typescript
UI_SETTINGS: {
- META_FIELDS: string;
- DOC_HIGHLIGHT: string;
- QUERY_STRING_OPTIONS: string;
- QUERY_ALLOW_LEADING_WILDCARDS: string;
- SEARCH_QUERY_LANGUAGE: string;
- SORT_OPTIONS: string;
- COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: string;
- COURIER_SET_REQUEST_PREFERENCE: string;
- COURIER_CUSTOM_REQUEST_PREFERENCE: string;
- COURIER_MAX_CONCURRENT_SHARD_REQUESTS: string;
- COURIER_BATCH_SEARCHES: string;
- SEARCH_INCLUDE_FROZEN: string;
- HISTOGRAM_BAR_TARGET: string;
- HISTOGRAM_MAX_BARS: string;
- HISTORY_LIMIT: string;
- SHORT_DOTS_ENABLE: string;
- FORMAT_DEFAULT_TYPE_MAP: string;
- FORMAT_NUMBER_DEFAULT_PATTERN: string;
- FORMAT_PERCENT_DEFAULT_PATTERN: string;
- FORMAT_BYTES_DEFAULT_PATTERN: string;
- FORMAT_CURRENCY_DEFAULT_PATTERN: string;
- FORMAT_NUMBER_DEFAULT_LOCALE: string;
- TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: string;
- TIMEPICKER_QUICK_RANGES: string;
- INDEXPATTERN_PLACEHOLDER: string;
- FILTERS_PINNED_BY_DEFAULT: string;
- FILTERS_EDITOR_SUGGEST_VALUES: string;
+ readonly META_FIELDS: "metaFields";
+ readonly DOC_HIGHLIGHT: "doc_table:highlight";
+ readonly QUERY_STRING_OPTIONS: "query:queryString:options";
+ readonly QUERY_ALLOW_LEADING_WILDCARDS: "query:allowLeadingWildcards";
+ readonly SEARCH_QUERY_LANGUAGE: "search:queryLanguage";
+ readonly SORT_OPTIONS: "sort:options";
+ readonly COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: "courier:ignoreFilterIfFieldNotInIndex";
+ readonly COURIER_SET_REQUEST_PREFERENCE: "courier:setRequestPreference";
+ readonly COURIER_CUSTOM_REQUEST_PREFERENCE: "courier:customRequestPreference";
+ readonly COURIER_MAX_CONCURRENT_SHARD_REQUESTS: "courier:maxConcurrentShardRequests";
+ readonly COURIER_BATCH_SEARCHES: "courier:batchSearches";
+ readonly SEARCH_INCLUDE_FROZEN: "search:includeFrozen";
+ readonly HISTOGRAM_BAR_TARGET: "histogram:barTarget";
+ readonly HISTOGRAM_MAX_BARS: "histogram:maxBars";
+ readonly HISTORY_LIMIT: "history:limit";
+ readonly SHORT_DOTS_ENABLE: "shortDots:enable";
+ readonly FORMAT_DEFAULT_TYPE_MAP: "format:defaultTypeMap";
+ readonly FORMAT_NUMBER_DEFAULT_PATTERN: "format:number:defaultPattern";
+ readonly FORMAT_PERCENT_DEFAULT_PATTERN: "format:percent:defaultPattern";
+ readonly FORMAT_BYTES_DEFAULT_PATTERN: "format:bytes:defaultPattern";
+ readonly FORMAT_CURRENCY_DEFAULT_PATTERN: "format:currency:defaultPattern";
+ readonly FORMAT_NUMBER_DEFAULT_LOCALE: "format:number:defaultLocale";
+ readonly TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: "timepicker:refreshIntervalDefaults";
+ readonly TIMEPICKER_QUICK_RANGES: "timepicker:quickRanges";
+ readonly TIMEPICKER_TIME_DEFAULTS: "timepicker:timeDefaults";
+ readonly INDEXPATTERN_PLACEHOLDER: "indexPattern:placeholder";
+ readonly FILTERS_PINNED_BY_DEFAULT: "filters:pinnedByDefault";
+ readonly FILTERS_EDITOR_SUGGEST_VALUES: "filterEditor:suggestValues";
}
```
diff --git a/docs/images/Discover-ContextView.png b/docs/discover/images/Discover-ContextView.png
similarity index 100%
rename from docs/images/Discover-ContextView.png
rename to docs/discover/images/Discover-ContextView.png
diff --git a/docs/images/Discover-Start.png b/docs/discover/images/Discover-Start.png
similarity index 100%
rename from docs/images/Discover-Start.png
rename to docs/discover/images/Discover-Start.png
diff --git a/docs/images/Expanded-Document.png b/docs/discover/images/Expanded-Document.png
similarity index 100%
rename from docs/images/Expanded-Document.png
rename to docs/discover/images/Expanded-Document.png
diff --git a/docs/images/Histogram-Time.png b/docs/discover/images/Histogram-Time.png
similarity index 100%
rename from docs/images/Histogram-Time.png
rename to docs/discover/images/Histogram-Time.png
diff --git a/docs/images/NegativeFilter.jpg b/docs/discover/images/NegativeFilter.jpg
similarity index 100%
rename from docs/images/NegativeFilter.jpg
rename to docs/discover/images/NegativeFilter.jpg
diff --git a/docs/images/PositiveFilter.jpg b/docs/discover/images/PositiveFilter.jpg
similarity index 100%
rename from docs/images/PositiveFilter.jpg
rename to docs/discover/images/PositiveFilter.jpg
diff --git a/docs/images/Timepicker-View.png b/docs/discover/images/Timepicker-View.png
similarity index 100%
rename from docs/images/Timepicker-View.png
rename to docs/discover/images/Timepicker-View.png
diff --git a/docs/images/edit_filter_query_json.png b/docs/discover/images/edit_filter_query_json.png
similarity index 100%
rename from docs/images/edit_filter_query_json.png
rename to docs/discover/images/edit_filter_query_json.png
diff --git a/docs/images/filter-field.png b/docs/discover/images/filter-field.png
similarity index 100%
rename from docs/images/filter-field.png
rename to docs/discover/images/filter-field.png
diff --git a/docs/images/time-filter-bar.png b/docs/discover/images/time-filter-bar.png
similarity index 100%
rename from docs/images/time-filter-bar.png
rename to docs/discover/images/time-filter-bar.png
diff --git a/docs/images/time-filter-calendar.png b/docs/discover/images/time-filter-calendar.png
similarity index 100%
rename from docs/images/time-filter-calendar.png
rename to docs/discover/images/time-filter-calendar.png
diff --git a/docs/images/tutorial-dashboard.png b/docs/getting-started/images/tutorial-dashboard.png
similarity index 100%
rename from docs/images/tutorial-dashboard.png
rename to docs/getting-started/images/tutorial-dashboard.png
diff --git a/docs/images/tutorial-discover-2.png b/docs/getting-started/images/tutorial-discover-2.png
similarity index 100%
rename from docs/images/tutorial-discover-2.png
rename to docs/getting-started/images/tutorial-discover-2.png
diff --git a/docs/images/tutorial-discover-3.png b/docs/getting-started/images/tutorial-discover-3.png
similarity index 100%
rename from docs/images/tutorial-discover-3.png
rename to docs/getting-started/images/tutorial-discover-3.png
diff --git a/docs/images/tutorial-full-inspect1.png b/docs/getting-started/images/tutorial-full-inspect1.png
similarity index 100%
rename from docs/images/tutorial-full-inspect1.png
rename to docs/getting-started/images/tutorial-full-inspect1.png
diff --git a/docs/images/tutorial-pattern-1.png b/docs/getting-started/images/tutorial-pattern-1.png
similarity index 100%
rename from docs/images/tutorial-pattern-1.png
rename to docs/getting-started/images/tutorial-pattern-1.png
diff --git a/docs/images/tutorial-visualize-bar-1.5.png b/docs/getting-started/images/tutorial-visualize-bar-1.5.png
similarity index 100%
rename from docs/images/tutorial-visualize-bar-1.5.png
rename to docs/getting-started/images/tutorial-visualize-bar-1.5.png
diff --git a/docs/images/tutorial-visualize-map-2.png b/docs/getting-started/images/tutorial-visualize-map-2.png
similarity index 100%
rename from docs/images/tutorial-visualize-map-2.png
rename to docs/getting-started/images/tutorial-visualize-map-2.png
diff --git a/docs/images/tutorial-visualize-md-2.png b/docs/getting-started/images/tutorial-visualize-md-2.png
similarity index 100%
rename from docs/images/tutorial-visualize-md-2.png
rename to docs/getting-started/images/tutorial-visualize-md-2.png
diff --git a/docs/images/tutorial-visualize-pie-2.png b/docs/getting-started/images/tutorial-visualize-pie-2.png
similarity index 100%
rename from docs/images/tutorial-visualize-pie-2.png
rename to docs/getting-started/images/tutorial-visualize-pie-2.png
diff --git a/docs/images/tutorial-visualize-pie-3.png b/docs/getting-started/images/tutorial-visualize-pie-3.png
similarity index 100%
rename from docs/images/tutorial-visualize-pie-3.png
rename to docs/getting-started/images/tutorial-visualize-pie-3.png
diff --git a/docs/images/tutorial-visualize-wizard-step-1.png b/docs/getting-started/images/tutorial-visualize-wizard-step-1.png
similarity index 100%
rename from docs/images/tutorial-visualize-wizard-step-1.png
rename to docs/getting-started/images/tutorial-visualize-wizard-step-1.png
diff --git a/docs/images/AddFieldButton.jpg b/docs/images/AddFieldButton.jpg
deleted file mode 100644
index efd4f50e34a0b..0000000000000
Binary files a/docs/images/AddFieldButton.jpg and /dev/null differ
diff --git a/docs/images/CollapseButton.jpg b/docs/images/CollapseButton.jpg
deleted file mode 100644
index 38bb350d49746..0000000000000
Binary files a/docs/images/CollapseButton.jpg and /dev/null differ
diff --git a/docs/images/Dashboard_Resize_Menu.png b/docs/images/Dashboard_Resize_Menu.png
deleted file mode 100644
index 835d23afe40e9..0000000000000
Binary files a/docs/images/Dashboard_Resize_Menu.png and /dev/null differ
diff --git a/docs/images/Dashboard_visualization_data.png b/docs/images/Dashboard_visualization_data.png
deleted file mode 100644
index 9792fedf1a51a..0000000000000
Binary files a/docs/images/Dashboard_visualization_data.png and /dev/null differ
diff --git a/docs/images/Discover-ContextView-FilterMontage.png b/docs/images/Discover-ContextView-FilterMontage.png
deleted file mode 100644
index c990d314a6ba1..0000000000000
Binary files a/docs/images/Discover-ContextView-FilterMontage.png and /dev/null differ
diff --git a/docs/images/Discover-FieldStats.jpg b/docs/images/Discover-FieldStats.jpg
deleted file mode 100644
index 4092b0d7caafd..0000000000000
Binary files a/docs/images/Discover-FieldStats.jpg and /dev/null differ
diff --git a/docs/images/Discover-MoveColumn.jpg b/docs/images/Discover-MoveColumn.jpg
deleted file mode 100644
index 630f2a0f18dbe..0000000000000
Binary files a/docs/images/Discover-MoveColumn.jpg and /dev/null differ
diff --git a/docs/images/EditVis.png b/docs/images/EditVis.png
deleted file mode 100644
index 3013168200860..0000000000000
Binary files a/docs/images/EditVis.png and /dev/null differ
diff --git a/docs/images/ExistsButton.jpg b/docs/images/ExistsButton.jpg
deleted file mode 100644
index 0d4ede0101e73..0000000000000
Binary files a/docs/images/ExistsButton.jpg and /dev/null differ
diff --git a/docs/images/ExpandButton.jpg b/docs/images/ExpandButton.jpg
deleted file mode 100644
index 1ed389a25dd36..0000000000000
Binary files a/docs/images/ExpandButton.jpg and /dev/null differ
diff --git a/docs/images/NYCTA-Table.jpg b/docs/images/NYCTA-Table.jpg
deleted file mode 100644
index 6b4987ef4b437..0000000000000
Binary files a/docs/images/NYCTA-Table.jpg and /dev/null differ
diff --git a/docs/images/NewDashboard.png b/docs/images/NewDashboard.png
deleted file mode 100644
index 08e5159250134..0000000000000
Binary files a/docs/images/NewDashboard.png and /dev/null differ
diff --git a/docs/images/RemoveFieldButton.jpg b/docs/images/RemoveFieldButton.jpg
deleted file mode 100644
index a260dc3cff62e..0000000000000
Binary files a/docs/images/RemoveFieldButton.jpg and /dev/null differ
diff --git a/docs/images/Start-Page.png b/docs/images/Start-Page.png
deleted file mode 100644
index 706d4aafd75e2..0000000000000
Binary files a/docs/images/Start-Page.png and /dev/null differ
diff --git a/docs/images/TimeFilter.jpg b/docs/images/TimeFilter.jpg
deleted file mode 100644
index 1c8700bc05616..0000000000000
Binary files a/docs/images/TimeFilter.jpg and /dev/null differ
diff --git a/docs/images/VizEditor.jpg b/docs/images/VizEditor.jpg
deleted file mode 100644
index 8aabfe544a0cd..0000000000000
Binary files a/docs/images/VizEditor.jpg and /dev/null differ
diff --git a/docs/images/add-column-button.png b/docs/images/add-column-button.png
deleted file mode 100644
index 6f44d0facf41f..0000000000000
Binary files a/docs/images/add-column-button.png and /dev/null differ
diff --git a/docs/images/add_filter_field.png b/docs/images/add_filter_field.png
deleted file mode 100644
index 2052559cf5273..0000000000000
Binary files a/docs/images/add_filter_field.png and /dev/null differ
diff --git a/docs/images/add_filter_operator.png b/docs/images/add_filter_operator.png
deleted file mode 100644
index fd7d42a9d1b98..0000000000000
Binary files a/docs/images/add_filter_operator.png and /dev/null differ
diff --git a/docs/images/add_filter_value.png b/docs/images/add_filter_value.png
deleted file mode 100644
index d357c6e5a3013..0000000000000
Binary files a/docs/images/add_filter_value.png and /dev/null differ
diff --git a/docs/images/auto_format_after.png b/docs/images/auto_format_after.png
deleted file mode 100644
index 018e82951b64f..0000000000000
Binary files a/docs/images/auto_format_after.png and /dev/null differ
diff --git a/docs/images/auto_format_before.png b/docs/images/auto_format_before.png
deleted file mode 100644
index 2535aa1af5240..0000000000000
Binary files a/docs/images/auto_format_before.png and /dev/null differ
diff --git a/docs/images/auto_format_bulk.png b/docs/images/auto_format_bulk.png
deleted file mode 100644
index 92cb688473ab7..0000000000000
Binary files a/docs/images/auto_format_bulk.png and /dev/null differ
diff --git a/docs/images/autorefresh-intervals.png b/docs/images/autorefresh-intervals.png
deleted file mode 100644
index 49be46fefd4aa..0000000000000
Binary files a/docs/images/autorefresh-intervals.png and /dev/null differ
diff --git a/docs/images/autorefresh-pause.png b/docs/images/autorefresh-pause.png
deleted file mode 100644
index 5a83c4587c961..0000000000000
Binary files a/docs/images/autorefresh-pause.png and /dev/null differ
diff --git a/docs/images/autorefresh.png b/docs/images/autorefresh.png
deleted file mode 100644
index 9a6225b9007bd..0000000000000
Binary files a/docs/images/autorefresh.png and /dev/null differ
diff --git a/docs/images/bar-terms-agg.png b/docs/images/bar-terms-agg.png
deleted file mode 100644
index b0b62b9e53213..0000000000000
Binary files a/docs/images/bar-terms-agg.png and /dev/null differ
diff --git a/docs/images/bar-terms-subagg.png b/docs/images/bar-terms-subagg.png
deleted file mode 100644
index 37cf5486eff1e..0000000000000
Binary files a/docs/images/bar-terms-subagg.png and /dev/null differ
diff --git a/docs/images/canvas-align-elements.gif b/docs/images/canvas-align-elements.gif
deleted file mode 100644
index 0081308d68795..0000000000000
Binary files a/docs/images/canvas-align-elements.gif and /dev/null differ
diff --git a/docs/images/canvas-background-color-picker.gif b/docs/images/canvas-background-color-picker.gif
deleted file mode 100644
index bd22941b35f5d..0000000000000
Binary files a/docs/images/canvas-background-color-picker.gif and /dev/null differ
diff --git a/docs/images/canvas-click-drag-element.gif b/docs/images/canvas-click-drag-element.gif
deleted file mode 100644
index 34f4268caf6f5..0000000000000
Binary files a/docs/images/canvas-click-drag-element.gif and /dev/null differ
diff --git a/docs/images/canvas-distribute-elements.gif b/docs/images/canvas-distribute-elements.gif
deleted file mode 100644
index 685d76ba22e40..0000000000000
Binary files a/docs/images/canvas-distribute-elements.gif and /dev/null differ
diff --git a/docs/images/canvas-download-json.gif b/docs/images/canvas-download-json.gif
deleted file mode 100644
index c0c0025e508c1..0000000000000
Binary files a/docs/images/canvas-download-json.gif and /dev/null differ
diff --git a/docs/images/canvas-ecommerce.png b/docs/images/canvas-ecommerce.png
deleted file mode 100644
index 58c0612881341..0000000000000
Binary files a/docs/images/canvas-ecommerce.png and /dev/null differ
diff --git a/docs/images/canvas-element-order.gif b/docs/images/canvas-element-order.gif
deleted file mode 100644
index e2911367e7dfa..0000000000000
Binary files a/docs/images/canvas-element-order.gif and /dev/null differ
diff --git a/docs/images/canvas-embed_workpad.gif b/docs/images/canvas-embed_workpad.gif
deleted file mode 100644
index 97a79d775fe36..0000000000000
Binary files a/docs/images/canvas-embed_workpad.gif and /dev/null differ
diff --git a/docs/images/canvas-fullscreen.gif b/docs/images/canvas-fullscreen.gif
deleted file mode 100644
index 2eebd3b511000..0000000000000
Binary files a/docs/images/canvas-fullscreen.gif and /dev/null differ
diff --git a/docs/images/canvas-move-pixel.gif b/docs/images/canvas-move-pixel.gif
deleted file mode 100644
index 228f0f7b7e18c..0000000000000
Binary files a/docs/images/canvas-move-pixel.gif and /dev/null differ
diff --git a/docs/images/canvas-resize-element.gif b/docs/images/canvas-resize-element.gif
deleted file mode 100644
index d2d2ab06bbb42..0000000000000
Binary files a/docs/images/canvas-resize-element.gif and /dev/null differ
diff --git a/docs/images/canvas-zoom.gif b/docs/images/canvas-zoom.gif
deleted file mode 100644
index 584118d75a43f..0000000000000
Binary files a/docs/images/canvas-zoom.gif and /dev/null differ
diff --git a/docs/images/canvas_create_image.png b/docs/images/canvas_create_image.png
deleted file mode 100644
index 7b7c38102e4c9..0000000000000
Binary files a/docs/images/canvas_create_image.png and /dev/null differ
diff --git a/docs/images/canvas_map-time-filter.gif b/docs/images/canvas_map-time-filter.gif
deleted file mode 100644
index 301d7f4b44158..0000000000000
Binary files a/docs/images/canvas_map-time-filter.gif and /dev/null differ
diff --git a/docs/images/canvas_share_autoplay_480.gif b/docs/images/canvas_share_autoplay_480.gif
deleted file mode 100644
index 84a108e58d3dc..0000000000000
Binary files a/docs/images/canvas_share_autoplay_480.gif and /dev/null differ
diff --git a/docs/images/canvas_share_hidetoolbar_480.gif b/docs/images/canvas_share_hidetoolbar_480.gif
deleted file mode 100644
index 282783057776a..0000000000000
Binary files a/docs/images/canvas_share_hidetoolbar_480.gif and /dev/null differ
diff --git a/docs/images/canvas_workpad_3_page.png b/docs/images/canvas_workpad_3_page.png
deleted file mode 100644
index 9a60ed3d00f60..0000000000000
Binary files a/docs/images/canvas_workpad_3_page.png and /dev/null differ
diff --git a/docs/images/canvas_workpad_edit_style.png b/docs/images/canvas_workpad_edit_style.png
deleted file mode 100644
index d12ae2cd81b8f..0000000000000
Binary files a/docs/images/canvas_workpad_edit_style.png and /dev/null differ
diff --git a/docs/images/canvas_workpad_weblog.png b/docs/images/canvas_workpad_weblog.png
deleted file mode 100755
index 7b6ebee5c9554..0000000000000
Binary files a/docs/images/canvas_workpad_weblog.png and /dev/null differ
diff --git a/docs/images/controls/controls_options.png b/docs/images/controls/controls_options.png
deleted file mode 100644
index aab93d5cd4be0..0000000000000
Binary files a/docs/images/controls/controls_options.png and /dev/null differ
diff --git a/docs/images/controls/dropdown_control_editor.png b/docs/images/controls/dropdown_control_editor.png
deleted file mode 100644
index 36a360dcd275e..0000000000000
Binary files a/docs/images/controls/dropdown_control_editor.png and /dev/null differ
diff --git a/docs/images/controls/range_slider_editor.png b/docs/images/controls/range_slider_editor.png
deleted file mode 100644
index 8d6c5a68d1d24..0000000000000
Binary files a/docs/images/controls/range_slider_editor.png and /dev/null differ
diff --git a/docs/images/discover-compass.png b/docs/images/discover-compass.png
deleted file mode 100644
index 0e3c80ff75a74..0000000000000
Binary files a/docs/images/discover-compass.png and /dev/null differ
diff --git a/docs/images/edit_filter_query.png b/docs/images/edit_filter_query.png
deleted file mode 100644
index 367a2a8578b8b..0000000000000
Binary files a/docs/images/edit_filter_query.png and /dev/null differ
diff --git a/docs/images/filter-actions.png b/docs/images/filter-actions.png
deleted file mode 100644
index 92feef2f0dbbb..0000000000000
Binary files a/docs/images/filter-actions.png and /dev/null differ
diff --git a/docs/images/filter-allbuttons.png b/docs/images/filter-allbuttons.png
deleted file mode 100644
index 3d6951812daa7..0000000000000
Binary files a/docs/images/filter-allbuttons.png and /dev/null differ
diff --git a/docs/images/filter-sample.png b/docs/images/filter-sample.png
deleted file mode 100644
index 9d2540720a5a2..0000000000000
Binary files a/docs/images/filter-sample.png and /dev/null differ
diff --git a/docs/images/goal.png b/docs/images/goal.png
deleted file mode 100644
index 04f16e8cd3e74..0000000000000
Binary files a/docs/images/goal.png and /dev/null differ
diff --git a/docs/images/history.png b/docs/images/history.png
deleted file mode 100644
index 8e6674e1f2c69..0000000000000
Binary files a/docs/images/history.png and /dev/null differ
diff --git a/docs/images/labelbutton.png b/docs/images/labelbutton.png
deleted file mode 100644
index 287a588802384..0000000000000
Binary files a/docs/images/labelbutton.png and /dev/null differ
diff --git a/docs/images/lens_remove_layer.png b/docs/images/lens_remove_layer.png
deleted file mode 100644
index 4184e5b846870..0000000000000
Binary files a/docs/images/lens_remove_layer.png and /dev/null differ
diff --git a/docs/images/management-index-management.png b/docs/images/management-index-management.png
deleted file mode 100644
index 1b1ff9226147c..0000000000000
Binary files a/docs/images/management-index-management.png and /dev/null differ
diff --git a/docs/images/management-upgrade-assistant-8.0.png b/docs/images/management-upgrade-assistant-8.0.png
deleted file mode 100644
index 4b37262414039..0000000000000
Binary files a/docs/images/management-upgrade-assistant-8.0.png and /dev/null differ
diff --git a/docs/images/management-watcher-buttons.png b/docs/images/management-watcher-buttons.png
deleted file mode 100644
index ce114ccf1bac9..0000000000000
Binary files a/docs/images/management-watcher-buttons.png and /dev/null differ
diff --git a/docs/images/management_rolled_dashboard.png b/docs/images/management_rolled_dashboard.png
deleted file mode 100755
index db731420fb96a..0000000000000
Binary files a/docs/images/management_rolled_dashboard.png and /dev/null differ
diff --git a/docs/images/management_rollups_visualization.png b/docs/images/management_rollups_visualization.png
deleted file mode 100755
index bba3b6e91a953..0000000000000
Binary files a/docs/images/management_rollups_visualization.png and /dev/null differ
diff --git a/docs/images/markdown-example.png b/docs/images/markdown-example.png
deleted file mode 100644
index 79daa1298883d..0000000000000
Binary files a/docs/images/markdown-example.png and /dev/null differ
diff --git a/docs/images/multiple_requests.png b/docs/images/multiple_requests.png
deleted file mode 100644
index e4fd010d54b4b..0000000000000
Binary files a/docs/images/multiple_requests.png and /dev/null differ
diff --git a/docs/images/regionmap.png b/docs/images/regionmap.png
deleted file mode 100644
index 97f2594e8bee6..0000000000000
Binary files a/docs/images/regionmap.png and /dev/null differ
diff --git a/docs/images/search-button.jpg b/docs/images/search-button.jpg
deleted file mode 100644
index b7787cac4bf6a..0000000000000
Binary files a/docs/images/search-button.jpg and /dev/null differ
diff --git a/docs/images/security_base_all.png b/docs/images/security_base_all.png
deleted file mode 100644
index 2aef42132ef21..0000000000000
Binary files a/docs/images/security_base_all.png and /dev/null differ
diff --git a/docs/images/share-short-link.png b/docs/images/share-short-link.png
deleted file mode 100644
index bf7f7782c4e2a..0000000000000
Binary files a/docs/images/share-short-link.png and /dev/null differ
diff --git a/docs/images/time-filter-absolute.jpg b/docs/images/time-filter-absolute.jpg
deleted file mode 100644
index bc54d57f0f737..0000000000000
Binary files a/docs/images/time-filter-absolute.jpg and /dev/null differ
diff --git a/docs/images/time-filter-relative.jpg b/docs/images/time-filter-relative.jpg
deleted file mode 100644
index 77beca3a3fd46..0000000000000
Binary files a/docs/images/time-filter-relative.jpg and /dev/null differ
diff --git a/docs/images/time-filter.jpg b/docs/images/time-filter.jpg
deleted file mode 100644
index e437f314d849d..0000000000000
Binary files a/docs/images/time-filter.jpg and /dev/null differ
diff --git a/docs/images/time-picker-step.jpg b/docs/images/time-picker-step.jpg
deleted file mode 100644
index 90c749776bb5d..0000000000000
Binary files a/docs/images/time-picker-step.jpg and /dev/null differ
diff --git a/docs/images/time-picker.jpg b/docs/images/time-picker.jpg
deleted file mode 100644
index 25830082d5919..0000000000000
Binary files a/docs/images/time-picker.jpg and /dev/null differ
diff --git a/docs/images/timelion-arg-help.jpg b/docs/images/timelion-arg-help.jpg
deleted file mode 100644
index 3e471c861d46b..0000000000000
Binary files a/docs/images/timelion-arg-help.jpg and /dev/null differ
diff --git a/docs/images/timelion-read-only-badge.png b/docs/images/timelion-read-only-badge.png
deleted file mode 100644
index 19ffbfed6335a..0000000000000
Binary files a/docs/images/timelion-read-only-badge.png and /dev/null differ
diff --git a/docs/images/timelion-save01.png b/docs/images/timelion-save01.png
deleted file mode 100644
index 47a33c2d36d43..0000000000000
Binary files a/docs/images/timelion-save01.png and /dev/null differ
diff --git a/docs/images/timelion-save02.png b/docs/images/timelion-save02.png
deleted file mode 100644
index 348b084ee5259..0000000000000
Binary files a/docs/images/timelion-save02.png and /dev/null differ
diff --git a/docs/images/tsvb-annotations.png b/docs/images/tsvb-annotations.png
deleted file mode 100644
index 22238db7e9e91..0000000000000
Binary files a/docs/images/tsvb-annotations.png and /dev/null differ
diff --git a/docs/images/tsvb-data-tab-derivative-example.png b/docs/images/tsvb-data-tab-derivative-example.png
deleted file mode 100644
index 66368baf1e16a..0000000000000
Binary files a/docs/images/tsvb-data-tab-derivative-example.png and /dev/null differ
diff --git a/docs/images/tsvb-data-tab-label.png b/docs/images/tsvb-data-tab-label.png
deleted file mode 100644
index 43d1fc64f4446..0000000000000
Binary files a/docs/images/tsvb-data-tab-label.png and /dev/null differ
diff --git a/docs/images/tsvb-data-tab-series-options-time-series.png b/docs/images/tsvb-data-tab-series-options-time-series.png
deleted file mode 100644
index 4c7ddadd38d95..0000000000000
Binary files a/docs/images/tsvb-data-tab-series-options-time-series.png and /dev/null differ
diff --git a/docs/images/tsvb-data-tab-series-options.png b/docs/images/tsvb-data-tab-series-options.png
deleted file mode 100644
index afadc3349bfe4..0000000000000
Binary files a/docs/images/tsvb-data-tab-series-options.png and /dev/null differ
diff --git a/docs/images/tutorial-full-inspect2.png b/docs/images/tutorial-full-inspect2.png
deleted file mode 100644
index 23c840f545ec3..0000000000000
Binary files a/docs/images/tutorial-full-inspect2.png and /dev/null differ
diff --git a/docs/images/tutorial-sample-discover-2.png b/docs/images/tutorial-sample-discover-2.png
deleted file mode 100644
index 4f4b2dc920ccb..0000000000000
Binary files a/docs/images/tutorial-sample-discover-2.png and /dev/null differ
diff --git a/docs/images/tutorial-sample-inspect2.png b/docs/images/tutorial-sample-inspect2.png
deleted file mode 100644
index b487d21e5cc02..0000000000000
Binary files a/docs/images/tutorial-sample-inspect2.png and /dev/null differ
diff --git a/docs/images/tutorial-visualize-pie-1.png b/docs/images/tutorial-visualize-pie-1.png
deleted file mode 100644
index 109829c01f28c..0000000000000
Binary files a/docs/images/tutorial-visualize-pie-1.png and /dev/null differ
diff --git a/docs/images/visualize-flow.png b/docs/images/visualize-flow.png
deleted file mode 100644
index bc00ff52a8d6e..0000000000000
Binary files a/docs/images/visualize-flow.png and /dev/null differ
diff --git a/docs/images/visualize-icon.png b/docs/images/visualize-icon.png
deleted file mode 100644
index af7ad18e9bf79..0000000000000
Binary files a/docs/images/visualize-icon.png and /dev/null differ
diff --git a/docs/images/visualize_coordinate_map_example.png b/docs/images/visualize_coordinate_map_example.png
deleted file mode 100644
index 24f03376adade..0000000000000
Binary files a/docs/images/visualize_coordinate_map_example.png and /dev/null differ
diff --git a/docs/images/visualize_region_map_example.png b/docs/images/visualize_region_map_example.png
deleted file mode 100644
index cf89e92625ece..0000000000000
Binary files a/docs/images/visualize_region_map_example.png and /dev/null differ
diff --git a/docs/images/viz-fit-bounds.png b/docs/images/viz-fit-bounds.png
deleted file mode 100644
index 9c0ddb89d7ddd..0000000000000
Binary files a/docs/images/viz-fit-bounds.png and /dev/null differ
diff --git a/docs/images/viz-lat-long-filter.png b/docs/images/viz-lat-long-filter.png
deleted file mode 100644
index 30c139b224565..0000000000000
Binary files a/docs/images/viz-lat-long-filter.png and /dev/null differ
diff --git a/docs/images/viz-zoom.png b/docs/images/viz-zoom.png
deleted file mode 100644
index 661e053130882..0000000000000
Binary files a/docs/images/viz-zoom.png and /dev/null differ
diff --git a/docs/images/follower_indices.png b/docs/management/alerting/images/follower_indices.png
similarity index 100%
rename from docs/images/follower_indices.png
rename to docs/management/alerting/images/follower_indices.png
diff --git a/docs/images/actions_icon.png b/docs/management/images/actions_icon.png
similarity index 100%
rename from docs/images/actions_icon.png
rename to docs/management/images/actions_icon.png
diff --git a/docs/images/add_remote_cluster.png b/docs/management/images/add_remote_cluster.png
similarity index 100%
rename from docs/images/add_remote_cluster.png
rename to docs/management/images/add_remote_cluster.png
diff --git a/docs/images/auto_follow_pattern.png b/docs/management/images/auto_follow_pattern.png
similarity index 100%
rename from docs/images/auto_follow_pattern.png
rename to docs/management/images/auto_follow_pattern.png
diff --git a/docs/images/colorformatter.png b/docs/management/images/colorformatter.png
similarity index 100%
rename from docs/images/colorformatter.png
rename to docs/management/images/colorformatter.png
diff --git a/docs/images/cross-cluster-replication-list-view.png b/docs/management/images/cross-cluster-replication-list-view.png
similarity index 100%
rename from docs/images/cross-cluster-replication-list-view.png
rename to docs/management/images/cross-cluster-replication-list-view.png
diff --git a/docs/images/index-lifecycle-policies-create.png b/docs/management/images/index-lifecycle-policies-create.png
similarity index 100%
rename from docs/images/index-lifecycle-policies-create.png
rename to docs/management/images/index-lifecycle-policies-create.png
diff --git a/docs/images/index_lifecycle_policies_options.png b/docs/management/images/index_lifecycle_policies_options.png
similarity index 100%
rename from docs/images/index_lifecycle_policies_options.png
rename to docs/management/images/index_lifecycle_policies_options.png
diff --git a/docs/images/index_management_add_policy.png b/docs/management/images/index_management_add_policy.png
similarity index 100%
rename from docs/images/index_management_add_policy.png
rename to docs/management/images/index_management_add_policy.png
diff --git a/docs/images/management-create-rollup-bar-chart.png b/docs/management/images/management-create-rollup-bar-chart.png
similarity index 100%
rename from docs/images/management-create-rollup-bar-chart.png
rename to docs/management/images/management-create-rollup-bar-chart.png
diff --git a/docs/images/management-index-patterns.png b/docs/management/images/management-index-patterns.png
similarity index 100%
rename from docs/images/management-index-patterns.png
rename to docs/management/images/management-index-patterns.png
diff --git a/docs/images/management-index-read-only-badge.png b/docs/management/images/management-index-read-only-badge.png
similarity index 100%
rename from docs/images/management-index-read-only-badge.png
rename to docs/management/images/management-index-read-only-badge.png
diff --git a/docs/images/management-index-templates-mappings.png b/docs/management/images/management-index-templates-mappings.png
similarity index 100%
rename from docs/images/management-index-templates-mappings.png
rename to docs/management/images/management-index-templates-mappings.png
diff --git a/docs/images/management-index-templates.png b/docs/management/images/management-index-templates.png
similarity index 100%
rename from docs/images/management-index-templates.png
rename to docs/management/images/management-index-templates.png
diff --git a/docs/images/management-license.png b/docs/management/images/management-license.png
similarity index 100%
rename from docs/images/management-license.png
rename to docs/management/images/management-license.png
diff --git a/docs/images/management-rollup-index-pattern.png b/docs/management/images/management-rollup-index-pattern.png
similarity index 100%
rename from docs/images/management-rollup-index-pattern.png
rename to docs/management/images/management-rollup-index-pattern.png
diff --git a/docs/images/management-saved-objects.png b/docs/management/images/management-saved-objects.png
similarity index 100%
rename from docs/images/management-saved-objects.png
rename to docs/management/images/management-saved-objects.png
diff --git a/docs/images/management-upgrade-assistant-9.0.png b/docs/management/images/management-upgrade-assistant-9.0.png
similarity index 100%
rename from docs/images/management-upgrade-assistant-9.0.png
rename to docs/management/images/management-upgrade-assistant-9.0.png
diff --git a/docs/images/management_create_rollup_job.png b/docs/management/images/management_create_rollup_job.png
similarity index 100%
rename from docs/images/management_create_rollup_job.png
rename to docs/management/images/management_create_rollup_job.png
diff --git a/docs/images/management_create_rollup_menu.png b/docs/management/images/management_create_rollup_menu.png
similarity index 100%
rename from docs/images/management_create_rollup_menu.png
rename to docs/management/images/management_create_rollup_menu.png
diff --git a/docs/images/management_index_create_wizard.png b/docs/management/images/management_index_create_wizard.png
similarity index 100%
rename from docs/images/management_index_create_wizard.png
rename to docs/management/images/management_index_create_wizard.png
diff --git a/docs/images/management_index_details.png b/docs/management/images/management_index_details.png
similarity index 100%
rename from docs/images/management_index_details.png
rename to docs/management/images/management_index_details.png
diff --git a/docs/images/management_index_labels.png b/docs/management/images/management_index_labels.png
similarity index 100%
rename from docs/images/management_index_labels.png
rename to docs/management/images/management_index_labels.png
diff --git a/docs/images/management_rollup_job_dashboard.png b/docs/management/images/management_rollup_job_dashboard.png
similarity index 100%
rename from docs/images/management_rollup_job_dashboard.png
rename to docs/management/images/management_rollup_job_dashboard.png
diff --git a/docs/images/management_rollup_job_details.png b/docs/management/images/management_rollup_job_details.png
similarity index 100%
rename from docs/images/management_rollup_job_details.png
rename to docs/management/images/management_rollup_job_details.png
diff --git a/docs/images/management_rollup_job_vis.png b/docs/management/images/management_rollup_job_vis.png
similarity index 100%
rename from docs/images/management_rollup_job_vis.png
rename to docs/management/images/management_rollup_job_vis.png
diff --git a/docs/images/management_rollup_list.png b/docs/management/images/management_rollup_list.png
similarity index 100%
rename from docs/images/management_rollup_list.png
rename to docs/management/images/management_rollup_list.png
diff --git a/docs/images/remote-clusters-list-view.png b/docs/management/images/remote-clusters-list-view.png
similarity index 100%
rename from docs/images/remote-clusters-list-view.png
rename to docs/management/images/remote-clusters-list-view.png
diff --git a/docs/images/settings-read-only-badge.png b/docs/management/images/settings-read-only-badge.png
similarity index 100%
rename from docs/images/settings-read-only-badge.png
rename to docs/management/images/settings-read-only-badge.png
diff --git a/docs/images/tutorial-ilm-custom-policy.png b/docs/management/images/tutorial-ilm-custom-policy.png
similarity index 100%
rename from docs/images/tutorial-ilm-custom-policy.png
rename to docs/management/images/tutorial-ilm-custom-policy.png
diff --git a/docs/images/tutorial-ilm-delete-phase-creation.png b/docs/management/images/tutorial-ilm-delete-phase-creation.png
similarity index 100%
rename from docs/images/tutorial-ilm-delete-phase-creation.png
rename to docs/management/images/tutorial-ilm-delete-phase-creation.png
diff --git a/docs/images/tutorial-ilm-delete-rollover.png b/docs/management/images/tutorial-ilm-delete-rollover.png
similarity index 100%
rename from docs/images/tutorial-ilm-delete-rollover.png
rename to docs/management/images/tutorial-ilm-delete-rollover.png
diff --git a/docs/images/tutorial-ilm-hotphaserollover-default.png b/docs/management/images/tutorial-ilm-hotphaserollover-default.png
similarity index 100%
rename from docs/images/tutorial-ilm-hotphaserollover-default.png
rename to docs/management/images/tutorial-ilm-hotphaserollover-default.png
diff --git a/docs/images/tutorial-ilm-modify-default-warm-phase-rollover.png b/docs/management/images/tutorial-ilm-modify-default-warm-phase-rollover.png
similarity index 100%
rename from docs/images/tutorial-ilm-modify-default-warm-phase-rollover.png
rename to docs/management/images/tutorial-ilm-modify-default-warm-phase-rollover.png
diff --git a/docs/images/add-data-fv.png b/docs/setup/images/add-data-fv.png
similarity index 100%
rename from docs/images/add-data-fv.png
rename to docs/setup/images/add-data-fv.png
diff --git a/docs/images/add-data-tutorials.png b/docs/setup/images/add-data-tutorials.png
similarity index 100%
rename from docs/images/add-data-tutorials.png
rename to docs/setup/images/add-data-tutorials.png
diff --git a/docs/images/data-viz-homepage.jpg b/docs/setup/images/data-viz-homepage.jpg
similarity index 100%
rename from docs/images/data-viz-homepage.jpg
rename to docs/setup/images/data-viz-homepage.jpg
diff --git a/docs/images/kibana-status-page-7_5_0.png b/docs/setup/images/kibana-status-page-7_5_0.png
similarity index 100%
rename from docs/images/kibana-status-page-7_5_0.png
rename to docs/setup/images/kibana-status-page-7_5_0.png
diff --git a/docs/uptime-guide/alerting.asciidoc b/docs/uptime-guide/alerting.asciidoc
deleted file mode 100644
index bf9e7693fc7a5..0000000000000
--- a/docs/uptime-guide/alerting.asciidoc
+++ /dev/null
@@ -1,33 +0,0 @@
-[role="xpack"]
-[[uptime-alerting]]
-
-=== Uptime alerting
-
-The Uptime app integrates with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions]
-feature. It provides a set of built-in actions and Uptime specific threshold alerts for you to use
-and enables central management of all alerts from {kibana-ref}/management.html[Kibana Management].
-
-[role="screenshot"]
-image::images/create-alert.png[Create alert]
-
-[float]
-==== Monitor status alerts
-
-To receive alerts when a monitor goes down, use the alerting menu at the top of the
-overview page. Use a query in the alert flyout to determine which monitors to check
-with your alert. If you already have a query in the overview page search bar it will
-be carried over into this box.
-
-[role="screenshot"]
-image::images/monitor-status-alert.png[Create monitor status alert flyout]
-
-[float]
-==== TLS alerts
-
-Uptime also provides the ability to create an alert that will notify you when one or
-more of your monitors have a TLS certificate that will expire within some threshold,
-or when its age exceeds a limit. The values for these thresholds are configurable on
-the <>.
-
-[role="screenshot"]
-image::images/tls-alert.png[Create TLS alert flyout]
diff --git a/docs/uptime-guide/app-overview.asciidoc b/docs/uptime-guide/app-overview.asciidoc
deleted file mode 100644
index 692489a7ad311..0000000000000
--- a/docs/uptime-guide/app-overview.asciidoc
+++ /dev/null
@@ -1,70 +0,0 @@
-[role="xpack"]
-[[uptime-app]]
-== Uptime app
-
-The Uptime app in {kib} enables you to monitor the status of network endpoints via HTTP/S, TCP, and ICMP.
-You can explore endpoint status over time, drill down into specific monitors,
-and view a high-level snapshot of your environment at any point in time.
-
-[role="screenshot"]
-image::images/uptime-overview.png[Uptime app overview]
-
-[role="xpack"]
-[[uptime-app-overview]]
-=== Overview
-
-The Uptime overview helps you quickly identify and diagnose outages and
-other connectivity issues within your network or environment. You can use the date range
-selection that is global to the Uptime app, to highlight
-an absolute date range, or a relative one, similar to other areas of {kib}.
-
-[float]
-=== Filter bar
-
-The Filter bar enables you to quickly view specific groups of monitors, or even
-an individual monitor if you have defined many.
-
-This control allows you to use automated filter options, as well as input custom filter
-text to select specific monitors by field, URL, ID, and other attributes.
-
-[role="screenshot"]
-image::images/filter-bar.png[Filter bar]
-
-[float]
-=== Snapshot panel
-
-The Snapshot panel displays the overall
-status of the environment you're monitoring or a subset of those monitors.
-You can see the total number of detected monitors within the selected
-Uptime date range, along with the number of monitors
-in an `up` or `down` state, which is based on the last check reported by Heartbeat
-for each monitor.
-
-Next to the counts, there is a histogram displaying the change over time throughout the
-selected date range.
-
-[role="screenshot"]
-image::images/snapshot-view.png[Snapshot view]
-
-[float]
-=== Monitor list
-
-Information about individual monitors is displayed in the monitor list and provides a quick
-way to navigate to a more in-depth visualization for interesting hosts or endpoints.
-
-The information displayed includes the recent status of a host or endpoint, when the monitor was last checked, its
-ID and URL, and its IP address. There is also sparkline showing its check status over time.
-
-[role="screenshot"]
-image::images/monitor-list.png[Monitor list]
-
-[float]
-=== Observability integrations
-
-The Monitor list also contains a menu of available integrations. When Uptime detects Kubernetes or
-Docker related host information, it provides links to open the Metrics app or Logs app pre-filtered
-for this host. Additionally, to help you quickly determine if these solutions contain data relevant to you,
-this feature contains links to filter the other views on the host's IP address.
-
-[role="screenshot"]
-image::images/observability_integrations.png[Observability integrations]
diff --git a/docs/uptime-guide/certificates.asciidoc b/docs/uptime-guide/certificates.asciidoc
deleted file mode 100644
index 58db91aa080eb..0000000000000
--- a/docs/uptime-guide/certificates.asciidoc
+++ /dev/null
@@ -1,15 +0,0 @@
-[role="xpack"]
-[[uptime-certificates]]
-
-=== Certificates
-
-The certificates page enables you to visualize TLS certificate data in your indices. In addition to the
-common name, associated monitors, issuer information, and SHA fingerprints, Uptime also assigns a status
-derived from the threshold values in the <>.
-
-Several of the columns on this page are sortable. You can use the search bar at the top of the view
-to find values in most of the TLS-related fields in your Uptime indices. Additionally, using the `Alerts`
-dropdown at the top of the page you can create a TLS alert.
-
-[role="screenshot"]
-image::images/certificates-page.png[Certificates]
diff --git a/docs/uptime-guide/deployment-arch.asciidoc b/docs/uptime-guide/deployment-arch.asciidoc
deleted file mode 100644
index c1b2f596c6665..0000000000000
--- a/docs/uptime-guide/deployment-arch.asciidoc
+++ /dev/null
@@ -1,27 +0,0 @@
-[role="xpack"]
-[[uptime-deployment-arch]]
-== Deployment Architecture
-
-There are multiple ways to deploy Uptime and Heartbeat.
-Use the information in this section to determine the best deployment for you.
-A guiding principle is that when an outage takes down the service being monitored it should not also take down Heartbeat.
-You want Heartbeat to be functioning even when your service is not, so the guidelines here help you maximize this possibility.
-
-Heartbeat is commonly run as a centralized service within a data center.
-While it is possible to run it as a separate "sidecar" process paired with each process/container, we recommend against it.
-Running Heartbeat centrally ensures you will still be able to see monitoring data in the event of an overloaded, disconnected, or otherwise malfunctioning server.
-
-For further redundancy, you may want to deploy multiple Heartbeats across geographic and network boundaries to provide more data.
-To do so, specify Heartbeat's observer {heartbeat-ref}/configuration-observer-options.html[geo options].
-
-Some examples might be:
-
-* **A site served from a content delivery network (CDN) with points of presence (POPs) around the globe:**
-To check if your site is reachable via CDN POPS, you may want to have multiple Heartbeat instances at different data centers around the world.
-* **A service within a single data center that is accessed across multiple VPNs:**
-Set up one Heartbeat instance within the VPN the service operates from, and another within an additional VPN that users access the service from.
-Having both instances helps pinpoint network errors in the event of an outage.
-* **A single service running primarily in a US east coast data center, with a hot failover located in a US west coast data center:**
-In each data center, run a Heartbeat instance that checks both the local copy of the service and its counterpart across the country.
-Set up two monitors in each region, one for the local service and one for the remote service.
-In the event of a data center failure it will be immediately apparent if the service had a connectivity issue to the outside world or if the failure was only internal.
diff --git a/docs/uptime-guide/images/cert-exp.png b/docs/uptime-guide/images/cert-exp.png
deleted file mode 100644
index cd87668db96dd..0000000000000
Binary files a/docs/uptime-guide/images/cert-exp.png and /dev/null differ
diff --git a/docs/uptime-guide/images/certificates-page.png b/docs/uptime-guide/images/certificates-page.png
deleted file mode 100644
index 598aae982cd6a..0000000000000
Binary files a/docs/uptime-guide/images/certificates-page.png and /dev/null differ
diff --git a/docs/uptime-guide/images/check-history.png b/docs/uptime-guide/images/check-history.png
deleted file mode 100644
index aac5efd9b91d3..0000000000000
Binary files a/docs/uptime-guide/images/check-history.png and /dev/null differ
diff --git a/docs/uptime-guide/images/create-alert.png b/docs/uptime-guide/images/create-alert.png
deleted file mode 100644
index 54a0c400cad4c..0000000000000
Binary files a/docs/uptime-guide/images/create-alert.png and /dev/null differ
diff --git a/docs/uptime-guide/images/crosshair-example.png b/docs/uptime-guide/images/crosshair-example.png
deleted file mode 100644
index f9e89c4f622e0..0000000000000
Binary files a/docs/uptime-guide/images/crosshair-example.png and /dev/null differ
diff --git a/docs/uptime-guide/images/filter-bar.png b/docs/uptime-guide/images/filter-bar.png
deleted file mode 100644
index b7c424d3d0d91..0000000000000
Binary files a/docs/uptime-guide/images/filter-bar.png and /dev/null differ
diff --git a/docs/uptime-guide/images/indices.png b/docs/uptime-guide/images/indices.png
deleted file mode 100644
index 4090747b6726c..0000000000000
Binary files a/docs/uptime-guide/images/indices.png and /dev/null differ
diff --git a/docs/uptime-guide/images/monitor-charts.png b/docs/uptime-guide/images/monitor-charts.png
deleted file mode 100644
index 522f34662657e..0000000000000
Binary files a/docs/uptime-guide/images/monitor-charts.png and /dev/null differ
diff --git a/docs/uptime-guide/images/monitor-list.png b/docs/uptime-guide/images/monitor-list.png
deleted file mode 100644
index c9a8eccf01f6e..0000000000000
Binary files a/docs/uptime-guide/images/monitor-list.png and /dev/null differ
diff --git a/docs/uptime-guide/images/monitor-status-alert.png b/docs/uptime-guide/images/monitor-status-alert.png
deleted file mode 100644
index 847a0f58f02ce..0000000000000
Binary files a/docs/uptime-guide/images/monitor-status-alert.png and /dev/null differ
diff --git a/docs/uptime-guide/images/observability_integrations.png b/docs/uptime-guide/images/observability_integrations.png
deleted file mode 100644
index 3b23aa2dbd2a5..0000000000000
Binary files a/docs/uptime-guide/images/observability_integrations.png and /dev/null differ
diff --git a/docs/uptime-guide/images/settings.png b/docs/uptime-guide/images/settings.png
deleted file mode 100644
index d19b7f842ea68..0000000000000
Binary files a/docs/uptime-guide/images/settings.png and /dev/null differ
diff --git a/docs/uptime-guide/images/snapshot-view.png b/docs/uptime-guide/images/snapshot-view.png
deleted file mode 100644
index b6f07fb0721aa..0000000000000
Binary files a/docs/uptime-guide/images/snapshot-view.png and /dev/null differ
diff --git a/docs/uptime-guide/images/status-bar.png b/docs/uptime-guide/images/status-bar.png
deleted file mode 100644
index fd72e2b78c2a0..0000000000000
Binary files a/docs/uptime-guide/images/status-bar.png and /dev/null differ
diff --git a/docs/uptime-guide/images/tls-alert.png b/docs/uptime-guide/images/tls-alert.png
deleted file mode 100644
index 19efe07838903..0000000000000
Binary files a/docs/uptime-guide/images/tls-alert.png and /dev/null differ
diff --git a/docs/uptime-guide/images/uptime-multi-deployment.png b/docs/uptime-guide/images/uptime-multi-deployment.png
deleted file mode 100644
index 5440d91e48e23..0000000000000
Binary files a/docs/uptime-guide/images/uptime-multi-deployment.png and /dev/null differ
diff --git a/docs/uptime-guide/images/uptime-overview.png b/docs/uptime-guide/images/uptime-overview.png
deleted file mode 100644
index 25c88b2d14287..0000000000000
Binary files a/docs/uptime-guide/images/uptime-overview.png and /dev/null differ
diff --git a/docs/uptime-guide/images/uptime-setup.png b/docs/uptime-guide/images/uptime-setup.png
deleted file mode 100644
index 398125202fc4a..0000000000000
Binary files a/docs/uptime-guide/images/uptime-setup.png and /dev/null differ
diff --git a/docs/uptime-guide/images/uptime-simple-deployment.png b/docs/uptime-guide/images/uptime-simple-deployment.png
deleted file mode 100644
index f46dfdb2b8b86..0000000000000
Binary files a/docs/uptime-guide/images/uptime-simple-deployment.png and /dev/null differ
diff --git a/docs/uptime-guide/index.asciidoc b/docs/uptime-guide/index.asciidoc
deleted file mode 100644
index 01a93cb454ea9..0000000000000
--- a/docs/uptime-guide/index.asciidoc
+++ /dev/null
@@ -1,22 +0,0 @@
-
-include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
-include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
-
-= Uptime monitoring guide
-
-include::overview.asciidoc[]
-
-include::install.asciidoc[]
-
-include::deployment-arch.asciidoc[]
-
-include::app-overview.asciidoc[]
-
-include::monitor.asciidoc[]
-
-include::settings.asciidoc[]
-
-include::certificates.asciidoc[]
-
-include::alerting.asciidoc[]
-
diff --git a/docs/uptime-guide/install.asciidoc b/docs/uptime-guide/install.asciidoc
deleted file mode 100644
index 05b9c6665562f..0000000000000
--- a/docs/uptime-guide/install.asciidoc
+++ /dev/null
@@ -1,74 +0,0 @@
-[[install-uptime]]
-== Install Uptime
-
-The easiest way to get started with Elastic Uptime is by using our hosted {es} Service on Elastic Cloud.
-The {es} Service is available on both AWS and GCP,
-and automatically configures {es} and {kib}.
-
-[float]
-=== Hosted Elasticsearch Service
-
-Skip managing your own {es} and {kib} instance by using our
-https://www.elastic.co/cloud/elasticsearch-service[hosted {es} Service] on
-Elastic Cloud.
-
-{ess-trial}[Try out the {es} Service for free],
-then jump straight to <>.
-
-[float]
-[[before-installation]]
-=== Install the stack yourself
-
-If you'd rather install the stack yourself,
-first see the https://www.elastic.co/support/matrix[Elastic Support Matrix] for information about supported operating systems and product compatibility.
-
-* <>
-* <>
-* <>
-
-[[install-elasticsearch]]
-=== Step 1: Install Elasticsearch
-
-Install an {es} cluster, start it up, and make sure it's running.
-
-. Verify that your system meets the
-https://www.elastic.co/support/matrix#matrix_jvm[minimum JVM requirements] for {es}.
-. {stack-gs}/get-started-elastic-stack.html#install-elasticsearch[Install Elasticsearch].
-. {stack-gs}/get-started-elastic-stack.html#_make_sure_elasticsearch_is_up_and_running[Make sure elasticsearch is up and running].
-
-[[install-kibana]]
-=== Step 2: Install Kibana
-
-Install {kib}, start it up, and open up the web interface:
-
-. {stack-gs}/get-started-elastic-stack.html#install-kibana[Install Kibana].
-. {stack-gs}/get-started-elastic-stack.html#_launch_the_kibana_web_interface[Launch the Kibana Web Interface].
-
-[[install-heartbeat]]
-=== Step 3: Install and configure Heartbeat
-
-Uptime requires the setup of monitors in Heartbeat.
-These monitors provide the data you'll be visualizing in the {kibana-ref}/xpack-uptime.html[Uptime app].
-
-For instructions on installing and configuring Heartbeat, see the *Setup Instructions* in {kib}.
-Additional information is available in {heartbeat-ref}/heartbeat-configuration.html[Configure Heartbeat].
-
-[role="screenshot"]
-image::images/uptime-setup.png[Installation instructions on the Uptime page in Kibana]
-
-[[setup-security]]
-=== Step 4: Set up Security
-
-Secure your installation by following the {heartbeat-ref}/securing-heartbeat.html[Secure Heartbeat] documentation.
-
-[float]
-==== Important considerations
-
-* Make sure you're using the same major versions of Heartbeat and {kib}.
-
-* Index patterns tell {kib} which {es} indices you want to explore.
-The Uptime app requires a +heartbeat-{major-version-only}*+ index pattern.
-If you have configured a different index pattern, you can use {ref}/indices-aliases.html[index aliases] to ensure data is recognized by the Uptime app.
-
-After you install and configure Heartbeat,
-the {kibana-ref}/xpack-uptime.html[Uptime app] is automatically populated with the Heartbeat monitors.
diff --git a/docs/uptime-guide/monitor.asciidoc b/docs/uptime-guide/monitor.asciidoc
deleted file mode 100644
index bb5d315cf63eb..0000000000000
--- a/docs/uptime-guide/monitor.asciidoc
+++ /dev/null
@@ -1,59 +0,0 @@
-[role="xpack"]
-[[uptime-monitor]]
-=== Monitor
-
-The Monitor page helps you gain insights into the performance
-of a specific network endpoint. A detailed visualization of
-the monitor's request duration over time, as well as the `up`/`down`
-status over time, is displayed. By configuring Machine Learning jobs
-on this page, you can also also detect anomalies in response time data.
-
-
-==== Status panel
-
-The Status panel displays a quick summary of the latest information
-regarding your monitor. You can view its latest status, click a link to
-visit the targeted URL, see its most recent request duration, and determine the
-amount of time that has elapsed since the last check.
-
-When two Heartbeat instances are configured in different geographic locations
-the map will show each location as a pinpoint on the map, along with the
-amount of time elapsed since data was last received from that location.
-
-[role="screenshot"]
-image::images/status-bar.png[Status bar]
-
-
-[float]
-==== Monitor charts
-
-The Monitor charts visualize information over the time specified in the
-date range. These charts help you gain insights into how quickly requests are being resolved
-by the targeted endpoint, and give you a sense of how frequently a host or endpoint
-was down in your selected timespan.
-
-[role="screenshot"]
-image::images/monitor-charts.png[Monitor charts]
-
-The Monitor duration chart displays request duration information for your monitor.
-The area surrounding the line is the range of request time for the corresponding
-bucket. The line is the average time. In the upper right hand of this panel
-you can enable Anomaly detection using Machine Learning. When response times change
-in an unexpected way the time range in which they occurred are highlighted with a color.
-
-The pings over time chart is a graphical representation of the check statuses over time.
-Hover over the charts to display crosshairs with specific numeric data.
-
-[role="screenshot"]
-image::images/crosshair-example.png[Chart crosshair]
-
-[float]
-==== Check history
-
-The Check history table lists the total count of this monitor's checks for the selected
-date range. To help find recent problems on a per-check basis, you can filter the checks
-by status and location. This table can help you gain some insight into more granular details
-about recent individual data points that Heartbeat is logging about your host or endpoint.
-
-[role="screenshot"]
-image::images/check-history.png[Check history view]
diff --git a/docs/uptime-guide/overview.asciidoc b/docs/uptime-guide/overview.asciidoc
deleted file mode 100644
index ab230b27f8cda..0000000000000
--- a/docs/uptime-guide/overview.asciidoc
+++ /dev/null
@@ -1,57 +0,0 @@
-[role="xpack"]
-[[uptime-overview]]
-== Elastic Uptime overview
-
-++++
-Overview
-++++
-
-Elastic Uptime enables you to monitor the availability and response times of applications and services in real time and to detect problems before they affect users.
-
-Elastic Uptime helps you to understand uptime and response time characteristics for your services and applications.
-It can be deployed both inside and outside your organization's network, so that you can analyze problems from multiple vantage points.
-
-Elastic Uptime uses these components: *Heartbeat*, *Elasticsearch* and *Kibana*.
-
-[float]
-=== Heartbeat
-
-{heartbeat-ref}/index.html[Heartbeat] is an open source data shipper that performs uptime monitoring.
-Elastic Uptime uses Heartbeat to collect monitoring data from your target applications and services, and ship it to Elasticsearch.
-
-[float]
-=== Elasticsearch
-
-{ref}/index.html[Elasticsearch] is a highly scalable, open source, search and analytics engine.
-Elasticsearch can store, search, and analyze large volumes of data in near real-time.
-Elastic Uptime uses Elasticsearch to store monitoring data from Heartbeat in Elasticsearch documents.
-
-[float]
-=== Kibana
-
-{kibana-ref}/index.html[Kibana] is an open source analytics and visualization platform designed to work with Elasticsearch.
-You can use Kibana to search, view, and interact with data stored in Elasticsearch.
-You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps.
-
-The {kibana-ref}/xpack-uptime.html[Elasticsearch Uptime app] in Kibana provides a dedicated user interface for viewing uptime data and identifying problem areas.
-
-[float]
-=== Example deployments
-// ++ I like the Infra/logging diagram which shows Metrics and Logging apps as separate components inside Kibana
-// ++ In diagram, should be Uptime app, not Uptime UI, possibly even Elastic Uptime? Also applies to Metrics/Logging/APM.
-// ++ Need more whitespace around components.
-
-In this simple deployment, a single instance of Heartbeat is deployed at a single monitoring location to monitor a single service.
-The Heartbeat instance sends the monitoring data to Elasticsearch.
-Then you can use the Uptime app in Kibana to view the data from Heartbeat and determine the status of the service.
-
-image::images/uptime-simple-deployment.png[Uptime simple deployment]
-
-In this deployment, two instances of Heartbeat are deployed at two different monitoring locations.
-Both instances monitor the same service.
-The Heartbeat instances send the monitoring data to Elasticsearch.
-As before, you can use the Uptime app in Kibana to view the Heartbeat data and determine the status of the service.
-When a failure occurs, the multiple monitoring locations enable you to pinpoint the area in which the failure has occurred.
-
-image::images/uptime-multi-deployment.png[Uptime multiple server deployment]
-
diff --git a/docs/uptime-guide/settings.asciidoc b/docs/uptime-guide/settings.asciidoc
deleted file mode 100644
index 59f9af631bfa7..0000000000000
--- a/docs/uptime-guide/settings.asciidoc
+++ /dev/null
@@ -1,51 +0,0 @@
-[role="xpack"]
-[[uptime-settings]]
-
-=== Settings
-
-The Uptime settings page lets you change which Heartbeat indices are displayed
-by the uptime app. Users must have the 'all' permission to modify items on this page.
-Uptime settings apply to the current space only. Use different settings in different
-spaces to segment different uptime use cases and domains.
-
-==== Indices
-
-Imagine your organization has one team for internal IT services, and another
-for public services. Each team operates independently and is only responsible for its
-own services. In this scenario, you might set up separate Heartbeat instances for each team,
-writing out to index patterns named `it-heartbeat-\*`, and `external-heartbeat-\*`. You would
-create separate roles and users for each in Elasticsearch, each with access to their own spaces,
-named `it` and `external` respectively. Within each space you would navigate to the settings page
-and set the correct index pattern to match only the indices that space is allowed to access.
-
-Note: The pattern set here only restricts what the Uptime app shows. Users may still be able
-to manually query Elasticsearch for data outside this pattern.
-
-[role="screenshot"]
-image::images/indices.png[Heartbeat indices]
-
-See the {kibana-ref}/uptime-security.html[Uptime security] and {heartbeat-ref}/securing-heartbeat.html[Heartbeat security]
-docs for more information.
-
-==== Certificate thresholds
-
-You can modify settings in this section to control how Uptime will visualize your TLS values in
-the <>. These settings also determine which certificates will be
-selected by any TLS alert you define.
-
-There are two fields, `age` and `expiration`. Use the `age` threshold to specify when Uptime should warn
-you about certificates that have been valid for too long. Use the `expiration` threshold to specify when Uptime should warn you
-about certificates that have approaching expiration dates.
-
-For example, a common security requirement is to make sure that none of your organization's TLS certificates have been
-valid for longer than one year. Modifying the `Age limit` field's value to 365 days will help you keep track of which
-certificates you may want to refresh.
-
-Likewise, to see which of your TLS certificates are close to expiring ahead of time, specify
-an `Expiration threshold` on this page. When the count of a certificate's remaining valid days falls
-below this threshold, Uptime will consider it in a warning state. When you define a TLS alert, you receive a
-notification from Uptime about the certificate.
-
-[role="screenshot"]
-image::images/cert-exp.png[Certification expiration thresholds]
-
diff --git a/docs/user/alerting/action-types/pagerduty.asciidoc b/docs/user/alerting/action-types/pagerduty.asciidoc
index 0468ab042e57e..5fd85a1045265 100644
--- a/docs/user/alerting/action-types/pagerduty.asciidoc
+++ b/docs/user/alerting/action-types/pagerduty.asciidoc
@@ -68,11 +68,11 @@ Then, select the *Integrations* tab and click the *New Integration* button.
* If you are creating a new service for your integration,
go to
https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations[Configuring Services and Integrations]
-and follow the steps outlined in the *Create a New Service* section, selecting *Elastic* as the *Integration Type* in step 4.
+and follow the steps outlined in the *Create a New Service* section, selecting *Elastic Alerts* as the *Integration Type* in step 4.
Continue with the <> section once you have finished these steps.
. Enter an *Integration Name* in the format Elastic-service-name (for example, Elastic-Alerting or Kibana-APM-Alerting)
-and select Elastic from the *Integration Type* menu.
+and select *Elastic Alerts* from the *Integration Type* menu.
. Click *Add Integration* to save your new integration.
+
You will be redirected to the *Integrations* tab for your service. An Integration Key is generated on this screen.
diff --git a/docs/images/Dashboard_add_new_visualization.png b/docs/user/dashboard/images/Dashboard_add_new_visualization.png
similarity index 100%
rename from docs/images/Dashboard_add_new_visualization.png
rename to docs/user/dashboard/images/Dashboard_add_new_visualization.png
diff --git a/docs/images/Dashboard_add_visualization.png b/docs/user/dashboard/images/Dashboard_add_visualization.png
similarity index 100%
rename from docs/images/Dashboard_add_visualization.png
rename to docs/user/dashboard/images/Dashboard_add_visualization.png
diff --git a/docs/images/Dashboard_example.png b/docs/user/dashboard/images/Dashboard_example.png
similarity index 100%
rename from docs/images/Dashboard_example.png
rename to docs/user/dashboard/images/Dashboard_example.png
diff --git a/docs/images/Dashboard_inspect.png b/docs/user/dashboard/images/Dashboard_inspect.png
similarity index 100%
rename from docs/images/Dashboard_inspect.png
rename to docs/user/dashboard/images/Dashboard_inspect.png
diff --git a/docs/images/clone_panel.gif b/docs/user/dashboard/images/clone_panel.gif
similarity index 100%
rename from docs/images/clone_panel.gif
rename to docs/user/dashboard/images/clone_panel.gif
diff --git a/docs/images/dashboard-read-only-badge.png b/docs/user/dashboard/images/dashboard-read-only-badge.png
similarity index 100%
rename from docs/images/dashboard-read-only-badge.png
rename to docs/user/dashboard/images/dashboard-read-only-badge.png
diff --git a/docs/images/time_range_per_panel.gif b/docs/user/dashboard/images/time_range_per_panel.gif
similarity index 100%
rename from docs/images/time_range_per_panel.gif
rename to docs/user/dashboard/images/time_range_per_panel.gif
diff --git a/docs/images/intro-dashboard.png b/docs/user/introduction/images/intro-dashboard.png
similarity index 100%
rename from docs/images/intro-dashboard.png
rename to docs/user/introduction/images/intro-dashboard.png
diff --git a/docs/images/intro-data-tutorial.png b/docs/user/introduction/images/intro-data-tutorial.png
similarity index 100%
rename from docs/images/intro-data-tutorial.png
rename to docs/user/introduction/images/intro-data-tutorial.png
diff --git a/docs/images/intro-discover.png b/docs/user/introduction/images/intro-discover.png
similarity index 100%
rename from docs/images/intro-discover.png
rename to docs/user/introduction/images/intro-discover.png
diff --git a/docs/images/intro-kibana.png b/docs/user/introduction/images/intro-kibana.png
similarity index 100%
rename from docs/images/intro-kibana.png
rename to docs/user/introduction/images/intro-kibana.png
diff --git a/docs/images/intro-management.png b/docs/user/introduction/images/intro-management.png
similarity index 100%
rename from docs/images/intro-management.png
rename to docs/user/introduction/images/intro-management.png
diff --git a/docs/images/intro-spaces.jpg b/docs/user/introduction/images/intro-spaces.jpg
similarity index 100%
rename from docs/images/intro-spaces.jpg
rename to docs/user/introduction/images/intro-spaces.jpg
diff --git a/docs/images/monitoring-dashboard.png b/docs/user/monitoring/images/monitoring-dashboard.png
similarity index 100%
rename from docs/images/monitoring-dashboard.png
rename to docs/user/monitoring/images/monitoring-dashboard.png
diff --git a/docs/images/report-automate-csv.png b/docs/user/reporting/images/report-automate-csv.png
similarity index 100%
rename from docs/images/report-automate-csv.png
rename to docs/user/reporting/images/report-automate-csv.png
diff --git a/docs/images/report-automate-pdf.png b/docs/user/reporting/images/report-automate-pdf.png
similarity index 100%
rename from docs/images/report-automate-pdf.png
rename to docs/user/reporting/images/report-automate-pdf.png
diff --git a/docs/images/add-bucket.png b/docs/visualize/images/add-bucket.png
similarity index 100%
rename from docs/images/add-bucket.png
rename to docs/visualize/images/add-bucket.png
diff --git a/docs/images/apply-changes-button.png b/docs/visualize/images/apply-changes-button.png
similarity index 100%
rename from docs/images/apply-changes-button.png
rename to docs/visualize/images/apply-changes-button.png
diff --git a/docs/images/color-picker.png b/docs/visualize/images/color-picker.png
similarity index 100%
rename from docs/images/color-picker.png
rename to docs/visualize/images/color-picker.png
diff --git a/docs/images/dashboard-controls.png b/docs/visualize/images/dashboard-controls.png
similarity index 100%
rename from docs/images/dashboard-controls.png
rename to docs/visualize/images/dashboard-controls.png
diff --git a/docs/images/gauge.png b/docs/visualize/images/gauge.png
similarity index 100%
rename from docs/images/gauge.png
rename to docs/visualize/images/gauge.png
diff --git a/docs/images/lens_data_info.png b/docs/visualize/images/lens_data_info.png
similarity index 100%
rename from docs/images/lens_data_info.png
rename to docs/visualize/images/lens_data_info.png
diff --git a/docs/images/lens_drag_drop.gif b/docs/visualize/images/lens_drag_drop.gif
similarity index 100%
rename from docs/images/lens_drag_drop.gif
rename to docs/visualize/images/lens_drag_drop.gif
diff --git a/docs/images/lens_suggestions.gif b/docs/visualize/images/lens_suggestions.gif
similarity index 100%
rename from docs/images/lens_suggestions.gif
rename to docs/visualize/images/lens_suggestions.gif
diff --git a/docs/images/lens_tutorial_1.png b/docs/visualize/images/lens_tutorial_1.png
similarity index 100%
rename from docs/images/lens_tutorial_1.png
rename to docs/visualize/images/lens_tutorial_1.png
diff --git a/docs/images/lens_tutorial_2.png b/docs/visualize/images/lens_tutorial_2.png
similarity index 100%
rename from docs/images/lens_tutorial_2.png
rename to docs/visualize/images/lens_tutorial_2.png
diff --git a/docs/images/lens_tutorial_3.png b/docs/visualize/images/lens_tutorial_3.png
similarity index 100%
rename from docs/images/lens_tutorial_3.png
rename to docs/visualize/images/lens_tutorial_3.png
diff --git a/docs/images/lens_viz_types.png b/docs/visualize/images/lens_viz_types.png
similarity index 100%
rename from docs/images/lens_viz_types.png
rename to docs/visualize/images/lens_viz_types.png
diff --git a/docs/images/markdown_example_1.png b/docs/visualize/images/markdown_example_1.png
similarity index 100%
rename from docs/images/markdown_example_1.png
rename to docs/visualize/images/markdown_example_1.png
diff --git a/docs/images/markdown_example_2.png b/docs/visualize/images/markdown_example_2.png
similarity index 100%
rename from docs/images/markdown_example_2.png
rename to docs/visualize/images/markdown_example_2.png
diff --git a/docs/images/markdown_example_3.png b/docs/visualize/images/markdown_example_3.png
similarity index 100%
rename from docs/images/markdown_example_3.png
rename to docs/visualize/images/markdown_example_3.png
diff --git a/docs/images/markdown_example_4.png b/docs/visualize/images/markdown_example_4.png
similarity index 100%
rename from docs/images/markdown_example_4.png
rename to docs/visualize/images/markdown_example_4.png
diff --git a/docs/images/timelion-conditional01.png b/docs/visualize/images/timelion-conditional01.png
similarity index 100%
rename from docs/images/timelion-conditional01.png
rename to docs/visualize/images/timelion-conditional01.png
diff --git a/docs/images/timelion-conditional02.png b/docs/visualize/images/timelion-conditional02.png
similarity index 100%
rename from docs/images/timelion-conditional02.png
rename to docs/visualize/images/timelion-conditional02.png
diff --git a/docs/images/timelion-conditional03.png b/docs/visualize/images/timelion-conditional03.png
similarity index 100%
rename from docs/images/timelion-conditional03.png
rename to docs/visualize/images/timelion-conditional03.png
diff --git a/docs/images/timelion-conditional04.png b/docs/visualize/images/timelion-conditional04.png
similarity index 100%
rename from docs/images/timelion-conditional04.png
rename to docs/visualize/images/timelion-conditional04.png
diff --git a/docs/images/timelion-create01.png b/docs/visualize/images/timelion-create01.png
similarity index 100%
rename from docs/images/timelion-create01.png
rename to docs/visualize/images/timelion-create01.png
diff --git a/docs/images/timelion-create02.png b/docs/visualize/images/timelion-create02.png
similarity index 100%
rename from docs/images/timelion-create02.png
rename to docs/visualize/images/timelion-create02.png
diff --git a/docs/images/timelion-create03.png b/docs/visualize/images/timelion-create03.png
similarity index 100%
rename from docs/images/timelion-create03.png
rename to docs/visualize/images/timelion-create03.png
diff --git a/docs/images/timelion-customize01.png b/docs/visualize/images/timelion-customize01.png
similarity index 100%
rename from docs/images/timelion-customize01.png
rename to docs/visualize/images/timelion-customize01.png
diff --git a/docs/images/timelion-customize02.png b/docs/visualize/images/timelion-customize02.png
similarity index 100%
rename from docs/images/timelion-customize02.png
rename to docs/visualize/images/timelion-customize02.png
diff --git a/docs/images/timelion-customize03.png b/docs/visualize/images/timelion-customize03.png
similarity index 100%
rename from docs/images/timelion-customize03.png
rename to docs/visualize/images/timelion-customize03.png
diff --git a/docs/images/timelion-customize04.png b/docs/visualize/images/timelion-customize04.png
similarity index 100%
rename from docs/images/timelion-customize04.png
rename to docs/visualize/images/timelion-customize04.png
diff --git a/docs/images/timelion-math01.png b/docs/visualize/images/timelion-math01.png
similarity index 100%
rename from docs/images/timelion-math01.png
rename to docs/visualize/images/timelion-math01.png
diff --git a/docs/images/timelion-math02.png b/docs/visualize/images/timelion-math02.png
similarity index 100%
rename from docs/images/timelion-math02.png
rename to docs/visualize/images/timelion-math02.png
diff --git a/docs/images/timelion-math03.png b/docs/visualize/images/timelion-math03.png
similarity index 100%
rename from docs/images/timelion-math03.png
rename to docs/visualize/images/timelion-math03.png
diff --git a/docs/images/timelion-math04.png b/docs/visualize/images/timelion-math04.png
similarity index 100%
rename from docs/images/timelion-math04.png
rename to docs/visualize/images/timelion-math04.png
diff --git a/docs/images/timelion-math05.png b/docs/visualize/images/timelion-math05.png
similarity index 100%
rename from docs/images/timelion-math05.png
rename to docs/visualize/images/timelion-math05.png
diff --git a/docs/images/tsvb-gauge.png b/docs/visualize/images/tsvb-gauge.png
similarity index 100%
rename from docs/images/tsvb-gauge.png
rename to docs/visualize/images/tsvb-gauge.png
diff --git a/docs/images/tsvb-markdown.png b/docs/visualize/images/tsvb-markdown.png
similarity index 100%
rename from docs/images/tsvb-markdown.png
rename to docs/visualize/images/tsvb-markdown.png
diff --git a/docs/images/tsvb-metric.png b/docs/visualize/images/tsvb-metric.png
similarity index 100%
rename from docs/images/tsvb-metric.png
rename to docs/visualize/images/tsvb-metric.png
diff --git a/docs/images/tsvb-screenshot.png b/docs/visualize/images/tsvb-screenshot.png
similarity index 100%
rename from docs/images/tsvb-screenshot.png
rename to docs/visualize/images/tsvb-screenshot.png
diff --git a/docs/images/tsvb-table.png b/docs/visualize/images/tsvb-table.png
similarity index 100%
rename from docs/images/tsvb-table.png
rename to docs/visualize/images/tsvb-table.png
diff --git a/docs/images/tsvb-top-n.png b/docs/visualize/images/tsvb-top-n.png
similarity index 100%
rename from docs/images/tsvb-top-n.png
rename to docs/visualize/images/tsvb-top-n.png
diff --git a/docs/images/vega_lite_default.png b/docs/visualize/images/vega_lite_default.png
similarity index 100%
rename from docs/images/vega_lite_default.png
rename to docs/visualize/images/vega_lite_default.png
diff --git a/docs/images/visualize-date-histogram-split-1.png b/docs/visualize/images/visualize-date-histogram-split-1.png
similarity index 100%
rename from docs/images/visualize-date-histogram-split-1.png
rename to docs/visualize/images/visualize-date-histogram-split-1.png
diff --git a/docs/images/visualize-date-histogram-split-2.png b/docs/visualize/images/visualize-date-histogram-split-2.png
similarity index 100%
rename from docs/images/visualize-date-histogram-split-2.png
rename to docs/visualize/images/visualize-date-histogram-split-2.png
diff --git a/docs/images/visualize-date-histogram.png b/docs/visualize/images/visualize-date-histogram.png
similarity index 100%
rename from docs/images/visualize-date-histogram.png
rename to docs/visualize/images/visualize-date-histogram.png
diff --git a/docs/images/visualize-drag-reorder.png b/docs/visualize/images/visualize-drag-reorder.png
similarity index 100%
rename from docs/images/visualize-drag-reorder.png
rename to docs/visualize/images/visualize-drag-reorder.png
diff --git a/docs/images/visualize_heat_map_example.png b/docs/visualize/images/visualize_heat_map_example.png
similarity index 100%
rename from docs/images/visualize_heat_map_example.png
rename to docs/visualize/images/visualize_heat_map_example.png
diff --git a/examples/embeddable_examples/common/book_saved_object_attributes.ts b/examples/embeddable_examples/common/book_saved_object_attributes.ts
new file mode 100644
index 0000000000000..62c08b7b81362
--- /dev/null
+++ b/examples/embeddable_examples/common/book_saved_object_attributes.ts
@@ -0,0 +1,28 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { SavedObjectAttributes } from '../../../src/core/types';
+
+export const BOOK_SAVED_OBJECT = 'book';
+
+export interface BookSavedObjectAttributes extends SavedObjectAttributes {
+ title: string;
+ author?: string;
+ readIt?: boolean;
+}
diff --git a/examples/embeddable_examples/common/index.ts b/examples/embeddable_examples/common/index.ts
index 726420fb9bdc3..55715113a12a2 100644
--- a/examples/embeddable_examples/common/index.ts
+++ b/examples/embeddable_examples/common/index.ts
@@ -18,3 +18,4 @@
*/
export { TodoSavedObjectAttributes } from './todo_saved_object_attributes';
+export { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from './book_saved_object_attributes';
diff --git a/examples/embeddable_examples/kibana.json b/examples/embeddable_examples/kibana.json
index 486c6322fad93..8ae04c1f6c644 100644
--- a/examples/embeddable_examples/kibana.json
+++ b/examples/embeddable_examples/kibana.json
@@ -4,7 +4,7 @@
"kibanaVersion": "kibana",
"server": true,
"ui": true,
- "requiredPlugins": ["embeddable"],
+ "requiredPlugins": ["embeddable", "uiActions"],
"optionalPlugins": [],
"extraPublicDirs": ["public/todo", "public/hello_world", "public/todo/todo_ref_embeddable"]
}
diff --git a/examples/embeddable_examples/public/book/book_component.tsx b/examples/embeddable_examples/public/book/book_component.tsx
new file mode 100644
index 0000000000000..064e13c131a0a
--- /dev/null
+++ b/examples/embeddable_examples/public/book/book_component.tsx
@@ -0,0 +1,90 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { EuiFlexItem, EuiFlexGroup, EuiIcon } from '@elastic/eui';
+
+import { EuiText } from '@elastic/eui';
+import { EuiFlexGrid } from '@elastic/eui';
+import { withEmbeddableSubscription } from '../../../../src/plugins/embeddable/public';
+import { BookEmbeddableInput, BookEmbeddableOutput, BookEmbeddable } from './book_embeddable';
+
+interface Props {
+ input: BookEmbeddableInput;
+ output: BookEmbeddableOutput;
+ embeddable: BookEmbeddable;
+}
+
+function wrapSearchTerms(task?: string, search?: string) {
+ if (!search || !task) return task;
+ const parts = task.split(new RegExp(`(${search})`, 'g'));
+ return parts.map((part, i) =>
+ part === search ? (
+
+ {part}
+
+ ) : (
+ part
+ )
+ );
+}
+
+export function BookEmbeddableComponentInner({ input: { search }, output: { attributes } }: Props) {
+ const title = attributes?.title;
+ const author = attributes?.author;
+ const readIt = attributes?.readIt;
+
+ return (
+
+
+
+ {title ? (
+
+
+
{wrapSearchTerms(title, search)},
+
+
+ ) : null}
+ {author ? (
+
+
+
-{wrapSearchTerms(author, search)}
+
+
+ ) : null}
+ {readIt ? (
+
+
+
+ ) : (
+
+
+
+ )}
+
+
+
+ );
+}
+
+export const BookEmbeddableComponent = withEmbeddableSubscription<
+ BookEmbeddableInput,
+ BookEmbeddableOutput,
+ BookEmbeddable,
+ {}
+>(BookEmbeddableComponentInner);
diff --git a/examples/embeddable_examples/public/book/book_embeddable.tsx b/examples/embeddable_examples/public/book/book_embeddable.tsx
new file mode 100644
index 0000000000000..d49bd3280d97d
--- /dev/null
+++ b/examples/embeddable_examples/public/book/book_embeddable.tsx
@@ -0,0 +1,123 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { Subscription } from 'rxjs';
+import {
+ Embeddable,
+ EmbeddableInput,
+ IContainer,
+ EmbeddableOutput,
+ SavedObjectEmbeddableInput,
+ AttributeService,
+} from '../../../../src/plugins/embeddable/public';
+import { BookSavedObjectAttributes } from '../../common';
+import { BookEmbeddableComponent } from './book_component';
+
+export const BOOK_EMBEDDABLE = 'book';
+export type BookEmbeddableInput = BookByValueInput | BookByReferenceInput;
+export interface BookEmbeddableOutput extends EmbeddableOutput {
+ hasMatch: boolean;
+ attributes: BookSavedObjectAttributes;
+}
+
+interface BookInheritedInput extends EmbeddableInput {
+ search?: string;
+}
+
+export type BookByValueInput = { attributes: BookSavedObjectAttributes } & BookInheritedInput;
+export type BookByReferenceInput = SavedObjectEmbeddableInput & BookInheritedInput;
+
+/**
+ * Returns whether any attributes contain the search string. If search is empty, true is returned. If
+ * there are no savedAttributes, false is returned.
+ * @param search - the search string
+ * @param savedAttributes - the saved object attributes for the saved object with id `input.savedObjectId`
+ */
+function getHasMatch(search?: string, savedAttributes?: BookSavedObjectAttributes): boolean {
+ if (!search) return true;
+ if (!savedAttributes) return false;
+ return Boolean(
+ (savedAttributes.author && savedAttributes.author.match(search)) ||
+ (savedAttributes.title && savedAttributes.title.match(search))
+ );
+}
+
+export class BookEmbeddable extends Embeddable {
+ public readonly type = BOOK_EMBEDDABLE;
+ private subscription: Subscription;
+ private node?: HTMLElement;
+ private savedObjectId?: string;
+ private attributes?: BookSavedObjectAttributes;
+
+ constructor(
+ initialInput: BookEmbeddableInput,
+ private attributeService: AttributeService<
+ BookSavedObjectAttributes,
+ BookByValueInput,
+ BookByReferenceInput
+ >,
+ {
+ parent,
+ }: {
+ parent?: IContainer;
+ }
+ ) {
+ super(initialInput, {} as BookEmbeddableOutput, parent);
+
+ this.subscription = this.getInput$().subscribe(async () => {
+ const savedObjectId = (this.getInput() as BookByReferenceInput).savedObjectId;
+ const attributes = (this.getInput() as BookByValueInput).attributes;
+ if (this.attributes !== attributes || this.savedObjectId !== savedObjectId) {
+ this.savedObjectId = savedObjectId;
+ this.reload();
+ } else {
+ this.updateOutput({
+ attributes: this.attributes,
+ hasMatch: getHasMatch(this.input.search, this.attributes),
+ });
+ }
+ });
+ }
+
+ public render(node: HTMLElement) {
+ if (this.node) {
+ ReactDOM.unmountComponentAtNode(this.node);
+ }
+ this.node = node;
+ ReactDOM.render(, node);
+ }
+
+ public async reload() {
+ this.attributes = await this.attributeService.unwrapAttributes(this.input);
+
+ this.updateOutput({
+ attributes: this.attributes,
+ hasMatch: getHasMatch(this.input.search, this.attributes),
+ });
+ }
+
+ public destroy() {
+ super.destroy();
+ this.subscription.unsubscribe();
+ if (this.node) {
+ ReactDOM.unmountComponentAtNode(this.node);
+ }
+ }
+}
diff --git a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx
new file mode 100644
index 0000000000000..f4a32fb498a2d
--- /dev/null
+++ b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx
@@ -0,0 +1,127 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import React from 'react';
+import { i18n } from '@kbn/i18n';
+import { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../../common';
+import { toMountPoint } from '../../../../src/plugins/kibana_react/public';
+import {
+ EmbeddableFactoryDefinition,
+ EmbeddableStart,
+ IContainer,
+ AttributeService,
+ EmbeddableFactory,
+} from '../../../../src/plugins/embeddable/public';
+import {
+ BookEmbeddable,
+ BOOK_EMBEDDABLE,
+ BookEmbeddableInput,
+ BookEmbeddableOutput,
+ BookByValueInput,
+ BookByReferenceInput,
+} from './book_embeddable';
+import { CreateEditBookComponent } from './create_edit_book_component';
+import { OverlayStart } from '../../../../src/core/public';
+
+interface StartServices {
+ getAttributeService: EmbeddableStart['getAttributeService'];
+ openModal: OverlayStart['openModal'];
+}
+
+export type BookEmbeddableFactory = EmbeddableFactory<
+ BookEmbeddableInput,
+ BookEmbeddableOutput,
+ BookEmbeddable,
+ BookSavedObjectAttributes
+>;
+
+export class BookEmbeddableFactoryDefinition
+ implements
+ EmbeddableFactoryDefinition<
+ BookEmbeddableInput,
+ BookEmbeddableOutput,
+ BookEmbeddable,
+ BookSavedObjectAttributes
+ > {
+ public readonly type = BOOK_EMBEDDABLE;
+ public savedObjectMetaData = {
+ name: 'Book',
+ includeFields: ['title', 'author', 'readIt'],
+ type: BOOK_SAVED_OBJECT,
+ getIconForSavedObject: () => 'pencil',
+ };
+
+ private attributeService?: AttributeService<
+ BookSavedObjectAttributes,
+ BookByValueInput,
+ BookByReferenceInput
+ >;
+
+ constructor(private getStartServices: () => Promise) {}
+
+ public async isEditable() {
+ return true;
+ }
+
+ public async create(input: BookEmbeddableInput, parent?: IContainer) {
+ return new BookEmbeddable(input, await this.getAttributeService(), {
+ parent,
+ });
+ }
+
+ public getDisplayName() {
+ return i18n.translate('embeddableExamples.book.displayName', {
+ defaultMessage: 'Book',
+ });
+ }
+
+ public async getExplicitInput(): Promise> {
+ const { openModal } = await this.getStartServices();
+ return new Promise>((resolve) => {
+ const onSave = async (attributes: BookSavedObjectAttributes, useRefType: boolean) => {
+ const wrappedAttributes = (await this.getAttributeService()).wrapAttributes(
+ attributes,
+ useRefType
+ );
+ resolve(wrappedAttributes);
+ };
+ const overlay = openModal(
+ toMountPoint(
+ {
+ onSave(attributes, useRefType);
+ overlay.close();
+ }}
+ />
+ )
+ );
+ });
+ }
+
+ private async getAttributeService() {
+ if (!this.attributeService) {
+ this.attributeService = await (await this.getStartServices()).getAttributeService<
+ BookSavedObjectAttributes,
+ BookByValueInput,
+ BookByReferenceInput
+ >(this.type);
+ }
+ return this.attributeService;
+ }
+}
diff --git a/examples/embeddable_examples/public/book/create_edit_book_component.tsx b/examples/embeddable_examples/public/book/create_edit_book_component.tsx
new file mode 100644
index 0000000000000..7e2d3cb9d88ab
--- /dev/null
+++ b/examples/embeddable_examples/public/book/create_edit_book_component.tsx
@@ -0,0 +1,88 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { useState } from 'react';
+import { EuiModalBody, EuiCheckbox } from '@elastic/eui';
+import { EuiFieldText } from '@elastic/eui';
+import { EuiButton } from '@elastic/eui';
+import { EuiModalFooter } from '@elastic/eui';
+import { EuiModalHeader } from '@elastic/eui';
+import { EuiFormRow } from '@elastic/eui';
+import { BookSavedObjectAttributes } from '../../common';
+
+export function CreateEditBookComponent({
+ savedObjectId,
+ attributes,
+ onSave,
+}: {
+ savedObjectId?: string;
+ attributes?: BookSavedObjectAttributes;
+ onSave: (attributes: BookSavedObjectAttributes, useRefType: boolean) => void;
+}) {
+ const [title, setTitle] = useState(attributes?.title ?? '');
+ const [author, setAuthor] = useState(attributes?.author ?? '');
+ const [readIt, setReadIt] = useState(attributes?.readIt ?? false);
+ return (
+
+
+
{`${savedObjectId ? 'Create new ' : 'Edit '}`}
+
+
+
+ setTitle(e.target.value)}
+ />
+
+
+ setAuthor(e.target.value)}
+ />
+
+
+ setReadIt(event.target.checked)}
+ />
+
+
+
+ onSave({ title, author, readIt }, false)}
+ >
+ {savedObjectId ? 'Unlink from library item' : 'Save and Return'}
+
+ onSave({ title, author, readIt }, true)}
+ >
+ {savedObjectId ? 'Update library item' : 'Save to library'}
+
+
+
+ );
+}
diff --git a/examples/embeddable_examples/public/book/edit_book_action.tsx b/examples/embeddable_examples/public/book/edit_book_action.tsx
new file mode 100644
index 0000000000000..222f70e0be60f
--- /dev/null
+++ b/examples/embeddable_examples/public/book/edit_book_action.tsx
@@ -0,0 +1,93 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { OverlayStart } from 'kibana/public';
+import { i18n } from '@kbn/i18n';
+import { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../../common';
+import { createAction } from '../../../../src/plugins/ui_actions/public';
+import { toMountPoint } from '../../../../src/plugins/kibana_react/public';
+import {
+ ViewMode,
+ EmbeddableStart,
+ SavedObjectEmbeddableInput,
+} from '../../../../src/plugins/embeddable/public';
+import {
+ BookEmbeddable,
+ BOOK_EMBEDDABLE,
+ BookByReferenceInput,
+ BookByValueInput,
+} from './book_embeddable';
+import { CreateEditBookComponent } from './create_edit_book_component';
+
+interface StartServices {
+ openModal: OverlayStart['openModal'];
+ getAttributeService: EmbeddableStart['getAttributeService'];
+}
+
+interface ActionContext {
+ embeddable: BookEmbeddable;
+}
+
+export const ACTION_EDIT_BOOK = 'ACTION_EDIT_BOOK';
+
+export const createEditBookAction = (getStartServices: () => Promise) =>
+ createAction({
+ getDisplayName: () =>
+ i18n.translate('embeddableExamples.book.edit', { defaultMessage: 'Edit Book' }),
+ type: ACTION_EDIT_BOOK,
+ order: 100,
+ getIconType: () => 'documents',
+ isCompatible: async ({ embeddable }: ActionContext) => {
+ return (
+ embeddable.type === BOOK_EMBEDDABLE && embeddable.getInput().viewMode === ViewMode.EDIT
+ );
+ },
+ execute: async ({ embeddable }: ActionContext) => {
+ const { openModal, getAttributeService } = await getStartServices();
+ const attributeService = getAttributeService<
+ BookSavedObjectAttributes,
+ BookByValueInput,
+ BookByReferenceInput
+ >(BOOK_SAVED_OBJECT);
+ const onSave = async (attributes: BookSavedObjectAttributes, useRefType: boolean) => {
+ const newInput = await attributeService.wrapAttributes(attributes, useRefType, embeddable);
+ if (!useRefType && (embeddable.getInput() as SavedObjectEmbeddableInput).savedObjectId) {
+ // Remove the savedObejctId when un-linking
+ newInput.savedObjectId = null;
+ }
+ embeddable.updateInput(newInput);
+ if (useRefType) {
+ // Ensures that any duplicate embeddables also register the changes. This mirrors the behavior of going back and forth between apps
+ embeddable.getRoot().reload();
+ }
+ };
+ const overlay = openModal(
+ toMountPoint(
+ {
+ overlay.close();
+ onSave(attributes, useRefType);
+ }}
+ />
+ )
+ );
+ },
+ });
diff --git a/examples/embeddable_examples/public/book/index.ts b/examples/embeddable_examples/public/book/index.ts
new file mode 100644
index 0000000000000..46f44926e2152
--- /dev/null
+++ b/examples/embeddable_examples/public/book/index.ts
@@ -0,0 +1,21 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export * from './book_embeddable';
+export * from './book_embeddable_factory';
diff --git a/examples/embeddable_examples/public/create_sample_data.ts b/examples/embeddable_examples/public/create_sample_data.ts
index bd5ade18aa91e..d598c32a182fe 100644
--- a/examples/embeddable_examples/public/create_sample_data.ts
+++ b/examples/embeddable_examples/public/create_sample_data.ts
@@ -18,9 +18,9 @@
*/
import { SavedObjectsClientContract } from 'kibana/public';
-import { TodoSavedObjectAttributes } from '../common';
+import { TodoSavedObjectAttributes, BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from '../common';
-export async function createSampleData(client: SavedObjectsClientContract) {
+export async function createSampleData(client: SavedObjectsClientContract, overwrite = true) {
await client.create(
'todo',
{
@@ -30,7 +30,20 @@ export async function createSampleData(client: SavedObjectsClientContract) {
},
{
id: 'sample-todo-saved-object',
- overwrite: true,
+ overwrite,
+ }
+ );
+
+ await client.create(
+ BOOK_SAVED_OBJECT,
+ {
+ title: 'Pillars of the Earth',
+ author: 'Ken Follett',
+ readIt: true,
+ },
+ {
+ id: 'sample-book-saved-object',
+ overwrite,
}
);
}
diff --git a/examples/embeddable_examples/public/index.ts b/examples/embeddable_examples/public/index.ts
index ec007f7c626f0..86f50f2b6e114 100644
--- a/examples/embeddable_examples/public/index.ts
+++ b/examples/embeddable_examples/public/index.ts
@@ -26,6 +26,8 @@ export {
export { ListContainer, LIST_CONTAINER, ListContainerFactory } from './list_container';
export { TODO_EMBEDDABLE, TodoEmbeddableFactory } from './todo';
+export { BOOK_EMBEDDABLE } from './book';
+
import { EmbeddableExamplesPlugin } from './plugin';
export {
diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts
index d65ca1e8e7e8d..95f4f5b41e198 100644
--- a/examples/embeddable_examples/public/plugin.ts
+++ b/examples/embeddable_examples/public/plugin.ts
@@ -17,14 +17,19 @@
* under the License.
*/
-import { EmbeddableSetup, EmbeddableStart } from '../../../src/plugins/embeddable/public';
-import { CoreSetup, CoreStart, Plugin } from '../../../src/core/public';
import {
+ EmbeddableSetup,
+ EmbeddableStart,
+ CONTEXT_MENU_TRIGGER,
+} from '../../../src/plugins/embeddable/public';
+import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public';
+import {
+ HelloWorldEmbeddableFactory,
HELLO_WORLD_EMBEDDABLE,
HelloWorldEmbeddableFactoryDefinition,
- HelloWorldEmbeddableFactory,
} from './hello_world';
import { TODO_EMBEDDABLE, TodoEmbeddableFactory, TodoEmbeddableFactoryDefinition } from './todo';
+
import {
MULTI_TASK_TODO_EMBEDDABLE,
MultiTaskTodoEmbeddableFactory,
@@ -46,9 +51,17 @@ import {
TodoRefEmbeddableFactory,
TodoRefEmbeddableFactoryDefinition,
} from './todo/todo_ref_embeddable_factory';
+import { ACTION_EDIT_BOOK, createEditBookAction } from './book/edit_book_action';
+import { BookEmbeddable, BOOK_EMBEDDABLE } from './book/book_embeddable';
+import {
+ BookEmbeddableFactory,
+ BookEmbeddableFactoryDefinition,
+} from './book/book_embeddable_factory';
+import { UiActionsStart } from '../../../src/plugins/ui_actions/public';
export interface EmbeddableExamplesSetupDependencies {
embeddable: EmbeddableSetup;
+ uiActions: UiActionsStart;
}
export interface EmbeddableExamplesStartDependencies {
@@ -62,6 +75,7 @@ interface ExampleEmbeddableFactories {
getListContainerEmbeddableFactory: () => ListContainerFactory;
getTodoEmbeddableFactory: () => TodoEmbeddableFactory;
getTodoRefEmbeddableFactory: () => TodoRefEmbeddableFactory;
+ getBookEmbeddableFactory: () => BookEmbeddableFactory;
}
export interface EmbeddableExamplesStart {
@@ -69,6 +83,12 @@ export interface EmbeddableExamplesStart {
factories: ExampleEmbeddableFactories;
}
+declare module '../../../src/plugins/ui_actions/public' {
+ export interface ActionContextMapping {
+ [ACTION_EDIT_BOOK]: { embeddable: BookEmbeddable };
+ }
+}
+
export class EmbeddableExamplesPlugin
implements
Plugin<
@@ -121,6 +141,20 @@ export class EmbeddableExamplesPlugin
getEmbeddableFactory: (await core.getStartServices())[1].embeddable.getEmbeddableFactory,
}))
);
+ this.exampleEmbeddableFactories.getBookEmbeddableFactory = deps.embeddable.registerEmbeddableFactory(
+ BOOK_EMBEDDABLE,
+ new BookEmbeddableFactoryDefinition(async () => ({
+ getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService,
+ openModal: (await core.getStartServices())[0].overlays.openModal,
+ }))
+ );
+
+ const editBookAction = createEditBookAction(async () => ({
+ getAttributeService: (await core.getStartServices())[1].embeddable.getAttributeService,
+ openModal: (await core.getStartServices())[0].overlays.openModal,
+ }));
+ deps.uiActions.registerAction(editBookAction);
+ deps.uiActions.attachAction(CONTEXT_MENU_TRIGGER, editBookAction.id);
}
public start(
diff --git a/examples/embeddable_examples/server/book_saved_object.ts b/examples/embeddable_examples/server/book_saved_object.ts
new file mode 100644
index 0000000000000..f0aca57f7925f
--- /dev/null
+++ b/examples/embeddable_examples/server/book_saved_object.ts
@@ -0,0 +1,40 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { SavedObjectsType } from 'kibana/server';
+
+export const bookSavedObject: SavedObjectsType = {
+ name: 'book',
+ hidden: false,
+ namespaceType: 'agnostic',
+ mappings: {
+ properties: {
+ title: {
+ type: 'keyword',
+ },
+ author: {
+ type: 'keyword',
+ },
+ readIt: {
+ type: 'boolean',
+ },
+ },
+ },
+ migrations: {},
+};
diff --git a/examples/embeddable_examples/server/plugin.ts b/examples/embeddable_examples/server/plugin.ts
index d956b834d0d3c..1308ac9e0fc5e 100644
--- a/examples/embeddable_examples/server/plugin.ts
+++ b/examples/embeddable_examples/server/plugin.ts
@@ -19,10 +19,12 @@
import { Plugin, CoreSetup, CoreStart } from 'kibana/server';
import { todoSavedObject } from './todo_saved_object';
+import { bookSavedObject } from './book_saved_object';
export class EmbeddableExamplesPlugin implements Plugin {
public setup(core: CoreSetup) {
core.savedObjects.registerType(todoSavedObject);
+ core.savedObjects.registerType(bookSavedObject);
}
public start(core: CoreStart) {}
diff --git a/examples/embeddable_explorer/public/embeddable_panel_example.tsx b/examples/embeddable_explorer/public/embeddable_panel_example.tsx
index b2807f9a4c346..ca9675bb7f5a1 100644
--- a/examples/embeddable_explorer/public/embeddable_panel_example.tsx
+++ b/examples/embeddable_explorer/public/embeddable_panel_example.tsx
@@ -33,6 +33,7 @@ import { EmbeddableStart, IEmbeddable } from '../../../src/plugins/embeddable/pu
import {
HELLO_WORLD_EMBEDDABLE,
TODO_EMBEDDABLE,
+ BOOK_EMBEDDABLE,
MULTI_TASK_TODO_EMBEDDABLE,
SearchableListContainerFactory,
} from '../../embeddable_examples/public';
@@ -72,6 +73,35 @@ export function EmbeddablePanelExample({ embeddableServices, searchListContainer
tasks: ['Go to school', 'Watch planet earth', 'Read the encyclopedia'],
},
},
+ '4': {
+ type: BOOK_EMBEDDABLE,
+ explicitInput: {
+ id: '4',
+ savedObjectId: 'sample-book-saved-object',
+ },
+ },
+ '5': {
+ type: BOOK_EMBEDDABLE,
+ explicitInput: {
+ id: '5',
+ attributes: {
+ title: 'The Sympathizer',
+ author: 'Viet Thanh Nguyen',
+ readIt: true,
+ },
+ },
+ },
+ '6': {
+ type: BOOK_EMBEDDABLE,
+ explicitInput: {
+ id: '6',
+ attributes: {
+ title: 'The Hobbit',
+ author: 'J.R.R. Tolkien',
+ readIt: false,
+ },
+ },
+ },
},
};
diff --git a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js
index 90bea1c3aa293..f4200d6f47574 100644
--- a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js
+++ b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/reporter.js
@@ -36,6 +36,8 @@ export function MochaReporterProvider({ getService }) {
let originalLogWriters;
let reporterCaptureStartTime;
+ const failuresOverTime = [];
+
return class MochaReporter extends Mocha.reporters.Base {
constructor(runner, options) {
super(runner, options);
@@ -154,30 +156,50 @@ export function MochaReporterProvider({ getService }) {
// - I started by trying to extract the Base.list() logic from mocha
// but it's a lot more complicated than this is horrible.
// - In order to fix the numbering and indentation we monkey-patch
- // console.log and parse the logged output.
+ // Mocha.reporters.Base.consoleLog and parse the logged output.
//
let output = '';
- const realLog = console.log;
- console.log = (...args) => (output += `${format(...args)}\n`);
+ const realLog = Mocha.reporters.Base.consoleLog;
+ Mocha.reporters.Base.consoleLog = (...args) => (output += `${format(...args)}\n`);
try {
Mocha.reporters.Base.list([runnable]);
} finally {
- console.log = realLog;
+ Mocha.reporters.Base.consoleLog = realLog;
}
+ const outputLines = output.split('\n');
+
+ const errorMarkerStart = outputLines.reduce((index, line, i) => {
+ if (index >= 0) {
+ return index;
+ }
+ return /Error:/.test(line) ? i : index;
+ }, -1);
+
+ const errorMessage = outputLines
+ // drop the first ${errorMarkerStart} lines, (empty + test title)
+ .slice(errorMarkerStart)
+ // move leading colors behind leading spaces
+ .map((line) => line.replace(/^((?:\[.+m)+)(\s+)/, '$2$1'))
+ .map((line) => ` ${line}`)
+ .join('\n');
+
log.write(
- `- ${colors.fail(`${symbols.err} fail: "${runnable.fullTitle()}"`)}` +
- '\n' +
- output
- .split('\n')
- // drop the first two lines, (empty + test title)
- .slice(2)
- // move leading colors behind leading spaces
- .map((line) => line.replace(/^((?:\[.+m)+)(\s+)/, '$2$1'))
- .map((line) => ` ${line}`)
- .join('\n')
+ `- ${colors.fail(`${symbols.err} fail: ${runnable.fullTitle()}`)}` + '\n' + errorMessage
);
+ // Prefer to reuse the nice Mocha nested title format for final summary
+ const nestedTitleFormat = outputLines
+ .slice(1, errorMarkerStart)
+ .join('\n')
+ // make sure to remove the list number
+ .replace(/\d+\)/, '');
+
+ failuresOverTime.push({
+ title: nestedTitleFormat,
+ error: errorMessage,
+ });
+
// failed hooks trigger the `onFail(runnable)` callback, so we snapshot the logs for
// them here. Tests will re-capture the snapshot in `onTestEnd()`
snapshotLogsForRunnable(runnable);
@@ -188,7 +210,7 @@ export function MochaReporterProvider({ getService }) {
log.setWriters(originalLogWriters);
}
- writeEpilogue(log, this.stats);
+ writeEpilogue(log, this.stats, failuresOverTime);
};
};
}
diff --git a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/write_epilogue.js b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/write_epilogue.js
index 72a011ce510bc..0ee429067254b 100644
--- a/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/write_epilogue.js
+++ b/packages/kbn-test/src/functional_test_runner/lib/mocha/reporter/write_epilogue.js
@@ -20,7 +20,7 @@
import * as colors from './colors';
import { ms } from './ms';
-export function writeEpilogue(log, stats) {
+export function writeEpilogue(log, stats, failuresDetail) {
// header
log.write('');
@@ -35,6 +35,12 @@ export function writeEpilogue(log, stats) {
// failures
if (stats.failures) {
log.write('%d failing', stats.failures);
+ log.write('');
+ failuresDetail.forEach(({ title, error }, i) => {
+ log.write('%d) %s', i + 1, title);
+ log.write('');
+ log.write('%s', error);
+ });
}
// footer
diff --git a/src/core/public/application/scoped_history.mock.ts b/src/core/public/application/scoped_history.mock.ts
index 56de97e630bf0..41c72306a99f9 100644
--- a/src/core/public/application/scoped_history.mock.ts
+++ b/src/core/public/application/scoped_history.mock.ts
@@ -27,7 +27,8 @@ const createMock = ({
hash = '',
key,
state,
-}: Partial = {}) => {
+ ...overrides
+}: Partial = {}) => {
const mock: ScopedHistoryMock = {
block: jest.fn(),
createHref: jest.fn(),
@@ -38,6 +39,7 @@ const createMock = ({
listen: jest.fn(),
push: jest.fn(),
replace: jest.fn(),
+ ...overrides,
action: 'PUSH',
length: 1,
location: {
diff --git a/src/core/server/saved_objects/mappings/types.ts b/src/core/server/saved_objects/mappings/types.ts
index 7521e4a4bee86..7a7955ee745e8 100644
--- a/src/core/server/saved_objects/mappings/types.ts
+++ b/src/core/server/saved_objects/mappings/types.ts
@@ -45,7 +45,9 @@
* @public
*/
export interface SavedObjectsTypeMappingDefinition {
- /** The dynamic property of the mapping. either `false` or 'strict'. Defaults to `false` */
+ /** The dynamic property of the mapping, either `false` or `'strict'`. If
+ * unspecified `dynamic: 'strict'` will be inherited from the top-level
+ * index mappings. */
dynamic?: false | 'strict';
/** The underlying properties of the type mapping */
properties: SavedObjectsMappingProperties;
@@ -134,7 +136,6 @@ export interface SavedObjectsCoreFieldMapping {
null_value?: number | boolean | string;
index?: boolean;
doc_values?: boolean;
- enabled?: boolean;
fields?: {
[subfield: string]: {
type: string;
@@ -146,14 +147,19 @@ export interface SavedObjectsCoreFieldMapping {
/**
* See {@link SavedObjectsFieldMapping} for documentation.
*
- * Note: this type intentially doesn't include a type definition for defining
- * the `dynamic` mapping parameter. Saved Object fields should always inherit
- * the `dynamic: 'strict'` paramater. If you are unsure of the shape of your
- * data use `type: 'object', enabled: false` instead.
- *
* @public
*/
export interface SavedObjectsComplexFieldMapping {
+ /**
+ * The dynamic property of the mapping, either `false` or `'strict'`. If
+ * unspecified `dynamic: 'strict'` will be inherited from the top-level
+ * index mappings.
+ *
+ * Note: To limit the number of mapping fields Saved Object types should
+ * *never* use `dynamic: true`.
+ */
+ dynamic?: false | 'strict';
+ enabled?: boolean;
doc_values?: boolean;
type?: string;
properties: SavedObjectsMappingProperties;
diff --git a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts
index 86c79cbfb5824..f8b203bf66d6a 100644
--- a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts
+++ b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts
@@ -151,7 +151,7 @@ describe('IndexMigrator', () => {
);
});
- test('retains mappings from the previous index', async () => {
+ test('retains unknown core field mappings from the previous index', async () => {
const { callCluster } = testOpts;
testOpts.mappingProperties = { foo: { type: 'text' } };
@@ -162,7 +162,7 @@ describe('IndexMigrator', () => {
aliases: {},
mappings: {
properties: {
- author: { type: 'text' },
+ unknown_core_field: { type: 'text' },
},
},
},
@@ -187,7 +187,66 @@ describe('IndexMigrator', () => {
},
},
properties: {
- author: { type: 'text' },
+ unknown_core_field: { type: 'text' },
+ foo: { type: 'text' },
+ migrationVersion: { dynamic: 'true', type: 'object' },
+ namespace: { type: 'keyword' },
+ namespaces: { type: 'keyword' },
+ type: { type: 'keyword' },
+ updated_at: { type: 'date' },
+ references: {
+ type: 'nested',
+ properties: {
+ name: { type: 'keyword' },
+ type: { type: 'keyword' },
+ id: { type: 'keyword' },
+ },
+ },
+ },
+ },
+ settings: { number_of_shards: 1, auto_expand_replicas: '0-1' },
+ },
+ index: '.kibana_2',
+ });
+ });
+
+ test('disables complex field mappings from unknown types in the previous index', async () => {
+ const { callCluster } = testOpts;
+
+ testOpts.mappingProperties = { foo: { type: 'text' } };
+
+ withIndex(callCluster, {
+ index: {
+ '.kibana_1': {
+ aliases: {},
+ mappings: {
+ properties: {
+ unknown_complex_field: { properties: { description: { type: 'text' } } },
+ },
+ },
+ },
+ },
+ });
+
+ await new IndexMigrator(testOpts).migrate();
+
+ expect(callCluster).toHaveBeenCalledWith('indices.create', {
+ body: {
+ mappings: {
+ dynamic: 'strict',
+ _meta: {
+ migrationMappingPropertyHashes: {
+ foo: '625b32086eb1d1203564cf85062dd22e',
+ migrationVersion: '4a1746014a75ade3a714e1db5763276f',
+ namespace: '2f4316de49999235636386fe51dc06c1',
+ namespaces: '2f4316de49999235636386fe51dc06c1',
+ references: '7997cf5a56cc02bdc9c93361bde732b0',
+ type: '2f4316de49999235636386fe51dc06c1',
+ updated_at: '00da57df13e94e9d98437d13ace4bfe0',
+ },
+ },
+ properties: {
+ unknown_complex_field: { dynamic: false, properties: {} },
foo: { type: 'text' },
migrationVersion: { dynamic: 'true', type: 'object' },
namespace: { type: 'keyword' },
diff --git a/src/core/server/saved_objects/migrations/core/migration_context.test.ts b/src/core/server/saved_objects/migrations/core/migration_context.test.ts
new file mode 100644
index 0000000000000..34d8d94d5ddab
--- /dev/null
+++ b/src/core/server/saved_objects/migrations/core/migration_context.test.ts
@@ -0,0 +1,88 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { disableUnknownTypeMappingFields } from './migration_context';
+
+describe('disableUnknownTypeMappingFields', () => {
+ const sourceMappings = {
+ _meta: {
+ migrationMappingPropertyHashes: {
+ unknown_type: 'md5hash',
+ unknown_core_field: 'md5hash',
+ known_type: 'oldmd5hash',
+ },
+ },
+ properties: {
+ unknown_type: {
+ properties: {
+ unused_field: { type: 'text' },
+ },
+ },
+ unknown_core_field: { type: 'keyword' },
+ known_type: {
+ properties: {
+ field_1: { type: 'text' },
+ old_field: { type: 'boolean' },
+ },
+ },
+ },
+ };
+ const activeMappings = {
+ _meta: {
+ migrationMappingPropertyHashes: {
+ known_type: 'md5hash',
+ },
+ },
+ properties: {
+ known_type: {
+ properties: {
+ new_field: { type: 'binary' },
+ field_1: { type: 'keyword' },
+ },
+ },
+ },
+ };
+ const targetMappings = disableUnknownTypeMappingFields(activeMappings, sourceMappings);
+
+ it('disables complex field mappings from unknown types in the source mappings', () => {
+ expect(targetMappings.properties.unknown_type).toEqual({ dynamic: false, properties: {} });
+ });
+
+ it('retains unknown core field mappings from the source mappings', () => {
+ expect(targetMappings.properties.unknown_core_field).toEqual({ type: 'keyword' });
+ });
+
+ it('overrides source mappings with known types from active mappings', () => {
+ expect(targetMappings.properties.known_type).toEqual({
+ properties: {
+ new_field: { type: 'binary' },
+ field_1: { type: 'keyword' }, // was type text in source mappings
+ // old_field was present in source but ommited in active mappings
+ },
+ });
+ });
+
+ it('retains the active mappings _meta ignoring any _meta fields in the source mappings', () => {
+ expect(targetMappings._meta).toEqual({
+ migrationMappingPropertyHashes: {
+ known_type: 'md5hash',
+ },
+ });
+ });
+});
diff --git a/src/core/server/saved_objects/migrations/core/migration_context.ts b/src/core/server/saved_objects/migrations/core/migration_context.ts
index 3a6145f5d9623..adf1851a1aa75 100644
--- a/src/core/server/saved_objects/migrations/core/migration_context.ts
+++ b/src/core/server/saved_objects/migrations/core/migration_context.ts
@@ -26,7 +26,11 @@
import { Logger } from 'src/core/server/logging';
import { SavedObjectsSerializer } from '../../serialization';
-import { SavedObjectsTypeMappingDefinitions } from '../../mappings';
+import {
+ SavedObjectsTypeMappingDefinitions,
+ SavedObjectsMappingProperties,
+ IndexMapping,
+} from '../../mappings';
import { buildActiveMappings } from './build_active_mappings';
import { CallCluster } from './call_cluster';
import { VersionedTransformer } from './document_migrator';
@@ -107,20 +111,68 @@ function createSourceContext(source: FullIndexInfo, alias: string) {
function createDestContext(
source: FullIndexInfo,
alias: string,
- mappingProperties: SavedObjectsTypeMappingDefinitions
+ typeMappingDefinitions: SavedObjectsTypeMappingDefinitions
): FullIndexInfo {
- const activeMappings = buildActiveMappings(mappingProperties);
+ const targetMappings = disableUnknownTypeMappingFields(
+ buildActiveMappings(typeMappingDefinitions),
+ source.mappings
+ );
return {
aliases: {},
exists: false,
indexName: nextIndexName(source.indexName, alias),
- mappings: {
- ...activeMappings,
- properties: {
- ...source.mappings.properties,
- ...activeMappings.properties,
- },
+ mappings: targetMappings,
+ };
+}
+
+/**
+ * Merges the active mappings and the source mappings while disabling the
+ * fields of any unknown Saved Object types present in the source index's
+ * mappings.
+ *
+ * Since the Saved Objects index has `dynamic: strict` defined at the
+ * top-level, only Saved Object types for which a mapping exists can be
+ * inserted into the index. To ensure that we can continue to store Saved
+ * Object documents belonging to a disabled plugin we define a mapping for all
+ * the unknown Saved Object types that were present in the source index's
+ * mappings. To limit the field count as much as possible, these unkwnown
+ * type's mappings are set to `dynamic: false`.
+ *
+ * (Since we're using the source index mappings instead of looking at actual
+ * document types in the inedx, we potentially add more "unknown types" than
+ * what would be necessary to support migrating all the data over to the
+ * target index.)
+ *
+ * @param activeMappings The mappings compiled from all the Saved Object types
+ * known to this Kibana node.
+ * @param sourceMappings The mappings of index used as the migration source.
+ * @returns The mappings that should be applied to the target index.
+ */
+export function disableUnknownTypeMappingFields(
+ activeMappings: IndexMapping,
+ sourceMappings: IndexMapping
+): IndexMapping {
+ const targetTypes = Object.keys(activeMappings.properties);
+
+ const disabledTypesProperties = Object.keys(sourceMappings.properties)
+ .filter((sourceType) => {
+ const isObjectType = 'properties' in sourceMappings.properties[sourceType];
+ // Only Object/Nested datatypes can be excluded from the field count by
+ // using `dynamic: false`.
+ return !targetTypes.includes(sourceType) && isObjectType;
+ })
+ .reduce((disabledTypesAcc, sourceType) => {
+ disabledTypesAcc[sourceType] = { dynamic: false, properties: {} };
+ return disabledTypesAcc;
+ }, {} as SavedObjectsMappingProperties);
+
+ return {
+ ...activeMappings,
+ properties: {
+ ...sourceMappings.properties,
+ ...disabledTypesProperties,
+ ...activeMappings.properties,
},
};
}
diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md
index 107edf11bb6f4..efeafc9e68d35 100644
--- a/src/core/server/server.api.md
+++ b/src/core/server/server.api.md
@@ -2022,6 +2022,9 @@ export interface SavedObjectsClientWrapperOptions {
export interface SavedObjectsComplexFieldMapping {
// (undocumented)
doc_values?: boolean;
+ dynamic?: false | 'strict';
+ // (undocumented)
+ enabled?: boolean;
// (undocumented)
properties: SavedObjectsMappingProperties;
// (undocumented)
@@ -2033,8 +2036,6 @@ export interface SavedObjectsCoreFieldMapping {
// (undocumented)
doc_values?: boolean;
// (undocumented)
- enabled?: boolean;
- // (undocumented)
fields?: {
[subfield: string]: {
type: string;
diff --git a/src/dev/ci_setup/checkout_sibling_es.sh b/src/dev/ci_setup/checkout_sibling_es.sh
index 3832ec9b4076a..915759d4214f9 100755
--- a/src/dev/ci_setup/checkout_sibling_es.sh
+++ b/src/dev/ci_setup/checkout_sibling_es.sh
@@ -7,11 +7,10 @@ function checkout_sibling {
targetDir=$2
useExistingParamName=$3
useExisting="$(eval "echo "\$$useExistingParamName"")"
- repoAddress="https://github.com/"
if [ -z ${useExisting:+x} ]; then
if [ -d "$targetDir" ]; then
- echo "I expected a clean workspace but an '${project}' sibling directory already exists in [$WORKSPACE]!"
+ echo "I expected a clean workspace but an '${project}' sibling directory already exists in [$PARENT_DIR]!"
echo
echo "Either define '${useExistingParamName}' or remove the existing '${project}' sibling."
exit 1
@@ -22,9 +21,8 @@ function checkout_sibling {
cloneBranch=""
function clone_target_is_valid {
-
echo " -> checking for '${cloneBranch}' branch at ${cloneAuthor}/${project}"
- if [[ -n "$(git ls-remote --heads "${repoAddress}${cloneAuthor}/${project}.git" ${cloneBranch} 2>/dev/null)" ]]; then
+ if [[ -n "$(git ls-remote --heads "git@github.com:${cloneAuthor}/${project}.git" ${cloneBranch} 2>/dev/null)" ]]; then
return 0
else
return 1
@@ -73,7 +71,7 @@ function checkout_sibling {
fi
echo " -> checking out '${cloneBranch}' branch from ${cloneAuthor}/${project}..."
- git clone -b "$cloneBranch" "${repoAddress}${cloneAuthor}/${project}.git" "$targetDir" --depth=1
+ git clone -b "$cloneBranch" "git@github.com:${cloneAuthor}/${project}.git" "$targetDir" --depth=1
echo " -> checked out ${project} revision: $(git -C "${targetDir}" rev-parse HEAD)"
echo
}
@@ -89,12 +87,12 @@ function checkout_sibling {
fi
}
-checkout_sibling "elasticsearch" "${WORKSPACE}/elasticsearch" "USE_EXISTING_ES"
+checkout_sibling "elasticsearch" "${PARENT_DIR}/elasticsearch" "USE_EXISTING_ES"
export TEST_ES_FROM=${TEST_ES_FROM:-snapshot}
# Set the JAVA_HOME based on the Java property file in the ES repo
# This assumes the naming convention used on CI (ex: ~/.java/java10)
-ES_DIR="$WORKSPACE/elasticsearch"
+ES_DIR="$PARENT_DIR/elasticsearch"
ES_JAVA_PROP_PATH=$ES_DIR/.ci/java-versions.properties
diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh
index f96a2240917e2..343ff47199375 100644
--- a/src/dev/ci_setup/setup_env.sh
+++ b/src/dev/ci_setup/setup_env.sh
@@ -53,8 +53,6 @@ export PARENT_DIR="$parentDir"
kbnBranch="$(jq -r .branch "$KIBANA_DIR/package.json")"
export KIBANA_PKG_BRANCH="$kbnBranch"
-export WORKSPACE="${WORKSPACE:-$PARENT_DIR}"
-
###
### download node
###
@@ -163,7 +161,7 @@ export -f checks-reporter-with-killswitch
source "$KIBANA_DIR/src/dev/ci_setup/load_env_keys.sh"
-ES_DIR="$WORKSPACE/elasticsearch"
+ES_DIR="$PARENT_DIR/elasticsearch"
ES_JAVA_PROP_PATH=$ES_DIR/.ci/java-versions.properties
if [[ -d "$ES_DIR" && -f "$ES_JAVA_PROP_PATH" ]]; then
diff --git a/src/dev/i18n/integrate_locale_files.test.ts b/src/dev/i18n/integrate_locale_files.test.ts
index 3bd3dc61c044f..7ff1d87f1bc55 100644
--- a/src/dev/i18n/integrate_locale_files.test.ts
+++ b/src/dev/i18n/integrate_locale_files.test.ts
@@ -21,7 +21,7 @@ import { mockMakeDirAsync, mockWriteFileAsync } from './integrate_locale_files.t
import path from 'path';
import { integrateLocaleFiles, verifyMessages } from './integrate_locale_files';
-// @ts-expect-error
+// @ts-ignore
import { normalizePath } from './utils';
const localePath = path.resolve(__dirname, '__fixtures__', 'integrate_locale_files', 'fr.json');
@@ -36,7 +36,6 @@ const defaultIntegrateOptions = {
sourceFileName: localePath,
dryRun: false,
ignoreIncompatible: false,
- ignoreMalformed: false,
ignoreMissing: false,
ignoreUnused: false,
config: {
diff --git a/src/dev/i18n/integrate_locale_files.ts b/src/dev/i18n/integrate_locale_files.ts
index f9cd6dd1971c7..d8ccccca15559 100644
--- a/src/dev/i18n/integrate_locale_files.ts
+++ b/src/dev/i18n/integrate_locale_files.ts
@@ -31,8 +31,7 @@ import {
normalizePath,
readFileAsync,
writeFileAsync,
- verifyICUMessage,
- // @ts-expect-error
+ // @ts-ignore
} from './utils';
import { I18nConfig } from './config';
@@ -42,7 +41,6 @@ export interface IntegrateOptions {
sourceFileName: string;
targetFileName?: string;
dryRun: boolean;
- ignoreMalformed: boolean;
ignoreIncompatible: boolean;
ignoreUnused: boolean;
ignoreMissing: boolean;
@@ -107,23 +105,6 @@ export function verifyMessages(
}
}
- for (const messageId of localizedMessagesIds) {
- const defaultMessage = defaultMessagesMap.get(messageId);
- if (defaultMessage) {
- try {
- const message = localizedMessagesMap.get(messageId)!;
- verifyICUMessage(message);
- } catch (err) {
- if (options.ignoreMalformed) {
- localizedMessagesMap.delete(messageId);
- options.log.warning(`Malformed translation ignored (${messageId}): ${err}`);
- } else {
- errorMessage += `\nMalformed translation (${messageId}): ${err}\n`;
- }
- }
- }
- }
-
if (errorMessage) {
throw createFailError(errorMessage);
}
diff --git a/src/dev/i18n/tasks/check_compatibility.ts b/src/dev/i18n/tasks/check_compatibility.ts
index afaf3cd875a8a..5900bf5aff252 100644
--- a/src/dev/i18n/tasks/check_compatibility.ts
+++ b/src/dev/i18n/tasks/check_compatibility.ts
@@ -22,14 +22,13 @@ import { integrateLocaleFiles, I18nConfig } from '..';
export interface I18nFlags {
fix: boolean;
- ignoreMalformed: boolean;
ignoreIncompatible: boolean;
ignoreUnused: boolean;
ignoreMissing: boolean;
}
export function checkCompatibility(config: I18nConfig, flags: I18nFlags, log: ToolingLog) {
- const { fix, ignoreIncompatible, ignoreUnused, ignoreMalformed, ignoreMissing } = flags;
+ const { fix, ignoreIncompatible, ignoreUnused, ignoreMissing } = flags;
return config.translations.map((translationsPath) => ({
task: async ({ messages }: { messages: Map }) => {
// If `fix` is set we should try apply all possible fixes and override translations file.
@@ -38,7 +37,6 @@ export function checkCompatibility(config: I18nConfig, flags: I18nFlags, log: To
ignoreIncompatible: fix || ignoreIncompatible,
ignoreUnused: fix || ignoreUnused,
ignoreMissing: fix || ignoreMissing,
- ignoreMalformed: fix || ignoreMalformed,
sourceFileName: translationsPath,
targetFileName: fix ? translationsPath : undefined,
config,
diff --git a/src/dev/i18n/utils.js b/src/dev/i18n/utils.js
index 11a002fdbf4a8..1d1c3118e0852 100644
--- a/src/dev/i18n/utils.js
+++ b/src/dev/i18n/utils.js
@@ -208,28 +208,6 @@ export function checkValuesProperty(prefixedValuesKeys, defaultMessage, messageI
}
}
-/**
- * Verifies valid ICU message.
- * @param message ICU message.
- * @param messageId ICU message id
- * @returns {undefined}
- */
-export function verifyICUMessage(message) {
- try {
- parser.parse(message);
- } catch (error) {
- if (error.name === 'SyntaxError') {
- const errorWithContext = createParserErrorMessage(message, {
- loc: {
- line: error.location.start.line,
- column: error.location.start.column - 1,
- },
- message: error.message,
- });
- throw errorWithContext;
- }
- }
-}
/**
* Extracts value references from the ICU message.
* @param message ICU message.
diff --git a/src/dev/notice/generate_notice_from_source.ts b/src/dev/notice/generate_notice_from_source.ts
index a2b05c6dc8a4e..fb74bed0f26f4 100644
--- a/src/dev/notice/generate_notice_from_source.ts
+++ b/src/dev/notice/generate_notice_from_source.ts
@@ -49,10 +49,8 @@ export async function generateNoticeFromSource({ productName, directory, log }:
ignore: [
'{node_modules,build,target,dist,data,built_assets}/**',
'packages/*/{node_modules,build,target,dist}/**',
- 'src/plugins/*/{node_modules,build,target,dist}/**',
'x-pack/{node_modules,build,target,dist,data}/**',
'x-pack/packages/*/{node_modules,build,target,dist}/**',
- 'x-pack/plugins/*/{node_modules,build,target,dist}/**',
],
};
diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts
index 70eeedac2b8b6..97ea988b1de3a 100644
--- a/src/dev/run_i18n_check.ts
+++ b/src/dev/run_i18n_check.ts
@@ -36,7 +36,6 @@ run(
async ({
flags: {
'ignore-incompatible': ignoreIncompatible,
- 'ignore-malformed': ignoreMalformed,
'ignore-missing': ignoreMissing,
'ignore-unused': ignoreUnused,
'include-config': includeConfig,
@@ -49,13 +48,12 @@ run(
fix &&
(ignoreIncompatible !== undefined ||
ignoreUnused !== undefined ||
- ignoreMalformed !== undefined ||
ignoreMissing !== undefined)
) {
throw createFailError(
`${chalk.white.bgRed(
' I18N ERROR '
- )} none of the --ignore-incompatible, --ignore-malformed, --ignore-unused or --ignore-missing is allowed when --fix is set.`
+ )} none of the --ignore-incompatible, --ignore-unused or --ignore-missing is allowed when --fix is set.`
);
}
@@ -101,7 +99,6 @@ run(
checkCompatibility(
config,
{
- ignoreMalformed: !!ignoreMalformed,
ignoreIncompatible: !!ignoreIncompatible,
ignoreUnused: !!ignoreUnused,
ignoreMissing: !!ignoreMissing,
diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts
index 25c3ea32783aa..23d66fae9f26e 100644
--- a/src/dev/run_i18n_integrate.ts
+++ b/src/dev/run_i18n_integrate.ts
@@ -31,7 +31,6 @@ run(
'ignore-incompatible': ignoreIncompatible = false,
'ignore-missing': ignoreMissing = false,
'ignore-unused': ignoreUnused = false,
- 'ignore-malformed': ignoreMalformed = false,
'include-config': includeConfig,
path,
source,
@@ -67,13 +66,12 @@ run(
typeof ignoreIncompatible !== 'boolean' ||
typeof ignoreUnused !== 'boolean' ||
typeof ignoreMissing !== 'boolean' ||
- typeof ignoreMalformed !== 'boolean' ||
typeof dryRun !== 'boolean'
) {
throw createFailError(
`${chalk.white.bgRed(
' I18N ERROR '
- )} --ignore-incompatible, --ignore-unused, --ignore-malformed, --ignore-missing, and --dry-run can't have values`
+ )} --ignore-incompatible, --ignore-unused, --ignore-missing, and --dry-run can't have values`
);
}
@@ -99,7 +97,6 @@ run(
ignoreIncompatible,
ignoreUnused,
ignoreMissing,
- ignoreMalformed,
config,
log,
});
diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts
index 85bfd4a7a4d26..9d9f5616b5a33 100644
--- a/src/dev/storybook/aliases.ts
+++ b/src/dev/storybook/aliases.ts
@@ -26,4 +26,5 @@ export const storybookAliases = {
infra: 'x-pack/legacy/plugins/infra/scripts/storybook.js',
security_solution: 'x-pack/plugins/security_solution/scripts/storybook.js',
ui_actions_enhanced: 'x-pack/plugins/ui_actions_enhanced/scripts/storybook.js',
+ observability: 'x-pack/plugins/observability/scripts/storybook.js',
};
diff --git a/src/plugins/charts/public/services/colors/mock.ts b/src/plugins/charts/public/services/colors/mock.ts
index 924dbd6aa52a4..f88980e521dda 100644
--- a/src/plugins/charts/public/services/colors/mock.ts
+++ b/src/plugins/charts/public/services/colors/mock.ts
@@ -24,5 +24,5 @@ const colors = new ColorsService();
colors.init(coreMock.createSetup().uiSettings);
export const colorsServiceMock: ColorsService = {
- createColorLookupFunction: jest.fn(colors.createColorLookupFunction),
+ createColorLookupFunction: jest.fn(colors.createColorLookupFunction.bind(colors)),
} as any;
diff --git a/src/plugins/console/public/application/components/editor_example.tsx b/src/plugins/console/public/application/components/editor_example.tsx
index e9e252e4ebb17..72a1056b1a866 100644
--- a/src/plugins/console/public/application/components/editor_example.tsx
+++ b/src/plugins/console/public/application/components/editor_example.tsx
@@ -18,8 +18,6 @@
*/
import { EuiScreenReaderOnly } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-// @ts-ignore
-import exampleText from 'raw-loader!../constants/help_example.txt';
import React, { useEffect } from 'react';
import { createReadOnlyAceEditor } from '../models/legacy_core_editor';
@@ -27,6 +25,17 @@ interface EditorExampleProps {
panel: string;
}
+const exampleText = `
+# index a doc
+PUT index/1
+{
+ "body": "here"
+}
+
+# and get it ...
+GET index/1
+`;
+
export function EditorExample(props: EditorExampleProps) {
const elemId = `help-example-${props.panel}`;
const inputId = `help-example-${props.panel}-input`;
diff --git a/src/plugins/console/public/application/constants/help_example.txt b/src/plugins/console/public/application/constants/help_example.txt
deleted file mode 100644
index fd37c41367033..0000000000000
--- a/src/plugins/console/public/application/constants/help_example.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# index a doc
-PUT index/1
-{
- "body": "here"
-}
-
-# and get it ...
-GET index/1
diff --git a/src/plugins/dashboard/public/application/dashboard_app_controller.tsx b/src/plugins/dashboard/public/application/dashboard_app_controller.tsx
index a321bc7959c5c..8138e1c7f4dfd 100644
--- a/src/plugins/dashboard/public/application/dashboard_app_controller.tsx
+++ b/src/plugins/dashboard/public/application/dashboard_app_controller.tsx
@@ -60,6 +60,7 @@ import {
ViewMode,
ContainerOutput,
EmbeddableInput,
+ SavedObjectEmbeddableInput,
} from '../../../embeddable/public';
import { NavAction, SavedDashboardPanel } from '../types';
@@ -431,7 +432,7 @@ export class DashboardAppController {
.getIncomingEmbeddablePackage();
if (incomingState) {
if ('id' in incomingState) {
- container.addNewEmbeddable(incomingState.type, {
+ container.addOrUpdateEmbeddable(incomingState.type, {
savedObjectId: incomingState.id,
});
} else if ('input' in incomingState) {
@@ -440,7 +441,7 @@ export class DashboardAppController {
const explicitInput = {
savedVis: input,
};
- container.addNewEmbeddable(incomingState.type, explicitInput);
+ container.addOrUpdateEmbeddable(incomingState.type, explicitInput);
}
}
}
diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
index f1ecd0f221926..ff74580ba256b 100644
--- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
@@ -46,7 +46,7 @@ import {
} from '../../../../kibana_react/public';
import { PLACEHOLDER_EMBEDDABLE } from './placeholder';
import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement';
-import { EmbeddableStateTransfer } from '../../../../embeddable/public';
+import { EmbeddableStateTransfer, EmbeddableOutput } from '../../../../embeddable/public';
export interface DashboardContainerInput extends ContainerInput {
viewMode: ViewMode;
@@ -159,29 +159,55 @@ export class DashboardContainer extends Container) => {
- const finalPanels = { ...this.input.panels };
- delete finalPanels[placeholderPanelState.explicitInput.id];
- const newPanelId = newPanelState.explicitInput?.id
- ? newPanelState.explicitInput.id
- : uuid.v4();
- finalPanels[newPanelId] = {
- ...placeholderPanelState,
- ...newPanelState,
- gridData: {
- ...placeholderPanelState.gridData,
- i: newPanelId,
- },
+ newStateComplete.then((newPanelState: Partial) =>
+ this.replacePanel(placeholderPanelState, newPanelState)
+ );
+ }
+
+ public replacePanel(
+ previousPanelState: DashboardPanelState,
+ newPanelState: Partial
+ ) {
+ // TODO: In the current infrastructure, embeddables in a container do not react properly to
+ // changes. Removing the existing embeddable, and adding a new one is a temporary workaround
+ // until the container logic is fixed.
+ const finalPanels = { ...this.input.panels };
+ delete finalPanels[previousPanelState.explicitInput.id];
+ const newPanelId = newPanelState.explicitInput?.id ? newPanelState.explicitInput.id : uuid.v4();
+ finalPanels[newPanelId] = {
+ ...previousPanelState,
+ ...newPanelState,
+ gridData: {
+ ...previousPanelState.gridData,
+ i: newPanelId,
+ },
+ explicitInput: {
+ ...newPanelState.explicitInput,
+ id: newPanelId,
+ },
+ };
+ this.updateInput({
+ panels: finalPanels,
+ lastReloadRequestTime: new Date().getTime(),
+ });
+ }
+
+ public async addOrUpdateEmbeddable<
+ EEI extends EmbeddableInput = EmbeddableInput,
+ EEO extends EmbeddableOutput = EmbeddableOutput,
+ E extends IEmbeddable = IEmbeddable
+ >(type: string, explicitInput: Partial) {
+ if (explicitInput.id && this.input.panels[explicitInput.id]) {
+ this.replacePanel(this.input.panels[explicitInput.id], {
+ type,
explicitInput: {
- ...newPanelState.explicitInput,
- id: newPanelId,
+ ...explicitInput,
+ id: uuid.v4(),
},
- };
- this.updateInput({
- panels: finalPanels,
- lastReloadRequestTime: new Date().getTime(),
});
- });
+ } else {
+ this.addNewEmbeddable(type, explicitInput);
+ }
}
public render(dom: HTMLElement) {
diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts
index 8ec72dc1f9a74..22db1552e4303 100644
--- a/src/plugins/data/common/constants.ts
+++ b/src/plugins/data/common/constants.ts
@@ -44,7 +44,8 @@ export const UI_SETTINGS = {
FORMAT_NUMBER_DEFAULT_LOCALE: 'format:number:defaultLocale',
TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: 'timepicker:refreshIntervalDefaults',
TIMEPICKER_QUICK_RANGES: 'timepicker:quickRanges',
+ TIMEPICKER_TIME_DEFAULTS: 'timepicker:timeDefaults',
INDEXPATTERN_PLACEHOLDER: 'indexPattern:placeholder',
FILTERS_PINNED_BY_DEFAULT: 'filters:pinnedByDefault',
FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues',
-};
+} as const;
diff --git a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts
index c1aa2efe46998..18048b81aab96 100644
--- a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts
+++ b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts
@@ -78,7 +78,12 @@ function decorateFlattenedWrapper(hit: Record, metaFields: Record {
+ constructor(private type: string, private savedObjectsClient: SavedObjectsClientContract) {}
+
+ public async unwrapAttributes(input: RefType | ValType): Promise {
+ if (isSavedObjectEmbeddableInput(input)) {
+ const savedObject: SimpleSavedObject = await this.savedObjectsClient.get<
+ SavedObjectAttributes
+ >(this.type, input.savedObjectId);
+ return savedObject.attributes;
+ }
+ return input.attributes;
+ }
+
+ public async wrapAttributes(
+ newAttributes: SavedObjectAttributes,
+ useRefType: boolean,
+ embeddable?: IEmbeddable
+ ): Promise> {
+ const savedObjectId =
+ embeddable && isSavedObjectEmbeddableInput(embeddable.getInput())
+ ? (embeddable.getInput() as SavedObjectEmbeddableInput).savedObjectId
+ : undefined;
+
+ if (useRefType) {
+ if (savedObjectId) {
+ await this.savedObjectsClient.update(this.type, savedObjectId, newAttributes);
+ return { savedObjectId } as RefType;
+ } else {
+ const savedItem = await this.savedObjectsClient.create(this.type, newAttributes);
+ return { savedObjectId: savedItem.id } as RefType;
+ }
+ } else {
+ return { attributes: newAttributes } as ValType;
+ }
+ }
+}
diff --git a/src/plugins/embeddable/public/lib/embeddables/index.ts b/src/plugins/embeddable/public/lib/embeddables/index.ts
index 5bab5ac27f3cc..06cb6e322acf3 100644
--- a/src/plugins/embeddable/public/lib/embeddables/index.ts
+++ b/src/plugins/embeddable/public/lib/embeddables/index.ts
@@ -25,4 +25,5 @@ export { ErrorEmbeddable, isErrorEmbeddable } from './error_embeddable';
export { withEmbeddableSubscription } from './with_subscription';
export { EmbeddableRoot } from './embeddable_root';
export * from './saved_object_embeddable';
+export { AttributeService } from './attribute_service';
export { EmbeddableRenderer, EmbeddableRendererProps } from './embeddable_renderer';
diff --git a/src/plugins/embeddable/public/lib/embeddables/saved_object_embeddable.ts b/src/plugins/embeddable/public/lib/embeddables/saved_object_embeddable.ts
index 6ca1800b16de4..5f093c55e94e4 100644
--- a/src/plugins/embeddable/public/lib/embeddables/saved_object_embeddable.ts
+++ b/src/plugins/embeddable/public/lib/embeddables/saved_object_embeddable.ts
@@ -26,5 +26,5 @@ export interface SavedObjectEmbeddableInput extends EmbeddableInput {
export function isSavedObjectEmbeddableInput(
input: EmbeddableInput | SavedObjectEmbeddableInput
): input is SavedObjectEmbeddableInput {
- return (input as SavedObjectEmbeddableInput).savedObjectId !== undefined;
+ return Boolean((input as SavedObjectEmbeddableInput).savedObjectId);
}
diff --git a/src/plugins/embeddable/public/mocks.tsx b/src/plugins/embeddable/public/mocks.tsx
index efd0ccdc4553d..48e5483124704 100644
--- a/src/plugins/embeddable/public/mocks.tsx
+++ b/src/plugins/embeddable/public/mocks.tsx
@@ -99,6 +99,7 @@ const createStartContract = (): Start => {
getEmbeddableFactories: jest.fn(),
getEmbeddableFactory: jest.fn(),
EmbeddablePanel: jest.fn(),
+ getAttributeService: jest.fn(),
getEmbeddablePanel: jest.fn(),
getStateTransfer: jest.fn(() => createEmbeddableStateTransferMock() as EmbeddableStateTransfer),
filtersAndTimeRangeFromContext: jest.fn(),
diff --git a/src/plugins/embeddable/public/plugin.tsx b/src/plugins/embeddable/public/plugin.tsx
index 03bb4a4779267..508c82c4247ed 100644
--- a/src/plugins/embeddable/public/plugin.tsx
+++ b/src/plugins/embeddable/public/plugin.tsx
@@ -43,11 +43,13 @@ import {
defaultEmbeddableFactoryProvider,
IEmbeddable,
EmbeddablePanel,
+ SavedObjectEmbeddableInput,
ChartActionContext,
isRangeSelectTriggerContext,
isValueClickTriggerContext,
} from './lib';
import { EmbeddableFactoryDefinition } from './lib/embeddables/embeddable_factory_definition';
+import { AttributeService } from './lib/embeddables/attribute_service';
import { EmbeddableStateTransfer } from './lib/state_transfer';
export interface EmbeddableSetupDependencies {
@@ -82,6 +84,13 @@ export interface EmbeddableStart {
embeddableFactoryId: string
) => EmbeddableFactory | undefined;
getEmbeddableFactories: () => IterableIterator;
+ getAttributeService: <
+ A,
+ V extends EmbeddableInput & { attributes: A },
+ R extends SavedObjectEmbeddableInput
+ >(
+ type: string
+ ) => AttributeService;
/**
* Given {@link ChartActionContext} returns a list of `data` plugin {@link Filter} entries.
@@ -206,6 +215,7 @@ export class EmbeddablePublicPlugin implements Plugin new AttributeService(type, core.savedObjects.client),
filtersFromContext,
filtersAndTimeRangeFromContext,
getStateTransfer: (history?: ScopedHistory) => {
diff --git a/src/plugins/es_ui_shared/static/forms/components/form_row.tsx b/src/plugins/es_ui_shared/static/forms/components/form_row.tsx
index ad5a517e40cfb..d38e6c4f5fd95 100644
--- a/src/plugins/es_ui_shared/static/forms/components/form_row.tsx
+++ b/src/plugins/es_ui_shared/static/forms/components/form_row.tsx
@@ -57,13 +57,9 @@ export const FormRow = ({
titleWrapped = title;
}
- if (!children && !field) {
- throw new Error('You need to provide either children or a field to the FormRow');
- }
-
return (
- {children ? children : }
+ {children ? children : field ? : null}
);
};
diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap
index 6a2fd1000e6b4..0c89fb494b6ac 100644
--- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap
+++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/header/__snapshots__/header.test.tsx.snap
@@ -49,7 +49,7 @@ exports[`Header should render a different name, prompt, and beta tag if provided
>
"`;
+exports[`RequestTrialExtension component should display when enterprise license is not active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome subscription features, request an extension now.
"`;
-exports[`RequestTrialExtension component should display when license is active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now.
"`;
+exports[`RequestTrialExtension component should display when license is active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome subscription features, request an extension now.
"`;
-exports[`RequestTrialExtension component should display when license is not active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now.
"`;
+exports[`RequestTrialExtension component should display when license is not active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome subscription features, request an extension now.
"`;
-exports[`RequestTrialExtension component should display when platinum license is not active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now.
"`;
+exports[`RequestTrialExtension component should display when platinum license is not active and trial has been used 1`] = `"
Extend your trial
If you’d like to continue using machine learning, advanced security, and our other awesome subscription features, request an extension now.
"`;
diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap
index cb2a41dadbe9e..0a5656aa266bc 100644
--- a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap
+++ b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`RevertToBasic component should display when license is about to expire 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features.
"`;
+exports[`RevertToBasic component should display when license is about to expire 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription features.
"`;
-exports[`RevertToBasic component should display when license is expired 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features.
"`;
+exports[`RevertToBasic component should display when license is expired 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription features.
"`;
-exports[`RevertToBasic component should display when trial is active 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features.
"`;
+exports[`RevertToBasic component should display when trial is active 1`] = `"
Revert to Basic license
You’ll revert to our free features and lose access to machine learning, advanced security, and other subscription features.
"`;
diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap
index 9370b77e29560..9da8bb958941b 100644
--- a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap
+++ b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`StartTrial component when trial is allowed display for basic license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other Platinum features have to offer.
"`;
+exports[`StartTrial component when trial is allowed display for basic license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other subscription features have to offer.
"`;
-exports[`StartTrial component when trial is allowed should display for expired enterprise license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other Platinum features have to offer.
"`;
+exports[`StartTrial component when trial is allowed should display for expired enterprise license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other subscription features have to offer.
"`;
-exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other Platinum features have to offer.
"`;
+exports[`StartTrial component when trial is allowed should display for expired platinum license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other subscription features have to offer.
"`;
-exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other Platinum features have to offer.
"`;
+exports[`StartTrial component when trial is allowed should display for gold license 1`] = `"
Start a 30-day trial
Experience what machine learning, advanced security, and all our other subscription features have to offer.