Skip to content

Commit 7ff15d3

Browse files
Merge branch 'master' into fix/value_popover
2 parents c4ec1ff + 6ee7955 commit 7ff15d3

2,658 files changed

Lines changed: 69412 additions & 33261 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,18 @@ module.exports = {
857857
'react-hooks/exhaustive-deps': ['error', { additionalHooks: '^useFetcher$' }],
858858
},
859859
},
860+
{
861+
files: ['x-pack/plugins/apm/**/*.stories.*', 'x-pack/plugins/observability/**/*.stories.*'],
862+
rules: {
863+
'react/function-component-definition': [
864+
'off',
865+
{
866+
namedComponents: 'function-declaration',
867+
unnamedComponents: 'arrow-function',
868+
},
869+
],
870+
},
871+
},
860872

861873
/**
862874
* Fleet overrides

NOTICE.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ SOFTWARE.
149149

150150
---
151151
Detection Rules
152-
Copyright 2020 Elasticsearch B.V.
152+
Copyright 2021 Elasticsearch B.V.
153153

154154
---
155155
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
156-
which is available under a "MIT" license. The files based on this license are:
156+
which is available under a "MIT" license. The rules based on this license are:
157157

158-
- defense_evasion_via_filter_manager
159-
- discovery_process_discovery_via_tasklist_command
160-
- persistence_priv_escalation_via_accessibility_features
161-
- persistence_via_application_shimming
162-
- defense_evasion_execution_via_trusted_developer_utilities
158+
- "Potential Evasion via Filter Manager" (06dceabf-adca-48af-ac79-ffdf4c3b1e9a)
159+
- "Process Discovery via Tasklist" (cc16f774-59f9-462d-8b98-d27ccd4519ec)
160+
- "Potential Modification of Accessibility Binaries" (7405ddf1-6c8e-41ce-818f-48bea6bcaed8)
161+
- "Potential Application Shimming via Sdbinst" (fd4a992d-6130-4802-9ff8-829b89ae801f)
162+
- "Trusted Developer Application Usage" (9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae1)
163163

164164
MIT License
165165

@@ -185,9 +185,9 @@ SOFTWARE.
185185

186186
---
187187
This product bundles rules based on https://github.com/FSecureLABS/leonidas
188-
which is available under a "MIT" license. The files based on this license are:
188+
which is available under a "MIT" license. The rules based on this license are:
189189

190-
- credential_access_secretsmanager_getsecretvalue.toml
190+
- "AWS Access Secret in Secrets Manager" (a00681e3-9ed6-447c-ab2c-be648821c622)
191191

192192
MIT License
193193

@@ -235,6 +235,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
235235
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
236236
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
237237

238+
---
239+
Portions of this code are licensed under the following license:
240+
For license information please see https://edge.fullstory.com/s/fs.js.LICENSE.txt
241+
238242
---
239243
This product bundles bootstrap@3.3.6 which is available under a
240244
"MIT" license.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
id: kibDevTutorialSetupDevEnv
3+
slug: /kibana-dev-docs/tutorial/setup-dev-env
4+
title: Setting up a Development Environment
5+
summary: Learn how to setup a development environemnt for contributing to the Kibana repository
6+
date: 2021-04-26
7+
tags: ['kibana', 'onboarding', 'dev', 'architecture', 'setup']
8+
---
9+
10+
Setting up a development environment is pretty easy.
11+
12+
<DocCallOut title="A note about Windows">
13+
In order to support Windows development we currently require you to use one of the following:
14+
15+
- [Git Bash](https://git-scm.com/download/win)
16+
- [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about)
17+
18+
19+
Before running the steps below, please make sure you have installed [Visual C++ Redistributable for Visual Studio 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48145) and that you are running all commands in either Git Bash or WSL.
20+
</DocCallOut>
21+
22+
## Get the code
23+
24+
Start by forking [the Kibana repository](https://github.com/elastic/kibana) on Github so that you have a place to stage pull requests and create branches for development.
25+
26+
Then clone the repository to your machine:
27+
28+
```sh
29+
git clone https://github.com/[YOUR_USERNAME]/kibana.git kibana
30+
cd kibana
31+
```
32+
33+
## Install dependencies
34+
35+
Install the version of Node.js listed in the `.node-version` file. This can be automated with tools such as [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows). As we also include a `.nvmrc` file you can switch to the correct version when using nvm by running:
36+
37+
```sh
38+
nvm use
39+
```
40+
41+
Then, install the latest version of yarn using:
42+
43+
```sh
44+
npm install -g yarn
45+
```
46+
47+
Finally, boostrap Kibana and install all of the remaining dependencies:
48+
49+
```sh
50+
yarn kbn bootstrap
51+
```
52+
53+
Node.js native modules could be in use and node-gyp is the tool used to build them. There are tools you need to install per platform and python versions you need to be using. Please follow the [node-gyp installation steps](https://github.com/nodejs/node-gyp#installation) for your platform.
54+
55+
## Run Elasticsearch
56+
57+
In order to start Kibana you need to run a local version of Elasticsearch. You can startup and initialize the latest Elasticsearch snapshot of the correct version for Kibana by running the following in a new terminal tab/window:
58+
59+
```sh
60+
yarn es snapshot
61+
```
62+
63+
You can pass `--license trial` to start Elasticsearch with a trial license, or use the Kibana UI to switch the local version to a trial version which includes all features.
64+
65+
Read about more options for [Running Elasticsearch during development](https://www.elastic.co/guide/en/kibana/current/running-elasticsearch.html), like connecting to a remote host, running from source, preserving data inbetween runs, running remote cluster, etc.
66+
67+
## Run Kibana
68+
69+
In another terminal tab/window you can start Kibana.
70+
71+
```sh
72+
yarn start
73+
```
74+
75+
If you include the `--run-examples` flag then all of the [developer examples](https://github.com/elastic/kibana/tree/{branch}/examples). Read more about the advanced options for [Running Kibana](https://www.elastic.co/guide/en/kibana/current/running-kibana-advanced.html).
76+
77+
## Code away!
78+
79+
You are now ready to start developing. Changes to the source files should be picked up automatically and either cause the server to restart, or be served to the browser on the next page refresh.
80+
81+
## Install pre-commit hook (optional)
82+
83+
In case you want to run a couple of checks like linting or check the file casing of the files to commit, we provide a way to install a pre-commit hook. To configure it you just need to run the following:
84+
85+
```sh
86+
node scripts/register_git_hook
87+
```
88+
89+
After the script completes the pre-commit hook will be created within the file `.git/hooks/pre-commit`. If you choose to not install it, don’t worry, we still run a quick CI check to provide feedback earliest as we can about the same checks.

docs/api/alerting/legacy/list.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ The API returns the following:
8080
},
8181
"producer":"stackAlerts",
8282
"minimumLicenseRequired":"basic",
83+
"isExportable":true,
8384
"enabledInLicense":true,
8485
"authorizedConsumers":{
8586
"alerts":{
@@ -113,6 +114,9 @@ Each alert type contains the following properties:
113114
| `minimumLicenseRequired`
114115
| The license required to use the alert type.
115116

117+
| `isExportable`
118+
| Whether the rule type is exportable through the Saved Objects Management UI.
119+
116120
| `enabledInLicense`
117121
| Whether the alert type is enabled or disabled based on the license.
118122

docs/api/alerting/list_rule_types.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The API returns the following:
8282
},
8383
"producer":"stackAlerts",
8484
"minimum_license_required":"basic",
85+
"is_exportable":true,
8586
"enabled_in_license":true,
8687
"authorized_consumers":{
8788
"alerts":{
@@ -115,6 +116,9 @@ Each rule type contains the following properties:
115116
| `minimum_license_required`
116117
| The license required to use the rule type.
117118

119+
| `is_exportable`
120+
| Whether the rule type is exportable through the Saved Objects Management UI.
121+
118122
| `enabled_in_license`
119123
| Whether the rule type is enabled or disabled based on the license.
120124

docs/api/task-manager/health.asciidoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
[[task-manager-api-health]]
2-
=== Get Task Manager health API
2+
== Task Manager health API
33
++++
44
<titleabbrev>Get Task Manager health</titleabbrev>
55
++++
66

77
Retrieve the health status of the {kib} Task Manager.
88

9+
[float]
910
[[task-manager-api-health-request]]
10-
==== Request
11+
=== Request
1112

1213
`GET <kibana host>:<port>/api/task_manager/_health`
1314

15+
[float]
1416
[[task-manager-api-health-codes]]
15-
==== Response code
17+
=== Response code
1618

1719
`200`::
1820
Indicates a successful call.
1921

22+
[float]
2023
[[task-manager-api-health-example]]
21-
==== Example
24+
=== Example
2225

2326
Retrieve the health status of the {kib} Task Manager:
2427

docs/developer/best-practices/navigation.asciidoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,26 @@ console.log(discoverUrl); // http://localhost:5601/bpr/s/space/app/discover
4747
const discoverUrlWithSomeState = core.http.basePath.prepend(`/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-10T11:39:50.203Z',to:'2020-09-10T11:40:20.249Z'))&_a=(columns:!(_source),filters:!(),index:'90943e30-9a47-11e8-b64d-95841ca0b247',interval:auto,query:(language:kuery,query:''),sort:!())`);
4848
----
4949

50-
Instead, each app should expose {kib-repo}tree/{branch}/src/plugins/share/public/url_generators/README.md[a URL generator].
51-
Other apps should use those URL generators for creating URLs.
50+
Instead, each app should expose {kib-repo}tree/{branch}/src/plugins/share/common/url_service/locators/README.md[a locator].
51+
Other apps should use those locators for navigation or URL creation.
5252

5353
[source,typescript jsx]
5454
----
55-
// Properly generated URL to *Discover* app. Generator code is owned by *Discover* app and available on *Discover*'s plugin contract.
56-
const discoverUrl = discoverUrlGenerator.createUrl({filters, timeRange});
55+
// Properly generated URL to *Discover* app. Locator code is owned by *Discover* app and available on *Discover*'s plugin contract.
56+
const discoverUrl = await plugins.discover.locator.getUrl({filters, timeRange});
57+
// or directly execute navigation
58+
await plugins.discover.locator.navigate({filters, timeRange});
5759
----
5860

59-
To get a better idea, take a look at *Discover* URL generator {kib-repo}tree/{branch}/src/plugins/discover/public/url_generator.ts[implementation].
61+
To get a better idea, take a look at *Discover* locator {kib-repo}tree/{branch}/src/plugins/discover/public/locator.ts[implementation].
6062
It allows specifying various **Discover** app state pieces like: index pattern, filters, query, time range and more.
6163

62-
There are two ways to access other's app URL generator in your code:
64+
There are two ways to access locators of other apps:
6365

6466
1. From a plugin contract of a destination app *(preferred)*.
65-
2. Using URL generator service instance on `share` plugin contract (in case an explicit plugin dependency is not possible).
67+
2. Using locator client in `share` plugin (case an explicit plugin dependency is not possible).
6668

67-
In case you want other apps to link to your app, then you should create a URL generator and expose it on your plugin's contract.
69+
In case you want other apps to link to your app, then you should create a locator and expose it on your plugin's contract.
6870

6971

7072
[[navigating-between-kibana-apps]]

docs/developer/getting-started/monorepo-packages.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ yarn kbn watch-bazel
7070
- @kbn/apm-utils
7171
- @kbn/babel-code-parser
7272
- @kbn/babel-preset
73+
- @kbn/cli-dev-mode
7374
- @kbn/config
7475
- @kbn/config-schema
7576
- @kbn/crypto
@@ -87,6 +88,7 @@ yarn kbn watch-bazel
8788
- @kbn/mapbox-gl
8889
- @kbn/monaco
8990
- @kbn/optimizer
91+
- @kbn/plugin-helpers
9092
- @kbn/rule-data-utils
9193
- @kbn/securitysolution-es-utils
9294
- @kbn/securitysolution-hook-utils
@@ -101,9 +103,11 @@ yarn kbn watch-bazel
101103
- @kbn/securitysolution-utils
102104
- @kbn/server-http-tools
103105
- @kbn/server-route-repository
106+
- @kbn/spec-to-console
104107
- @kbn/std
105108
- @kbn/storybook
106109
- @kbn/telemetry-utils
110+
- @kbn/test-subj-selector
107111
- @kbn/tinymath
108112
- @kbn/ui-framework
109113
- @kbn/ui-shared-deps

docs/developer/plugin-list.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ so they can properly protect the data within their clusters.
191191
192192
193193
|{kib-repo}blob/{branch}/src/plugins/share/README.md[share]
194-
|Replaces the legacy ui/share module for registering share context menus.
194+
|The share plugin contains various utilities for displaying sharing context menu,
195+
generating deep links to other apps, and creating short URLs.
195196
196197
197198
|{kib-repo}blob/{branch}/src/plugins/spaces_oss/README.md[spacesOss]

docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
```typescript
1010
readonly links: {
11+
readonly settings: string;
1112
readonly canvas: {
1213
readonly guide: string;
1314
};

0 commit comments

Comments
 (0)