Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-xxx-remove-le…
Browse files Browse the repository at this point in the history
…gacy-kibana-plugin
  • Loading branch information
pgayvallet committed Sep 3, 2020
2 parents 8014d60 + d3416c0 commit a784054
Show file tree
Hide file tree
Showing 846 changed files with 21,007 additions and 8,668 deletions.
15 changes: 13 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,19 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services

# Enterprise Search
/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
# Shared
/x-pack/plugins/enterprise_search/ @elastic/enterprise-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
# App Search
/x-pack/plugins/enterprise_search/public/applications/app_search @elastic/app-search-frontend
/x-pack/plugins/enterprise_search/server/routes/app_search @elastic/app-search-frontend
/x-pack/plugins/enterprise_search/server/collectors/app_search @elastic/app-search-frontend
/x-pack/plugins/enterprise_search/server/saved_objects/app_search @elastic/app-search-frontend
# Workplace Search
/x-pack/plugins/enterprise_search/public/applications/workplace_search @elastic/workplace-search-frontend
/x-pack/plugins/enterprise_search/server/routes/workplace_search @elastic/workplace-search-frontend
/x-pack/plugins/enterprise_search/server/collectors/workplace_search @elastic/workplace-search-frontend
/x-pack/plugins/enterprise_search/server/saved_objects/workplace_search @elastic/workplace-search-frontend

# Elasticsearch UI
/src/plugins/dev_tools/ @elastic/es-ui
Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/APM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: APM Issue
about: Issues related to the APM solution in Kibana
labels: Team:apm
title: [APM]
---

**Versions**
Kibana: (if relevant)
APM Server: (if relevant)
Elasticsearch: (if relevant)
7 changes: 7 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
This product includes code in the function applyCubicBezierStyles that was
inspired by a public Codepen, which was available under a "MIT" license.

Copyright (c) 2020 by Guillaume (https://codepen.io/guillaumethomas/pen/xxbbBKO)
MIT License http://www.opensource.org/licenses/mit-license

---
This product includes code that is adapted from mapbox-gl-js, which is
available under a "BSD-3-Clause" license.
Expand Down
31 changes: 0 additions & 31 deletions docs/canvas/canvas-tinymath-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -492,37 +492,6 @@ find the mean by index.
|one or more numbers or arrays of numbers
|===

*Returns*: `number` | `Array.<number>`. The maximum value of all numbers if
`args` contains only numbers. Returns an array with the the maximum values at each
index, including all scalar numbers in `args` in the calculation at each index if
`args` contains at least one array.

*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths

*Example*
[source, js]
------------
max(1, 2, 3) // returns 3
max([10, 20, 30, 40], 15) // returns [15, 20, 30, 40]
max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9]
------------

[float]
=== mean( ...args )

Finds the mean value of one of more numbers/arrays of numbers passed into the function.
If at least one array of numbers is passed into the function, the function will
find the mean by index.

[cols="3*^<"]
|===
|Param |Type |Description

|...args
|number \| Array.<number>
|one or more numbers or arrays of numbers
|===

*Returns*: `number` | `Array.<number>`. The mean value of all numbers if `args`
contains only numbers. Returns an array with the the mean values of each index,
including all scalar numbers in `args` in the calculation at each index if `args`
Expand Down
30 changes: 17 additions & 13 deletions docs/developer/contributing/development-github.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[development-github]]
== How we use git and github
== How we use Git and GitHub

[discrete]
=== Forking
Expand All @@ -12,17 +12,21 @@ repo, which we'll refer to in later code snippets.
[discrete]
=== Branching

* All work on the next major release goes into master.
* Past major release branches are named `{majorVersion}.x`. They contain
work that will go into the next minor release. For example, if the next
minor release is `5.2.0`, work for it should go into the `5.x` branch.
* Past minor release branches are named `{majorVersion}.{minorVersion}`.
They contain work that will go into the next patch release. For example,
if the next patch release is `5.3.1`, work for it should go into the
`5.3` branch.
* All work is done on feature branches and merged into one of these
branches.
* Where appropriate, we'll backport changes into older release branches.
At Elastic, all products in the stack, including Kibana, are released at the same time with the same version number. Most of these projects have the following branching strategy:

* `master` is the next major version.
* `<major>.x` is the next minor version.
* `<major>.<minor>` is the next release of a minor version, including patch releases.

As an example, let's assume that the `7.x` branch is currently a not-yet-released `7.6.0`. Once `7.6.0` has reached feature freeze, it will be branched to `7.6` and `7.x` will be updated to reflect `7.7.0`. The release of `7.6.0` and subsequent patch releases will be cut from the `7.6` branch. At any time, you can verify the current version of a branch by inspecting the `version` attribute in the `package.json` file within the Kibana source.

