Skip to content

Commit

Permalink
Merge branch 'master' into fix-legacy-import-version-field-regression
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 6, 2020
2 parents 12a54ba + 478f587 commit 1fe5766
Show file tree
Hide file tree
Showing 655 changed files with 28,275 additions and 7,372 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,7 @@ module.exports = {
*/
{
// typescript only for front and back end
files: [
'x-pack/plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
],
files: ['x-pack/plugins/{alerts,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
/src/plugins/home/public @elastic/kibana-core-ui
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
/src/plugins/home/server/services/ @elastic/kibana-core-ui
/src/plugins/kibana_overview/ @elastic/kibana-core-ui
/x-pack/plugins/global_search_bar/ @elastic/kibana-core-ui
#CC# /src/legacy/core_plugins/newsfeed @elastic/kibana-core-ui
#CC# /src/legacy/server/sample_data/ @elastic/kibana-core-ui
Expand Down Expand Up @@ -316,7 +317,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
#CC# /x-pack/legacy/plugins/alerting/ @elastic/kibana-alerting-services
#CC# /x-pack/legacy/plugins/task_manager @elastic/kibana-alerting-services
#CC# /x-pack/legacy/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
#CC# /x-pack/plugins/alerting_builtins @elastic/kibana-alerting-services
#CC# /x-pack/plugins/stack_alerts @elastic/kibana-alerting-services

# Enterprise Search
# Shared
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"indexPatternManagement": "src/plugins/index_pattern_management",
"advancedSettings": "src/plugins/advanced_settings",
"kibana_legacy": "src/plugins/kibana_legacy",
"kibanaOverview": "src/plugins/kibana_overview",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
Expand Down
20 changes: 12 additions & 8 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|This plugin contains several helpers and services to integrate pieces of the legacy Kibana app with the new Kibana platform.
|{kib-repo}blob/{branch}/src/plugins/kibana_overview/README.md[kibanaOverview]
|An overview page highlighting Kibana apps
|{kib-repo}blob/{branch}/src/plugins/kibana_react/README.md[kibanaReact]
|Tools for building React applications in Kibana.
Expand Down Expand Up @@ -274,13 +278,6 @@ which will load the visualization's editor.
|The Kibana actions plugin provides a framework to create executable actions. You can:
|{kib-repo}blob/{branch}/x-pack/plugins/alerting_builtins/README.md[alertingBuiltins]
|This plugin provides alertTypes shipped with Kibana for use with the
the alerts plugin. When enabled, it will register
the built-in alertTypes with the alerting plugin, register associated HTTP
routes, etc.
|{kib-repo}blob/{branch}/x-pack/plugins/alerts/README.md[alerts]
|The Kibana alerting plugin provides a common place to set up alerts. You can:
Expand Down Expand Up @@ -402,7 +399,7 @@ the infrastructure monitoring use-case within Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_manager/README.md[ingestManager]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.ingestManager.fleet.tlsCheckDisabled=false)
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
|{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines]
Expand Down Expand Up @@ -486,6 +483,13 @@ using the CURL scripts in the scripts folder.
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/stack_alerts/README.md[stackAlerts]
|This plugin provides alertTypes shipped with Kibana for use with the
the alerts plugin. When enabled, it will register
the alertTypes by the Stack in the alerting plugin, register associated HTTP
routes, etc.
|{kib-repo}blob/{branch}/x-pack/plugins/task_manager[taskManager]
|WARNING: Missing README.
Expand Down
1 change: 1 addition & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [OnPreAuthToolkit](./kibana-plugin-core-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [OnPreResponseExtensions](./kibana-plugin-core-server.onpreresponseextensions.md) | Additional data to extend a response. |
| [OnPreResponseInfo](./kibana-plugin-core-server.onpreresponseinfo.md) | Response status code. |
| [OnPreResponseRender](./kibana-plugin-core-server.onpreresponserender.md) | Additional data to extend a response when rendering a new body |
| [OnPreResponseToolkit](./kibana-plugin-core-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreResponse interceptor for incoming request. |
| [OnPreRoutingToolkit](./kibana-plugin-core-server.onpreroutingtoolkit.md) | A tool set defining an outcome of OnPreRouting interceptor for incoming request. |
| [OpsMetrics](./kibana-plugin-core-server.opsmetrics.md) | Regroups metrics gathered by all the collectors. This contains metrics about the os/runtime, the kibana process and the http server. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [OnPreResponseRender](./kibana-plugin-core-server.onpreresponserender.md) &gt; [body](./kibana-plugin-core-server.onpreresponserender.body.md)

## OnPreResponseRender.body property

the body to use in the response

<b>Signature:</b>

```typescript
body: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [OnPreResponseRender](./kibana-plugin-core-server.onpreresponserender.md) &gt; [headers](./kibana-plugin-core-server.onpreresponserender.headers.md)

## OnPreResponseRender.headers property

additional headers to attach to the response

<b>Signature:</b>

```typescript
headers?: ResponseHeaders;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [OnPreResponseRender](./kibana-plugin-core-server.onpreresponserender.md)

## OnPreResponseRender interface

Additional data to extend a response when rendering a new body

<b>Signature:</b>

```typescript
export interface OnPreResponseRender
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-core-server.onpreresponserender.body.md) | <code>string</code> | the body to use in the response |
| [headers](./kibana-plugin-core-server.onpreresponserender.headers.md) | <code>ResponseHeaders</code> | additional headers to attach to the response |

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export interface OnPreResponseToolkit
| Property | Type | Description |
| --- | --- | --- |
| [next](./kibana-plugin-core-server.onpreresponsetoolkit.next.md) | <code>(responseExtensions?: OnPreResponseExtensions) =&gt; OnPreResponseResult</code> | To pass request to the next handler |
| [render](./kibana-plugin-core-server.onpreresponsetoolkit.render.md) | <code>(responseRender: OnPreResponseRender) =&gt; OnPreResponseResult</code> | To override the response with a different body |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [OnPreResponseToolkit](./kibana-plugin-core-server.onpreresponsetoolkit.md) &gt; [render](./kibana-plugin-core-server.onpreresponsetoolkit.render.md)

## OnPreResponseToolkit.render property

To override the response with a different body

<b>Signature:</b>

```typescript
render: (responseRender: OnPreResponseRender) => OnPreResponseResult;
```
14 changes: 7 additions & 7 deletions docs/settings/ingest-manager-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

experimental[]

You can configure `xpack.ingestManager` settings in your `kibana.yml`.
You can configure `xpack.fleet` settings in your `kibana.yml`.
By default, {ingest-manager} is enabled. To use {fleet}, you also need to configure {kib} and {es} hosts.

See the {ingest-guide}/index.html[Ingest Management] docs for more information.
Expand All @@ -17,9 +17,9 @@ See the {ingest-guide}/index.html[Ingest Management] docs for more information.

[cols="2*<"]
|===
| `xpack.ingestManager.enabled` {ess-icon}
| `xpack.fleet.enabled` {ess-icon}
| Set to `true` (default) to enable {ingest-manager}.
| `xpack.ingestManager.fleet.enabled` {ess-icon}
| `xpack.fleet.agents.enabled` {ess-icon}
| Set to `true` (default) to enable {fleet}.
|===

Expand All @@ -29,19 +29,19 @@ See the {ingest-guide}/index.html[Ingest Management] docs for more information.

[cols="2*<"]
|===
| `xpack.ingestManager.registryUrl`
| `xpack.fleet.registryUrl`
| The address to use to reach {package-manager} registry.
|===

==== {fleet} settings

[cols="2*<"]
|===
| `xpack.ingestManager.fleet.kibana.host`
| `xpack.fleet.agents.kibana.host`
| The hostname used by {agent} for accessing {kib}.
| `xpack.ingestManager.fleet.elasticsearch.host`
| `xpack.fleet.agents.elasticsearch.host`
| The hostname used by {agent} for accessing {es}.
| `xpack.ingestManager.fleet.tlsCheckDisabled`
| `xpack.fleet.agents.tlsCheckDisabled`
| Set to `true` to allow {fleet} to run on a {kib} instance without TLS enabled.
|===

Expand Down
18 changes: 8 additions & 10 deletions docs/user/dashboard/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,18 @@ visualization, configure the customization options for your visualization.

The data fields that are displayed are based on the selected <<index-patterns,index pattern>> and the <<set-time-filter,time filter>>.

To view the data fields in a different index pattern, click the index pattern, then select a new one. The data fields automatically update.
To view the data fields in a different index pattern, click the *Change Index Pattern* dropdown, then select a new one.

To filter the data fields:

* Enter the name in the *Search field names*.
* Click *Field by type*, then select the filter. To show all fields in the index pattern, deselect *Only show fields with data*.
* Enter the data field name in *Search field names*.
* Click *Field filters*, then select the filter.

[float]
[[view-data-summaries]]
==== View data summaries
==== View data field summaries

To help you decide exactly the data you want to display, get a quick summary of each field. The summary shows the distribution of
To help you decide exactly the data you want to display, get a quick summary of each data field. The summary shows the distribution of
values within the specified time range.

To view the data field summary information, navigate to the field, then click *i*.
Expand Down Expand Up @@ -252,11 +252,9 @@ When there is an exclamation point (!) next to a visualization type, *Lens* is u

For each visualization type, you can customize the aggregation and labels. The options available depend on the selected visualization type.

. Click a data field name in the editor, or click *Drop a field here*.
. Change the options that appear.
+
[role="screenshot"]
image::images/lens_aggregation_labels.png[Quick function options]
. From the editor, click a data field, or click *Drop a field or click to add*.

. Change the options, then click *Close*.

[float]
[[add-layers-and-indices]]
Expand Down
Binary file not shown.
Binary file modified docs/user/dashboard/images/lens_drag_drop.gif
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/user/dashboard/images/lens_index_pattern.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/user/dashboard/images/lens_layers.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/user/dashboard/images/lens_suggestions.gif
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/user/dashboard/images/lens_tutorial_1.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/user/dashboard/images/lens_tutorial_2.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/user/dashboard/images/lens_tutorial_3.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/user/dashboard/images/lens_tutorial_3.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/user/dashboard/images/lens_viz_types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 14 additions & 11 deletions docs/user/dashboard/tutorials.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Learn how to use *Lens*, *Vega*, and *Timelion* by going through one of the step
[[lens-tutorial]]
=== Compare sales over time with Lens

Ready to create your own visualization with Lens? Use the following tutorial to create a visualization that lets you compare sales over time.
Ready to create your own visualization with *Lens*? Use the following tutorial to create a visualization that lets you compare sales over time.

[float]
[[lens-before-begin]]
==== Before you begin

To start, you'll need to add the <<add-sample-data, sample ecommerce data>>.
To start, add the <<add-sample-data, sample ecommerce data>>.

[float]
==== Build the visualization
Expand All @@ -23,16 +23,16 @@ Drag and drop your data onto the visualization builder pane.

. Click image:images/time-filter-calendar.png[], then click *Last 7 days*.
+
The fields in the data panel update.
The *Available fields* automatically update.

. Drag and drop the *taxful_total_price* data field to the visualization builder pane.
+
[role="screenshot"]
image::images/lens_tutorial_1.png[Lens tutorial]

To display the average order prices over time, *Lens* automatically added in *order_date* field.
To display the average order prices over time, *Lens* automatically added *order_date* to the *X-axis*.

To break down your data, drag the *category.keyword* field to the visualization builder pane. Lens
To break down your data, drag and drop the *category.keyword* field to the visualization builder pane. Lens
knows that you want to show the top categories and compare them across the dates,
and creates a chart that compares the sales for each of the top three categories:

Expand All @@ -45,30 +45,33 @@ image::images/lens_tutorial_2.png[Lens tutorial]

Make your visualization look exactly how you want with the customization options.

. Click *Average of taxful_total_price*, then change the *Label* to `Sales`.
. Click *Average of taxful_total_price*, then change the *Display name* to Sales.
+
[role="screenshot"]
image::images/lens_tutorial_3.1.png[Lens tutorial]

. Click *Close*.

. Click *Top values of category.keyword*, then change *Number of values* to `10`.
+
[role="screenshot"]
image::images/lens_tutorial_3.2.png[Lens tutorial]

. Click *Close*.
+
The visualization updates to show there are only six available categories.
+
Look at the *Suggestions*. An area chart is not an option, but for the sales data, a stacked area chart might be the best option.

. To switch the chart type, click *Stacked bar chart* in the column, then click *Stacked area* from the *Select a visualizations* window.
. Look at the *Suggestions*. An area chart is not an option, but for the sales data, a stacked area chart might be the best option.
To switch the chart type, click *Stacked bar chart*, then click *Stacked area* from the *Select a visualization* dropdown.
+
[role="screenshot"]
image::images/lens_tutorial_3.png[Lens tutorial]

[float]
[[lens-tutorial-next-steps]]
==== Next steps
==== What's next?

Now that you've created your visualization, you can add it to a <<dashboard,dashboard>> or <<canvas,Canvas workpad>>.
Now that you've created your *Lens* visualization, add it to a <<dashboard,dashboard>> or <<canvas,Canvas workpad>>.

[[vega-lite-tutorial-create-your-first-visualizations]]
=== Create your first visualization with Vega-Lite
Expand Down
Binary file removed docs/visualize/images/lens_aggregation_labels.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_data_info.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_drag_drop.gif
Binary file not shown.
Binary file removed docs/visualize/images/lens_index_pattern.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_layers.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_suggestions.gif
Binary file not shown.
Binary file removed docs/visualize/images/lens_tutorial_1.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_tutorial_2.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_tutorial_3.1.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_tutorial_3.2.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_tutorial_3.png
Binary file not shown.
Binary file removed docs/visualize/images/lens_viz_types.png
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"@babel/register": "^7.10.5",
"@babel/types": "^7.11.0",
"@elastic/apm-rum": "^5.6.1",
"@elastic/charts": "23.1.1",
"@elastic/charts": "23.2.1",
"@elastic/ems-client": "7.10.0",
"@elastic/eslint-config-kibana": "0.15.0",
"@elastic/eslint-plugin-eui": "0.0.2",
Expand Down
11 changes: 11 additions & 0 deletions packages/kbn-telemetry-tools/src/tools/serializer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ describe('getDescriptor', () => {
});
});

it('serializes RecordWithKnownAllProps', () => {
const usageInterface = usageInterfaces.get('RecordWithKnownAllProps')!;
const descriptor = getDescriptor(usageInterface, tsProgram);
expect(descriptor).toEqual({
prop1: { kind: ts.SyntaxKind.NumberKeyword, type: 'NumberKeyword' },
prop2: { kind: ts.SyntaxKind.NumberKeyword, type: 'NumberKeyword' },
prop3: { kind: ts.SyntaxKind.NumberKeyword, type: 'NumberKeyword' },
prop4: { kind: ts.SyntaxKind.NumberKeyword, type: 'NumberKeyword' },
});
});

it('serializes IndexedAccessType', () => {
const usageInterface = usageInterfaces.get('IndexedAccessType')!;
const descriptor = getDescriptor(usageInterface, tsProgram);
Expand Down
6 changes: 5 additions & 1 deletion packages/kbn-telemetry-tools/src/tools/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ export function getConstraints(node: ts.Node, program: ts.Program): any {

if (ts.isUnionTypeNode(node)) {
const types = node.types.filter(discardNullOrUndefined);
return types.map((typeNode) => getConstraints(typeNode, program));
return types.reduce<any>((acc, typeNode) => {
const constraints = getConstraints(typeNode, program);
const contraintsArray = Array.isArray(constraints) ? constraints : [constraints];
return [...acc, ...contraintsArray];
}, []);
}

if (ts.isLiteralTypeNode(node) && ts.isLiteralExpression(node.literal)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"kbn:watch": "node scripts/build --dev --watch"
},
"dependencies": {
"@elastic/charts": "23.1.1",
"@elastic/charts": "23.2.1",
"@elastic/eui": "29.3.0",
"@elastic/numeral": "^2.5.0",
"@kbn/i18n": "1.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/core/server/http/http_server.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ type ToolkitMock = jest.Mocked<OnPreResponseToolkit & OnPostAuthToolkit & OnPreR

const createToolkitMock = (): ToolkitMock => {
return {
render: jest.fn(),
next: jest.fn(),
rewriteUrl: jest.fn(),
};
Expand Down
1 change: 1 addition & 0 deletions src/core/server/http/http_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const createAuthToolkitMock = (): jest.Mocked<AuthToolkit> => ({
});

const createOnPreResponseToolkitMock = (): jest.Mocked<OnPreResponseToolkit> => ({
render: jest.fn(),
next: jest.fn(),
});

Expand Down
1 change: 1 addition & 0 deletions src/core/server/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export { OnPreAuthHandler, OnPreAuthToolkit } from './lifecycle/on_pre_auth';
export {
OnPreResponseHandler,
OnPreResponseToolkit,
OnPreResponseRender,
OnPreResponseExtensions,
OnPreResponseInfo,
} from './lifecycle/on_pre_response';
Expand Down
Loading

0 comments on commit 1fe5766

Please sign in to comment.