Skip to content

Commit

Permalink
Merge branch 'master' into refactorSearchSource
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Oct 14, 2019
2 parents 0d7c97d + c87b761 commit 54f0a98
Show file tree
Hide file tree
Showing 2,434 changed files with 405,605 additions and 57,784 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
/x-pack/test/functional/services/ml.ts @elastic/ml-ui
/x-pack/legacy/plugins/transform/ @elastic/ml-ui

# Operations
/renovate.json5 @elastic/kibana-operations
Expand All @@ -45,7 +46,6 @@
# Platform
/src/core/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/ui/public/saved_objects @elastic/kibana-platform
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform

Expand All @@ -55,6 +55,7 @@
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
/src/legacy/server/csp/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security

# Kibana Stack Services
/packages/kbn-analytics/ @elastic/kibana-stack-services
Expand Down
3 changes: 3 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ files:
- 'x-pack/legacy/plugins/rollup/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/canvas/**/*.s+(a|c)ss'
ignore:
- 'x-pack/legacy/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/lens/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
rules:
quotes:
- 2
Expand Down
22 changes: 16 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,27 @@ IntelliJ | Settings » Languages & Frameworks » JavaScript » Code Quality To

Another tool we use for enforcing consistent coding style is EditorConfig, which can be set up by installing a plugin in your editor that dynamically updates its configuration. Take a look at the [EditorConfig](http://editorconfig.org/#download) site to find a plugin for your editor, and browse our [`.editorconfig`](https://github.com/elastic/kibana/blob/master/.editorconfig) file to see what config rules we set up.

#### Setup Guide for VS Code Users

Note that for VSCode, to enable "live" linting of TypeScript (and other) file types, you will need to modify your local settings, as shown below. The default for the ESLint extension is to only lint JavaScript file types.

```json
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
]
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
]
```

`eslint` can automatically fix trivial lint errors when you save a file by adding this line in your setting.

```json
"eslint.autoFixOnSave": true,
```

It is **not** recommended to use `prettier` plugin on Kibana project. Because settings are in `eslintrc.js` file and it is applied to too many files that shouldn't be prettier-ized.

### Internationalization

All user-facing labels and info texts in Kibana should be internationalized. Please take a look at the [readme](packages/kbn-i18n/README.md) and the [guideline](packages/kbn-i18n/GUIDELINE.md) of the i18n package on how to do so.
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,6 @@ def buildXpack() {
def runErrorReporter() {
bash """
source src/dev/ci_setup/setup_env.sh
node src/dev/failed_tests/cli
node scripts/report_failed_tests
"""
}
2 changes: 1 addition & 1 deletion docs/api/spaces-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Manage your {kib} spaces.
* <<spaces-api-get-all, Get all {kib} spaces API>>
* <<spaces-api-delete, Delete space API>>
* <<spaces-api-copy-saved-objects, Copy saved objects to space API>>
*<<spaces-api-resolve-copy-saved-objects-conflicts , Resolve copy saved objects to space conflicts API>>
* <<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects to space conflicts API>>

include::spaces-management/post.asciidoc[]
include::spaces-management/put.asciidoc[]
Expand Down
44 changes: 44 additions & 0 deletions docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[[troubleshooting]]
=== Troubleshooting common problems

If you have something to add to this section, please consider creating a pull request with
your proposed changes at https://github.com/elastic/kibana.

Also check out the https://discuss.elastic.co/c/apm[APM discussion forum].

==== No APM data found

This section can help with any of the following:

* Data isn't displaying in the APM app
* You're seeing a message like "No Services Found",
* You're seeing errors like "Fielddata is disabled on text fields by default..."

There are a number of factors that could be at play here.
One important thing to double-check first is your index template.

An APM index template must exist for the APM app to work correctly.
By default, this index template is created by APM Server on startup.
However, this only happens if `setup.template.enabled` is `true` in `apm-server.yml`.
You can create the index template manually by running `apm-server setup`.
Take note that index templates *cannot* be applied retroactively -- they are only applied at index creation time.
More information is available in {apm-server-ref}/apm-server-configuration.html[Set up and configure].

You can check for the existence of an APM index template using the
{ref}/indices-get-template.html[Get index template API].
If you're using the default index naming pattern, that request would be:

[source,js]
--------------------------------------------------
GET /_template/apm-{version}
--------------------------------------------------
// CONSOLE

If you're not outputting data directly from APM Server to Elasticsearch (perhaps you're using Logstash or Kafka),
then the index template will not be set up automatically. Instead, you'll need to
{apm-server-ref}/_manually_loading_template_configuration.html#load-template-manually-alternate[load the template manually].

Finally, this problem can also occur if you've changed the index name that you write APM data to.
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].
2 changes: 2 additions & 0 deletions docs/apm/using-the-apm-ui.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ include::metrics.asciidoc[]
include::agent-configuration.asciidoc[]

