Skip to content

Commit

Permalink
Merge branch 'master' into np-migration/ua
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Nov 20, 2019
2 parents 7336aca + 9cb37a1 commit 3046e54
Show file tree
Hide file tree
Showing 2,092 changed files with 37,479 additions and 16,577 deletions.
10 changes: 5 additions & 5 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stage("Kibana Pipeline") {
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld "./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh"
runbld("./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
}
} else {
kibanaPipeline.buildXpack()
Expand Down Expand Up @@ -62,18 +62,18 @@ stage("Kibana Pipeline") {
def getWorkerFromParams(isXpack, job, ciGroup) {
if (!isXpack) {
if (job == 'firefoxSmoke') {
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' })
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') })
} else if(job == 'visualRegression') {
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' })
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') })
} else {
return kibanaPipeline.getOssCiGroupWorker(ciGroup)
}
}

if (job == 'firefoxSmoke') {
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' })
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') })
} else if(job == 'visualRegression') {
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' })
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') })
} else {
return kibanaPipeline.getXpackCiGroupWorker(ciGroup)
}
Expand Down
9 changes: 2 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},
{
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -839,6 +832,8 @@ module.exports = {
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
'react/jsx-tag-spacing': 'error',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'rest-spread-spacing': ['error', 'never'],
'symbol-description': 'error',
Expand Down
5 changes: 0 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
# Canvas
/x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas

# Code
/x-pack/legacy/plugins/code/ @teams/code
/x-pack/test/functional/apps/code/ @teams/code
/x-pack/test/api_integration/apis/code/ @teams/code

# Logs & Metrics UI
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/legacy/plugins/integrations_manager/ @elastic/epm
Expand Down
6 changes: 3 additions & 3 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"expressions_np": "src/plugins/expressions",
"expressions": "src/legacy/core_plugins/expressions",
"expressions": "src/plugins/expressions",
"inputControl": "src/legacy/core_plugins/input_control_vis",
"inspector": "src/plugins/inspector",
"inspectorViews": "src/legacy/core_plugins/inspector_views",
Expand All @@ -34,7 +34,7 @@
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visualizations": "src/plugins/visualizations"
"visualizations": ["src/plugins/visualizations", "src/legacy/core_plugins/visualizations"]
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": []
Expand Down
1 change: 0 additions & 1 deletion .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ files:
include:
- 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss'
- 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss'
- 'src/legacy/ui/public/query_bar/**/*.s+(a|c)ss'
- 'src/legacy/ui/public/vislib/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/rollup/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ Note that for VSCode, to enable "live" linting of TypeScript (and other) file ty
"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.
:warning: It is **not** recommended to use the [`Prettier` extension/IDE plugin](https://prettier.io/) while maintaining the Kibana project. Formatting and styling roles are set in the multiple `.eslintrc.js` files across the project and some of them use the [NPM version of Prettier](https://www.npmjs.com/package/prettier). Using the IDE extension might cause conflicts, applying the formatting to too many files that shouldn't be prettier-ized and/or highlighting errors that are actually OK.

### Internationalization

Expand Down
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' }),
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', { runbld './test/scripts/jenkins_accessibility.sh' }),
'oss-visualRegression': kibanaPipeline.getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' }),
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') }),
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', { runbld('./test/scripts/jenkins_accessibility.sh', 'Execute kibana-accessibility') }),
'oss-visualRegression': kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') }),
]),
'kibana-xpack-agent': kibanaPipeline.withWorkers('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
Expand All @@ -39,9 +39,9 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' }),
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', { runbld './test/scripts/jenkins_xpack_accessibility.sh' }),
'xpack-visualRegression': kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' }),
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') }),
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', { runbld('./test/scripts/jenkins_xpack_accessibility.sh', 'Execute xpack-accessibility') }),
'xpack-visualRegression': kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') }),
]),
])
}
Expand Down
1 change: 1 addition & 0 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ You should prefer modern language features in a lot of cases, e.g.:
* Prefer arrow function over storing `this` (no `const self = this;`)
* Prefer template strings over string concatenation
* Prefer the spread operator for copying arrays (`[...arr]`) over `arr.slice()`
* Use optional chaining (`?.`) and nullish Coalescing (`??`) over `lodash.get` (and similar utilities)
### Avoid mutability and state
Expand Down
4 changes: 2 additions & 2 deletions docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ image::images/canvas-create-URL.gif[Create POST URL]
[[add-workpad-website]]
=== Share the workpad on a website

