Skip to content

Commit

Permalink
Merge branch 'master' into tests/vega
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Jan 19, 2020
2 parents 975317a + 9567cca commit 21794d6
Show file tree
Hide file tree
Showing 266 changed files with 2,937 additions and 2,034 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr-project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
[
{ "label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173897 },
{ "label": "Feature:Lens", "projectName": "Lens", "columnId": 6219362 },
{ "label": "Team:Platform", "projectName": "kibana-platform", "columnId": 5514360 },
{"label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580}
{ "label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580 }
]
ghToken: ${{ secrets.GITHUB_TOKEN }}
10 changes: 3 additions & 7 deletions docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Want to export multiple workpads? Go to the *Canvas workpads* view, select the w
[[create-workpad-pdf]]
=== Create a PDF

Create a PDF copy of your workpad that you can save and share outside of {kib}.
If you have a license that supports the {report-features}, you can create a PDF copy of your workpad that you can save and share outside {kib}.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.
For more information, refer to <<reporting-getting-started, Reporting from Kibana>>.

. From your workpad, click the *Share workpad* icon in the upper left corner, then select *PDF reports*.

Expand All @@ -38,12 +38,10 @@ image::images/canvas-generate-pdf.gif[Generate PDF]
[[create-workpad-URL]]
=== Create a POST URL

Create a POST URL that you can use to automatically generate PDF reports using Watcher or a script.
If you have a license that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using Watcher or a script.

For more information, refer to <<automating-report-generation, Automating report generation>>.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.

. From your workpad, click the *Share workpad* icon in the upper left corner, then select *PDF reports*.

. Click *Copy POST URL*.
Expand All @@ -57,8 +55,6 @@ image::images/canvas-create-URL.gif[Create POST URL]

beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.

. From your workpad, click the *Share this workpad* icon in the upper left corner, then select *Share on a website*.

. On the *Share on a website* pane, follow the instructions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## DiscoveredPlugin.configPath property

Root configuration path used by the plugin, defaults to "id".
Root configuration path used by the plugin, defaults to "id" in snake\_case format.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface DiscoveredPlugin

| Property | Type | Description |
| --- | --- | --- |
| [configPath](./kibana-plugin-server.discoveredplugin.configpath.md) | <code>ConfigPath</code> | Root configuration path used by the plugin, defaults to "id". |
| [configPath](./kibana-plugin-server.discoveredplugin.configpath.md) | <code>ConfigPath</code> | Root configuration path used by the plugin, defaults to "id" in snake\_case format. |
| [id](./kibana-plugin-server.discoveredplugin.id.md) | <code>PluginName</code> | Identifier of the plugin. |
| [optionalPlugins](./kibana-plugin-server.discoveredplugin.optionalplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. |
| [requiredPlugins](./kibana-plugin-server.discoveredplugin.requiredplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

## PluginManifest.configPath property

Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id".
Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id" in snake\_case format.

<b>Signature:</b>

```typescript
readonly configPath: ConfigPath;
```

## Example

id: myPlugin configPath: my\_plugin

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## PluginManifest.id property

Identifier of the plugin.
Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Should never be used in code outside of Core but is exported for documentation p

| Property | Type | Description |
| --- | --- | --- |
| [configPath](./kibana-plugin-server.pluginmanifest.configpath.md) | <code>ConfigPath</code> | Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id". |
| [id](./kibana-plugin-server.pluginmanifest.id.md) | <code>PluginName</code> | Identifier of the plugin. |
| [configPath](./kibana-plugin-server.pluginmanifest.configpath.md) | <code>ConfigPath</code> | Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id" in snake\_case format. |
| [id](./kibana-plugin-server.pluginmanifest.id.md) | <code>PluginName</code> | Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc. |
| [kibanaVersion](./kibana-plugin-server.pluginmanifest.kibanaversion.md) | <code>string</code> | The version of Kibana the plugin is compatible with, defaults to "version". |
| [optionalPlugins](./kibana-plugin-server.pluginmanifest.optionalplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. |
| [requiredPlugins](./kibana-plugin-server.pluginmanifest.requiredplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. |
Expand Down
2 changes: 1 addition & 1 deletion docs/discover/document-data.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tailor the documents table to suit your needs.

[horizontal]
Add a field column::
Hover over the list of *Available fields* and then click *add* next to each field you want include as a column in the table.
Hover over the list of *Available fields* and then click *add* next to each field you want to include as a column in the table.
The first field you add replaces the `_source` column.
Change sort order:: By default, columns are sorted by the values in the field.
If a time field is configured for the current index pattern,
Expand Down
6 changes: 3 additions & 3 deletions docs/management/managing-licenses.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ At the end of the trial period, the platinum features operate in a
<<license-expiration,degraded mode>>. You can revert to a basic license,
extend the trial, or purchase a subscription.

TIP: If {security-features} are enabled, before you revert to a basic license or
install a gold or platinum license, you must configure Transport Layer Security
(TLS) in {es}. See {ref}/encrypting-communications.html[Encrypting communications].
TIP: If {security-features} are enabled, unless you have a trial license,
you must configure Transport Layer Security (TLS) in {es}.
See {ref}/encrypting-communications.html[Encrypting communications].
{kib} and the {ref}/start-basic.html[start basic API] provide a list of all of
the features that will no longer be supported if you revert to a basic license.

Expand Down
Binary file added docs/maps/images/extended_stats_config.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/gear_icon.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 removed docs/maps/images/gs_link_icon.png
Binary file not shown.
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_style_class.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_style_dynamic.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_style_static.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 50 additions & 11 deletions docs/maps/vector-style.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
When styling a vector layer, you can customize your data by property, such as size and color.
For each property, you can specify whether to use a constant or data driven value for the style.


[float]
[[maps-vector-style-static]]
==== Static styling
Expand All @@ -17,36 +18,74 @@ The *kibana_sample_data_logs* layer uses static styling for all properties.
[role="screenshot"]
image::maps/images/vector_style_static.png[]


[float]
[[maps-vector-style-data-driven]]
==== Data driven styling

Use data driven styling to symbolize features from a range of numeric property values.
To enable data driven styling, click image:maps/images/gs_link_icon.png[] next to the property.
This button is only available when vector features contain numeric properties.
Use data driven styling to symbolize features by property values.
To enable data driven styling for a style property, change the selected value from *Fixed* or *Solid* to *By value*.

The image below shows an example of data driven styling using the <<add-sample-data, Kibana sample web logs>> data set.
The *kibana_sample_data_logs* layer uses data driven styling for fill color and symbol size style properties.

* The `hour_of_day` property determines the fill color for each feature based on where the value fits on a linear scale.
Light green circles symbolize documents that occur earlier in the day, and dark green circles symbolize documents that occur later in the day.

* The `bytes` property determines the size of each symbol based on where the value fits on a linear scale.
Smaller circles symbolize documents with smaller payloads, and larger circles symbolize documents with larger payloads.

[role="screenshot"]
image::maps/images/vector_style_dynamic.png[]


[float]
[[maps-vector-style-quantitative-data-driven]]
==== Quantitative data driven styling

Quantitative data driven styling symbolizes features from a range of numeric property values.

To ensure symbols are consistent as you pan, zoom, and filter the map, quantitative data driven styling uses {ref}/search-aggregations-metrics-extendedstats-aggregation.html[extended_stats aggregation] to retrieve statistical metadata.

Click the gear icon image:maps/images/gear_icon.png[] to configure extended_stats. Set *Sigma* to a smaller value to minimize outliers by moving the range minimum and maximum closer to the average. Clear the *Calculate range from indices* checkbox to turn off the extended_stats aggregation request.

NOTE: When the *Calculate range from indices* checkbox is cleared, symbols might be inconsistent as users pan, zoom, and filter the map. Without extended_stats, the range is calulated with data from the local layer. The range is recalulcated when layer data changes.

[role="screenshot"]
image::maps/images/extended_stats_config.png[]

When the property value is undefined for a feature:

* *Fill color* and *Border color* are set to transparent and are not visible.
* *Border width* and *Symbol size* are set to the minimum size.
* *Symbol orientation* is set to 0.

When the minimum and maximum are the same and there is no range:
When the symbol range minimum and maximum are the same and there is no range:

* *Fill color* and *Border color* are set to last color in the color ramp.
* *Border width* and *Symbol size* are set to the maximum size.

The image below shows an example of data driven styling using the <<add-sample-data, Kibana sample web logs>> data set.
The *kibana_sample_data_logs* layer uses data driven styling for fill color and symbol size style properties.

* The `hour_of_day` property determines the fill color for each feature based on where the value fits on a linear scale.
Light green circles symbolize documents that occur earlier in the day, and dark green circles symbolize documents that occur later in the day.
[float]
[[maps-vector-style-qualitative-data-driven]]
==== Qualitative data driven styling

* The `bytes` property determines the size of each symbol based on where the value fits on a linear scale.
Smaller circles symbolize documents with smaller payloads, and larger circles symbolize documents with larger payloads.
Qualitative data driven styling symbolizes non-numeric properties, such as strings and IP addresses, by category.

Qualitative data driven styling is available for the following styling properties:

* *Fill color*
* *Border color*
* *Label color*
* *Label border color*

Qualitative data driven styling uses a {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation] to retrieve the top nine categories for the property. Feature values within the top categories are assigned a unique color. 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.

The image below shows an example of quantitative data driven styling using the <<add-sample-data, Kibana sample web logs>> data set.
The `machine.os.keyword` property determines the color of each symbol based on category.

[role="screenshot"]
image::maps/images/vector_style_dynamic.png[]
image::maps/images/quantitative_data_driven_styling.png[]


[float]
Expand Down
1 change: 1 addition & 0 deletions src/core/CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ my_plugin/
   ├── index.ts
   └── plugin.ts
```
- [Manifest file](/docs/development/core/server/kibana-plugin-server.pluginmanifest.md) should be defined on top level.
- Both `server` and `public` should have an `index.ts` and a `plugin.ts` file:
- `index.ts` should only contain:
- The `plugin` export
Expand Down
25 changes: 14 additions & 11 deletions src/core/server/config/integration_tests/config_deprecation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ describe('configuration deprecations', () => {
await root.setup();

const logs = loggingServiceMock.collect(mockLoggingService);
expect(logs.warn).toMatchInlineSnapshot(`Array []`);
const warnings = logs.warn.flatMap(i => i);
expect(warnings).not.toContain(
'"optimize.lazy" is deprecated and has been replaced by "optimize.watch"'
);
expect(warnings).not.toContain(
'"optimize.lazyPort" is deprecated and has been replaced by "optimize.watchPort"'
);
});

it('should log deprecation warnings for core deprecations', async () => {
Expand All @@ -50,15 +56,12 @@ describe('configuration deprecations', () => {
await root.setup();

const logs = loggingServiceMock.collect(mockLoggingService);
expect(logs.warn).toMatchInlineSnapshot(`
Array [
Array [
"\\"optimize.lazy\\" is deprecated and has been replaced by \\"optimize.watch\\"",
],
Array [
"\\"optimize.lazyPort\\" is deprecated and has been replaced by \\"optimize.watchPort\\"",
],
]
`);
const warnings = logs.warn.flatMap(i => i);
expect(warnings).toContain(
'"optimize.lazy" is deprecated and has been replaced by "optimize.watch"'
);
expect(warnings).toContain(
'"optimize.lazyPort" is deprecated and has been replaced by "optimize.watchPort"'
);
});
});
42 changes: 42 additions & 0 deletions src/core/server/plugins/discovery/is_camel_case.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { isCamelCase } from './is_camel_case';

describe('isCamelCase', () => {
it('matches a string in camelCase', () => {
expect(isCamelCase('foo')).toBe(true);
expect(isCamelCase('foo1')).toBe(true);
expect(isCamelCase('fooBar')).toBe(true);
expect(isCamelCase('fooBarBaz')).toBe(true);
expect(isCamelCase('fooBAR')).toBe(true);
});

it('does not match strings in other cases', () => {
expect(isCamelCase('AAA')).toBe(false);
expect(isCamelCase('FooBar')).toBe(false);
expect(isCamelCase('3Foo')).toBe(false);
expect(isCamelCase('o_O')).toBe(false);
expect(isCamelCase('foo_bar')).toBe(false);
expect(isCamelCase('foo_')).toBe(false);
expect(isCamelCase('_fooBar')).toBe(false);
expect(isCamelCase('fooBar_')).toBe(false);
expect(isCamelCase('_fooBar_')).toBe(false);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

export { getSuggestionsProvider } from './value_suggestions';
const camelCaseRegExp = /^[a-z]{1}([a-zA-Z0-9]{1,})$/;
export function isCamelCase(candidate: string) {
return camelCaseRegExp.test(candidate);
}
Loading

0 comments on commit 21794d6

Please sign in to comment.