include::advanced-queries.asciidoc[]

include::troubleshooting.asciidoc[]
3 changes: 2 additions & 1 deletion docs/code/code-install-lang-server.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[[code-install-lang-server]]
== Install language server

*Code* comes with built-in language support for TypeScript. You can install additional languages as a {kib} plugin.
*Code* comes with built-in language support for TypeScript. You can install additional languages as a {kib} plugin. Plugin's reduce the distribution size to run Code inside {kib}. Install only the languages needed for your indexed repositories.

[role="screenshot"]
image::images/code-lang-server-tab.png[]

For the current version, *Code* supports the following languages in addition to TypeScript:

* `Java`
* `GO`

You can check the status of the language servers and get installation instructions on the *Language Servers* tab. Make sure the status of the language server is `INSTALLED` or `RUNNING` after you restart the {kib} instance.
[role="screenshot"]
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/plugin/development-plugin-resources.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ node scripts/generate_plugin my_plugin_name # replace "my_plugin_name" with your
The Kibana directory must be named `kibana`, and your plugin directory should be located in the root of `kibana` in a `plugins` directory, for example:

["source","shell"]
-----------
----
.
└── kibana
└── plugins
├── foo-plugin
└── bar-plugin
--------
----

[float]
==== References in the code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The list of common parameters:
- *responseHandler*: <string> one of the available response handlers or a <function> for a custom response handler
- *editor*: <string> one of the available editors or Editor class for custom one
- *editorConfig*: object holding editor parameters
- *options.showTimePicker*: <bool> show or hide time picker (defaults to true)
- *options.showTimePicker*: <bool> show or hide time filter (defaults to true)
- *options.showQueryBar*: <bool> show or hide query bar (defaults to true)
- *options.showFilterBar*: <bool> show or hide filter bar (defaults to true)
- *options.showIndexSelection*: <bool> show or hide index selection (defaults to true)
Expand Down Expand Up @@ -275,7 +275,7 @@ VisTypesRegistryProvider.register(MyNewVisType);
[[development-visualization-request-handlers]]
=== Visualization Request Handlers
Request handler gets called when one of the following keys on AppState change:
`vis`, `query`, `filters` or `uiState` and when timepicker is updated. On top
`vis`, `query`, `filters` or `uiState` and when the time filter is updated. On top
of that it will also get called on force refresh.

By default visualizations will use the `courier` request handler. They can also choose to use any of the other provided
Expand Down Expand Up @@ -417,7 +417,7 @@ The `vis` object holds the visualization state and is the window into kibana:
- *vis.getUiState()*: gets UI state of visualization
- *vis.uiStateVal(name, val)*: updates a property in UI state
- *vis.isEditorMode()*: returns true if in editor mode
- *vis.API.timeFilter*: allows you to access time picker
- *vis.API.timeFilter*: allows you to access time filter
- *vis.API.queryFilter*: gives you access to queryFilter
- *vis.API.events.click*: default click handler
- *vis.API.events.brush*: default brush handler
Expand All @@ -430,12 +430,12 @@ visualization's render method.
For the parameters that should not be saved with the visualization you should use the UI state.
These hold viewer-specific state, such as popup open/closed, custom colors applied to the series etc.

You can access filter bar and time picker through the objects defined on `vis.API`
You can access the filter bar and time filter through the objects defined on `vis.API`

[[development-vis-timefilter]]
==== timeFilter

Update the timefilter time values and call update() method on it to update time picker
Update the timefilter time values and call update() method on it to update the time filter

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [(constructor)](./kibana-plugin-public.httpfetcherror._constructor_.md)

## HttpFetchError.(constructor)

Constructs a new instance of the `HttpFetchError` class

<b>Signature:</b>

```typescript
constructor(message: string, request: Request, response?: Response | undefined, body?: any);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| message | <code>string</code> | |
| request | <code>Request</code> | |
| response | <code>Response &#124; undefined</code> | |
| body | <code>any</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [body](./kibana-plugin-public.httpfetcherror.body.md)

## HttpFetchError.body property

<b>Signature:</b>

```typescript
readonly body?: any;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

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

## HttpFetchError class


<b>Signature:</b>