beta[] Download the workpad and share it on any website, then customize the workpad behavior to autoplay the pages or hide the toolbar.
beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. If you are using a Gold or Platinum license, enable reporting in your `config/kibana.yml` file.

Expand All @@ -74,7 +74,7 @@ NOTE: Shareable workpads encode the current state of the workpad in a JSON file.

[float]
[[change-the-workpad-settings]]
=== Change the shareable workpad settings
=== Change the settings

After you've added the workpad to your website, you can change the autoplay and toolbar settings.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export interface ChromeNavControl

| Property | Type | Description |
| --- | --- | --- |
| [mount](./kibana-plugin-public.chromenavcontrol.mount.md) | <code>MountPoint</code> | |
| [order](./kibana-plugin-public.chromenavcontrol.order.md) | <code>number</code> | |

## Methods

| Method | Description |
| --- | --- |
| [mount(targetDomElement)](./kibana-plugin-public.chromenavcontrol.mount.md) | |

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,10 @@

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeNavControl](./kibana-plugin-public.chromenavcontrol.md) &gt; [mount](./kibana-plugin-public.chromenavcontrol.mount.md)

## ChromeNavControl.mount() method
## ChromeNavControl.mount property

<b>Signature:</b>

```typescript
mount(targetDomElement: HTMLElement): () => void;
mount: MountPoint;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| targetDomElement | <code>HTMLElement</code> | |

<b>Returns:</b>

`() => void`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ A function that should mount DOM content inside the provided container element a
<b>Signature:</b>

```typescript
export declare type MountPoint = (element: HTMLElement) => UnmountCallback;
export declare type MountPoint<T extends HTMLElement = HTMLElement> = (element: T) => UnmountCallback;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export interface OverlayStart
| Property | Type | Description |
| --- | --- | --- |
| [banners](./kibana-plugin-public.overlaystart.banners.md) | <code>OverlayBannersStart</code> | [OverlayBannersStart](./kibana-plugin-public.overlaybannersstart.md) |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>(flyoutChildren: React.ReactNode, flyoutProps?: {</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>(modalChildren: React.ReactNode, modalProps?: {</code><br/><code> className?: string;</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>OverlayFlyoutStart['open']</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>OverlayModalStart['open']</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

## OverlayStart.openFlyout property


<b>Signature:</b>

```typescript
openFlyout: (flyoutChildren: React.ReactNode, flyoutProps?: {
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openFlyout: OverlayFlyoutStart['open'];
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

## OverlayStart.openModal property


<b>Signature:</b>

```typescript
openModal: (modalChildren: React.ReactNode, modalProps?: {
className?: string;
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openModal: OverlayModalStart['open'];
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Each route can have only one handler function, which is executed when the route

```ts
const router = createRouter();
// handler is called when '${my-plugin-id}/path' resource is requested with `GET` method
// handler is called when '/path' resource is requested with `GET` method
router.get({ path: '/path', validate: false }, (context, req, res) => res.ok({ content: 'ok' }));

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface HttpServiceSetup

## Example

To handle an incoming request in your plugin you should: - Create a `Router` instance. Router is already configured to use `plugin-id` to prefix path segment for your routes.
To handle an incoming request in your plugin you should: - Create a `Router` instance.

```ts
const router = httpSetup.createRouter();
Expand Down Expand Up @@ -61,7 +61,7 @@ const handler = async (context: RequestHandlerContext, request: KibanaRequest, r
}

```
- Register route handler for GET request to 'my-app/path/<!-- -->{<!-- -->id<!-- -->}<!-- -->' path
- Register route handler for GET request to 'path/<!-- -->{<!-- -->id<!-- -->}<!-- -->' path

```ts
import { schema, TypeOf } from '@kbn/config-schema';
Expand Down
41 changes: 29 additions & 12 deletions docs/discover/kuery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ they appear. This means documents with "quick brown fox" will match, but so will
to search for a phrase.

The query parser will no longer split on whitespace. Multiple search terms must be separated by explicit
boolean operators. Note that boolean operators are not case sensitive.
boolean operators. Lucene will combine search terms with an `or` by default, so `response:200 extension:php` would
become `response:200 or extension:php` in KQL. This will match documents where response matches 200, extension matches php, or both.
Note that boolean operators are not case sensitive.

`response:200 extension:php` in lucene would become `response:200 and extension:php`.
This will match documents where response matches 200 and extension matches php.
We can make terms required by using `and`.

We can make terms optional by using `or`.

`response:200 or extension:php` will match documents where response matches 200, extension matches php, or both.
`response:200 and extension:php` will match documents where response matches 200 and extension matches php.

By default, `and` has a higher precedence than `or`.

Expand Down Expand Up @@ -73,7 +72,7 @@ set these terms will be matched against all fields. For example, a query for `re
in the response field, but a query for just `200` will search for 200 across all fields in your index.
============

===== Nested Field Support
==== Nested Field Support

KQL supports querying on {ref}/nested.html[nested fields] through a special syntax. You can query nested fields in subtly different
ways, depending on the results you want, so crafting nested queries requires extra thought.
Expand All @@ -85,7 +84,8 @@ There are two main approaches to take:
* *Parts of the query can match different nested documents.* This is how a regular object field works.
Although generally less useful, there might be occasions where you want to query a nested field in this way.

Let's take a look at the first approach. In the following document, `items` is a nested field:
Let's take a look at the first approach. In the following document, `items` is a nested field. Each document in the nested
field contains a name, stock, and category.

[source,json]
----------------------------------
Expand Down Expand Up @@ -116,21 +116,38 @@ Let's take a look at the first approach. In the following document, `items` is a
}
----------------------------------

===== Match a single nested document

To find stores that have more than 10 bananas in stock, you would write a query like this:

`items:{ name:banana and stock > 10 }`

`items` is the "nested path". Everything inside the curly braces (the "nested group") must match a single document.
For example, `items:{ name:banana and stock:9 }` does not match because there isn't a single nested document that
matches the entire query in the nested group.
`items` is the "nested path". Everything inside the curly braces (the "nested group") must match a single nested document.

The following example returns no matches because no single nested document has bananas with a stock of 9.

`items:{ name:banana and stock:9 }`

==== Match different nested documents

What if you want to find a store with more than 10 bananas that *also* stocks vegetables? This is the second way of querying a nested field, and you can do it like this:
The subqueries in this example are in separate nested groups and can match different nested documents.

`items:{ name:banana } and items:{ stock:9 }`

`name:banana` matches the first document in the array and `stock:9` matches the third document in the array.

==== Combine approaches

You can combine these two approaches to create complex queries. What if you wanted to find a store with more than 10
bananas that *also* stocks vegetables? You could do this:

`items:{ name:banana and stock > 10 } and items:{ category:vegetable }`

The first nested group (`name:banana and stock > 10`) must still match a single document, but the `category:vegetables`
subquery can match a different nested document because it is in a separate group.

==== Nested fields inside other nested fields

KQL's syntax also supports nested fields inside of other nested fields&mdash;you simply have to specify the full path. Suppose you
have a document where `level1` and `level2` are both nested fields:

Expand Down
Binary file added docs/images/lens_data_info.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_drag_drop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_remove_layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_suggestions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_tutorial_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_tutorial_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/lens_tutorial_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3046e54

Please sign in to comment.