Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into chore/apollo-3
Browse files Browse the repository at this point in the history
# Conflicts:
#	yarn.lock
  • Loading branch information
patrykkopycinski committed Dec 12, 2019
2 parents 2785df3 + 989a349 commit 88ad668
Show file tree
Hide file tree
Showing 1,402 changed files with 30,562 additions and 20,907 deletions.
1 change: 1 addition & 0 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
x-pack/legacy/plugins/*/node_modules \
x-pack/legacy/plugins/reporting/.chromium \
test/plugin_functional/plugins/*/node_modules \
examples/*/node_modules \
.es \
.chromedriver \
.geckodriver;
Expand Down
20 changes: 0 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/eui_utils/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/kibana_react/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -170,13 +164,6 @@ module.exports = {
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/legacy/plugins/infra/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/legacy/plugins/lens/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -209,13 +196,6 @@ module.exports = {
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/legacy/plugins/watcher/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
},
},

/**
* Prettier
Expand Down
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# App
/x-pack/legacy/plugins/lens/ @elastic/kibana-app
/x-pack/legacy/plugins/graph/ @elastic/kibana-app
/src/plugins/share/ @elastic/kibana-app
/src/legacy/server/url_shortening/ @elastic/kibana-app
/src/legacy/server/sample_data/ @elastic/kibana-app

# App Architecture
Expand All @@ -14,7 +16,6 @@
/src/plugins/kibana_react/ @elastic/kibana-app-arch
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
/src/plugins/navigation/ @elastic/kibana-app-arch
/src/plugins/share/ @elastic/kibana-app-arch
/src/plugins/ui_actions/ @elastic/kibana-app-arch
/src/plugins/visualizations/ @elastic/kibana-app-arch
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
Expand All @@ -28,7 +29,6 @@
/src/legacy/core_plugins/kibana/server/routes/api/suggestions/ @elastic/kibana-app-arch
/src/legacy/core_plugins/visualizations/ @elastic/kibana-app-arch
/src/legacy/server/index_patterns/ @elastic/kibana-app-arch
/src/legacy/server/url_shortening/ @elastic/kibana-app-arch

# APM
/x-pack/legacy/plugins/apm/ @elastic/apm-ui
Expand Down
38 changes: 37 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ node scripts/makelogs --auth <username>:<password>
> The default username and password combination are `elastic:changeme`
> Make sure to execute `node scripts/makelogs` *after* elasticsearch is up and running!
### Running Elasticsearch Remotely

You can save some system resources, and the effort of generating sample data, if you have a remote Elasticsearch cluster to connect to. (**Elasticians: you do! Check with your team about where to find credentials**)
Expand All @@ -239,6 +240,41 @@ kibana.index: '.{YourGitHubHandle}-kibana'
xpack.task_manager.index: '.{YourGitHubHandle}-task-manager-kibana'
```

### Running remote clusters
Setup remote clusters for cross cluster search (CCS) and cross cluster replication (CCR).

Start your primary cluster by running:
```bash
yarn es snapshot -E path.data=../data_prod1
```

Start your remote cluster by running:
```bash
yarn es snapshot -E transport.port=9500 -E http.port=9201 -E path.data=../data_prod2
```

Once both clusters are running, start kibana. Kibana will connect to the primary cluster.

Setup the remote cluster in Kibana from either `Management` -> `Elasticsearch` -> `Remote Clusters` UI or by running the following script in `Console`.
```
PUT _cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"cluster_one": {
"seeds": [
"localhost:9500"
]
}
}
}
}
}
```

Follow the [cross-cluster search](https://www.elastic.co/guide/en/kibana/current/management-cross-cluster-search.html) instructions for setting up index patterns to search across clusters.

### Running Kibana

Start the development server.
Expand Down Expand Up @@ -506,7 +542,7 @@ yarn test:browser --dev # remove the --dev flag to run them once and close
* In System Preferences > Sharing, change your computer name to be something simple, e.g. "computer".
* Run Kibana with `yarn start --host=computer.local` (substituting your computer name).
* Now you can run your VM, open the browser, and navigate to `http://computer.local:5601` to test Kibana.
* Alternatively you can use browserstack
* Alternatively you can use browserstack

#### Running Browser Automation Tests

Expand Down
19 changes: 19 additions & 0 deletions docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,22 @@ Finally, this problem can also occur if you've changed the index name that you w
The default index pattern can be found {apm-server-ref}/elasticsearch-output.html#index-option-es[here].
If you change this setting, you must also configure the `setup.template.name` and `setup.template.pattern` options.
See {apm-server-ref}/configuration-template.html[Load the Elasticsearch index template].

==== Unknown route

The {apm-app-ref}/transactions.html[transaction overview] will only display helpful information
when the transactions in your services are named correctly.
If you're seeing "GET unknown route" or "unknown route" in the APM app,
it could be a sign that something isn't working like it should.

Elastic APM Agents come with built-in support for popular frameworks out-of-the-box.
This means, among other things, that the Agent will try to automatically name HTTP requests.
As an example, the Node.js Agent uses the route that handled the request, while the Java Agent uses the Servlet name.

"Unknown route" indicates that the Agent can't determine what to name the request,
perhaps because the technology you're using isn't supported, the Agent has been installed incorrectly,
or because something is happening to the request that the Agent doesn't understand.

To resolve this, you'll need to head over to the relevant {apm-agents-ref}[Agent documentation].
Specifically, view the Agent's supported technologies page.
You can also use the Agent's public API to manually set a name for the transaction.
12 changes: 0 additions & 12 deletions docs/development/core/public/kibana-plugin-public.httpbody.md

This file was deleted.

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

```typescript
export interface HttpErrorResponse extends HttpResponse
export interface HttpErrorResponse extends IHttpResponse
```
## Properties
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-public](./kibana-plugin-public.md) &gt; [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) &gt; [asResponse](./kibana-plugin-public.httpfetchoptions.asresponse.md)

## HttpFetchOptions.asResponse property

When `true` the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) with detailed request and response information. When `false`<!-- -->, the return type will just be the parsed response body. Defaults to `false`<!-- -->.

<b>Signature:</b>

```typescript
asResponse?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface HttpFetchOptions extends HttpRequestInit
| Property | Type | Description |
| --- | --- | --- |
| [asResponse](./kibana-plugin-public.httpfetchoptions.asresponse.md) | <code>boolean</code> | When <code>true</code> the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) with detailed request and response information. When <code>false</code>, the return type will just be the parsed response body. Defaults to <code>false</code>. |
| [headers](./kibana-plugin-public.httpfetchoptions.headers.md) | <code>HttpHeadersInit</code> | Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md)<!-- -->. |
| [prependBasePath](./kibana-plugin-public.httpfetchoptions.prependbasepath.md) | <code>boolean</code> | Whether or not the request should automatically prepend the basePath. Defaults to <code>true</code>. |
| [query](./kibana-plugin-public.httpfetchoptions.query.md) | <code>HttpFetchQuery</code> | The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-public.httpfetchquery.md)<!-- -->. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpHandler](./kibana-plugin-public.httphandler.md)

## HttpHandler type
## HttpHandler interface

A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [HttpBody](./kibana-plugin-public.httpbody.md) for the response.
A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) for the response.

<b>Signature:</b>

```typescript
export declare type HttpHandler = (path: string, options?: HttpFetchOptions) => Promise<HttpBody>;
export interface HttpHandler
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ Define an interceptor to be executed after a response is received.
<b>Signature:</b>

```typescript
response?(httpResponse: HttpResponse, controller: IHttpInterceptController): Promise<InterceptedHttpResponse> | InterceptedHttpResponse | void;
response?(httpResponse: IHttpResponse, controller: IHttpInterceptController): Promise<IHttpResponseInterceptorOverrides> | IHttpResponseInterceptorOverrides | void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| httpResponse | <code>HttpResponse</code> | |
| httpResponse | <code>IHttpResponse</code> | |
| controller | <code>IHttpInterceptController</code> | |
<b>Returns:</b>
`Promise<InterceptedHttpResponse> | InterceptedHttpResponse | void`
`Promise<IHttpResponseInterceptorOverrides> | IHttpResponseInterceptorOverrides | void`
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Define an interceptor to be executed if a response interceptor throws an error o
<b>Signature:</b>

```typescript
responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController): Promise<InterceptedHttpResponse> | InterceptedHttpResponse | void;
responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController): Promise<IHttpResponseInterceptorOverrides> | IHttpResponseInterceptorOverrides | void;
```
## Parameters
Expand All @@ -21,5 +21,5 @@ responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptC
<b>Returns:</b>
`Promise<InterceptedHttpResponse> | InterceptedHttpResponse | void`
`Promise<IHttpResponseInterceptorOverrides> | IHttpResponseInterceptorOverrides | void`
19 changes: 0 additions & 19 deletions docs/development/core/public/kibana-plugin-public.httpresponse.md

This file was deleted.

This file 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-public](./kibana-plugin-public.md) &gt; [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) &gt; [body](./kibana-plugin-public.ihttpresponse.body.md)

## IHttpResponse.body property

Parsed body received, may be undefined if there was an error.

<b>Signature:</b>

```typescript
readonly body?: TResponseBody;
```
21 changes: 21 additions & 0 deletions docs/development/core/public/kibana-plugin-public.ihttpresponse.md
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-public](./kibana-plugin-public.md) &gt; [IHttpResponse](./kibana-plugin-public.ihttpresponse.md)

## IHttpResponse interface


<b>Signature:</b>

```typescript
export interface IHttpResponse<TResponseBody = any>
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-public.ihttpresponse.body.md) | <code>TResponseBody</code> | Parsed body received, may be undefined if there was an error. |
| [request](./kibana-plugin-public.ihttpresponse.request.md) | <code>Readonly&lt;Request&gt;</code> | Raw request sent to Kibana server. |
| [response](./kibana-plugin-public.ihttpresponse.response.md) | <code>Readonly&lt;Response&gt;</code> | Raw response received, may be undefined if there was an error. |

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-public](./kibana-plugin-public.md) &gt; [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) &gt; [request](./kibana-plugin-public.ihttpresponse.request.md)

## IHttpResponse.request property

Raw request sent to Kibana server.

<b>Signature:</b>

```typescript
readonly request: Readonly<Request>;
```
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-public](./kibana-plugin-public.md) &gt; [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) &gt; [response](./kibana-plugin-public.ihttpresponse.response.md)

## IHttpResponse.response property

Raw response received, may be undefined if there was an error.

<b>Signature:</b>

```typescript
readonly response?: Readonly<Response>;
```
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-public](./kibana-plugin-public.md) &gt; [IHttpResponseInterceptorOverrides](./kibana-plugin-public.ihttpresponseinterceptoroverrides.md) &gt; [body](./kibana-plugin-public.ihttpresponseinterceptoroverrides.body.md)

## IHttpResponseInterceptorOverrides.body property

Parsed body received, may be undefined if there was an error.

<b>Signature:</b>

```typescript
readonly body?: TResponseBody;
```
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-public](./kibana-plugin-public.md) &gt; [IHttpResponseInterceptorOverrides](./kibana-plugin-public.ihttpresponseinterceptoroverrides.md)

## IHttpResponseInterceptorOverrides interface

Properties that can be returned by HttpInterceptor.request to override the response.

<b>Signature:</b>

```typescript
export interface IHttpResponseInterceptorOverrides<TResponseBody = any>
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-public.ihttpresponseinterceptoroverrides.body.md) | <code>TResponseBody</code> | Parsed body received, may be undefined if there was an error. |
| [response](./kibana-plugin-public.ihttpresponseinterceptoroverrides.response.md) | <code>Readonly&lt;Response&gt;</code> | Raw response received, may be undefined if there was an error. |

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-public](./kibana-plugin-public.md) &gt; [IHttpResponseInterceptorOverrides](./kibana-plugin-public.ihttpresponseinterceptoroverrides.md) &gt; [response](./kibana-plugin-public.ihttpresponseinterceptoroverrides.response.md)

## IHttpResponseInterceptorOverrides.response property

Raw response received, may be undefined if there was an error.

<b>Signature:</b>

```typescript
readonly response?: Readonly<Response>;
```
Loading

0 comments on commit 88ad668

Please sign in to comment.