Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Dec 13, 2019
2 parents 397d241 + dbec0b1 commit a75a500
Show file tree
Hide file tree
Showing 1,188 changed files with 24,013 additions and 13,275 deletions.
6 changes: 0 additions & 6 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
22 changes: 13 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,19 @@
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security

# Kibana Stack Services
/src/dev/i18n @elastic/kibana-stack-services
/packages/kbn-analytics/ @elastic/kibana-stack-services
/src/legacy/core_plugins/ui_metric/ @elastic/kibana-stack-services
/src/plugins/usage_collection/ @elastic/kibana-stack-services
/x-pack/legacy/plugins/telemetry @elastic/kibana-stack-services
/x-pack/legacy/plugins/alerting @elastic/kibana-stack-services
/x-pack/legacy/plugins/actions @elastic/kibana-stack-services
/x-pack/legacy/plugins/task_manager @elastic/kibana-stack-services
# Kibana Localization
/src/dev/i18n @elastic/kibana-localization

# Pulse
/packages/kbn-analytics/ @elastic/pulse
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
/src/plugins/usage_collection/ @elastic/pulse
/x-pack/legacy/plugins/telemetry @elastic/pulse

# Kibana Alerting Services
/x-pack/legacy/plugins/alerting @elastic/kibana-alerting-services
/x-pack/legacy/plugins/actions @elastic/kibana-alerting-services
/x-pack/legacy/plugins/task_manager @elastic/kibana-alerting-services

