Skip to content

Commit c86091c

Browse files
committed
Merge in the WIP branch
2 parents 7d22fa7 + b935426 commit c86091c

File tree

400 files changed

+8856
-6805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+8856
-6805
lines changed

.ci/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=14.16.0
4+
ARG NODE_VERSION=14.16.1
55

66
FROM node:${NODE_VERSION} AS base
77

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979

8080
# Uptime
8181
/x-pack/plugins/uptime @elastic/uptime
82+
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime
8283
/x-pack/test/functional_with_es_ssl/apps/uptime @elastic/uptime
8384
/x-pack/test/functional/apps/uptime @elastic/uptime
8485
/x-pack/test/api_integration/apis/uptime @elastic/uptime

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.16.0
1+
14.16.1

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.16.0
1+
14.16.1

WORKSPACE.bazel

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.2.3")
2727
# we can update that rule.
2828
node_repositories(
2929
node_repositories = {
30-
"14.16.0-darwin_amd64": ("node-v14.16.0-darwin-x64.tar.gz", "node-v14.16.0-darwin-x64", "14ec767e376d1e2e668f997065926c5c0086ec46516d1d45918af8ae05bd4583"),
31-
"14.16.0-linux_arm64": ("node-v14.16.0-linux-arm64.tar.xz", "node-v14.16.0-linux-arm64", "440489a08bfd020e814c9e65017f58d692299ac3f150c8e78d01abb1104c878a"),
32-
"14.16.0-linux_s390x": ("node-v14.16.0-linux-s390x.tar.xz", "node-v14.16.0-linux-s390x", "335348e46f45284b6356416ef58f85602d2dee99094588b65900f6c8839df77e"),
33-
"14.16.0-linux_amd64": ("node-v14.16.0-linux-x64.tar.xz", "node-v14.16.0-linux-x64", "2e079cf638766fedd720d30ec8ffef5d6ceada4e8b441fc2a093cb9a865f4087"),
34-
"14.16.0-windows_amd64": ("node-v14.16.0-win-x64.zip", "node-v14.16.0-win-x64", "716045c2f16ea10ca97bd04cf2e5ef865f9c4d6d677a9bc25e2ea522b594af4f"),
30+
"14.16.1-darwin_amd64": ("node-v14.16.1-darwin-x64.tar.gz", "node-v14.16.1-darwin-x64", "b762b72fc149629b7e394ea9b75a093cad709a9f2f71480942945d8da0fc1218"),
31+
"14.16.1-linux_arm64": ("node-v14.16.1-linux-arm64.tar.xz", "node-v14.16.1-linux-arm64", "b4d474e79f7d33b3b4430fad25c3f836b82ce2d5bb30d4a2c9fa20df027e40da"),
32+
"14.16.1-linux_s390x": ("node-v14.16.1-linux-s390x.tar.xz", "node-v14.16.1-linux-s390x", "af9982fef32e4a3e4a5d66741dcf30ac9c27613bd73582fa1dae1fb25003047a"),
33+
"14.16.1-linux_amd64": ("node-v14.16.1-linux-x64.tar.xz", "node-v14.16.1-linux-x64", "85a89d2f68855282c87851c882d4c4bbea4cd7f888f603722f0240a6e53d89df"),
34+
"14.16.1-windows_amd64": ("node-v14.16.1-win-x64.zip", "node-v14.16.1-win-x64", "e469db37b4df74627842d809566c651042d86f0e6006688f0f5fe3532c6dfa41"),
3535
},
36-
node_version = "14.16.0",
36+
node_version = "14.16.1",
3737
node_urls = [
3838
"https://nodejs.org/dist/v{version}/{filename}",
3939
],

docs/canvas/canvas-expression-lifecycle.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ Since all of the sub-expressions are now resolved into actual values, the <<imag
177177
demodata
178178
| image dataurl={
179179
if condition={getCell price | gte 100}
180-
then={asset 3cb3ec3a-84d7-48fa-8709-274ad5cc9e0b}
181-
else={asset cbc11a1f-8f25-4163-94b4-2c3a060192e7}
180+
then={asset "asset-3cb3ec3a-84d7-48fa-8709-274ad5cc9e0b"}
181+
else={asset "asset-cbc11a1f-8f25-4163-94b4-2c3a060192e7"}
182182
}
183183
----
184184

docs/canvas/canvas-function-reference.asciidoc

+31
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,37 @@ Clears the _context_, and returns `null`.
376376
*Returns:* `null`
377377

378378

379+
[float]
380+
[[clog_fn]]
381+
=== `clog`
382+
383+
It outputs the _context_ in the console. This function is for debug purpose.
384+
385+
*Expression syntax*
386+
[source,js]
387+
----
388+
clog
389+
----
390+
391+
*Code example*
392+
[source,text]
393+
----
394+
filters
395+
| demodata
396+
| clog
397+
| filterrows fn={getCell "age" | gt 70}
398+
| clog
399+
| pointseries x="time" y="mean(price)"
400+
| plot defaultStyle={seriesStyle lines=1 fill=1}
401+
| render
402+
----
403+
This prints the `datatable` objects in the browser console before and after the `filterrows` function.
404+
405+
*Accepts:* `any`
406+
407+
*Returns:* `any`
408+
409+
379410
[float]
380411
[[columns_fn]]
381412
=== `columns`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [AutoRefreshDoneFn](./kibana-plugin-plugins-data-public.autorefreshdonefn.md)
4+
5+
## AutoRefreshDoneFn type
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
export declare type AutoRefreshDoneFn = () => void;
11+
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
| [getSearchParamsFromRequest(searchRequest, dependencies)](./kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md) | |
4848
| [getTime(indexPattern, timeRange, options)](./kibana-plugin-plugins-data-public.gettime.md) | |
4949
| [plugin(initializerContext)](./kibana-plugin-plugins-data-public.plugin.md) | |
50+
| [waitUntilNextSessionCompletes$(sessionService, { waitForIdle })](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletes_.md) | Creates an observable that emits when next search session completes. This utility is helpful to use in the application to delay some tasks until next session completes. |
5051

5152
## Interfaces
5253

@@ -92,6 +93,7 @@
9293
| [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) | |
9394
| [SearchSessionInfoProvider](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.md) | Provide info about current search session to be stored in the Search Session saved object |
9495
| [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | search source fields |
96+
| [WaitUntilNextSessionCompletesOptions](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletesoptions.md) | Options for [waitUntilNextSessionCompletes$()](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletes_.md) |
9597

9698
## Variables
9799

@@ -141,6 +143,7 @@
141143
| [AggParam](./kibana-plugin-plugins-data-public.aggparam.md) | |
142144
| [AggsStart](./kibana-plugin-plugins-data-public.aggsstart.md) | AggsStart represents the actual external contract as AggsCommonStart is only used internally. The difference is that AggsStart includes the typings for the registry with initialized agg types. |
143145
| [AutocompleteStart](./kibana-plugin-plugins-data-public.autocompletestart.md) | \* |
146+
| [AutoRefreshDoneFn](./kibana-plugin-plugins-data-public.autorefreshdonefn.md) | |
144147
| [CustomFilter](./kibana-plugin-plugins-data-public.customfilter.md) | |
145148
| [EsaggsExpressionFunctionDefinition](./kibana-plugin-plugins-data-public.esaggsexpressionfunctiondefinition.md) | |
146149
| [EsdslExpressionFunctionDefinition](./kibana-plugin-plugins-data-public.esdslexpressionfunctiondefinition.md) | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [waitUntilNextSessionCompletes$](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletes_.md)
4+
5+
## waitUntilNextSessionCompletes$() function
6+
7+
Creates an observable that emits when next search session completes. This utility is helpful to use in the application to delay some tasks until next session completes.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export declare function waitUntilNextSessionCompletes$(sessionService: ISessionService, { waitForIdle }?: WaitUntilNextSessionCompletesOptions): import("rxjs").Observable<SearchSessionState>;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| sessionService | <code>ISessionService</code> | [ISessionService](./kibana-plugin-plugins-data-public.isessionservice.md) |
20+
| { waitForIdle } | <code>WaitUntilNextSessionCompletesOptions</code> | |
21+
22+
<b>Returns:</b>
23+
24+
`import("rxjs").Observable<SearchSessionState>`
25+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [WaitUntilNextSessionCompletesOptions](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletesoptions.md)
4+
5+
## WaitUntilNextSessionCompletesOptions interface
6+
7+
Options for [waitUntilNextSessionCompletes$()](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletes_.md)
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
export interface WaitUntilNextSessionCompletesOptions
13+
```
14+
15+
## Properties
16+
17+
| Property | Type | Description |
18+
| --- | --- | --- |
19+
| [waitForIdle](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletesoptions.waitforidle.md) | <code>number</code> | For how long to wait between session state transitions before considering that session completed |
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [WaitUntilNextSessionCompletesOptions](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletesoptions.md) &gt; [waitForIdle](./kibana-plugin-plugins-data-public.waituntilnextsessioncompletesoptions.waitforidle.md)
4+
5+
## WaitUntilNextSessionCompletesOptions.waitForIdle property
6+
7+
For how long to wait between session state transitions before considering that session completed
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
waitForIdle?: number;
13+
```

docs/settings/alert-action-settings.asciidoc

+13
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ You can configure the following settings in the `kibana.yml` file.
5959
| `xpack.actions.proxyUrl` {ess-icon}
6060
| Specifies the proxy URL to use, if using a proxy for actions. By default, no proxy is used.
6161

62+
| `xpack.actions.proxyBypassHosts` {ess-icon}
63+
| Specifies hostnames which should not use the proxy, if using a proxy for actions. The value is an array of hostnames as strings. By default, all hosts will use the proxy, but if an action's hostname is in this list, the proxy will not be used. The settings `xpack.actions.proxyBypassHosts` and `xpack.actions.proxyOnlyHosts` cannot be used at the same time.
64+
65+
| `xpack.actions.proxyOnlyHosts` {ess-icon}
66+
| Specifies hostnames which should only use the proxy, if using a proxy for actions. The value is an array of hostnames as strings. By default, no hosts will use the proxy, but if an action's hostname is in this list, the proxy will be used. The settings `xpack.actions.proxyBypassHosts` and `xpack.actions.proxyOnlyHosts` cannot be used at the same time.
67+
6268
| `xpack.actions.proxyHeaders` {ess-icon}
6369
| Specifies HTTP headers for the proxy, if using a proxy for actions. Defaults to {}.
6470

@@ -71,6 +77,13 @@ a|`xpack.actions.`
7177
+
7278
As an alternative to setting both `xpack.actions.proxyRejectUnauthorizedCertificates` and `xpack.actions.rejectUnauthorized`, you can point the OS level environment variable `NODE_EXTRA_CA_CERTS` to a file that contains the root CAs needed to trust certificates.
7379

80+
| `xpack.actions.maxResponseContentLength` {ess-icon}
81+
| Specifies the max number of bytes of the http response for requests to external resources. Defaults to 1000000 (1MB).
82+
83+
| `xpack.actions.responseTimeout` {ess-icon}
84+
| Specifies the time allowed for requests to external resources. Requests that take longer are aborted. The time is formatted as <count>[ms|s|m|h|d|w|M|Y], for example, '20m', '24h', '7d', '1w'. Defaults to 60s.
85+
86+
7487
|===
7588

7689
[float]

docs/user/dashboard/timelion.asciidoc

+34
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,40 @@ If the value of your parameter contains spaces or commas you have to put the val
3333

3434
.es(q='some query', index=logstash-*)
3535

36+
[float]
37+
[[customize-data-series-y-axis]]
38+
===== .yaxis() function
39+
40+
{kib} supports many y-axis scales and ranges for your data series.
41+
42+
The `.yaxis()` function supports the following parameters:
43+
44+
* *yaxis* &mdash; The numbered y-axis to plot the series on. For example, use `.yaxis(2)` to display a second y-axis.
45+
* *min* &mdash; The minimum value for the y-axis range.
46+
* *max* &mdash; The maximum value for the y-axis range.
47+
* *position* &mdash; The location of the units. Values include `left` or `right`.
48+
* *label* &mdash; The label for the axis.
49+
* *color* &mdash; The color of the axis label.
50+
* *units* &mdash; The function to use for formatting the y-axis labels. Values include `bits`, `bits/s`, `bytes`, `bytes/s`, `currency(:ISO 4217 currency code)`, `percent`, and `custom(:prefix:suffix)`.
51+
* *tickDecimals* &mdash; The tick decimal precision.
52+
53+
Example:
54+
55+
[source,text]
56+
----------------------------------
57+
.es(index= kibana_sample_data_logs,
58+
timefield='@timestamp',
59+
metric='avg:bytes')
60+
.label('Average Bytes for request')
61+
.title('Memory consumption over time in bytes').yaxis(1,units=bytes,position=left), <1>
62+
.es(index= kibana_sample_data_logs,
63+
timefield='@timestamp',
64+
metric=avg:machine.ram)
65+
.label('Average Machine RAM amount').yaxis(2,units=bytes,position=right) <2>
66+
----------------------------------
67+
68+
<1> `.yaxis(1,units=bytes,position=left)` &mdash; Specifies the first y-axis for the first data series, and changes the units on the left.
69+
<2> `.yaxis(2,units=bytes,position=left)` &mdash; Specifies the second y-axis for the second data series, and changes the units on the right.
3670

3771
[float]
3872
==== Tutorial: Create visualizations with Timelion

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"**/typescript": "4.1.3"
9393
},
9494
"engines": {
95-
"node": "14.16.0",
95+
"node": "14.16.1",
9696
"yarn": "^1.21.1"
9797
},
9898
"dependencies": {
@@ -131,10 +131,12 @@
131131
"@kbn/crypto": "link:packages/kbn-crypto",
132132
"@kbn/i18n": "link:packages/kbn-i18n",
133133
"@kbn/interpreter": "link:packages/kbn-interpreter",
134+
"@kbn/io-ts-utils": "link:packages/kbn-io-ts-utils",
134135
"@kbn/legacy-logging": "link:packages/kbn-legacy-logging",
135136
"@kbn/logging": "link:packages/kbn-logging",
136137
"@kbn/monaco": "link:packages/kbn-monaco",
137138
"@kbn/server-http-tools": "link:packages/kbn-server-http-tools",
139+
"@kbn/server-route-repository": "link:packages/kbn-server-route-repository",
138140
"@kbn/std": "link:packages/kbn-std",
139141
"@kbn/tinymath": "link:packages/kbn-tinymath",
140142
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
@@ -206,7 +208,6 @@
206208
"content-disposition": "0.5.3",
207209
"copy-to-clipboard": "^3.0.8",
208210
"core-js": "^3.6.5",
209-
"css-minimizer-webpack-plugin": "^1.3.0",
210211
"custom-event-polyfill": "^0.3.0",
211212
"cytoscape": "^3.10.0",
212213
"cytoscape-dagre": "^2.2.2",
@@ -682,6 +683,7 @@
682683
"copy-webpack-plugin": "^6.0.2",
683684
"cpy": "^8.1.1",
684685
"css-loader": "^3.4.2",
686+
"css-minimizer-webpack-plugin": "^1.3.0",
685687
"cypress": "^6.8.0",
686688
"cypress-cucumber-preprocessor": "^2.5.2",
687689
"cypress-multi-reporters": "^1.4.0",

packages/kbn-analytics/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"emitDeclarationOnly": true,
88
"declaration": true,
99
"declarationMap": true,
10+
"isolatedModules": true,
1011
"sourceMap": true,
1112
"sourceRoot": "../../../../../packages/kbn-analytics/src",
1213
"types": [

packages/kbn-dev-utils/src/plugins/simple_kibana_platform_plugin_discovery.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import Path from 'path';
1010

1111
import globby from 'globby';
12+
import normalize from 'normalize-path';
1213

1314
import { parseKibanaPlatformPlugin } from './parse_kibana_platform_plugin';
1415

@@ -32,7 +33,7 @@ export function simpleKibanaPlatformPluginDiscovery(scanDirs: string[], pluginPa
3233
),
3334
...pluginPaths.map((path) => Path.resolve(path, `kibana.json`)),
3435
])
35-
);
36+
).map((path) => normalize(path));
3637

