-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ad_hoc_enrichment_ui
Conflicts: x-pack/plugins/security_solution/cypress/integration/detection_rules/indicator_match_rule.spec.ts
- Loading branch information
Showing
1,067 changed files
with
27,666 additions
and
10,047 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
id: kibDevTutorialSetupDevEnv | ||
slug: /kibana-dev-docs/tutorial/setup-dev-env | ||
title: Setting up a Development Environment | ||
summary: Learn how to setup a development environemnt for contributing to the Kibana repository | ||
date: 2021-04-26 | ||
tags: ['kibana', 'onboarding', 'dev', 'architecture', 'setup'] | ||
--- | ||
|
||
Setting up a development environment is pretty easy. | ||
|
||
<DocCallOut title="A note about Windows"> | ||
In order to support Windows development we currently require you to use one of the following: | ||
|
||
- [Git Bash](https://git-scm.com/download/win) | ||
- [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about) | ||
|
||
|
||
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. | ||
</DocCallOut> | ||
|
||
## Get the code | ||
|
||
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. | ||
|
||
Then clone the repository to your machine: | ||
|
||
```sh | ||
git clone https://github.com/[YOUR_USERNAME]/kibana.git kibana | ||
cd kibana | ||
``` | ||
|
||
## Install dependencies | ||
|
||
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: | ||
|
||
```sh | ||
nvm use | ||
``` | ||
|
||
Then, install the latest version of yarn using: | ||
|
||
```sh | ||
npm install -g yarn | ||
``` | ||
|
||
Finally, boostrap Kibana and install all of the remaining dependencies: | ||
|
||
```sh | ||
yarn kbn bootstrap | ||
``` | ||
|
||
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. | ||
|
||
## Run Elasticsearch | ||
|
||
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: | ||
|
||
```sh | ||
yarn es snapshot | ||
``` | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Run Kibana | ||
|
||
In another terminal tab/window you can start Kibana. | ||
|
||
```sh | ||
yarn start | ||
``` | ||
|
||
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). | ||
|
||
## Code away! | ||
|
||
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. | ||
|
||
## Install pre-commit hook (optional) | ||
|
||
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: | ||
|
||
```sh | ||
node scripts/register_git_hook | ||
``` | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ore/public/kibana-plugin-core-public.resolvedsimplesavedobject.aliastargetid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) > [aliasTargetId](./kibana-plugin-core-public.resolvedsimplesavedobject.aliastargetid.md) | ||
|
||
## ResolvedSimpleSavedObject.aliasTargetId property | ||
|
||
The ID of the object that the legacy URL alias points to. This is only defined when the outcome is `'aliasMatch'` or `'conflict'`<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
aliasTargetId?: SavedObjectsResolveResponse['aliasTargetId']; | ||
``` |
22 changes: 22 additions & 0 deletions
22
.../development/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) | ||
|
||
## ResolvedSimpleSavedObject interface | ||
|
||
This interface is a very simple wrapper for SavedObjects resolved from the server with the [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface ResolvedSimpleSavedObject<T = unknown> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [aliasTargetId](./kibana-plugin-core-public.resolvedsimplesavedobject.aliastargetid.md) | <code>SavedObjectsResolveResponse['aliasTargetId']</code> | The ID of the object that the legacy URL alias points to. This is only defined when the outcome is <code>'aliasMatch'</code> or <code>'conflict'</code>. | | ||
| [outcome](./kibana-plugin-core-public.resolvedsimplesavedobject.outcome.md) | <code>SavedObjectsResolveResponse['outcome']</code> | The outcome for a successful <code>resolve</code> call is one of the following values:<!-- -->\* <code>'exactMatch'</code> -- One document exactly matched the given ID. \* <code>'aliasMatch'</code> -- One document with a legacy URL alias matched the given ID; in this case the <code>saved_object.id</code> field is different than the given ID. \* <code>'conflict'</code> -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the <code>saved_object</code> object is the exact match, and the <code>saved_object.id</code> field is the same as the given ID. | | ||
| [savedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.savedobject.md) | <code>SimpleSavedObject<T></code> | The saved object that was found. | | ||
|
15 changes: 15 additions & 0 deletions
15
...ment/core/public/kibana-plugin-core-public.resolvedsimplesavedobject.outcome.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) > [outcome](./kibana-plugin-core-public.resolvedsimplesavedobject.outcome.md) | ||
|
||
## ResolvedSimpleSavedObject.outcome property | ||
|
||
The outcome for a successful `resolve` call is one of the following values: | ||
|
||
\* `'exactMatch'` -- One document exactly matched the given ID. \* `'aliasMatch'` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different than the given ID. \* `'conflict'` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
outcome: SavedObjectsResolveResponse['outcome']; | ||
``` |
13 changes: 13 additions & 0 deletions
13
.../core/public/kibana-plugin-core-public.resolvedsimplesavedobject.savedobject.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) > [savedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.savedobject.md) | ||
|
||
## ResolvedSimpleSavedObject.savedObject property | ||
|
||
The saved object that was found. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
savedObject: SimpleSavedObject<T>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...development/core/public/kibana-plugin-core-public.savedobjectsclient.resolve.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md) > [resolve](./kibana-plugin-core-public.savedobjectsclient.resolve.md) | ||
|
||
## SavedObjectsClient.resolve property | ||
|
||
Resolves a single object | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
resolve: <T = unknown>(type: string, id: string) => Promise<ResolvedSimpleSavedObject<T>>; | ||
``` |
Oops, something went wrong.