# Design
**/*.scss @elastic/kibana-design
Expand Down
13 changes: 0 additions & 13 deletions .github/labeler.yml

This file was deleted.

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
34 changes: 20 additions & 14 deletions config/apm.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,22 @@ const { join } = require('path');
const { execSync } = require('child_process');
const merge = require('lodash.merge');

module.exports = merge({
active: false,
serverUrl: 'https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io:443',
// The secretToken below is intended to be hardcoded in this file even though
// it makes it public. This is not a security/privacy issue. Normally we'd
// instead disable the need for a secretToken in the APM Server config where
// the data is transmitted to, but due to how it's being hosted, it's easier,
// for now, to simply leave it in.
secretToken: 'R0Gjg46pE9K9wGestd',
globalLabels: {},
centralConfig: false,
logUncaughtExceptions: true
}, devConfig());
module.exports = merge(
{
active: false,
serverUrl: 'https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io:443',
// The secretToken below is intended to be hardcoded in this file even though
// it makes it public. This is not a security/privacy issue. Normally we'd
// instead disable the need for a secretToken in the APM Server config where
// the data is transmitted to, but due to how it's being hosted, it's easier,
// for now, to simply leave it in.
secretToken: 'R0Gjg46pE9K9wGestd',
globalLabels: {},
centralConfig: false,
logUncaughtExceptions: true,
},
devConfig()
);

const rev = gitRev();
if (rev !== null) module.exports.globalLabels.git_rev = rev;
Expand All @@ -66,7 +69,10 @@ try {

function gitRev() {
try {
return execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
return execSync('git rev-parse --short HEAD', {
encoding: 'utf-8',
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
} catch (e) {
return null;
}
Expand Down
2 changes: 2 additions & 0 deletions config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@
# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English - en , by default , Chinese - zh-CN .
#i18n.locale: "en"

ui_metric.enabled: false
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.
2 changes: 1 addition & 1 deletion docs/development/core/public/kibana-plugin-public.app.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export interface App extends AppBase
| Property | Type | Description |
| --- | --- | --- |
| [chromeless](./kibana-plugin-public.app.chromeless.md) | <code>boolean</code> | Hide the UI chrome when the application is mounted. Defaults to <code>false</code>. Takes precedence over chrome service visibility settings. |
| [mount](./kibana-plugin-public.app.mount.md) | <code>(context: AppMountContext, params: AppMountParameters) =&gt; AppUnmount &#124; Promise&lt;AppUnmount&gt;</code> | A mount function called when the user navigates to this app's route. |
| [mount](./kibana-plugin-public.app.mount.md) | <code>AppMount &#124; AppMountDeprecated</code> | A mount function called when the user navigates to this app's route. May have signature of [AppMount](./kibana-plugin-public.appmount.md) or [AppMountDeprecated](./kibana-plugin-public.appmountdeprecated.md)<!-- -->. |
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

## App.mount property

A mount function called when the user navigates to this app's route.
A mount function called when the user navigates to this app's route. May have signature of [AppMount](./kibana-plugin-public.appmount.md) or [AppMountDeprecated](./kibana-plugin-public.appmountdeprecated.md)<!-- -->.

<b>Signature:</b>

```typescript
mount: (context: AppMountContext, params: AppMountParameters) => AppUnmount | Promise<AppUnmount>;
mount: AppMount | AppMountDeprecated;
```

## Remarks

When function has two arguments, it will be called with a [context](./kibana-plugin-public.appmountcontext.md) as the first argument. This behavior is \*\*deprecated\*\*, and consumers should instead use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->.

Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface ApplicationSetup
| Method | Description |
| --- | --- |
| [register(app)](./kibana-plugin-public.applicationsetup.register.md) | Register an mountable application to the system. |
| [registerMountContext(contextName, provider)](./kibana-plugin-public.applicationsetup.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. |
| [registerMountContext(contextName, provider)](./kibana-plugin-public.applicationsetup.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@

## ApplicationSetup.registerMountContext() method

Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context.
> Warning: This API is now obsolete.
>
>
Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->.

<b>Signature:</b>

```typescript
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<App['mount'], T>): void;
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountDeprecated, T>): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| contextName | <code>T</code> | The key of [AppMountContext](./kibana-plugin-public.appmountcontext.md) this provider's return value should be attached to. |
| provider | <code>IContextProvider&lt;App['mount'], T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
| provider | <code>IContextProvider&lt;AppMountDeprecated, T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ export interface ApplicationStart
| --- | --- |
| [getUrlForApp(appId, options)](./kibana-plugin-public.applicationstart.geturlforapp.md) | Returns a relative URL to a given app, including the global base path. |
| [navigateToApp(appId, options)](./kibana-plugin-public.applicationstart.navigatetoapp.md) | Navigiate to a given app |
| [registerMountContext(contextName, provider)](./kibana-plugin-public.applicationstart.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. |
| [registerMountContext(contextName, provider)](./kibana-plugin-public.applicationstart.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@

## ApplicationStart.registerMountContext() method

Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context.
> Warning: This API is now obsolete.
>
>
Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->.

<b>Signature:</b>

```typescript
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<App['mount'], T>): void;
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountDeprecated, T>): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| contextName | <code>T</code> | The key of [AppMountContext](./kibana-plugin-public.appmountcontext.md) this provider's return value should be attached to. |
| provider | <code>IContextProvider&lt;App['mount'], T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
| provider | <code>IContextProvider&lt;AppMountDeprecated, T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
<b>Returns:</b>
Expand Down
13 changes: 13 additions & 0 deletions docs/development/core/public/kibana-plugin-public.appmount.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; [AppMount](./kibana-plugin-public.appmount.md)

## AppMount type

A mount function called when the user navigates to this app's route.

<b>Signature:</b>

```typescript
export declare type AppMount = (params: AppMountParameters) => AppUnmount | Promise<AppUnmount>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

## AppMountContext interface

The context object received when applications are mounted to the DOM.
> Warning: This API is now obsolete.
>
>
The context object received when applications are mounted to the DOM. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->.

<b>Signature:</b>

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

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

## AppMountDeprecated type

> Warning: This API is now obsolete.
>
>
A mount function called when the user navigates to this app's route.

<b>Signature:</b>

```typescript
export declare type AppMountDeprecated = (context: AppMountContext, params: AppMountParameters) => AppUnmount | Promise<AppUnmount>;
```

## Remarks

When function has two arguments, it will be called with a [context](./kibana-plugin-public.appmountcontext.md) as the first argument. This behavior is \*\*deprecated\*\*, and consumers should instead use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->.

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

## CoreSetup.context property

> Warning: This API is now obsolete.
>
>
[ContextSetup](./kibana-plugin-public.contextsetup.md)

<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [CoreSetup](./kibana-plugin-public.coresetup.md) &gt; [getStartServices](./kibana-plugin-public.coresetup.getstartservices.md)

## CoreSetup.getStartServices() method

Allows plugins to get access to APIs available in start inside async handlers, such as [App.mount](./kibana-plugin-public.app.mount.md)<!-- -->. Promise will not resolve until Core and plugin dependencies have completed `start`<!-- -->.

<b>Signature:</b>

```typescript
getStartServices(): Promise<[CoreStart, TPluginsStart]>;
```
<b>Returns:</b>

`Promise<[CoreStart, TPluginsStart]>`

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Core services exposed to the `Plugin` setup lifecycle
<b>Signature:</b>

```typescript
export interface CoreSetup
export interface CoreSetup<TPluginsStart extends object = object>
```

## Properties
Expand All @@ -24,3 +24,9 @@ export interface CoreSetup
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) |
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>IUiSettingsClient</code> | [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) |

## Methods

| Method | Description |
| --- | --- |
| [getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md) | Allows plugins to get access to APIs available in start inside async handlers, such as [App.mount](./kibana-plugin-public.app.mount.md)<!-- -->. Promise will not resolve until Core and plugin dependencies have completed <code>start</code>. |

12 changes: 0 additions & 12 deletions docs/development/core/public/kibana-plugin-public.httpbody.md

This file was deleted.

Loading

0 comments on commit a75a500

Please sign in to comment.