Pull requests are made into the `master` branch and then backported when it is safe and appropriate.

* Breaking changes do not get backported and only go into `master`.
* All non-breaking changes can be backported to the `<major>.x` branch.
* Features should not be backported to a `<major>.<minor>` branch.
* Bugs can be backported to a `<major>.<minor>` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description.
* Documentation changes can be backported to any branch at any time.

[discrete]
=== Commits and Merging
Expand Down Expand Up @@ -109,4 +113,4 @@ Assuming you've successfully rebased and you're happy with the code, you should
[discrete]
=== Creating a pull request

See <<development-pull-request>> for the next steps on getting your code changes merged into {kib}.
See <<development-pull-request>> for the next steps on getting your code changes merged into {kib}.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export interface AppMountParameters<HistoryLocationState = unknown>
| [element](./kibana-plugin-core-public.appmountparameters.element.md) | <code>HTMLElement</code> | The container element to render the application into. |
| [history](./kibana-plugin-core-public.appmountparameters.history.md) | <code>ScopedHistory&lt;HistoryLocationState&gt;</code> | A scoped history instance for your application. Should be used to wire up your applications Router. |
| [onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) | <code>(handler: AppLeaveHandler) =&gt; void</code> | A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.<!-- -->This will be called either when the user goes to another application, or when trying to close the tab or manually changing the url. |
| [setHeaderActionMenu](./kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md) | <code>(menuMount: MountPoint &#124; undefined) =&gt; void</code> | A function that can be used to set the mount point used to populate the application action container in the chrome header.<!-- -->Calling the handler multiple time will erase the current content of the action menu with the mount from the latest call. Calling the handler with <code>undefined</code> will unmount the current mount point. Calling the handler after the application has been unmounted will have no effect. |

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

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) &gt; [setHeaderActionMenu](./kibana-plugin-core-public.appmountparameters.setheaderactionmenu.md)

## AppMountParameters.setHeaderActionMenu property

A function that can be used to set the mount point used to populate the application action container in the chrome header.

Calling the handler multiple time will erase the current content of the action menu with the mount from the latest call. Calling the handler with `undefined` will unmount the current mount point. Calling the handler after the application has been unmounted will have no effect.

<b>Signature:</b>

```typescript
setHeaderActionMenu: (menuMount: MountPoint | undefined) => void;
```

## Example


```ts
// application.tsx
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';

import { CoreStart, AppMountParameters } from 'src/core/public';
import { MyPluginDepsStart } from './plugin';

export renderApp = ({ element, history, setHeaderActionMenu }: AppMountParameters) => {
const { renderApp } = await import('./application');
const { renderActionMenu } = await import('./action_menu');
setHeaderActionMenu((element) => {
return renderActionMenu(element);
})
return renderApp({ element, history });
}

```

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

```typescript
filter?: string;
filter?: string | KueryNode;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface SavedObjectsFindOptions
| --- | --- | --- |
| [defaultSearchOperator](./kibana-plugin-core-public.savedobjectsfindoptions.defaultsearchoperator.md) | <code>'AND' &#124; 'OR'</code> | |
| [fields](./kibana-plugin-core-public.savedobjectsfindoptions.fields.md) | <code>string[]</code> | An array of fields to include in the results |
| [filter](./kibana-plugin-core-public.savedobjectsfindoptions.filter.md) | <code>string</code> | |
| [filter](./kibana-plugin-core-public.savedobjectsfindoptions.filter.md) | <code>string &#124; KueryNode</code> | |
| [hasReference](./kibana-plugin-core-public.savedobjectsfindoptions.hasreference.md) | <code>{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }</code> | |
| [namespaces](./kibana-plugin-core-public.savedobjectsfindoptions.namespaces.md) | <code>string[]</code> | |
| [page](./kibana-plugin-core-public.savedobjectsfindoptions.page.md) | <code>number</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
filter?: string;
filter?: string | KueryNode;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface SavedObjectsFindOptions
| --- | --- | --- |
| [defaultSearchOperator](./kibana-plugin-core-server.savedobjectsfindoptions.defaultsearchoperator.md) | <code>'AND' &#124; 'OR'</code> | |
| [fields](./kibana-plugin-core-server.savedobjectsfindoptions.fields.md) | <code>string[]</code> | An array of fields to include in the results |
| [filter](./kibana-plugin-core-server.savedobjectsfindoptions.filter.md) | <code>string</code> | |
| [filter](./kibana-plugin-core-server.savedobjectsfindoptions.filter.md) | <code>string &#124; KueryNode</code> | |
| [hasReference](./kibana-plugin-core-server.savedobjectsfindoptions.hasreference.md) | <code>{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }</code> | |
| [namespaces](./kibana-plugin-core-server.savedobjectsfindoptions.namespaces.md) | <code>string[]</code> | |
| [page](./kibana-plugin-core-server.savedobjectsfindoptions.page.md) | <code>number</code> | |
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-core-server](./kibana-plugin-core-server.md) &gt; [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) &gt; [dependencies$](./kibana-plugin-core-server.statusservicesetup.dependencies_.md)

## StatusServiceSetup.dependencies$ property

Current status for all plugins this plugin depends on. Each key of the `Record` is a plugin id.

<b>Signature:</b>

```typescript
dependencies$: Observable<Record<string, ServiceStatus>>;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) &gt; [derivedStatus$](./kibana-plugin-core-server.statusservicesetup.derivedstatus_.md)