```typescript
export declare class HttpFetchError extends Error
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(message, request, response, body)](./kibana-plugin-public.httpfetcherror._constructor_.md) | | Constructs a new instance of the <code>HttpFetchError</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [body](./kibana-plugin-public.httpfetcherror.body.md) | | <code>any</code> | |
| [request](./kibana-plugin-public.httpfetcherror.request.md) | | <code>Request</code> | |
| [response](./kibana-plugin-public.httpfetcherror.response.md) | | <code>Response &#124; undefined</code> | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [request](./kibana-plugin-public.httpfetcherror.request.md)

## HttpFetchError.request property

<b>Signature:</b>

```typescript
readonly request: Request;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [response](./kibana-plugin-public.httpfetcherror.response.md)

## HttpFetchError.response property

<b>Signature:</b>

```typescript
readonly response?: Response | undefined;
```
6 changes: 4 additions & 2 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->

| Class | Description |
| --- | --- |
| [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) | |
| [HttpInterceptController](./kibana-plugin-public.httpinterceptcontroller.md) | |
| [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state. The client-side SavedObjectsClient is a thin convenience library around the SavedObjects HTTP API for interacting with Saved Objects. |
| [SimpleSavedObject](./kibana-plugin-public.simplesavedobject.md) | This class is a very simple wrapper for SavedObjects loaded from the server with the [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md)<!-- -->.<!-- -->It provides basic functionality for creating/saving/deleting saved objects, but doesn't include any type-specific implementations. |
Expand Down Expand Up @@ -70,7 +71,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [Plugin](./kibana-plugin-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
| [SavedObject](./kibana-plugin-public.savedobject.md) | |
| [SavedObjectAttributes](./kibana-plugin-public.savedobjectattributes.md) | The data for a Saved Object is stored in the <code>attributes</code> key as either an object or an array of objects. |
| [SavedObjectAttributes](./kibana-plugin-public.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
| [SavedObjectReference](./kibana-plugin-public.savedobjectreference.md) | A reference to another saved object. |
| [SavedObjectsBaseOptions](./kibana-plugin-public.savedobjectsbaseoptions.md) | |
| [SavedObjectsBatchResponse](./kibana-plugin-public.savedobjectsbatchresponse.md) | |
Expand Down Expand Up @@ -104,7 +105,8 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [PluginInitializer](./kibana-plugin-public.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>public</code> directory should conform to this interface. |
| [PluginOpaqueId](./kibana-plugin-public.pluginopaqueid.md) | |
| [RecursiveReadonly](./kibana-plugin-public.recursivereadonly.md) | |
| [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md) | |
| [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md) | Type definition for a Saved Object attribute value |
| [SavedObjectAttributeSingle](./kibana-plugin-public.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md) |
| [SavedObjectsClientContract](./kibana-plugin-public.savedobjectsclientcontract.md) | SavedObjectsClientContract as implemented by the [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md) |
| [ToastInput](./kibana-plugin-public.toastinput.md) | |
| [UiSettingsClientContract](./kibana-plugin-public.uisettingsclientcontract.md) | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## SavedObject.attributes property

The data for a Saved Object is stored in the `attributes` key as either an object or an array of objects.
The data for a Saved Object is stored as an object in the `attributes` property.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface SavedObject<T extends SavedObjectAttributes = any>

| Property | Type | Description |
| --- | --- | --- |
| [attributes](./kibana-plugin-public.savedobject.attributes.md) | <code>T</code> | The data for a Saved Object is stored in the <code>attributes</code> key as either an object or an array of objects. |
| [attributes](./kibana-plugin-public.savedobject.attributes.md) | <code>T</code> | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
| [error](./kibana-plugin-public.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
| [id](./kibana-plugin-public.savedobject.id.md) | <code>string</code> | The ID of this Saved Object, guaranteed to be unique for all objects of the same <code>type</code> |
| [migrationVersion](./kibana-plugin-public.savedobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

## SavedObjectAttribute type

Type definition for a Saved Object attribute value

<b>Signature:</b>

```typescript
export declare type SavedObjectAttribute = string | number | boolean | null | undefined | SavedObjectAttributes | SavedObjectAttributes[];
export declare type SavedObjectAttribute = SavedObjectAttributeSingle | SavedObjectAttributeSingle[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## SavedObjectAttributes interface

The data for a Saved Object is stored in the `attributes` key as either an object or an array of objects.
The data for a Saved Object is stored as an object in the `attributes` property.

<b>Signature:</b>

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-public](./kibana-plugin-public.md) &gt; [SavedObjectAttributeSingle](./kibana-plugin-public.savedobjectattributesingle.md)

## SavedObjectAttributeSingle type

Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md)

<b>Signature:</b>

```typescript
export declare type SavedObjectAttributeSingle = string | number | boolean | null | undefined | SavedObjectAttributes;
```
Loading

0 comments on commit 54f0a98

Please sign in to comment.