Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into lens-drilldowns
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed May 14, 2020
2 parents 271165e + 9981ef6 commit 34b12cc
Show file tree
Hide file tree
Showing 997 changed files with 48,030 additions and 9,181 deletions.
95 changes: 16 additions & 79 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}


32 changes: 17 additions & 15 deletions .ci/Jenkinsfile_visual_baseline
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className="plgComponent" />
);
}
```

```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.
Expand Down
8 changes: 4 additions & 4 deletions docs/api/features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The API returns the following:
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
"navLinkId": "kibana:discover",
"navLinkId": "discover",
"app": [
"kibana"
],
Expand Down Expand Up @@ -74,7 +74,7 @@ The API returns the following:
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
"navLinkId": "kibana:visualize",
"navLinkId": "visualize",
"app": [
"kibana"
],
Expand Down Expand Up @@ -121,7 +121,7 @@ The API returns the following:
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
"navLinkId": "kibana:dashboard",
"navLinkId": "dashboards",
"app": [
"kibana"
],
Expand Down Expand Up @@ -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"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -216,7 +216,7 @@ init(server) {
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'kibana:discover',
navLinkId: 'discover',
app: ['kibana'],
catalogue: ['discover'],
privileges: {
Expand Down
7 changes: 2 additions & 5 deletions docs/maps/heatmap-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file modified docs/maps/images/heatmap_layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/maps/images/spatial_filters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/maps/images/tile_layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/maps/images/vector_layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/maps/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down
3 changes: 1 addition & 2 deletions docs/maps/indexing-geojson-data-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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".
+
Expand Down
39 changes: 39 additions & 0 deletions docs/maps/map-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -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 <<maps-spatial-filters, spatial filters>> are displayed.

image::maps/images/spatial_filters.png[]

*Show spatial filters on map*::
Clear the checkbox so <<maps-spatial-filters, spatial filters>> 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.
12 changes: 6 additions & 6 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -48,13 +48,13 @@ The cluster location is the weighted centroid for all geo-points in the gridded

*Heat map*:: Creates a <<heatmap-layer, heat map layer>> 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*.

Expand All @@ -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.
Expand Down Expand Up @@ -99,7 +99,7 @@ image::maps/images/point_to_point.png[]

Use term joins to augment vector features with properties for <<maps-vector-style-data-driven, data driven styling>> and richer tooltip content.

Term joins are available for <<vector-layer, vector layers>> with the following sources:
Term joins are available for the following <<vector-layer, vector layers>>:

* Configured GeoJSON
* Documents
Expand Down
Loading

0 comments on commit 34b12cc

Please sign in to comment.