Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into fc/cheat-shee…
Browse files Browse the repository at this point in the history
…t-doc
  • Loading branch information
legrego committed Jun 20, 2019
2 parents 695225f + bc1e900 commit fbdc3ad
Show file tree
Hide file tree
Showing 1,010 changed files with 18,756 additions and 9,431 deletions.
2 changes: 2 additions & 0 deletions .ci/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JOB:
- kibana-intake
- x-pack-intake
- kibana-firefoxSmoke
- kibana-ciGroup1
- kibana-ciGroup2
- kibana-ciGroup3
Expand All @@ -16,6 +17,7 @@ JOB:
# - kibana-visualRegression

# make sure all x-pack-ciGroups are listed in test/scripts/jenkins_xpack_ci_group.sh
- x-pack-firefoxSmoke
- x-pack-ciGroup1
- x-pack-ciGroup2
- x-pack-ciGroup3
Expand Down
6 changes: 6 additions & 0 deletions .ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ kibana-ciGroup*)
kibana-visualRegression*)
./test/scripts/jenkins_visual_regression.sh
;;
kibana-firefoxSmoke*)
./test/scripts/jenkins_firefox_smoke.sh
;;
x-pack-intake)
./test/scripts/jenkins_xpack.sh
;;
Expand All @@ -30,6 +33,9 @@ x-pack-ciGroup*)
x-pack-visualRegression*)
./test/scripts/jenkins_xpack_visual_regression.sh
;;
x-pack-firefoxSmoke*)
./test/scripts/jenkins_xpack_firefox_smoke.sh
;;
*)
echo "JOB '$JOB' is not implemented."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ webpackstats.json
!/config/kibana.yml
coverage
selenium
.babel_register_cache.json
.babelcache.json
.webpack.babelcache
*.swp
*.swo
Expand Down
3 changes: 3 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"interpreter": "src/legacy/core_plugins/interpreter",
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"embeddableApi": "src/legacy/core_plugins/embeddable_api",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/legacy/core_plugins/markdown_vis",
"metricVis": "src/legacy/core_plugins/metric_vis",
Expand All @@ -25,8 +26,10 @@
"xpack.apm": "x-pack/plugins/apm",
"xpack.beatsManagement": "x-pack/plugins/beats_management",
"xpack.canvas": "x-pack/plugins/canvas",
"xpack.code": "x-pack/plugins/code",
"xpack.crossClusterReplication": "x-pack/plugins/cross_cluster_replication",
"xpack.dashboardMode": "x-pack/plugins/dashboard_mode",
"xpack.fileUpload": "x-pack/plugins/file_upload",
"xpack.graph": "x-pack/plugins/graph",
"xpack.grokDebugger": "x-pack/plugins/grokdebugger",
"xpack.idxMgmt": "x-pack/plugins/index_management",
Expand Down
24 changes: 22 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ yarn kbn bootstrap

(You can also run `yarn kbn` to see the other available commands. For more info about this tool, see https://github.com/elastic/kibana/tree/master/packages/kbn-pm.)

### Running Elasticsearch
### Running Elasticsearch Locally

There are a few options when it comes to running Elasticsearch:
There are a few options when it comes to running Elasticsearch locally:

#### Nightly snapshot (recommended)

Expand Down Expand Up @@ -213,6 +213,26 @@ 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**)

You'll need to [create a `kibana.dev.yml`](#customizing-configkibanadevyml) and add the following to it:

```
elasticsearch.hosts:
- {{ url }}
elasticsearch.username: {{ username }}
elasticsearch.password: {{ password }}
elasticsearch.ssl.verificationMode: none
```

If many other users will be interacting with your remote cluster, you'll want to add the following to avoid causing conflicts:

```
kibana.index: '.{YourGitHubHandle}-kibana'
xpack.task_manager.index: '.{YourGitHubHandle}-task-manager-kibana'
```

### Running Kibana

Expand Down
2 changes: 1 addition & 1 deletion bin/kibana
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
exit 1
fi

NODE_ENV=production exec "${NODE}" --no-warnings --max-http-header-size=65536 $NODE_OPTIONS "${DIR}/src/cli" ${@}
NODE_ENV=production BROWSERSLIST_IGNORE_OLD_DATA=true exec "${NODE}" --no-warnings --max-http-header-size=65536 $NODE_OPTIONS "${DIR}/src/cli" ${@}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export interface CoreStart
| [i18n](./kibana-plugin-public.corestart.i18n.md) | <code>I18nStart</code> | [I18nStart](./kibana-plugin-public.i18nstart.md) |
| [notifications](./kibana-plugin-public.corestart.notifications.md) | <code>NotificationsStart</code> | [NotificationsStart](./kibana-plugin-public.notificationsstart.md) |
| [overlays](./kibana-plugin-public.corestart.overlays.md) | <code>OverlayStart</code> | [OverlayStart](./kibana-plugin-public.overlaystart.md) |
| [uiSettings](./kibana-plugin-public.corestart.uisettings.md) | <code>UiSettingsStart</code> | [UiSettingsStart](./kibana-plugin-public.uisettingsstart.md) |

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; [CoreStart](./kibana-plugin-public.corestart.md) &gt; [uiSettings](./kibana-plugin-public.corestart.uisettings.md)

