Skip to content

Commit

Permalink
Merge branch 'master' into improve-telemetry-test
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Aug 21, 2020
2 parents 64fbac8 + ec44ee0 commit 14df430
Show file tree
Hide file tree
Showing 974 changed files with 43,122 additions and 35,422 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ target
# package overrides
/packages/eslint-config-kibana
/packages/kbn-interpreter/src/common/lib/grammar.js
/packages/kbn-plugin-generator/sao_template/template
/packages/kbn-plugin-generator/template
/packages/kbn-pm/dist
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ module.exports = {
{
files: [
'.eslintrc.js',
'packages/kbn-plugin-generator/**/*.js',
'packages/kbn-eslint-import-resolver-kibana/**/*.js',
'packages/kbn-eslint-plugin-eslint/**/*',
'x-pack/gulpfile.js',
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/security_solution/**/*.scss @elastic/security-design
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/lists_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- 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; [KibanaRequest](./kibana-plugin-core-server.kibanarequest.md) &gt; [id](./kibana-plugin-core-server.kibanarequest.id.md)

## KibanaRequest.id property

A identifier to identify this request.

<b>Signature:</b>

```typescript
readonly id: string;
```

## Remarks

Depending on the user's configuration, this value may be sourced from the incoming request's `X-Opaque-Id` header which is not guaranteed to be unique per request.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export declare class KibanaRequest<Params = unknown, Query = unknown, Body = unk
| [body](./kibana-plugin-core-server.kibanarequest.body.md) | | <code>Body</code> | |
| [events](./kibana-plugin-core-server.kibanarequest.events.md) | | <code>KibanaRequestEvents</code> | Request events [KibanaRequestEvents](./kibana-plugin-core-server.kibanarequestevents.md) |
| [headers](./kibana-plugin-core-server.kibanarequest.headers.md) | | <code>Headers</code> | Readonly copy of incoming request headers. |
| [id](./kibana-plugin-core-server.kibanarequest.id.md) | | <code>string</code> | A identifier to identify this request. |
| [isSystemRequest](./kibana-plugin-core-server.kibanarequest.issystemrequest.md) | | <code>boolean</code> | Whether or not the request is a "system request" rather than an application-level request. Can be set on the client using the <code>HttpFetchOptions#asSystemRequest</code> option. |
| [params](./kibana-plugin-core-server.kibanarequest.params.md) | | <code>Params</code> | |
| [query](./kibana-plugin-core-server.kibanarequest.query.md) | | <code>Query</code> | |
Expand Down
2 changes: 2 additions & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectMigrationMap](./kibana-plugin-core-server.savedobjectmigrationmap.md) | A map of [migration functions](./kibana-plugin-core-server.savedobjectmigrationfn.md) to be used for a given type. The map's keys must be valid semver versions.<!-- -->For a given document, only migrations with a higher version number than that of the document will be applied. Migrations are executed in order, starting from the lowest version and ending with the highest one. |
| [SavedObjectReference](./kibana-plugin-core-server.savedobjectreference.md) | A reference to another saved object. |
| [SavedObjectsAddToNamespacesOptions](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.md) | |
| [SavedObjectsAddToNamespacesResponse](./kibana-plugin-core-server.savedobjectsaddtonamespacesresponse.md) | |
| [SavedObjectsBaseOptions](./kibana-plugin-core-server.savedobjectsbaseoptions.md) | |
| [SavedObjectsBulkCreateObject](./kibana-plugin-core-server.savedobjectsbulkcreateobject.md) | |
| [SavedObjectsBulkGetObject](./kibana-plugin-core-server.savedobjectsbulkgetobject.md) | |
Expand All @@ -167,6 +168,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | |
| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | |
| [SavedObjectsDeleteFromNamespacesOptions](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.md) | |
| [SavedObjectsDeleteFromNamespacesResponse](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesresponse.md) | |
| [SavedObjectsDeleteOptions](./kibana-plugin-core-server.savedobjectsdeleteoptions.md) | |
| [SavedObjectsExportOptions](./kibana-plugin-core-server.savedobjectsexportoptions.md) | Options controlling the export operation. |
| [SavedObjectsExportResultDetails](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- 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; [SavedObjectsAddToNamespacesResponse](./kibana-plugin-core-server.savedobjectsaddtonamespacesresponse.md)

## SavedObjectsAddToNamespacesResponse interface


<b>Signature:</b>

```typescript
export interface SavedObjectsAddToNamespacesResponse
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [namespaces](./kibana-plugin-core-server.savedobjectsaddtonamespacesresponse.namespaces.md) | <code>string[]</code> | The namespaces the object exists in after this operation is complete. |

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; [SavedObjectsAddToNamespacesResponse](./kibana-plugin-core-server.savedobjectsaddtonamespacesresponse.md) &gt; [namespaces](./kibana-plugin-core-server.savedobjectsaddtonamespacesresponse.namespaces.md)

## SavedObjectsAddToNamespacesResponse.namespaces property

The namespaces the object exists in after this operation is complete.

<b>Signature:</b>

```typescript
namespaces: string[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export interface SavedObjectsBulkCreateObject<T = unknown>
| [migrationVersion](./kibana-plugin-core-server.savedobjectsbulkcreateobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
| [references](./kibana-plugin-core-server.savedobjectsbulkcreateobject.references.md) | <code>SavedObjectReference[]</code> | |
| [type](./kibana-plugin-core-server.savedobjectsbulkcreateobject.type.md) | <code>string</code> | |
| [version](./kibana-plugin-core-server.savedobjectsbulkcreateobject.version.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- 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; [SavedObjectsBulkCreateObject](./kibana-plugin-core-server.savedobjectsbulkcreateobject.md) &gt; [version](./kibana-plugin-core-server.savedobjectsbulkcreateobject.version.md)

## SavedObjectsBulkCreateObject.version property

<b>Signature:</b>

```typescript
version?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Adds namespaces to a SavedObject
<b>Signature:</b>

```typescript
addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<{}>;
addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<SavedObjectsAddToNamespacesResponse>;
```

## Parameters
Expand All @@ -23,5 +23,5 @@ addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedO

<b>Returns:</b>

`Promise<{}>`
`Promise<SavedObjectsAddToNamespacesResponse>`

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Removes namespaces from a SavedObject
<b>Signature:</b>

```typescript
deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<{}>;
deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<SavedObjectsDeleteFromNamespacesResponse>;
```

## Parameters
Expand All @@ -23,5 +23,5 @@ deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: S

<b>Returns:</b>

`Promise<{}>`
`Promise<SavedObjectsDeleteFromNamespacesResponse>`

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions
| [overwrite](./kibana-plugin-core-server.savedobjectscreateoptions.overwrite.md) | <code>boolean</code> | Overwrite existing documents (defaults to false) |
| [references](./kibana-plugin-core-server.savedobjectscreateoptions.references.md) | <code>SavedObjectReference[]</code> | |
| [refresh](./kibana-plugin-core-server.savedobjectscreateoptions.refresh.md) | <code>MutatingOperationRefreshSetting</code> | The Elasticsearch Refresh setting for this operation |
| [version](./kibana-plugin-core-server.savedobjectscreateoptions.version.md) | <code>string</code> | An opaque version number which changes on each successful write operation. Can be used in conjunction with <code>overwrite</code> for implementing optimistic concurrency control. |
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; [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) &gt; [version](./kibana-plugin-core-server.savedobjectscreateoptions.version.md)

## SavedObjectsCreateOptions.version property

An opaque version number which changes on each successful write operation. Can be used in conjunction with `overwrite` for implementing optimistic concurrency control.

<b>Signature:</b>

```typescript
version?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- 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; [SavedObjectsDeleteFromNamespacesResponse](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesresponse.md)

## SavedObjectsDeleteFromNamespacesResponse interface


<b>Signature:</b>

```typescript
export interface SavedObjectsDeleteFromNamespacesResponse
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [namespaces](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesresponse.namespaces.md) | <code>string[]</code> | The namespaces the object exists in after this operation is complete. An empty array indicates the object was deleted. |

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; [SavedObjectsDeleteFromNamespacesResponse](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesresponse.md) &gt; [namespaces](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesresponse.namespaces.md)

## SavedObjectsDeleteFromNamespacesResponse.namespaces property

The namespaces the object exists in after this operation is complete. An empty array indicates the object was deleted.

<b>Signature:</b>

```typescript
namespaces: string[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Adds one or more namespaces to a given multi-namespace saved object. This method
<b>Signature:</b>

```typescript
addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<{}>;
addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<SavedObjectsAddToNamespacesResponse>;
```

## Parameters
Expand All @@ -23,5 +23,5 @@ addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedO

<b>Returns:</b>

`Promise<{}>`
`Promise<SavedObjectsAddToNamespacesResponse>`

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Removes one or more namespaces from a given multi-namespace saved object. If no
<b>Signature:</b>

```typescript
deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<{}>;
deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<SavedObjectsDeleteFromNamespacesResponse>;
```

## Parameters
Expand All @@ -23,5 +23,5 @@ deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: S

<b>Returns:</b>

`Promise<{}>`
`Promise<SavedObjectsDeleteFromNamespacesResponse>`

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
export declare type FieldFormatsGetConfigFn = <T = any>(key: string, defaultOverride?: T) => T;
export declare type FieldFormatsGetConfigFn = GetConfigFn;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

## getSearchParamsFromRequest() function


<b>Signature:</b>

```typescript
export declare function getSearchParamsFromRequest(searchRequest: SearchRequest, dependencies: {
injectedMetadata: CoreStart['injectedMetadata'];
uiSettings: IUiSettingsClient;
esShardTimeout: number;
getConfig: GetConfigFn;
}): ISearchRequestParams;
```

Expand All @@ -18,7 +19,7 @@ export declare function getSearchParamsFromRequest(searchRequest: SearchRequest,
| Parameter | Type | Description |
| --- | --- | --- |
| searchRequest | <code>SearchRequest</code> | |
| dependencies | <code>{</code><br/><code> injectedMetadata: CoreStart['injectedMetadata'];</code><br/><code> uiSettings: IUiSettingsClient;</code><br/><code>}</code> | |
| dependencies | <code>{</code><br/><code> esShardTimeout: number;</code><br/><code> getConfig: GetConfigFn;</code><br/><code>}</code> | |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
export declare type FieldFormatsGetConfigFn = <T = any>(key: string, defaultOverride?: T) => T;
export declare type FieldFormatsGetConfigFn = GetConfigFn;
```
6 changes: 6 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,12 @@ identifies this {kib} instance. *Default: `"your-hostname"`*
| {kib} is served by a back end server. This
setting specifies the port to use. *Default: `5601`*

| `server.requestId.allowFromAnyIp:`
| Sets whether or not the X-Opaque-Id header should be trusted from any IP address for identifying requests in logs and forwarded to Elasticsearch.

| `server.requestId.ipAllowlist:`
| A list of IPv4 and IPv6 address which the `X-Opaque-Id` header should be trusted from. Normally this would be set to the IP addresses of the load balancers or reverse-proxy that end users use to access Kibana. If any are set, `server.requestId.allowFromAnyIp` must also be set to `false.`

| `server.rewriteBasePath:`
| Specifies whether {kib} should
rewrite requests that are prefixed with `server.basePath` or require that they
Expand Down
8 changes: 3 additions & 5 deletions docs/visualize/vega.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[[vega-graph]]
== Vega

experimental[]

Build custom visualizations using Vega and Vega-Lite, backed by one or more
data sources including {es}, Elastic Map Service, URL,
or static data. Use the {kib} extensions to Vega to embed Vega into
Expand Down Expand Up @@ -1259,7 +1257,7 @@ Override it by providing a different `stroke`, `fill`, or `color` (Vega-Lite) va
[[vega-queries]]
==== Writing {es} queries in Vega

experimental[] {kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
{kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
with support for direct {es} queries specified as a `url`.

Because of this, {kib} is **unable to support dynamically loaded data**,
Expand Down Expand Up @@ -1414,7 +1412,7 @@ try to get about 10-15 data points (buckets).
[[vega-esmfiles]]
=== Access Elastic Map Service files

experimental[] Access the Elastic Map Service files via the same mechanism:
Access the Elastic Map Service files via the same mechanism:

[source,yaml]
----
Expand Down Expand Up @@ -1619,7 +1617,7 @@ kibanaSetTimeFilter(start, end)
[[vega-useful-links]]
=== Resources and examples

experimental[] To learn more about Vega and Vega-Lite, refer to the resources and examples.
To learn more about Vega and Vega-Lite, refer to the resources and examples.

==== Vega editor
The https://vega.github.io/editor/[Vega Editor] includes examples for Vega & Vega-Lite, but does not support any
Expand Down
10 changes: 3 additions & 7 deletions examples/embeddable_examples/public/book/book_embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
EmbeddableOutput,
SavedObjectEmbeddableInput,
ReferenceOrValueEmbeddable,
Container,
} from '../../../../src/plugins/embeddable/public';
import { BookSavedObjectAttributes } from '../../common';
import { BookEmbeddableComponent } from './book_component';
Expand Down Expand Up @@ -104,16 +103,13 @@ export class BookEmbeddable extends Embeddable<BookEmbeddableInput, BookEmbeddab
};

getInputAsValueType = async (): Promise<BookByValueInput> => {
const input =
this.getRoot() && (this.getRoot() as Container).getInput().panels[this.id].explicitInput
? ((this.getRoot() as Container).getInput().panels[this.id]
.explicitInput as BookEmbeddableInput)
: this.input;
const input = this.attributeService.getExplicitInputFromEmbeddable(this);
return this.attributeService.getInputAsValueType(input);
};

getInputAsRefType = async (): Promise<BookByReferenceInput> => {
return this.attributeService.getInputAsRefType(this.input, { showSaveModal: true });
const input = this.attributeService.getExplicitInputFromEmbeddable(this);
return this.attributeService.getInputAsRefType(input, { showSaveModal: true });
};

public render(node: HTMLElement) {
Expand Down
8 changes: 2 additions & 6 deletions examples/search_examples/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/
import {
PLUGIN_ID,
PLUGIN_NAME,
IMyStrategyRequest,
IMyStrategyResponse,
SERVER_SEARCH_ROUTE_PATH,
} from '../../common';
Expand Down Expand Up @@ -134,12 +133,9 @@ export const SearchExamplesApp = ({
query,
},
},
};

if (strategy) {
// Add a custom request parameter to be consumed by `MyStrategy`.
(request as IMyStrategyRequest).get_cool = getCool;
}
...(strategy ? { get_cool: getCool } : {}),
};

// Submit the search request using the `data.search` service.
const searchSubscription$ = data.search
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@
"**/graphql-toolkit/lodash": "^4.17.15",
"**/hoist-non-react-statics": "^3.3.2",
"**/isomorphic-git/**/base64-js": "^1.2.1",
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-test-renderer": "^16.12.0",
"**/request": "^2.88.2",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1"
},
Expand All @@ -121,7 +123,7 @@
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/register": "^7.10.5",
"@elastic/apm-rum": "^5.4.0",
"@elastic/apm-rum": "^5.5.0",
"@elastic/charts": "19.8.1",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.9.0-rc.2",
Expand Down
Loading

0 comments on commit 14df430

Please sign in to comment.