diff --git a/.ci/Jenkinsfile_coverage b/.ci/Jenkinsfile_coverage
index c474998e6fd3d..63798e2e29e44 100644
--- a/.ci/Jenkinsfile_coverage
+++ b/.ci/Jenkinsfile_coverage
@@ -5,89 +5,26 @@ kibanaLibrary.load() // load from the Jenkins instance
kibanaPipeline(timeoutMinutes: 240) {
catchErrors {
+ def timestamp = new Date(currentBuild.startTimeInMillis).format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
withEnv([
- 'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
+ "TIME_STAMP=${timestamp}",
+ 'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
- parallel([
- 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
- 'x-pack-intake-agent': {
- withEnv([
- 'NODE_ENV=test' // Needed for jest tests only
- ]) {
- workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh')()
- }
- },
- 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
- '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),
- ]),
- 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
- '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),
- ]),
- ])
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
- kibanaPipeline.downloadCoverageArtifacts()
- kibanaPipeline.bash(
- '''
- # bootstrap from x-pack folder
- source src/dev/ci_setup/setup_env.sh
- cd x-pack
- yarn kbn bootstrap --prefer-offline
- cd ..
- # extract archives
- mkdir -p /tmp/extracted_coverage
- echo extracting intakes
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- echo extracting kibana-oss-tests
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- echo extracting kibana-xpack-tests
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- # replace path in json files to have valid html report
- pwd=$(pwd)
- du -sh /tmp/extracted_coverage/target/kibana-coverage/
- echo replacing path in json files
- for i in {1..9}; do
- sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
- done
- wait
- # merge oss & x-pack reports
- echo merging coverage reports
- yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
- yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
- echo copy mocha reports
- mkdir -p target/kibana-coverage/mocha-combined
- cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
- ''',
- "run `yarn kbn bootstrap && merge coverage`"
- )
- sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
- sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
- sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
+ kibanaCoverage.runTests()
+ handleIngestion(TIME_STAMP)
}
}
+ kibanaPipeline.sendMail()
}
- kibanaPipeline.sendMail()
}
+
+def handleIngestion(timestamp) {
+ kibanaPipeline.downloadCoverageArtifacts()
+ kibanaCoverage.prokLinks("### Process HTML Links")
+ kibanaCoverage.collectVcsInfo("### Collect VCS Info")
+ kibanaCoverage.ingest(timestamp, '### Injest && Upload')
+ kibanaCoverage.uploadCoverageStaticSite(timestamp)
+}
+
+
diff --git a/.ci/Jenkinsfile_visual_baseline b/.ci/Jenkinsfile_visual_baseline
index 815c1345bbb68..2a16c499fa168 100644
--- a/.ci/Jenkinsfile_visual_baseline
+++ b/.ci/Jenkinsfile_visual_baseline
@@ -4,20 +4,22 @@ library 'kibana-pipeline-library'
kibanaLibrary.load()
kibanaPipeline(timeoutMinutes: 120) {
- catchError {
- parallel([
- 'oss-visualRegression': {
- workers.ci(name: 'oss-visualRegression', size: 's', ramDisk: false) {
- kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
- }
- },
- 'xpack-visualRegression': {
- workers.ci(name: 'xpack-visualRegression', size: 's', ramDisk: false) {
- kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
- }
- },
- ])
- }
+ ciStats.trackBuild {
+ catchError {
+ parallel([
+ 'oss-visualRegression': {
+ workers.ci(name: 'oss-visualRegression', size: 's', ramDisk: false) {
+ kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
+ }
+ },
+ 'xpack-visualRegression': {
+ workers.ci(name: 'xpack-visualRegression', size: 's', ramDisk: false) {
+ kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
+ }
+ },
+ ])
+ }
- kibanaPipeline.sendMail()
+ kibanaPipeline.sendMail()
+ }
}
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 638e86ef375fe..19116977756f4 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -128,6 +128,9 @@
/src/legacy/server/utils/ @elastic/kibana-operations
/src/legacy/server/warnings/ @elastic/kibana-operations
+# Quality Assurance
+/src/dev/code_coverage @elastic/kibana-qa
+
# Platform
/src/core/ @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
@@ -161,7 +164,8 @@
# Pulse
/packages/kbn-analytics/ @elastic/pulse
-/src/legacy/core_plugins/ui_metric/ @elastic/pulse
+/src/plugins/kibana_usage_collection/ @elastic/pulse
+/src/plugins/newsfeed/ @elastic/pulse
/src/plugins/telemetry/ @elastic/pulse
/src/plugins/telemetry_collection_manager/ @elastic/pulse
/src/plugins/telemetry_management_section/ @elastic/pulse
diff --git a/.gitignore b/.gitignore
index 13c7cd5fb2769..f843609d32f7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,4 +46,6 @@ npm-debug.log*
.tern-project
x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
+/x-pack/legacy/plugins/apm/e2e/snapshots.js
/x-pack/plugins/apm/e2e/snapshots.js
+.nyc_output
diff --git a/.sass-lint.yml b/.sass-lint.yml
index c8985108dabf2..db895583eb8a7 100644
--- a/.sass-lint.yml
+++ b/.sass-lint.yml
@@ -11,6 +11,7 @@ files:
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
+ - 'x-pack/plugins/spaces/**/*.s+(a|c)ss'
ignore:
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e4a9d87bc56fc..a9a2f609e0913 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -414,6 +414,34 @@ extract them to a `JSON` file or integrate translations back to Kibana. To know
We cannot support accepting contributions to the translations from any source other than the translators we have engaged to do the work.
We are still to develop a proper process to accept any contributed translations. We certainly appreciate that people care enough about the localization effort to want to help improve the quality. We aim to build out a more comprehensive localization process for the future and will notify you once contributions can be supported, but for the time being, we are not able to incorporate suggestions.
+### Syling with SASS
+
+When writing a new component, create a sibling SASS file of the same name and import directly into the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
+
+Any JavaScript (or TypeScript) file that imports SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`styling_constants.scss` file](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/styles/_styling_constants.scss). However, any Legacy (file path includes `/legacy`) files will not.
+
+**Example:**
+
+```tsx
+// component.tsx
+
+import './component.scss';
+
+export const Component = () => {
+ return (
+
+ );
+}
+```
+
+```scss
+// component.scss
+
+.plgComponent { ... }
+```
+
+Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file.
+
### Testing and Building
To ensure that your changes will not break other functionality, please run the test suite and build process before submitting your Pull Request.
diff --git a/docs/api/features.asciidoc b/docs/api/features.asciidoc
index da8b0edfe2261..57a87ff6342f9 100644
--- a/docs/api/features.asciidoc
+++ b/docs/api/features.asciidoc
@@ -29,7 +29,7 @@ The API returns the following:
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
- "navLinkId": "kibana:discover",
+ "navLinkId": "discover",
"app": [
"kibana"
],
@@ -74,7 +74,7 @@ The API returns the following:
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
- "navLinkId": "kibana:visualize",
+ "navLinkId": "visualize",
"app": [
"kibana"
],
@@ -121,7 +121,7 @@ The API returns the following:
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
- "navLinkId": "kibana:dashboard",
+ "navLinkId": "dashboards",
"app": [
"kibana"
],
@@ -173,7 +173,7 @@ The API returns the following:
"id": "dev_tools",
"name": "Dev Tools",
"icon": "devToolsApp",
- "navLinkId": "kibana:dev_tools",
+ "navLinkId": "dev_tools",
"app": [
"kibana"
],
diff --git a/docs/apm/api.asciidoc b/docs/apm/api.asciidoc
index 93733f5990a46..b26c7446b91d1 100644
--- a/docs/apm/api.asciidoc
+++ b/docs/apm/api.asciidoc
@@ -60,7 +60,7 @@ The following Agent configuration APIs are available:
======
`settings`::
-(required) Key/value object with settings and their corresponding value.
+(required) Key/value object with option name and option value.
`agent_name`::
(optional) The agent name is used by the UI to determine which settings to display.
@@ -73,14 +73,14 @@ The following Agent configuration APIs are available:
--------------------------------------------------
PUT /api/apm/settings/agent-configuration
{
- "service" : {
- "name" : "frontend",
- "environment" : "production"
+ "service": {
+ "name": "frontend",
+ "environment": "production"
},
- "settings" : {
- "transaction_sample_rate" : 0.4,
- "capture_body" : "off",
- "transaction_max_spans" : 500
+ "settings": {
+ "transaction_sample_rate": "0.4",
+ "capture_body": "off",
+ "transaction_max_spans": "500"
},
"agent_name": "nodejs"
}
@@ -124,7 +124,7 @@ PUT /api/apm/settings/agent-configuration
DELETE /api/apm/settings/agent-configuration
{
"service" : {
- "name" : "frontend",
+ "name": "frontend",
"environment": "production"
}
}
@@ -157,9 +157,9 @@ DELETE /api/apm/settings/agent-configuration
"environment": "production"
},
"settings": {
- "transaction_sample_rate": 1,
+ "transaction_sample_rate": "1",
"capture_body": "off",
- "transaction_max_spans": 200
+ "transaction_max_spans": "200"
},
"@timestamp": 1581934104843,
"applied_by_agent": false,
@@ -171,9 +171,9 @@ DELETE /api/apm/settings/agent-configuration
"name": "opbeans-go"
},
"settings": {
- "transaction_sample_rate": 1,
+ "transaction_sample_rate": "1",
"capture_body": "off",
- "transaction_max_spans": 300
+ "transaction_max_spans": "300"
},
"@timestamp": 1581934111727,
"applied_by_agent": false,
@@ -185,7 +185,7 @@ DELETE /api/apm/settings/agent-configuration
"name": "frontend"
},
"settings": {
- "transaction_sample_rate": 1,
+ "transaction_sample_rate": "1",
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
@@ -250,7 +250,7 @@ GET /api/apm/settings/agent-configuration
"name": "frontend"
},
"settings": {
- "transaction_sample_rate": 1,
+ "transaction_sample_rate": "1",
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
@@ -266,9 +266,9 @@ GET /api/apm/settings/agent-configuration
--------------------------------------------------
POST /api/apm/settings/agent-configuration/search
{
- "etag" : "1e58c178efeebae15c25c539da740d21dee422fc",
+ "etag": "1e58c178efeebae15c25c539da740d21dee422fc",
"service" : {
- "name" : "frontend",
+ "name": "frontend",
"environment": "production"
}
}
diff --git a/docs/canvas/canvas-elements.asciidoc b/docs/canvas/canvas-elements.asciidoc
index a25460a20eb50..4149039a3f87b 100644
--- a/docs/canvas/canvas-elements.asciidoc
+++ b/docs/canvas/canvas-elements.asciidoc
@@ -31,7 +31,7 @@ By default, most of the elements you create use demo data until you change the d
[[canvas-add-object]]
==== Add a saved object
-Add a <>, such as a map or Lens visualization, then customize it to fit your display needs.
+Add a <>, then customize it to fit your display needs.
. Click *Embed object*.
diff --git a/docs/developer/plugin/development-plugin-feature-registration.asciidoc b/docs/developer/plugin/development-plugin-feature-registration.asciidoc
index 4702204196bf2..d594a6d4255b2 100644
--- a/docs/developer/plugin/development-plugin-feature-registration.asciidoc
+++ b/docs/developer/plugin/development-plugin-feature-registration.asciidoc
@@ -153,7 +153,7 @@ init(server) {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
- navLinkId: 'kibana:dev_tools',
+ navLinkId: 'dev_tools',
app: ['kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
privileges: {
@@ -216,7 +216,7 @@ init(server) {
}),
order: 100,
icon: 'discoverApp',
- navLinkId: 'kibana:discover',
+ navLinkId: 'discover',
app: ['kibana'],
catalogue: ['discover'],
privileges: {
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.extractsearchsourcereferences.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.extractsearchsourcereferences.md
new file mode 100644
index 0000000000000..cd051cfeca6b0
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.extractsearchsourcereferences.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [extractSearchSourceReferences](./kibana-plugin-plugins-data-public.extractsearchsourcereferences.md)
+
+## extractSearchSourceReferences variable
+
+Signature:
+
+```typescript
+extractReferences: (state: SearchSourceFields) => [SearchSourceFields & {
+ indexRefName?: string | undefined;
+}, SavedObjectReference[]]
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.injectsearchsourcereferences.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.injectsearchsourcereferences.md
new file mode 100644
index 0000000000000..b55f5b866244d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.injectsearchsourcereferences.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [injectSearchSourceReferences](./kibana-plugin-plugins-data-public.injectsearchsourcereferences.md)
+
+## injectSearchSourceReferences variable
+
+Signature:
+
+```typescript
+injectReferences: (searchSourceFields: SearchSourceFields & {
+ indexRefName: string;
+}, references: SavedObjectReference[]) => SearchSourceFields
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
index 8b58957b9044a..02cc34baf7c45 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
@@ -101,11 +101,14 @@
| [esFilters](./kibana-plugin-plugins-data-public.esfilters.md) | |
| [esKuery](./kibana-plugin-plugins-data-public.eskuery.md) | |
| [esQuery](./kibana-plugin-plugins-data-public.esquery.md) | |
+| [extractSearchSourceReferences](./kibana-plugin-plugins-data-public.extractsearchsourcereferences.md) | |
| [fieldFormats](./kibana-plugin-plugins-data-public.fieldformats.md) | |
| [FilterBar](./kibana-plugin-plugins-data-public.filterbar.md) | |
| [getIndexPatternFieldListCreator](./kibana-plugin-plugins-data-public.getindexpatternfieldlistcreator.md) | |
| [getKbnTypeNames](./kibana-plugin-plugins-data-public.getkbntypenames.md) | Get the esTypes known by all kbnFieldTypes {Array} |
| [indexPatterns](./kibana-plugin-plugins-data-public.indexpatterns.md) | |
+| [injectSearchSourceReferences](./kibana-plugin-plugins-data-public.injectsearchsourcereferences.md) | |
+| [parseSearchSourceJSON](./kibana-plugin-plugins-data-public.parsesearchsourcejson.md) | |
| [QueryStringInput](./kibana-plugin-plugins-data-public.querystringinput.md) | |
| [search](./kibana-plugin-plugins-data-public.search.md) | |
| [SearchBar](./kibana-plugin-plugins-data-public.searchbar.md) | |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.parsesearchsourcejson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.parsesearchsourcejson.md
new file mode 100644
index 0000000000000..f5014c55fdaab
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.parsesearchsourcejson.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [parseSearchSourceJSON](./kibana-plugin-plugins-data-public.parsesearchsourcejson.md)
+
+## parseSearchSourceJSON variable
+
+Signature:
+
+```typescript
+parseSearchSourceJSON: (searchSourceJSON: string) => SearchSourceFields
+```
diff --git a/docs/maps/heatmap-layer.asciidoc b/docs/maps/heatmap-layer.asciidoc
index 77b6d929a931c..7149bc5623169 100644
--- a/docs/maps/heatmap-layer.asciidoc
+++ b/docs/maps/heatmap-layer.asciidoc
@@ -2,15 +2,12 @@
[[heatmap-layer]]
== Heat map layer
-In the heat map layer, point data is clustered to show locations with higher densities.
+Heat map layers cluster point data to show locations with higher densities.
[role="screenshot"]
image::maps/images/heatmap_layer.png[]
-You can create a heat map layer from the following data source:
-
-*Grid aggregation*:: Geospatial data grouped in grids with metrics for each gridded cell.
-Set *Show as* to *heat map*.
+To add a heat map layer to your map, click *Add layer*, then select the *Heat map* layer.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point].
NOTE: Only count, sum, unique count metric aggregations are available with the grid aggregation source and heat map layers.
diff --git a/docs/maps/images/heatmap_layer.png b/docs/maps/images/heatmap_layer.png
index 8d59de38beccd..87a45146f95a5 100644
Binary files a/docs/maps/images/heatmap_layer.png and b/docs/maps/images/heatmap_layer.png differ
diff --git a/docs/maps/images/spatial_filters.png b/docs/maps/images/spatial_filters.png
new file mode 100644
index 0000000000000..991e7f62962d0
Binary files /dev/null and b/docs/maps/images/spatial_filters.png differ
diff --git a/docs/maps/images/tile_layer.png b/docs/maps/images/tile_layer.png
index 60cb90ac5b90b..fc1d571b3e9b0 100644
Binary files a/docs/maps/images/tile_layer.png and b/docs/maps/images/tile_layer.png differ
diff --git a/docs/maps/images/vector_layer.png b/docs/maps/images/vector_layer.png
index a30f6c1d6acfd..6bc9701759ce7 100644
Binary files a/docs/maps/images/vector_layer.png and b/docs/maps/images/vector_layer.png differ
diff --git a/docs/maps/index.asciidoc b/docs/maps/index.asciidoc
index 56826c5209034..de90d7adb29c0 100644
--- a/docs/maps/index.asciidoc
+++ b/docs/maps/index.asciidoc
@@ -30,6 +30,7 @@ include::tile-layer.asciidoc[]
include::vector-layer.asciidoc[]
include::maps-aggregations.asciidoc[]
include::search.asciidoc[]
+include::map-settings.asciidoc[]
include::connect-to-ems.asciidoc[]
include::geojson-upload.asciidoc[]
include::indexing-geojson-data-tutorial.asciidoc[]
diff --git a/docs/maps/indexing-geojson-data-tutorial.asciidoc b/docs/maps/indexing-geojson-data-tutorial.asciidoc
index bf846a2b80e03..c1ca9d0925c9a 100644
--- a/docs/maps/indexing-geojson-data-tutorial.asciidoc
+++ b/docs/maps/indexing-geojson-data-tutorial.asciidoc
@@ -87,14 +87,13 @@ hot spots are. An advantage of having indexed
lightning strikes is that you can perform aggregations on the data.
. Click *Add layer*.
-. From the list of layer types, click *Grid aggregation*.
+. From the list of layer types, click *Heat map*.
+
Because you indexed `lightning_detected.geojson` using the index name and
pattern `lightning_detected`, that data is available as a {ref}/geo-point.html[geo_point]
aggregation.
. Select `lightning_detected`.
-. Click *Show as* and select `heat map`.
. Click *Add layer* to add the heat map layer
"Lightning intensity".
+
diff --git a/docs/maps/map-settings.asciidoc b/docs/maps/map-settings.asciidoc
new file mode 100644
index 0000000000000..4e290b6da2e71
--- /dev/null
+++ b/docs/maps/map-settings.asciidoc
@@ -0,0 +1,39 @@
+[role="xpack"]
+[[maps-settings]]
+== Map settings
+
+Elastic Maps offers settings that let you configure how a map is displayed.
+To access these settings, click *Map settings* in the application toolbar.
+
+[float]
+[[maps-settings-navigation]]
+=== Navigation
+
+*Zoom range*::
+Constrain the map to the defined zoom range.
+
+*Initial map location*::
+Configure the initial map center and zoom.
+* *Map location at save*: Use the map center and zoom from the map position at the time of the latest save.
+* *Fixed location*: Lock the map center and zoom to fixed values.
+* *Browser location*: Set the initial map center to the browser location.
+
+[float]
+[[maps-settings-spatial-filters]]
+=== Spatial filters
+
+Use spatial filter settings to configure how <> are displayed.
+
+image::maps/images/spatial_filters.png[]
+
+*Show spatial filters on map*::
+Clear the checkbox so <> do not appear on the map.
+
+*Opacity*::
+Set the opacity of spatial filters.
+
+*Fill color*::
+Set the fill color of spatial filters.
+
+*Border color*::
+Set the border color of spatial filters.
diff --git a/docs/maps/maps-aggregations.asciidoc b/docs/maps/maps-aggregations.asciidoc
index 2b65ae99a381b..6b03614ab9d6a 100644
--- a/docs/maps/maps-aggregations.asciidoc
+++ b/docs/maps/maps-aggregations.asciidoc
@@ -37,7 +37,7 @@ image::maps/images/grid_to_docs.gif[]
[[maps-grid-aggregation]]
=== Grid aggregation
-The *Grid aggregation* source uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into grids. You can calculate metrics for each gridded cell.
+*Grid aggregation* layers use {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into grids. You can calculate metrics for each gridded cell.
Symbolize grid aggregation metrics as:
@@ -48,13 +48,13 @@ The cluster location is the weighted centroid for all geo-points in the gridded
*Heat map*:: Creates a <> that clusters the weighted centroids for each gridded cell.
-To enable grid aggregation:
+To enable a grid aggregation layer:
-. Click *Add layer*, then select the *Grid aggregation* source.
+. Click *Add layer*, then select the *Clusters and grids* or *Heat map* layer.
To enable a blended layer that dynamically shows clusters or documents:
-. Click *Add layer*, then select the *Documents* source.
+. Click *Add layer*, then select the *Documents* layer.
. Configure *Index pattern* and the *Geospatial field*. To enable clustering, the *Geospatial field* must be set to a field mapped as {ref}/geo-point.html[geo_point].
. In *Scaling*, select *Show clusters when results exceed 10000*.
@@ -69,7 +69,7 @@ then accumulates the most relevant documents based on sort order for each entry
To enable top hits:
-. Click *Add layer* button and select *Documents* source.
+. Click *Add layer*, then select the *Documents* layer.
. Configure *Index pattern* and *Geospatial field*.
. In *Scaling*, select *Show top hits per entity*.
. Set *Entity* to the field that identifies entities in your documents.
@@ -99,7 +99,7 @@ image::maps/images/point_to_point.png[]
Use term joins to augment vector features with properties for <> and richer tooltip content.
-Term joins are available for <> with the following sources:
+Term joins are available for the following <>:
* Configured GeoJSON
* Documents
diff --git a/docs/maps/maps-getting-started.asciidoc b/docs/maps/maps-getting-started.asciidoc
index 6495b8a057cf6..a74d442d6ffa2 100644
--- a/docs/maps/maps-getting-started.asciidoc
+++ b/docs/maps/maps-getting-started.asciidoc
@@ -62,10 +62,10 @@ The first layer you'll add is a choropleth layer to shade world countries
by web log traffic. Darker shades symbolize countries with more web log traffic,
and lighter shades symbolize countries with less traffic.
-==== Add a vector layer from the Elastic Maps Service source
+==== Add a vector layer to display world country boundaries
-. In the map legend, click *Add layer*.
-. Click the *EMS Boundaries* data source.
+. Click *Add layer*.
+. Select the *EMS Boundaries* layer.
. From the *Layer* dropdown menu, select *World Countries*.
. Click the *Add layer* button.
. Set *Name* to `Total Requests by Country`.
@@ -112,16 +112,16 @@ To avoid overwhelming the user with too much data at once, you'll add two layers
* The first layer will display individual documents.
The layer will appear when the user zooms in the map to show smaller regions.
-* The second layer will show aggregated data that represents many documents.
+* The second layer will display aggregated data that represents many documents.
The layer will appear when the user zooms out the map to show larger amounts of the globe.
-==== Add a vector layer from the document source
+==== Add a vector layer to display individual documents
This layer displays web log documents as points.
The layer is only visible when users zoom in the map past zoom level 9.
-. In the map legend, click *Add layer*.
-. Click the *Documents* data source.
+. Click *Add layer*.
+. Click the *Documents* layer.
. Set *Index pattern* to *kibana_sample_data_logs*.
. Click the *Add layer* button.
. Set *Name* to `Actual Requests`.
@@ -137,7 +137,7 @@ Your map now looks like this between zoom levels 9 and 24:
[role="screenshot"]
image::maps/images/gs_add_es_document_layer.png[]
-==== Add a vector layer from the grid aggregation source
+==== Add a vector layer to display aggregated data
Aggregations group {es} documents into grids. You can calculate metrics
for each gridded cell.
@@ -154,10 +154,9 @@ image::maps/images/grid_metrics_both.png[]
===== Add the layer
-. In the map legend, click *Add layer*.
-. Click the *Grid aggregation* data source.
+. Click *Add layer*.
+. Click the *Clusters and grids* layer.
. Set *Index pattern* to *kibana_sample_data_logs*.
-. Set *Show as* to *clusters*.
. Click the *Add layer* button.
. Set *Name* to `Total Requests and Bytes`.
. Set *Visibility* to the range [0, 9].
diff --git a/docs/maps/search.asciidoc b/docs/maps/search.asciidoc
index a461ab6fbb3a6..124a976c009d4 100644
--- a/docs/maps/search.asciidoc
+++ b/docs/maps/search.asciidoc
@@ -10,13 +10,13 @@ You can create a layer that requests data from {es} from the following:
* <> with:
-** Documents source
+** Documents
-** Grid aggregation source
+** Clusters and grid
** <>
-* <> with Grid aggregation source
+* <>
[role="screenshot"]
image::maps/images/global_search_bar.png[]
diff --git a/docs/maps/tile-layer.asciidoc b/docs/maps/tile-layer.asciidoc
index 059dd527f4810..6da8dbad0a66d 100644
--- a/docs/maps/tile-layer.asciidoc
+++ b/docs/maps/tile-layer.asciidoc
@@ -2,12 +2,12 @@
[[tile-layer]]
== Tile layer
-The tile layer displays image tiles served from a tile server.
+Tile layers display image tiles served from a tile server.
[role="screenshot"]
image::maps/images/tile_layer.png[]
-You can create a tile layer from the following data sources:
+To add a tile layer to your map, click *Add layer*, then select one of the following layers:
*Configured Tile Map Service*:: Tile map service configured in kibana.yml.
See map.tilemap.url in <> for details.
diff --git a/docs/maps/vector-layer.asciidoc b/docs/maps/vector-layer.asciidoc
index 17c57c82b0f17..d6a5931659a40 100644
--- a/docs/maps/vector-layer.asciidoc
+++ b/docs/maps/vector-layer.asciidoc
@@ -2,12 +2,15 @@
[[vector-layer]]
== Vector layer
-The vector layer displays points, lines, and polygons.
+Vector layers display points, lines, and polygons.
[role="screenshot"]
image::maps/images/vector_layer.png[]
-You can create a vector layer from the following sources:
+To add a vector layer to your map, click *Add layer*, then select one of the following layers:
+
+*Clusters and grids*:: Geospatial data grouped in grids with metrics for each gridded cell.
+The index must contain at least one field mapped as {ref}/geo-point.html[geo_point].
*Configured GeoJSON*:: Vector data from hosted GeoJSON configured in kibana.yml.
See map.regionmap.* in <> for details.
@@ -18,15 +21,13 @@ The index must contain at least one field mapped as {ref}/geo-point.html[geo_poi
NOTE: Document results are limited to the `index.max_result_window` index setting, which defaults to 10000.
Use <> to plot large data sets.
-*Grid aggregation*:: Geospatial data grouped in grids with metrics for each gridded cell.
-Set *Show as* to *grid rectangles* or *clusters*.
-The index must contain at least one field mapped as {ref}/geo-point.html[geo_point].
-
*EMS Boundaries*:: Administrative boundaries from https://www.elastic.co/elastic-maps-service[Elastic Maps Service].
*Point to point*:: Aggregated data paths between the source and destination.
The index must contain at least 2 fields mapped as {ref}/geo-point.html[geo_point], source and destination.
+*Upload Geojson*:: Index GeoJSON data in Elasticsearch.
+
include::vector-style.asciidoc[]
include::vector-style-properties.asciidoc[]
include::vector-tooltips.asciidoc[]
diff --git a/docs/maps/vector-style.asciidoc b/docs/maps/vector-style.asciidoc
index 7bc8a909d1ec6..5f5b3a1b2aecd 100644
--- a/docs/maps/vector-style.asciidoc
+++ b/docs/maps/vector-style.asciidoc
@@ -86,7 +86,7 @@ Qualitative data driven styling is available for the following styling propertie
* *Label color*
* *Label border color*
-To ensure symbols are consistent as you pan, zoom, and filter the map, qualitative data driven styling uses a {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation]. The term aggregation retrieves the top nine categories for the property. Feature values within the top categories are assigned a unique style. Feature values outside of the top categories are grouped into the *Other* category. A feature is assigned the *Other* category when the property value is undefined.
+To ensure symbols are consistent as you pan, zoom, and filter the map, qualitative data driven styling uses a {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation]. The term aggregation retrieves the top categories for the property. Feature values within the top categories are assigned a unique style. Feature values outside of the top categories are grouped into the *Other* category. A feature is assigned the *Other* category when the property value is undefined.
To configure the terms aggregation, click the gear icon image:maps/images/gear_icon.png[]. Clear the *Get categories from indice* checkbox to turn off the terms aggregation request.
diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc
index 09878b3059ac8..e8dcf689df8e4 100644
--- a/docs/user/alerting/action-types.asciidoc
+++ b/docs/user/alerting/action-types.asciidoc
@@ -41,9 +41,9 @@ see https://www.elastic.co/subscriptions[the subscription page].
[float]
[[create-connectors]]
-=== Preconfigured connectors and action types
+=== Preconfigured actions and connectors
-For out-of-the-box and standardized connectors, you can <>
+For out-of-the-box and standardized connectors, you can <>
before {kib} starts.
If you preconfigure a connector, you can also <>.
@@ -54,4 +54,4 @@ include::action-types/pagerduty.asciidoc[]
include::action-types/server-log.asciidoc[]
include::action-types/slack.asciidoc[]
include::action-types/webhook.asciidoc[]
-include::pre-configured-connectors.asciidoc[]
+include::action-types/pre-configured-connectors.asciidoc[]
diff --git a/docs/user/alerting/action-types/email.asciidoc b/docs/user/alerting/action-types/email.asciidoc
index 81b4e210961f6..4fb8a816d1ec9 100644
--- a/docs/user/alerting/action-types/email.asciidoc
+++ b/docs/user/alerting/action-types/email.asciidoc
@@ -28,27 +28,46 @@ Password:: password for 'login' type authentication.
name: preconfigured-email-action-type
actionTypeId: .email
config:
- from: testsender@test.com <1.1>
- host: validhostname <1.2>
- port: 8080 <1.3>
- secure: false <1.4>
+ from: testsender@test.com
+ host: validhostname
+ port: 8080
+ secure: false
secrets:
- user: testuser <2.1>
- password: passwordkeystorevalue <2.2>
+ user: testuser
+ password: passwordkeystorevalue
--
`config` defines the action type specific to the configuration and contains the following properties:
-<1.1> `from:` is an email address and correspond to *Sender*.
-<1.2> `host:` is a string and correspond to *Host*.
-<1.3> `port:` is a number and correspond to *Port*.
-<1.4> `secure:` is a boolean and correspond to *Secure*.
+[cols="2*<"]
+|===
-`secrets` defines action type sensitive configuration:
+| `from`
+| An email address that corresponds to *Sender*.
-<2.1> `user:` is a string and correspond to *User*.
-<2.2> `password:` is a string and correspond to *Password*. Should be stored in the <>.
+| `host`
+| A string that corresponds to *Host*.
+| `port`
+| A number that corresponds to *Port*.
+
+| `secure`
+| A boolean that corresponds to *Secure*.
+
+|===
+
+`secrets` defines sensitive information for the action type:
+
+[cols="2*<"]
+|===
+
+| `user`
+| A string that corresponds to *User*.
+
+| `password`
+| A string that corresponds to *Password*. Should be stored in the <>.
+
+|===
[[email-action-configuration]]
==== Action configuration
diff --git a/docs/user/alerting/action-types/index.asciidoc b/docs/user/alerting/action-types/index.asciidoc
index c71412210c535..115423086bae3 100644
--- a/docs/user/alerting/action-types/index.asciidoc
+++ b/docs/user/alerting/action-types/index.asciidoc
@@ -25,16 +25,26 @@ Execution time field:: This field will be automatically set to the time the ale
name: action-type-index
actionTypeId: .index
config:
- index: .kibana <1>
- refresh: true <2>
- executionTimeField: somedate <3>
+ index: .kibana
+ refresh: true
+ executionTimeField: somedate
--
`config` defines the action type specific to the configuration and contains the following properties:
-<1> `index:` is a string and correspond to *Index*.
-<2> `refresh:` is a boolean and correspond to *Refresh*.
-<3> `executionTimeField:` is a string and correspond to *Execution time field*.
+[cols="2*<"]
+|===
+
+|`index`
+| A string that corresponds to *Index*.
+
+|`refresh`
+| A boolean that corresponds to *Refresh*.
+
+|`executionTimeField`
+| A string that corresponds to *Execution time field*.
+
+|===
[float]
diff --git a/docs/user/alerting/action-types/pagerduty.asciidoc b/docs/user/alerting/action-types/pagerduty.asciidoc
index cd51ec2e3301e..0468ab042e57e 100644
--- a/docs/user/alerting/action-types/pagerduty.asciidoc
+++ b/docs/user/alerting/action-types/pagerduty.asciidoc
@@ -145,18 +145,19 @@ Integration Key:: A 32 character PagerDuty Integration Key for an integration
name: preconfigured-pagerduty-action-type
actionTypeId: .pagerduty
config:
- apiUrl: https://test.host <1.1>
+ apiUrl: https://test.host
secrets:
- routingKey: testroutingkey <2.1>
+ routingKey: testroutingkey
--
-`config` defines the action type specific to the configuration and contains the following properties:
+`config` defines the action type specific to the configuration.
+`config` contains
+`apiURL`, a string that corresponds to *API URL*.
-<1.1> `apiUrl:` is URL string and correspond to *API URL*.
+`secrets` defines sensitive information for the action type.
+`secrets` contains
+`routingKey`, a string that corresponds to *Integration Key*.
-`secrets` defines action type sensitive configuration:
-
-<2.1> `routingKey:` is a string and correspond to *Integration Key*.
[float]
[[pagerduty-action-configuration]]
diff --git a/docs/user/alerting/action-types/pre-configured-connectors.asciidoc b/docs/user/alerting/action-types/pre-configured-connectors.asciidoc
new file mode 100644
index 0000000000000..b3e401256f27b
--- /dev/null
+++ b/docs/user/alerting/action-types/pre-configured-connectors.asciidoc
@@ -0,0 +1,121 @@
+[role="xpack"]
+[[pre-configured-action-types-and-connectors]]
+
+=== Preconfigured connectors and action types
+
+You can preconfigure a connector or action type to have all the information it needs prior to startup
+by adding it to the `kibana.yml` file.
+
+Preconfigured connectors offer the following capabilities:
+
+- Require no setup. Configuration and credentials needed to execute an
+action are predefined, including the connector name and ID.
+- Appear in all spaces because they are not saved objects.
+- Cannot be edited or deleted.
+
+A preconfigured action type has only preconfigured connectors. Preconfigured
+connectors can belong to either the preconfigured action type or to the regular action type.
+
+[float]
+[[preconfigured-connector-example]]
+==== Preconfigured connectors
+
+This example shows a valid configuration for
+two out-of-the box connectors: <> and <>.
+
+```js
+ xpack.actions.preconfigured:
+ my-slack1: <1>
+ actionTypeId: .slack <2>
+ name: 'Slack #xyz' <3>
+ config: <4>
+ webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
+ webhook-service:
+ actionTypeId: .webhook
+ name: 'Email service'
+ config:
+ url: 'https://email-alert-service.elastic.co'
+ method: post
+ headers:
+ header1: value1
+ header2: value2
+ secrets: <5>
+ user: elastic
+ password: changeme
+```
+
+<1> The key is the action connector identifier, `my-slack1` in this example.
+<2> `actionTypeId` is the action type identifier.
+<3> `name` is the name of the preconfigured connector.
+<4> `config` is the action type specific to the configuration.
+<5> `secrets` is sensitive configuration, such as username, password, and keys.
+
+[NOTE]
+==============================================
+Sensitive properties, such as passwords, can also be stored in the <>.
+==============================================
+
+////
+[float]
+[[managing-pre-configured-connectors]]
+==== View preconfigured connectors
+////
+
+In *Management > Alerts and Actions*, preconfigured connectors
+appear in the <>,
+regardless of which space you are in.
+They are tagged as “preconfigured”, and you cannot delete them.
+
+[role="screenshot"]
+image::images/pre-configured-connectors-managing.png[Connectors managing tab with pre-cofigured]
+
+Clicking a preconfigured connector shows the description, but not the configuration.
+A message indicates that this is a preconfigured connector.
+
+[role="screenshot"]
+image::images/pre-configured-connectors-view-screen.png[Pre-configured connector view details]
+
+The connector details preview is disabled for preconfigured connectors
+of a preconfigured action type.
+
+[role="screenshot"]
+image::images/pre-configured-action-type-managing.png[Connectors managing tab with pre-cofigured]
+
+[float]
+[[preconfigured-action-type-example]]
+==== Preconfigured action type
+
+This example shows a preconfigured action type with one out-of-the box connector.
+
+```js
+ xpack.actions.enabledActionTypes: ['.slack', '.email', '.index'] <1>
+ xpack.actions.preconfigured: <2>
+ my-server-log:
+ actionTypeId: .server-log
+ name: 'Server log #xyz'
+```
+
+<1> `enabledActionTypes` excludes the preconfigured action type to prevent creating and deleting connectors.
+<2> `preconfigured` is the setting for defining the list of available connectors for the preconfigured action type.
+
+[[managing-pre-configured-action-types]]
+To attach a preconfigured action to an alert:
+
+. In *Management > Alerts and Actions*, open the *Connectors* tab.
+
+. Click *Create connector.*
+
+. In the list of available action types, select the preconfigured action type you want.
++
+[role="screenshot"]
+image::images/pre-configured-action-type-select-type.png[Pre-configured connector create menu]
+
+. In *Create alert*, open the connector dropdown, and then select the preconfigured
+connector.
++
+The `preconfigured` label distinguishes it from a space-aware connector.
++
+[role="screenshot"]
+image::images/alert-pre-configured-connectors-dropdown.png[Dropdown list with pre-cofigured connectors]
+
+. Click *Add action*.
diff --git a/docs/user/alerting/action-types/slack.asciidoc b/docs/user/alerting/action-types/slack.asciidoc
index afa616ba77b3a..5bad8a53f898c 100644
--- a/docs/user/alerting/action-types/slack.asciidoc
+++ b/docs/user/alerting/action-types/slack.asciidoc
@@ -23,12 +23,12 @@ Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messa
name: preconfigured-slack-action-type
actionTypeId: .slack
config:
- webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz' <1>
+ webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
--
-`config` defines the action type specific to the configuration and contains the following properties:
-
-<1> `webhookUrl:` is URL string and correspond to *Webhook URL*.
+`config` defines the action type specific to the configuration.
+`config` contains
+`webhookUrl`, a string that corresponds to *Webhook URL*.
[float]
diff --git a/docs/user/alerting/action-types/webhook.asciidoc b/docs/user/alerting/action-types/webhook.asciidoc
index 27609652288b5..c91c24430e982 100644
--- a/docs/user/alerting/action-types/webhook.asciidoc
+++ b/docs/user/alerting/action-types/webhook.asciidoc
@@ -19,7 +19,7 @@ Password:: An optional password. If set, HTTP basic authentication is used. Cur
[float]
[[Preconfigured-webhook-configuration]]
-==== Preconfigured action type
+==== Preconfigured action type
[source,text]
--
@@ -27,25 +27,44 @@ Password:: An optional password. If set, HTTP basic authentication is used. Cur
name: preconfigured-webhook-action-type
actionTypeId: .webhook
config:
- url: https://test.host <1.1>
- method: POST <1.2>
- headers: <1.3>
+ url: https://test.host
+ method: POST
+ headers:
testheader: testvalue
secrets:
- user: testuser <2.1>
- password: passwordkeystorevalue <2.2>
+ user: testuser
+ password: passwordkeystorevalue
--
`config` defines the action type specific to the configuration and contains the following properties:
-<1.1> `url:` is URL string and correspond to *URL*.
-<1.2> `method:` is a string and correspond to *Method*.
-<1.3> `headers:` is Record and correspond to *Headers*.
+[cols="2*<"]
+|===
-`secrets` defines action type sensitive configuration:
+|`url`
+| A URL string that corresponds to *URL*.
+
+|`method`
+| A string that corresponds to *Method*.
+
+|`headers`
+|A record that corresponds to *Headers*.
+
+|===
+
+`secrets` defines sensitive information for the action type:
+
+[cols="2*<"]
+|===
+
+|`user`
+|A string that corresponds to *User*.
+
+|`password`
+|A string that corresponds to *Password*. Should be stored in the <>.
+
+|===
-<2.1> `user:` is a string and correspond to *User*.
-<2.2> `password:` is a string and correspond to *Password*. Should be stored in the <>.
[float]
[[webhook-action-configuration]]
diff --git a/docs/user/alerting/images/alert-pre-configured-connectors-dropdown.png b/docs/user/alerting/images/alert-pre-configured-connectors-dropdown.png
index 4e6c713298626..081688758eb48 100644
Binary files a/docs/user/alerting/images/alert-pre-configured-connectors-dropdown.png and b/docs/user/alerting/images/alert-pre-configured-connectors-dropdown.png differ
diff --git a/docs/user/alerting/images/alert-pre-configured-slack-connector.png b/docs/user/alerting/images/alert-pre-configured-slack-connector.png
index de05e2074ddde..e9d81877fbf4f 100644
Binary files a/docs/user/alerting/images/alert-pre-configured-slack-connector.png and b/docs/user/alerting/images/alert-pre-configured-slack-connector.png differ
diff --git a/docs/user/alerting/images/pre-configured-action-type-select-type.png b/docs/user/alerting/images/pre-configured-action-type-select-type.png
index 29e5a29edc7c0..91ca831840ce9 100644
Binary files a/docs/user/alerting/images/pre-configured-action-type-select-type.png and b/docs/user/alerting/images/pre-configured-action-type-select-type.png differ
diff --git a/docs/user/alerting/images/pre-configured-connectors-view-screen.png b/docs/user/alerting/images/pre-configured-connectors-view-screen.png
index 43ac44e7536d8..9c75f86498beb 100644
Binary files a/docs/user/alerting/images/pre-configured-connectors-view-screen.png and b/docs/user/alerting/images/pre-configured-connectors-view-screen.png differ
diff --git a/docs/user/alerting/pre-configured-connectors.asciidoc b/docs/user/alerting/pre-configured-connectors.asciidoc
deleted file mode 100644
index d5c20d1853d42..0000000000000
--- a/docs/user/alerting/pre-configured-connectors.asciidoc
+++ /dev/null
@@ -1,128 +0,0 @@
-[role="xpack"]
-[[pre-configured-action-types-and-connectors]]
-
-== Preconfigured connectors and action types
-
-You can preconfigure an action type or a connector to have all the information it needs prior to startup
-by adding it to the `kibana.yml` file.
-
-Preconfigured connectors offer the following capabilities:
-
-- Require no setup. Configuration and credentials needed to execute an
-action are predefined, including the connector name and ID.
-- Appear in all spaces because they are not saved objects.
-- Cannot be edited or deleted.
-
-Sensitive configuration information, such as credentials, can use the <>.
-
-A preconfigured action types has only preconfigured connectors. Preconfigured connectors can belong to either the preconfigured action type or to the regular action type.
-
-[float]
-[[preconfigured-connector-example]]
-=== Creating a preconfigured connector
-
-The following example shows a valid configuration of two out-of-the box connectors: <> and <>.
-
-```js
- xpack.actions.preconfigured:
- my-slack1: <1>
- actionTypeId: .slack <2>
- name: 'Slack #xyz' <3>
- config: <4>
- webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
- webhook-service:
- actionTypeId: .webhook
- name: 'Email service'
- config:
- url: 'https://email-alert-service.elastic.co'
- method: post
- headers:
- header1: value1
- header2: value2
- secrets: <5>
- user: elastic
- password: changeme
-```
-
-<1> the key is the action connector identifier, eg `my-slack1` in this example.
-<2> `actionTypeId` is the action type identifier.
-<3> `name` is the name of the preconfigured connector.
-<4> `config` is the action type specific to the configuration.
-<5> `secrets` is sensitive configuration, such as username, password, and keys.
-
-[NOTE]
-==============================================
-Sensitive properties, such as passwords, can also be stored in the <>.
-==============================================
-
-[float]
-[[preconfigured-action-type-example]]
-=== Creating a preconfigured action type
-
-In the `kibana.yml` file:
-
-. Exclude the action type from `xpack.actions.enabledActionTypes`.
-. Add all its preconfigured connectors.
-
-The following example shows a valid configuration of preconfigured action type with one out-of-the box connector.
-
-```js
- xpack.actions.enabledActionTypes: ['.slack', '.email', '.index'] <1>
- xpack.actions.preconfigured: <2>
- my-server-log:
- actionTypeId: .server-log
- name: 'Server log #xyz'
-```
-
-<1> `enabledActionTypes` should exclude preconfigured action type to prevent creating and deleting connectors.
-<2> `preconfigured` is the setting for defining the list of available connectors for the preconfigured action type.
-
-[float]
-[[managing-pre-configured-connectors]]
-=== Managing preconfigured connectors
-
-Preconfigured connectors appear in the connector list, regardless of which space the user is in.
-They are tagged as “preconfigured” and cannot be deleted.
-
-[role="screenshot"]
-image::images/pre-configured-connectors-managing.png[Connectors managing tab with pre-cofigured]
-
-Clicking on a preconfigured connector shows the description, but not any of the configuration.
-A message indicates that this is a preconfigured connector.
-
-[role="screenshot"]
-image::images/pre-configured-connectors-view-screen.png[Pre-configured connector view details]
-
-The connector details preview is disabled for preconfigured connectors.
-
-[role="screenshot"]
-image::images/pre-configured-action-type-managing.png[Connectors managing tab with pre-cofigured]
-
-
-[float]
-[[managing-pre-configured-action-types]]
-=== Managing preconfigured action types
-
-Clicking *Create connector* shows the list of available action types.
-Disabled action types are not included.
-
-[role="screenshot"]
-image::images/pre-configured-action-type-select-type.png[Pre-configured connector create menu]
-
-[float]
-[[pre-configured-connector-alert-form]]
-=== Alert with a preconfigured connector
-
-When attaching an action to an alert,
-select from a list of available action types, and
-then select the Slack or Webhook type. Those action types were configured previously.
-The preconfigured connector is installed and is automatically selected.
-
-[role="screenshot"]
-image::images/alert-pre-configured-slack-connector.png[Create alert with selected Slack action type]
-
-The dropdown is populated with additional preconfigured Slack connectors.
-The `preconfigured` label distinguishes them from space-aware connectors that use saved objects.
-
-[role="screenshot"]
-image::images/alert-pre-configured-connectors-dropdown.png[Dropdown list with pre-cofigured connectors]
diff --git a/docs/user/dashboard.asciidoc b/docs/user/dashboard.asciidoc
index de714ae40086b..301efb2dfe2c0 100644
--- a/docs/user/dashboard.asciidoc
+++ b/docs/user/dashboard.asciidoc
@@ -174,7 +174,7 @@ to view an embedded dashboard.
* Generate a PNG report
TIP: To create a link to a dashboard by title, use: +
-`${domain}/${basepath?}/app/kibana#/dashboards?title=${yourdashboardtitle}`
+`${domain}/${basepath?}/app/dashboards#/list?title=${yourdashboardtitle}`
TIP: When sharing a link to a dashboard snapshot, use the *Short URL*. Snapshot
URLs are long and can be problematic for Internet Explorer and other
diff --git a/docs/user/plugins.asciidoc b/docs/user/plugins.asciidoc
index 83c1ab1a842bb..a96fe811dc84f 100644
--- a/docs/user/plugins.asciidoc
+++ b/docs/user/plugins.asciidoc
@@ -33,12 +33,17 @@ $ bin/kibana-plugin install x-pack
=== Install plugins from an arbitrary URL
You can download official Elastic plugins simply by specifying their name. You
-can alternatively specify a URL to a specific plugin, as in the following
-example:
+can alternatively specify a URL or file path to a specific plugin, as in the following
+examples:
["source","shell",subs="attributes"]
$ bin/kibana-plugin install https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-{version}.zip
+or
+
+["source","shell",subs="attributes"]
+$ bin/kibana-plugin install file:///local/path/to/custom_plugin.zip
+
You can specify URLs that use the HTTP, HTTPS, or `file` protocols.
[float]
diff --git a/examples/alerting_example/public/alert_types/always_firing.tsx b/examples/alerting_example/public/alert_types/always_firing.tsx
index a62a24365ea3f..b7add1f6d43ce 100644
--- a/examples/alerting_example/public/alert_types/always_firing.tsx
+++ b/examples/alerting_example/public/alert_types/always_firing.tsx
@@ -51,6 +51,7 @@ export function getAlertType(): AlertTypeModel {
}
return validationResult;
},
+ requiresAppContext: false,
};
}
diff --git a/examples/alerting_example/public/alert_types/astros.tsx b/examples/alerting_example/public/alert_types/astros.tsx
index 9bda7da6f140d..3411c6722ccd6 100644
--- a/examples/alerting_example/public/alert_types/astros.tsx
+++ b/examples/alerting_example/public/alert_types/astros.tsx
@@ -99,6 +99,7 @@ export function getAlertType(): AlertTypeModel {
return validationResult;
},
+ requiresAppContext: false,
};
}
diff --git a/examples/alerting_example/server/alert_types/always_firing.ts b/examples/alerting_example/server/alert_types/always_firing.ts
index f0553ad5ebebd..dfee379013eb1 100644
--- a/examples/alerting_example/server/alert_types/always_firing.ts
+++ b/examples/alerting_example/server/alert_types/always_firing.ts
@@ -20,7 +20,7 @@
import uuid from 'uuid';
import { range } from 'lodash';
import { AlertType } from '../../../../x-pack/plugins/alerting/server';
-import { DEFAULT_INSTANCES_TO_GENERATE } from '../../common/constants';
+import { DEFAULT_INSTANCES_TO_GENERATE, ALERTING_EXAMPLE_APP_ID } from '../../common/constants';
export const alertType: AlertType = {
id: 'example.always-firing',
@@ -43,4 +43,5 @@ export const alertType: AlertType = {
count,
};
},
+ producer: ALERTING_EXAMPLE_APP_ID,
};
diff --git a/examples/alerting_example/server/alert_types/astros.ts b/examples/alerting_example/server/alert_types/astros.ts
index 3a53f85e6a266..d22bc6164fa52 100644
--- a/examples/alerting_example/server/alert_types/astros.ts
+++ b/examples/alerting_example/server/alert_types/astros.ts
@@ -19,7 +19,7 @@
import axios from 'axios';
import { AlertType } from '../../../../x-pack/plugins/alerting/server';
-import { Operator, Craft } from '../../common/constants';
+import { Operator, Craft, ALERTING_EXAMPLE_APP_ID } from '../../common/constants';
interface PeopleInSpace {
people: Array<{
@@ -79,4 +79,5 @@ export const alertType: AlertType = {
peopleInSpace,
};
},
+ producer: ALERTING_EXAMPLE_APP_ID,
};
diff --git a/package.json b/package.json
index 0c83cb429b651..810d9ddb7e337 100644
--- a/package.json
+++ b/package.json
@@ -72,7 +72,8 @@
"spec_to_console": "node scripts/spec_to_console",
"backport-skip-ci": "backport --prDescription \"[skip-ci]\"",
"storybook": "node scripts/storybook",
- "cover:report": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report --reporter=lcov && open ./target/coverage/report/lcov-report/index.html"
+ "cover:report": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report --reporter=lcov && open ./target/coverage/report/lcov-report/index.html",
+ "cover:functional:merge": "nyc report --temp-dir target/kibana-coverage/functional --report-dir target/coverage/report/functional --reporter=json-summary"
},
"repository": {
"type": "git",
diff --git a/packages/kbn-es/src/utils/native_realm.js b/packages/kbn-es/src/utils/native_realm.js
index 247ddc461910f..086898abb6b67 100644
--- a/packages/kbn-es/src/utils/native_realm.js
+++ b/packages/kbn-es/src/utils/native_realm.js
@@ -76,6 +76,10 @@ exports.NativeRealm = class NativeRealm {
}
const reservedUsers = await this.getReservedUsers();
+ if (!reservedUsers || reservedUsers.length < 1) {
+ throw new Error('no reserved users found, unable to set native realm passwords');
+ }
+
await Promise.all(
reservedUsers.map(async user => {
await this.setPassword(user, options[`password.${user}`]);
diff --git a/packages/kbn-plugin-helpers/cli.js b/packages/kbn-plugin-helpers/cli.js
index c6fc48bc5be9a..48b70535272fe 100644
--- a/packages/kbn-plugin-helpers/cli.js
+++ b/packages/kbn-plugin-helpers/cli.js
@@ -88,6 +88,4 @@ program
}))
);
-program.command('postinstall').action(createCommanderAction('postinstall'));
-
program.parse(process.argv);
diff --git a/packages/kbn-plugin-helpers/lib/tasks.js b/packages/kbn-plugin-helpers/lib/tasks.js
index 0e33e2086d9c4..afc9c056d51d7 100644
--- a/packages/kbn-plugin-helpers/lib/tasks.js
+++ b/packages/kbn-plugin-helpers/lib/tasks.js
@@ -22,7 +22,6 @@ const startTask = require('../tasks/start');
const testAllTask = require('../tasks/test/all');
const testKarmaTask = require('../tasks/test/karma');
const testMochaTask = require('../tasks/test/mocha');
-const postinstallTask = require('../tasks/postinstall');
module.exports = {
build: buildTask,
@@ -30,5 +29,4 @@ module.exports = {
testAll: testAllTask,
testKarma: testKarmaTask,
testMocha: testMochaTask,
- postinstall: postinstallTask,
};
diff --git a/packages/kbn-plugin-helpers/tasks/postinstall/index.js b/packages/kbn-plugin-helpers/tasks/postinstall/index.js
deleted file mode 100644
index 9522e1e0e8998..0000000000000
--- a/packages/kbn-plugin-helpers/tasks/postinstall/index.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-
-const resolve = require('path').resolve;
-const statSync = require('fs').statSync;
-
-module.exports = function(plugin) {
- if (
- fileExists(resolve(plugin.root, '../kibana/package.json')) &&
- !fileExists(resolve(plugin.root, '../../kibana/package.json'))
- ) {
- process.stdout.write(
- '\nWARNING: Kibana now requires that plugins must be located in ' +
- '`../kibana-extra/{pluginName}` relative to the Kibana folder ' +
- 'during development. We found a Kibana in `../kibana`, but not in ' +
- '`../../kibana`.\n'
- );
- }
-};
-
-function fileExists(path) {
- try {
- const stat = statSync(path);
- return stat.isFile();
- } catch (e) {
- return false;
- }
-}
diff --git a/packages/kbn-spec-to-console/lib/convert.js b/packages/kbn-spec-to-console/lib/convert.js
index 88e3693d702e5..9648ef0b85a4f 100644
--- a/packages/kbn-spec-to-console/lib/convert.js
+++ b/packages/kbn-spec-to-console/lib/convert.js
@@ -37,13 +37,16 @@ module.exports = spec => {
Object.keys(spec).forEach(api => {
const source = spec[api];
- if (source.url.paths.every(path => Boolean(path.deprecated))) {
- return;
- }
-
if (!source.url) {
return result;
}
+
+ if (source.url.path) {
+ if (source.url.paths.every(path => Boolean(path.deprecated))) {
+ return;
+ }
+ }
+
const convertedSpec = (result[api] = {});
if (source.params) {
const urlParams = convertParams(source.params);
diff --git a/scripts/ingest_coverage.js b/scripts/ingest_coverage.js
new file mode 100644
index 0000000000000..5defe22473d67
--- /dev/null
+++ b/scripts/ingest_coverage.js
@@ -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.
+ */
+
+require('../src/setup_node_env');
+require('../src/dev/code_coverage/ingest_coverage').runCoverageIngestionCli();
diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md
index a82cc27839a1d..c124169580337 100644
--- a/src/core/CONVENTIONS.md
+++ b/src/core/CONVENTIONS.md
@@ -201,6 +201,36 @@ export class MyPlugin implements Plugin {
}
```
+Prefer the pattern shown above, using `core.getStartServices()`, rather than store local references retrieved from `start`.
+
+**Bad:**
+```ts
+export class MyPlugin implements Plugin {
+ // Anti pattern
+ private coreStart?: CoreStart;
+ private depsStart?: DepsStart;
+
+ public setup(core) {
+ core.application.register({
+ id: 'my-app',
+ async mount(params) {
+ const { renderApp } = await import('./application/my_app');
+ // Anti pattern - use `core.getStartServices()` instead!
+ return renderApp(this.coreStart, this.depsStart, params);
+ }
+ });
+ }
+
+ public start(core, deps) {
+ // Anti pattern
+ this.coreStart = core;
+ this.depsStart = deps;
+ }
+}
+```
+
+The main reason to prefer the provided async accessor, is that it doesn't requires the developer to understand and reason about when that function can be called. Having an API that fails sometimes isn't a good API design, and it makes accurately testing this difficult.
+
#### Services
Service structure should mirror the plugin lifecycle to make reasoning about how the service is executed more clear.
diff --git a/src/core/README.md b/src/core/README.md
index b30c62e21b296..87c42d9c6dab6 100644
--- a/src/core/README.md
+++ b/src/core/README.md
@@ -4,8 +4,8 @@ Core is a set of systems (frontend, backend etc.) that Kibana and its plugins ar
## Plugin development
Core Plugin API Documentation:
- - [Core Public API](/docs/development/core/public/kibana-plugin-public.md)
- - [Core Server API](/docs/development/core/server/kibana-plugin-server.md)
+ - [Core Public API](/docs/development/core/public/kibana-plugin-core-public.md)
+ - [Core Server API](/docs/development/core/server/kibana-plugin-core-server.md)
- [Conventions for Plugins](./CONVENTIONS.md)
- [Testing Kibana Plugins](./TESTING.md)
- [Migration guide for porting existing plugins](./MIGRATION.md)
diff --git a/src/core/public/application/application_service.tsx b/src/core/public/application/application_service.tsx
index fd496da26283c..6802c2363b9f8 100644
--- a/src/core/public/application/application_service.tsx
+++ b/src/core/public/application/application_service.tsx
@@ -198,6 +198,7 @@ export class ApplicationService {
appBasePath: basePath.prepend(app.appRoute!),
mount: wrapMount(plugin, app),
unmountBeforeMounting: false,
+ legacy: false,
});
},
registerLegacyApp: app => {
@@ -232,6 +233,7 @@ export class ApplicationService {
appBasePath,
mount,
unmountBeforeMounting: true,
+ legacy: true,
});
},
registerAppUpdater: (appUpdater$: Observable) =>
diff --git a/src/core/public/application/integration_tests/router.test.tsx b/src/core/public/application/integration_tests/router.test.tsx
index 915c58b28ad6d..9f379859dc34f 100644
--- a/src/core/public/application/integration_tests/router.test.tsx
+++ b/src/core/public/application/integration_tests/router.test.tsx
@@ -27,7 +27,7 @@ import { createRenderer, createAppMounter, createLegacyAppMounter, getUnmounter
import { AppStatus } from '../types';
import { ScopedHistory } from '../scoped_history';
-describe('AppContainer', () => {
+describe('AppRouter', () => {
let mounters: MockedMounterMap;
let globalHistory: History;
let appStatuses$: BehaviorSubject