Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into reason
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Aug 15, 2021
2 parents f254d2b + 2e68ce1 commit 6f32e96
Show file tree
Hide file tree
Showing 809 changed files with 20,765 additions and 8,620 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=14.17.3
ARG NODE_VERSION=14.17.5

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.3
14.17.5
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.3
14.17.5
18 changes: 9 additions & 9 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "8f5f192ba02319254aaf2cdcca00ec12eaafeb979a80a1e946773c520ae0a2c9",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.7.0/rules_nodejs-3.7.0.tar.gz"],
sha256 = "e79c08a488cc5ac40981987d862c7320cee8741122a2649e9b08e850b6f20442",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.8.0/rules_nodejs-3.8.0.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.7.0")
check_rules_nodejs_version(minimum_version_string = "3.8.0")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand All @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.7.0")
# we can update that rule.
node_repositories(
node_repositories = {
"14.17.3-darwin_amd64": ("node-v14.17.3-darwin-x64.tar.gz", "node-v14.17.3-darwin-x64", "522f85db1d1fe798cba5f601d1bba7b5203ca8797b2bc934ff6f24263f0b7fb2"),
"14.17.3-linux_arm64": ("node-v14.17.3-linux-arm64.tar.xz", "node-v14.17.3-linux-arm64", "80f4143d3c2d4cf3c4420eea3202c7bf16788b0a72fd512e60bfc8066a08a51c"),
"14.17.3-linux_s390x": ("node-v14.17.3-linux-s390x.tar.xz", "node-v14.17.3-linux-s390x", "4f69c30732f94189b9ab98f3100b17f1e4db2000848d56064e887be1c28e81ae"),
"14.17.3-linux_amd64": ("node-v14.17.3-linux-x64.tar.xz", "node-v14.17.3-linux-x64", "d659d78144042a1801f35dd611d0fab137e841cde902b2c6a821163a5e36f105"),
"14.17.3-windows_amd64": ("node-v14.17.3-win-x64.zip", "node-v14.17.3-win-x64", "170fb4f95539d1d7e1295fb2556cb72bee352cdf81a02ffb16cf6d50ad2fefbf"),
"14.17.5-darwin_amd64": ("node-v14.17.5-darwin-x64.tar.gz", "node-v14.17.5-darwin-x64", "2e40ab625b45b9bdfcb963ddd4d65d87ddf1dd37a86b6f8b075cf3d77fe9dc09"),
"14.17.5-linux_arm64": ("node-v14.17.5-linux-arm64.tar.xz", "node-v14.17.5-linux-arm64", "3a2e674b6db50dfde767c427e8f077235bbf6f9236e1b12a4cc3496b12f94bae"),
"14.17.5-linux_s390x": ("node-v14.17.5-linux-s390x.tar.xz", "node-v14.17.5-linux-s390x", "7d40eee3d54241403db12fb3bc420cd776e2b02e89100c45cf5e74a73942e7f6"),
"14.17.5-linux_amd64": ("node-v14.17.5-linux-x64.tar.xz", "node-v14.17.5-linux-x64", "2d759de07a50cd7f75bd73d67e97b0d0e095ee3c413efac7d1b3d1e84ed76fff"),
"14.17.5-windows_amd64": ("node-v14.17.5-win-x64.zip", "node-v14.17.5-win-x64", "a99b7ee08e846e5d1f4e70c4396265542819d79ed9cebcc27760b89571f03cbf"),
},
node_version = "14.17.3",
node_version = "14.17.5",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
Binary file added dev_docs/assets/data_view_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions dev_docs/key_concepts/data_views.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: kibDataViewsKeyConcepts
slug: /kibana-dev-docs/data-view-intro
title: Data Views
summary: Data views are the central method of defining queryable data sets in Kibana
date: 2021-08-11
tags: ['kibana','dev', 'contributor', 'api docs']
---

*Note: Kibana index patterns are currently being renamed to data views. There will be some naming inconsistencies until the transition is complete.*

Data views (formerly Kibana index patterns or KIPs) are the central method of describing sets of indices for queries. Usage is strongly recommended
as a number of high level <DocLink id="kibBuildingBlocks" text="building blocks"/> rely on them. Further, they provide a consistent view of data across
a variety Kibana apps.

Data views are defined by a wildcard string (an index pattern) which matches indices, data streams, and index aliases, optionally specify a
timestamp field for time series data, and are stored as a <DocLink id="kibDevDocsSavedObjectsIntro"
text="saved object"/>. They have a field list which comprises all the fields in matching indices plus fields defined specifically
on the data view via runtime fields. Schema-on-read functionality is provided by data view defined runtime fields.

![image](../assets/data_view_diagram.png)



The data view API is made available via the data plugin (`data.indexPatterns`, soon to be renamed) and most commonly used with <DocLink id="kibDevTutorialDataSearchAndSessions" section="high-level-search" text="SearchSource" />
(`data.search.search.SearchSource`) to perform queries. SearchSource will apply existing filters and queries from the search bar UI.

Users can create data views via [Data view management](https://www.elastic.co/guide/en/kibana/current/index-patterns.html).
Additionally, they can be created through the data view API.

Data views also allow formatters and custom labels to be defined for fields.

86 changes: 86 additions & 0 deletions dev_docs/tutorials/data_views.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
id: kibDevTutorialDataViews
slug: /kibana-dev-docs/tutorials/data-views
title: Data views API
summary: Data views API
date: 2021-08-11
tags: ['kibana', 'onboarding', 'dev', 'architecture']
---

*Note: Kibana index patterns are currently being renamed to data views. There will be some naming inconsistencies until the transition is complete.*

### Data views API

- Get list of data views
- Get default data view and examine fields
- Get data view by id
- Find data view by title
- Create data view
- Create data view and save it
- Modify data view and save it
- Delete data view

#### Get list of data view titles and ids

```
const idsAndTitles = await data.indexPatterns.getIdsWithTitle();
idsAndTitles.forEach(({id, title}) => console.log(`Data view id: ${id} title: ${title}`));
```

#### Get default data view and examine fields

```
const defaultDataView = await data.indexPatterns.getDefault();
defaultDataView.fields.forEach(({name}) => { console.log(name); })
```

#### Get data view by id

```
const id = 'xxxxxx-xxx-xxxxxx';
const dataView = await data.indexPatterns.get(id);
```

#### Find data view by title

```
const title = 'kibana-*';
const [dataView] = await data.indexPatterns.find(title);
```

#### Create data view

```
const dataView = await data.indexPatterns.create({ title: 'kibana-*' });
```

#### Create data view and save it immediately

```
const dataView = await data.indexPatterns.createAndSave({ title: 'kibana-*' });
```

#### Create data view, modify, and save

```
const dataView = await data.indexPatterns.create({ title: 'kibana-*' });
dataView.setFieldCustomLabel('customer_name', 'Customer Name');
data.indexPatterns.createSavedObject(dataView);
```

#### Modify data view and save it

```
dataView.setFieldCustomLabel('customer_name', 'Customer Name');
await data.indexPatterns.updateSavedObject(dataView);
```

#### Delete index pattern

```
await data.indexPatterns.delete(dataViewId);
```

### Data view HTTP API

Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/index-patterns-api.html)
53 changes: 52 additions & 1 deletion dev_docs/tutorials/kibana_page_template.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibDevDocsKPTTutorial
slug: /kibana-dev-docs/tutorials/kibana-page-template
title: KibanaPageTemplate component
title: Kibana Page Template
summary: Learn how to create pages in Kibana
date: 2021-03-20
tags: ['kibana', 'dev', 'ui', 'tutorials']
Expand Down Expand Up @@ -117,3 +117,54 @@ When using `EuiSideNav`, root level items should not be linked but provide secti
![Screenshot of Stack Management empty state with a provided solution navigation shown on the left, outlined in pink.](../assets/kibana_template_solution_nav.png)

![Screenshots of Stack Management page in mobile view. Menu closed on the left, menu open on the right.](../assets/kibana_template_solution_nav_mobile.png)

## `noDataConfig`

Increases the consistency in messaging across all the solutions during the getting started process when no data exists. Each solution/template instance decides when is the most appropriate time to show this configuration, but is messaged specifically towards having no indices or index patterns at all or that match the particular solution.

This is a built-in configuration that displays a very specific UI and requires very specific keys. It will also ignore all other configurations of the template including `pageHeader` and `children`, with the exception of continuing to show `solutionNav`.

The `noDataConfig` is of type [`NoDataPagProps`](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_react/public/page_template/no_data_page/no_data_page.tsx):

1. `solution: string`: Single name for the current solution, used to auto-generate the title, logo, description, and button label *(required)*
2. `docsLink: string`: Required to set the docs link for the whole solution *(required)*
3. `logo?: string`: Optionally replace the auto-generated logo
4. `pageTitle?: string`: Optionally replace the auto-generated page title (h1)
5. `actions: NoDataPageActionsProps`: An object of `NoDataPageActions` configurations with unique primary keys *(required)*

### `NoDataPageActions`

There are two main actions for adding data that we promote throughout Kibana, Elastic Agent and Beats. They are added to the cards that are displayed by using the keys `elasticAgent` and `beats` respectively. For consistent messaging, these two cards are pre-configured but require specific `href`s and/or `onClick` handlers for directing the user to the right location for that solution.

It also accepts a `recommended` prop as a boolean to promote one or more of the cards through visuals added to the UI. It will also place the `recommended` ones first in the list. By default, the configuration will recommend `elasticAgent`. Optionally you can also replace the `button` label by passing a string, or the whole component by passing a `ReactNode`.


```tsx
// Perform your own check
const hasData = checkForData();

// No data configuration
const noDataConfig: KibanaPageTemplateProps['noDataConfig'] = {
solution: 'Observability',
docsLink: '#',
actions: {
elasticAgent: {
href: '#',
},
beats: {
href: '#',
},
},
};

<KibanaPageTemplate
solutionNav={/* Solution navigation still show if it exists and use the right template type */}
pageHeader={/* Page header will be ignored */}
noDataConfig={hasData ? undefined : noDataConfig}
>
{/* Children will be ignored */}
</KibanaPageTemplate>
```


![Screenshot of and example in Observability using the no data configuration and using the corresponding list numbers to point out the UI elements that they adjust.](../assets/kibana_template_no_data_config.png)
2 changes: 2 additions & 0 deletions docs/apm/agent-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ For this reason, it is still essential to set custom default configurations loca
==== APM Server setup

This feature requires {apm-server-ref}/setup-kibana-endpoint.html[Kibana endpoint configuration] in APM Server.
In addition, if an APM agent is using {apm-server-ref}/configuration-anonymous.html[anonymous authentication] to communicate with the APM Server,
the agent's service name must be included in the `apm-server.auth.anonymous.allow_service` list.

APM Server acts as a proxy between the agents and Kibana.
Kibana communicates any changed settings to APM Server so that your agents only need to poll APM Server to determine which settings have changed.
Expand Down
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-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; ["aria-label"](./kibana-plugin-core-public.overlayflyoutopenoptions._aria-label_.md)

## OverlayFlyoutOpenOptions."aria-label" property

<b>Signature:</b>

```typescript
'aria-label'?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ export interface OverlayFlyoutOpenOptions

| Property | Type | Description |
| --- | --- | --- |
| ["aria-label"](./kibana-plugin-core-public.overlayflyoutopenoptions._aria-label_.md) | <code>string</code> | |
| ["data-test-subj"](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md) | <code>string</code> | |
| [hideCloseButton](./kibana-plugin-core-public.overlayflyoutopenoptions.hideclosebutton.md) | <code>boolean</code> | |
| [maxWidth](./kibana-plugin-core-public.overlayflyoutopenoptions.maxwidth.md) | <code>boolean &#124; number &#124; string</code> | |
| [onClose](./kibana-plugin-core-public.overlayflyoutopenoptions.onclose.md) | <code>(flyout: OverlayRef) =&gt; void</code> | EuiFlyout onClose handler. If provided the consumer is responsible for calling flyout.close() to close the flyout; |
| [ownFocus](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | <code>boolean</code> | |
| [size](./kibana-plugin-core-public.overlayflyoutopenoptions.size.md) | <code>EuiFlyoutSize</code> | |

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-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [onClose](./kibana-plugin-core-public.overlayflyoutopenoptions.onclose.md)

## OverlayFlyoutOpenOptions.onClose property

EuiFlyout onClose handler. If provided the consumer is responsible for calling flyout.close() to close the flyout;

<b>Signature:</b>

```typescript
onClose?: (flyout: OverlayRef) => void;
```
Binary file added docs/maps/images/app_gis_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 12 additions & 11 deletions docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ refer to <<xpack-security-authorization,Granting access to {kib}>>.
. Open the main menu, and then click *Dashboard*.
. Click **Create dashboard**.
. Set the time range to *Last 7 days*.
. Click **Create panel**.
. Click **Maps**.
. Click the **Create new Maps** icon image:maps/images/app_gis_icon.png[]

[float]
[[maps-add-choropleth-layer]]
Expand All @@ -62,14 +61,15 @@ and lighter shades will symbolize countries with less traffic.

. Add a Tooltip field:

** Select **ISO 3166-1 alpha-2 code** and **name**.
** Click **Add**.
** **ISO 3166-1 alpha-2 code** is added by default.
** Click **+ Add** to open field select.
** Select **name** and click *Add*.

. In **Layer style**, set:
. In **Layer style**:

** **Fill color: As number** to the grey color ramp
** **Border color** to white
** **Label** to symbol label
** Set **Fill color: As number** to the grey color ramp.
** Set **Border color** to white.
** Under **Label**, change **By value** to **Fixed**.

. Click **Save & close**.
+
Expand Down Expand Up @@ -135,9 +135,10 @@ grids with less bytes transferred.
** **Name** to `Total Requests and Bytes`
** **Visibility** to the range [0, 9]
** **Opacity** to 100%
. In **Metrics**, use:
** **Agregation** set to **Count**, and
** **Aggregation** set to **Sum** with **Field** set to **bytes**
. In **Metrics**:
** Set **Agregation** to **Count**.
** Click **Add metric**.
** Set **Aggregation** to **Sum** with **Field** set to **bytes**.
. In **Layer style**, change **Symbol size**:
** Set the field select to *sum bytes*.
** Set the min size to 7 and the max size to 25 px.
Expand Down
2 changes: 2 additions & 0 deletions docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ To add a vector layer to your map, click *Add layer*, then select one of the fol
*Clusters and grids*:: Geospatial data grouped in grids with metrics for each gridded cell.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

*Create index*:: Draw shapes on the map and index in Elasticsearch.

*Documents*:: Points, lines, and polyons from Elasticsearch.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].
+
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can configure the following settings in the `kibana.yml` file.
[cols="2*<"]
|===
| `xpack.actions.enabled`
| Feature toggle that enables Actions in {kib}.
| Deprecated. This will be removed in 8.0. Feature toggle that enables Actions in {kib}.
If `false`, all features dependent on Actions are disabled, including the *Observability* and *Security* apps. Default: `true`.

| `xpack.actions.allowedHosts` {ess-icon}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"**/underscore": "^1.13.1"
},
"engines": {
"node": "14.17.3",
"node": "14.17.5",
"yarn": "^1.21.1"
},
"dependencies": {
Expand Down Expand Up @@ -336,7 +336,7 @@
"re-resizable": "^6.1.1",
"re2": "^1.15.4",
"react": "^16.12.0",
"react-ace": "^5.9.0",
"react-ace": "^7.0.5",
"react-beautiful-dnd": "^13.0.0",
"react-color": "^2.13.8",
"react-dom": "^16.12.0",
Expand Down Expand Up @@ -446,7 +446,7 @@
"@babel/traverse": "^7.12.12",
"@babel/types": "^7.12.12",
"@bazel/ibazel": "^0.15.10",
"@bazel/typescript": "^3.7.0",
"@bazel/typescript": "^3.8.0",
"@cypress/snapshot": "^2.1.7",
"@cypress/webpack-preprocessor": "^5.6.0",
"@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana",
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-es-archiver/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
Loading

0 comments on commit 6f32e96

Please sign in to comment.