3738
const manifestPaths = globby.sync(patterns, { absolute: true }).map((path) =>
3839
// absolute paths returned from globby are using normalize or
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
module.exports = {
10+
preset: '@kbn/test',
11+
rootDir: '../..',
12+
roots: ['<rootDir>/packages/kbn-io-ts-utils'],
13+
};

packages/kbn-io-ts-utils/package.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@kbn/io-ts-utils",
3+
"main": "./target/index.js",
4+
"types": "./target/index.d.ts",
5+
"version": "1.0.0",
6+
"license": "SSPL-1.0 OR Elastic License 2.0",
7+
"private": true,
8+
"scripts": {
9+
"build": "../../node_modules/.bin/tsc",
10+
"kbn:bootstrap": "yarn build",
11+
"kbn:watch": "yarn build --watch"
12+
}
13+
}

packages/kbn-io-ts-utils/src/index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
export { jsonRt } from './json_rt';
10+
export { mergeRt } from './merge_rt';
11+
export { strictKeysRt } from './strict_keys_rt';

x-pack/plugins/apm/common/runtime_types/json_rt/index.test.ts packages/kbn-io-ts-utils/src/json_rt/index.test.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*
22
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
33
* or more contributor license agreements. Licensed under the Elastic License
4-
* 2.0; you may not use this file except in compliance with the Elastic License
5-
* 2.0.
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
67
*/
78

89
import * as t from 'io-ts';
@@ -12,9 +13,7 @@ import { Right } from 'fp-ts/lib/Either';
1213
import { pipe } from 'fp-ts/lib/pipeable';
1314
import { identity } from 'fp-ts/lib/function';
1415

15-
function getValueOrThrow<TEither extends Either<any, any>>(
16-
either: TEither
17-
): Right<TEither> {
16+
function getValueOrThrow<TEither extends Either<any, any>>(either: TEither): Right<TEither> {
1817
const value = pipe(
1918
either,
2019
fold(() => {

x-pack/plugins/apm/common/runtime_types/json_rt/index.ts packages/kbn-io-ts-utils/src/json_rt/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*
22
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
33
* or more contributor license agreements. Licensed under the Elastic License
4-
* 2.0; you may not use this file except in compliance with the Elastic License
5-
* 2.0.
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
67
*/
78

89
import * as t from 'io-ts';

0 commit comments

Comments
 (0)