Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into graph/shim-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Oct 24, 2019
2 parents c816050 + a279a0b commit d3c5a3e
Show file tree
Hide file tree
Showing 856 changed files with 18,296 additions and 12,771 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ bower_components
/x-pack/legacy/plugins/infra/public/graphql/types.ts
/x-pack/legacy/plugins/infra/server/graphql/types.ts
/x-pack/legacy/plugins/apm/cypress/**/snapshots.js
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
**/graphql/types.ts
**/*.js.snap
!/.eslintrc.js
20 changes: 19 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* 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 { readdirSync } = require('fs');
const { resolve } = require('path');

Expand Down Expand Up @@ -622,7 +641,6 @@ module.exports = {
// will introduced after the other warns are fixed
// 'react/sort-comp': 'error',
'react/void-dom-elements-no-children': 'error',
'react/jsx-boolean-value': ['error', 'warn'],
// will introduced after the other warns are fixed
// 'react/jsx-no-bind': 'error',
'react/jsx-no-comment-textnodes': 'error',
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
/src/dev/ @elastic/kibana-operations
/src/setup_node_env/ @elastic/kibana-operations
/src/optimize/ @elastic/kibana-operations
/packages/*eslint*/ @elastic/kibana-operations
/packages/*babel*/ @elastic/kibana-operations
/packages/kbn-dev-utils*/ @elastic/kibana-operations
/packages/kbn-es/ @elastic/kibana-operations
/packages/kbn-pm/ @elastic/kibana-operations
/packages/kbn-test/ @elastic/kibana-operations