## CoreStart.uiSettings property

[UiSettingsStart](./kibana-plugin-public.uisettingsstart.md)

<b>Signature:</b>

```typescript
uiSettings: UiSettingsStart;
```
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [RecursiveReadonly](./kibana-plugin-public.recursivereadonly.md) | |
| [ToastInput](./kibana-plugin-public.toastinput.md) | |
| [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md) | |
| [UiSettingsStart](./kibana-plugin-public.uisettingsstart.md) | |

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

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

## UiSettingsStart type


<b>Signature:</b>

```typescript
export declare type UiSettingsStart = UiSettingsClient;
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<b>Signature:</b>

```typescript
export declare type AuthenticationHandler = (request: Readonly<Request>, t: AuthToolkit) => AuthResult | Promise<AuthResult>;
export declare type AuthenticationHandler = (request: KibanaRequest, t: AuthToolkit) => AuthResult | Promise<AuthResult>;
```
13 changes: 13 additions & 0 deletions docs/development/core/server/kibana-plugin-server.authheaders.md
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-server](./kibana-plugin-server.md) &gt; [AuthHeaders](./kibana-plugin-server.authheaders.md)

## AuthHeaders type

Auth Headers map

<b>Signature:</b>

```typescript
export declare type AuthHeaders = Record<string, 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-server](./kibana-plugin-server.md) &gt; [AuthResultData](./kibana-plugin-server.authresultdata.md) &gt; [headers](./kibana-plugin-server.authresultdata.headers.md)

## AuthResultData.headers property

Auth specific headers to authenticate a user against Elasticsearch.

<b>Signature:</b>

```typescript
headers: AuthHeaders;
```
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-server](./kibana-plugin-server.md) &gt; [AuthResultData](./kibana-plugin-server.authresultdata.md)

## AuthResultData interface

Result of an incoming request authentication.

<b>Signature:</b>

```typescript
export interface AuthResultData
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [headers](./kibana-plugin-server.authresultdata.headers.md) | <code>AuthHeaders</code> | Auth specific headers to authenticate a user against Elasticsearch. |
| [state](./kibana-plugin-server.authresultdata.state.md) | <code>Record&lt;string, unknown&gt;</code> | Data to associate with an incoming request. Any downstream plugin may get access to the data. |

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-server](./kibana-plugin-server.md) &gt; [AuthResultData](./kibana-plugin-server.authresultdata.md) &gt; [state](./kibana-plugin-server.authresultdata.state.md)

## AuthResultData.state property

Data to associate with an incoming request. Any downstream plugin may get access to the data.

<b>Signature:</b>

```typescript
state: Record<string, unknown>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Authentication is successful with given credentials, allow request to pass throu
<b>Signature:</b>

```typescript
authenticated: (state?: object) => AuthResult;
authenticated: (data?: Partial<AuthResultData>) => AuthResult;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface AuthToolkit

| Property | Type | Description |
| --- | --- | --- |
| [authenticated](./kibana-plugin-server.authtoolkit.authenticated.md) | <code>(state?: object) =&gt; AuthResult</code> | Authentication is successful with given credentials, allow request to pass through |
| [authenticated](./kibana-plugin-server.authtoolkit.authenticated.md) | <code>(data?: Partial&lt;AuthResultData&gt;) =&gt; AuthResult</code> | Authentication is successful with given credentials, allow request to pass through |
| [redirected](./kibana-plugin-server.authtoolkit.redirected.md) | <code>(url: string) =&gt; AuthResult</code> | Authentication requires to interrupt request handling and redirect to a configured url |
| [rejected](./kibana-plugin-server.authtoolkit.rejected.md) | <code>(error: Error, options?: {</code><br/><code> statusCode?: number;</code><br/><code> }) =&gt; AuthResult</code> | Authentication is unsuccessful, fail the request with specified error. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Constructs a new instance of the `ClusterClient` class
<b>Signature:</b>

```typescript
constructor(config: ElasticsearchClientConfig, log: Logger);
constructor(config: ElasticsearchClientConfig, log: Logger, getAuthHeaders?: GetAuthHeaders);
```

## Parameters
Expand All @@ -18,4 +18,5 @@ constructor(config: ElasticsearchClientConfig, log: Logger);
| --- | --- | --- |
| config | <code>ElasticsearchClientConfig</code> | |
| log | <code>Logger</code> | |
| getAuthHeaders | <code>GetAuthHeaders</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ Creates an instance of `ScopedClusterClient` based on the configuration the curr
<b>Signature:</b>

```typescript
asScoped(req?: {
headers?: Headers;
}): ScopedClusterClient;
asScoped(request?: KibanaRequest | LegacyRequest | FakeRequest): ScopedClusterClient;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| req | <code>{</code><br/><code> headers?: Headers;</code><br/><code> }</code> | Request the <code>ScopedClusterClient</code> instance will be scoped to. |
| request | <code>KibanaRequest &#124; LegacyRequest &#124; FakeRequest</code> | Request the <code>ScopedClusterClient</code> instance will be scoped to. Supports request optionality, Legacy.Request &amp; FakeRequest for BWC with LegacyPlatform |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export declare class ClusterClient

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(config, log)](./kibana-plugin-server.clusterclient.(constructor).md) | | Constructs a new instance of the <code>ClusterClient</code> class |
| [(constructor)(config, log, getAuthHeaders)](./kibana-plugin-server.clusterclient.(constructor).md) | | Constructs a new instance of the <code>ClusterClient</code> class |

