Skip to content

Commit

Permalink
Merge branch 'master' into test/form-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored May 13, 2020
2 parents fb78234 + 66e1d32 commit 396c6cf
Show file tree
Hide file tree
Showing 709 changed files with 9,505 additions and 4,917 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
# Pulse
/packages/kbn-analytics/ @elastic/pulse
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
/src/plugins/kibana_usage_collection/ @elastic/pulse
/src/plugins/telemetry/ @elastic/pulse
/src/plugins/telemetry_collection_manager/ @elastic/pulse
/src/plugins/telemetry_management_section/ @elastic/pulse
Expand Down
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
21 changes: 10 additions & 11 deletions docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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`.
Expand All @@ -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.
Expand All @@ -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].
Expand Down
6 changes: 3 additions & 3 deletions docs/maps/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ You can create a layer that requests data from {es} from the following:

* <<vector-layer>> with:

** Documents source
** Documents

** Grid aggregation source
** Clusters and grid

** <<terms-join>>

* <<heatmap-layer>> with Grid aggregation source
* <<heatmap-layer>>

[role="screenshot"]
image::maps/images/global_search_bar.png[]
Expand Down
4 changes: 2 additions & 2 deletions docs/maps/tile-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<settings>> for details.
Expand Down
13 changes: 7 additions & 6 deletions docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<settings>> for details.
Expand All @@ -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 <<maps-aggregations, aggregations>> 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[]
2 changes: 1 addition & 1 deletion docs/maps/vector-style.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/user/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export function getAlertType(): AlertTypeModel {
}
return validationResult;
},
requiresAppContext: false,
};
}

Expand Down
1 change: 1 addition & 0 deletions examples/alerting_example/public/alert_types/astros.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function getAlertType(): AlertTypeModel {

return validationResult;
},
requiresAppContext: false,
};
}

Expand Down
Loading

0 comments on commit 396c6cf

Please sign in to comment.