## StatusServiceSetup.derivedStatus$ property

The status of this plugin as derived from its dependencies.

<b>Signature:</b>

```typescript
derivedStatus$: Observable<ServiceStatus>;
```

## Remarks

By default, plugins inherit this derived status from their dependencies. Calling overrides this default status.

This may emit multliple times for a single status change event as propagates through the dependency tree

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,73 @@ API for accessing status of Core and this plugin's dependencies as well as for c
export interface StatusServiceSetup
```

## Remarks

By default, a plugin inherits it's current status from the most severe status level of any Core services and any plugins that it depends on. This default status is available on the API.

Plugins may customize their status calculation by calling the API with an Observable. Within this Observable, a plugin may choose to only depend on the status of some of its dependencies, to ignore severe status levels of particular Core services they are not concerned with, or to make its status dependent on other external services.

## Example 1

Customize a plugin's status to only depend on the status of SavedObjects:

```ts
core.status.set(
core.status.core$.pipe(
. map((coreStatus) => {
return coreStatus.savedObjects;
}) ;
);
);

```

## Example 2

Customize a plugin's status to include an external service:

```ts
const externalStatus$ = interval(1000).pipe(
switchMap(async () => {
const resp = await fetch(`https://myexternaldep.com/_healthz`);
const body = await resp.json();
if (body.ok) {
return of({ level: ServiceStatusLevels.available, summary: 'External Service is up'});
} else {
return of({ level: ServiceStatusLevels.available, summary: 'External Service is unavailable'});
}
}),
catchError((error) => {
of({ level: ServiceStatusLevels.unavailable, summary: `External Service is down`, meta: { error }})
})
);

core.status.set(
combineLatest([core.status.derivedStatus$, externalStatus$]).pipe(
map(([derivedStatus, externalStatus]) => {
if (externalStatus.level > derivedStatus) {
return externalStatus;
} else {
return derivedStatus;
}
})
)
);

```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [core$](./kibana-plugin-core-server.statusservicesetup.core_.md) | <code>Observable&lt;CoreStatus&gt;</code> | Current status for all Core services. |
| [dependencies$](./kibana-plugin-core-server.statusservicesetup.dependencies_.md) | <code>Observable&lt;Record&lt;string, ServiceStatus&gt;&gt;</code> | Current status for all plugins this plugin depends on. Each key of the <code>Record</code> is a plugin id. |
| [derivedStatus$](./kibana-plugin-core-server.statusservicesetup.derivedstatus_.md) | <code>Observable&lt;ServiceStatus&gt;</code> | The status of this plugin as derived from its dependencies. |
| [overall$](./kibana-plugin-core-server.statusservicesetup.overall_.md) | <code>Observable&lt;ServiceStatus&gt;</code> | Overall system status for all of Kibana. |

## Methods

| Method | Description |
| --- | --- |
| [set(status$)](./kibana-plugin-core-server.statusservicesetup.set.md) | Allows a plugin to specify a custom status dependent on its own criteria. Completely overrides the default inherited status. |

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

## StatusServiceSetup.set() method

Allows a plugin to specify a custom status dependent on its own criteria. Completely overrides the default inherited status.

<b>Signature:</b>

```typescript
set(status$: Observable<ServiceStatus>): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| status$ | <code>Observable&lt;ServiceStatus&gt;</code> | |

<b>Returns:</b>

`void`

## Remarks

See the [StatusServiceSetup.derivedStatus$](./kibana-plugin-core-server.statusservicesetup.derivedstatus_.md) API for leveraging the default status calculation that is provided by Core.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a784054

Please sign in to comment.