# Platform
/src/core/ @elastic/kibana-platform
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"paths": {
"common.ui": "src/legacy/ui",
"data": "src/legacy/core_plugins/data",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"expressions": "src/legacy/core_plugins/expressions",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"server": "src/legacy/server",
Expand Down
112 changes: 66 additions & 46 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
Kibana source code with Kibana X-Pack source code
Copyright 2012-2019 Elasticsearch B.V.

---
Pretty handling of logarithmic axes.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Created by Arne de Laat
Set axis.mode to "log" and make the axis logarithmic using transform:
axis: {
mode: 'log',
transform: function(v) {v <= 0 ? Math.log(v) / Math.LN10 : null},
inverseTransform: function(v) {Math.pow(10, v)}
}
The transform filters negative and zero values, because those are
invalid on logarithmic scales.
This plugin tries to create good looking logarithmic ticks, using
unicode superscript characters. If all data to be plotted is between two
powers of ten then the default flot tick generator and renderer are
used. Logarithmic ticks are places at powers of ten and at half those
values if there are not to many ticks already (e.g. [1, 5, 10, 50, 100]).
For details, see https://github.com/flot/flot/pull/1328

---
This product has relied on ASTExplorer that is licensed under MIT.

---
This product includes code that is based on flot-charts, which was available
under a "MIT" license.

The MIT License (MIT)

Copyright (c) 2007-2014 IOLA and Ole Laursen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---
This product uses Noto fonts that are licensed under the SIL Open
Font License, Version 1.1.
Expand Down Expand Up @@ -34,26 +80,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
Pretty handling of logarithmic axes.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Created by Arne de Laat
Set axis.mode to "log" and make the axis logarithmic using transform:
axis: {
mode: 'log',
transform: function(v) {v <= 0 ? Math.log(v) / Math.LN10 : null},
inverseTransform: function(v) {Math.pow(10, v)}
}
The transform filters negative and zero values, because those are
invalid on logarithmic scales.
This plugin tries to create good looking logarithmic ticks, using
unicode superscript characters. If all data to be plotted is between two
powers of ten then the default flot tick generator and renderer are
used. Logarithmic ticks are places at powers of ten and at half those
values if there are not to many ticks already (e.g. [1, 5, 10, 50, 100]).
For details, see https://github.com/flot/flot/pull/1328

---
This product bundles [email protected] which is available under a
"MIT" license.
Expand Down Expand Up @@ -107,6 +133,26 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---
This product bundles code based on [email protected] which is
available under a "MIT" license.

ISC License

Copyright (c) 2017 Brandon Keepers

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
This product includes code that is adapted from mapbox-gl-js, which is
available under a "BSD-3-Clause" license.
Expand Down Expand Up @@ -166,32 +212,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
This product includes code that is based on flot-charts, which was available
under a "MIT" license.

The MIT License (MIT)

Copyright (c) 2007-2014 IOLA and Ole Laursen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---
This product includes code that was extracted from [email protected].
Original license:
Expand Down
6 changes: 3 additions & 3 deletions docs/maps/geojson-upload.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ for example, in visualizations and Canvas workpads.
[float]
=== Why GeoJSON?
GeoJSON is an open-standard file format for storing geospatial vector data.
Although many vector data formats are available in the GIS community,
Although many vector data formats are available in the GIS community,
GeoJSON is the most commonly used and flexible option.
[float]

Expand All @@ -18,14 +18,14 @@ Follow the instructions below to upload a GeoJSON data file, or try the
<<indexing-geojson-data-tutorial, end-to-end integrated example>>.

. Open *Elastic Maps*, and then click *Add layer*.
. Click *Upload GeoJSON vector file*.
. Click *Uploaded GeoJSON*.
+
[role="screenshot"]
image::maps/images/fu_gs_select_source_file_upload.png[]

. Use the file chooser to select a valid GeoJSON file. The file will load
a preview of the data on the map.
. Use the default *Index type* of {ref}/geo-point.html[geo_point] for point data,
. Use the default *Index type* of {ref}/geo-point.html[geo_point] for point data,
or override it and select {ref}/geo-shape.html[geo_shape].
All other shapes will default to a type of `geo_shape`.
. Leave the default *Index name* and *Index pattern* names (the name of the uploaded
Expand Down
Binary file added docs/maps/images/locked_tooltip.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/multifeature_tooltip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 19 additions & 19 deletions docs/maps/indexing-geojson-data-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[indexing-geojson-data-tutorial]]
== Indexing GeoJSON data tutorial

In this tutorial, you'll build a customized map that shows the flight path between
In this tutorial, you'll build a customized map that shows the flight path between
two airports, and the lightning hot spots on that route. You'll learn to:

* Import GeoJSON files into Kibana
Expand All @@ -15,15 +15,15 @@ two airports, and the lightning hot spots on that route. You'll learn to:
This tutorial requires you to download the following GeoJSON sample data files.
These files are good examples of the types
of vector data that you can upload to Kibana and index in
Elasticsearch for display in *Elastic Maps*.
Elasticsearch for display in *Elastic Maps*.

* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/logan_international_airport.geojson[Logan International Airport]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/bangor_international_airport.geojson[Bangor International Airport]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/lightning_detected.geojson[Lightning detected]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/original_flight_path.geojson[Original flight path]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/modified_flight_path.geojson[Modified flight path]

The data represents two real airports, two fictitious flight routes, and
The data represents two real airports, two fictitious flight routes, and
fictitious lightning reports. You don't need to use all of
these files. Feel free to work with as many files as you'd like, or use valid GeoJSON
files of your own.
Expand All @@ -47,20 +47,20 @@ image::maps/images/fu_gs_new_england_map.png[]
For each GeoJSON file you downloaded, complete the following steps:

. Below the map legend, click *Add layer*.
. From the list of layer types, click *Upload GeoJSON vector file*.
. From the list of layer types, click *Uploaded GeoJSON*.
. Using the File Picker, upload the GeoJSON file.
+
Depending on the geometry type of your features, this will
Depending on the geometry type of your features, this will
auto-populate *Index type* with either {ref}/geo-point.html[geo_point] or
{ref}/geo-shape.html[geo_shape] and *Index name* with
{ref}/geo-shape.html[geo_shape] and *Index name* with
`<file name>`.

. Click *Import file* in the lower right.
+
You'll see activity as the GeoJSON Upload utility creates a new index
and index pattern for the data set. When the process is complete, you should
receive messages that the creation of the new index and index pattern
were successful.
were successful.

. Click *Add layer* in the bottom right.

Expand All @@ -69,7 +69,7 @@ were successful.
. Once you've added all of the sample files,
<<maps-save, save your map>>.
+
At this point, you could consider the map complete,
At this point, you could consider the map complete,
but there are a few additions and tweaks that you can make to tell a
better story with your data.
+
Expand All @@ -80,34 +80,34 @@ image::maps/images/fu_gs_flight_paths.png[]
=== Add a heatmap aggregation layer

Looking at the `Lightning detected` layer, it's clear where lightning has
struck. What's less clear, is if there have been more lightning
strikes in some areas than others, in other words, where the lightning
struck. What's less clear, is if there have been more lightning
strikes in some areas than others, in other words, where the lightning
hot spots are. An advantage of having indexed
{ref}/geo-point.html[geo_point] data for the
lightning strikes is that you can perform aggregations on the data.
{ref}/geo-point.html[geo_point] data for the
lightning strikes is that you can perform aggregations on the data.

. Below the map legend, click *Add layer*.
. From the list of layer types, click *Grid aggregation*.
+
Because you indexed `lightning_detected.geojson` using the index name and
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.
aggregation.

. Select `lightning_detected`.
. Click *Show as* and select `heat map`.
. Click *Add layer* to add the heat map layer
"Lightning intensity".
+
The remaining default settings are good, but there are a couple of
settings that you might want to change.
settings that you might want to change.

. Under *Source settings* > *Grid resolution*, select from the different heat map resolutions.
. Under *Source settings* > *Grid resolution*, select from the different heat map resolutions.
+
The default "Coarse" looks
good, but feel free to select a different resolution.

. Play around with the *Layer Style* >
*Color range* setting.
*Color range* setting.
+
Again the default looks good, but feel free to choose a
different color range.
Expand All @@ -125,14 +125,14 @@ image::maps/images/fu_gs_lightning_intensity.png[]
=== Organize the layers

Consider ways you might improve the appearance of the final map.
Small changes in how and when layers are shown can help tell a
Small changes in how and when layers are shown can help tell a
better story with your data. Here are a few final tweaks
you might make:

* Update layer names
* Adjust styles for each layer
* Adjust the layer order
* Decide which layers to show at different zoom levels
* Decide which layers to show at different zoom levels

When you've finished, again be sure to <<maps-save, save your work >>.

Expand Down
2 changes: 1 addition & 1 deletion docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and lighter shades symbolize countries with less traffic.
==== Add a vector layer from the Elastic Maps Service source

. In the map legend, click *Add layer*.
. Click the *Vector shapes* data source.
. Click the *EMS Boundaries* data source.
. From the *Layer* dropdown menu, select *World Countries*.
. Click the *Add layer* button.
. Set *Layer name* to `Total Requests by Country`.
Expand Down
4 changes: 2 additions & 2 deletions docs/maps/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A spatial filter narrows search results to documents that either intersect with,
You can create spatial filters in two ways:

* Click the tool icon image:maps/images/tools_icon.png[], and then draw a polygon or bounding box on the map to define the spatial filter.
* Click *Filter by geometry* in a tooltip, and then use the feature's geometry for the spatial filter.
* Click *Filter by geometry* in a <<maps-vector-tooltip-locking, locked tooltip>>, and then use the feature's geometry for the spatial filter.
+
[role="screenshot"]
image::maps/images/create_spatial_filter.png[]
Expand All @@ -55,7 +55,7 @@ Spatial filters have the following properties:
==== Phrase filters

A phrase filter narrows search results to documents that contain the specified text.
You can create a phrase filter by clicking the plus icon image:maps/images/gs_plus_icon.png[] in a feature tooltip.
You can create a phrase filter by clicking the plus icon image:maps/images/gs_plus_icon.png[] in a <<maps-vector-tooltip-locking, locked tooltip>>.

[role="screenshot"]
image::maps/images/create_phrase_filter.png[]
Expand Down
1 change: 1 addition & 0 deletions docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ The index must contain at least 2 fields mapped as {ref}/geo-point.html[geo_poin

include::vector-style.asciidoc[]
include::vector-style-properties.asciidoc[]
include::vector-tooltips.asciidoc[]
Loading

0 comments on commit d3c5a3e

Please sign in to comment.