## Properties

Expand All @@ -28,6 +28,6 @@ export declare class ClusterClient

| Method | Modifiers | Description |
| --- | --- | --- |
| [asScoped(req)](./kibana-plugin-server.clusterclient.asscoped.md) | | Creates an instance of <code>ScopedClusterClient</code> based on the configuration the current cluster client that exposes additional <code>callAsCurrentUser</code> method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed. |
| [asScoped(request)](./kibana-plugin-server.clusterclient.asscoped.md) | | Creates an instance of <code>ScopedClusterClient</code> based on the configuration the current cluster client that exposes additional <code>callAsCurrentUser</code> method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed. |
| [close()](./kibana-plugin-server.clusterclient.close.md) | | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. |

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-server](./kibana-plugin-server.md) &gt; [FakeRequest](./kibana-plugin-server.fakerequest.md) &gt; [headers](./kibana-plugin-server.fakerequest.headers.md)

## FakeRequest.headers property

Headers used for authentication against Elasticsearch

<b>Signature:</b>

```typescript
headers: Record<string, string>;
```
20 changes: 20 additions & 0 deletions docs/development/core/server/kibana-plugin-server.fakerequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [FakeRequest](./kibana-plugin-server.fakerequest.md)

## FakeRequest interface

Fake request object created manually by Kibana plugins.

<b>Signature:</b>

```typescript
export interface FakeRequest
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [headers](./kibana-plugin-server.fakerequest.headers.md) | <code>Record&lt;string, string&gt;</code> | Headers used for authentication against Elasticsearch |

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-server](./kibana-plugin-server.md) &gt; [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md)

## GetAuthHeaders type

Get headers to authenticate a user against Elasticsearch.

<b>Signature:</b>

```typescript
export declare type GetAuthHeaders = (request: KibanaRequest | Request) => AuthHeaders | undefined;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## HttpServiceStart.isListening property

Indicates if http server is listening on a port
Indicates if http server is listening on a given port

<b>Signature:</b>

```typescript
isListening: () => boolean;
isListening: (port: number) => boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface HttpServiceStart

| Property | Type | Description |
| --- | --- | --- |
| [isListening](./kibana-plugin-server.httpservicestart.islistening.md) | <code>() =&gt; boolean</code> | Indicates if http server is listening on a port |
| [isListening](./kibana-plugin-server.httpservicestart.islistening.md) | <code>(port: number) =&gt; boolean</code> | Indicates if http server is listening on a given port |

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ export interface InternalCoreStart

| Property | Type | Description |
| --- | --- | --- |
| [http](./kibana-plugin-server.internalcorestart.http.md) | <code>HttpServiceStart</code> | |
| [plugins](./kibana-plugin-server.internalcorestart.plugins.md) | <code>PluginsServiceStart</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Constructs a new instance of the `KibanaRequest` class
<b>Signature:</b>

```typescript
constructor(request: Request, params: Params, query: Query, body: Body);
constructor(request: Request, params: Params, query: Query, body: Body, withoutSecretHeaders: boolean);
```

## Parameters
Expand All @@ -20,4 +20,5 @@ constructor(request: Request, params: Params, query: Query, body: Body);
| params | <code>Params</code> | |
| query | <code>Query</code> | |
| body | <code>Body</code> | |
| withoutSecretHeaders | <code>boolean</code> | |

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

## KibanaRequest.headers property

This property will be removed in future version of this class, please use the `getFilteredHeaders` method instead

<b>Signature:</b>

```typescript
Expand Down
Loading

0 comments on commit fbdc3ad

Please sign in to comment.