Skip to content

Commit

Permalink
Merge branch 'master' into expand-log-threshold-executor-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Sep 2, 2020
2 parents 2db6153 + febeb47 commit af0979d
Show file tree
Hide file tree
Showing 1,434 changed files with 34,599 additions and 66,789 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ target
/x-pack/legacy/plugins/maps/public/vendor/**

# package overrides
/packages/eslint-config-kibana
/packages/elastic-eslint-config-kibana
/packages/kbn-interpreter/src/common/lib/grammar.js
/packages/kbn-plugin-generator/template
/packages/kbn-pm/dist
Expand Down
24 changes: 1 addition & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/plugins/es_ui_shared/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/kibana_react/**/*.{js,mjs,ts,tsx}'],
rules: {
Expand All @@ -125,25 +119,12 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},
{
files: ['x-pack/legacy/plugins/index_management/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},

/**
* Files that require Apache 2.0 headers, settings
Expand Down Expand Up @@ -296,10 +277,7 @@ module.exports = {
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
},
{
target: [
'(src|x-pack)/plugins/*/server/**/*',
'!x-pack/plugins/apm/**/*', // https://github.com/elastic/kibana/issues/67210
],
target: ['(src|x-pack)/plugins/*/server/**/*'],
from: ['(src|x-pack)/plugins/*/public/**/*'],
errorMessage: `Server code can not import from public, use a common directory.`,
},
Expand Down
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
/x-pack/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/plugins/observability/ @elastic/observability-ui
/x-pack/legacy/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/uptime @elastic/uptime

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)
6 changes: 2 additions & 4 deletions docs/api/using-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ For all APIs, you must use a request header. The {kib} APIs support the `kbn-xsr
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:

* The API endpoint uses the `GET` or `HEAD` operations

* The path is whitelisted using the <<settings, `server.xsrf.whitelist`>> setting

* XSRF protections are disabled using the `server.xsrf.disableProtection` setting
* The path is whitelisted using the <<settings-xsrf-whitelist, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting

`Content-Type: application/json`::
Applicable only when you send a payload in the API request. {kib} API requests and responses use JSON.
Expand Down
4 changes: 2 additions & 2 deletions docs/apm/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ users interacting with APM APIs must have <<apm-app-api-user,sufficient privileg
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:

* The API endpoint uses the `GET` or `HEAD` operations
* The path is whitelisted using the <<settings, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the `server.xsrf.disableProtection` setting
* The path is whitelisted using the <<settings-xsrf-whitelist, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting

`Content-Type: application/json`::
Applicable only when you send a payload in the API request.
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}.
2 changes: 1 addition & 1 deletion docs/developer/getting-started/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ you can switch to the correct version when using nvm by running:
nvm use
----

Install the latest version of https://yarnpkg.com[yarn].
Install the latest version of https://classic.yarnpkg.com/en/docs/install[yarn v1].

Bootstrap {kib} and install all the dependencies:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you’re installing dependencies and seeing an error that looks
something like

....
Unsupported URL Type: link:packages/eslint-config-kibana
Unsupported URL Type: link:packages/elastic-eslint-config-kibana
....

you’re likely running `npm`. To install dependencies in {kib} you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To get started copy and paste this example to `test/functional/config.js`:
["source","js"]
-----------
import { resolve } from 'path';
import { resolveKibanaPath } from '@kbn/plugin-helpers';
import { REPO_ROOT } from '@kbn/dev-utils';
import { MyServiceProvider } from './services/my_service';
import { MyAppPageProvider } from './services/my_app_page';
Expand All @@ -24,7 +24,7 @@ export default async function ({ readConfigFile }) {
// read the {kib} config file so that we can utilize some of
// its services and PageObjects
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
const kibanaConfig = await readConfigFile(resolve(REPO_ROOT, 'test/functional/config.js'));
return {
// list paths to the files that contain your plugins tests
Expand Down
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

Loading

0 comments on commit af0979d

Please sign in to comment.