Skip to content

Commit

Permalink
Merge branch 'master' into deangularize-navbar-2
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Apr 10, 2020
2 parents 198affa + 93971db commit c106db9
Show file tree
Hide file tree
Showing 1,212 changed files with 28,730 additions and 26,003 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/legacy/core_plugins/expressions/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: [
'src/legacy/core_plugins/vis_default_editor/public/components/controls/**/*.{ts,tsx}',
],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/es_ui_shared/**/*.{js,ts,tsx}'],
rules: {
Expand Down
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/legacy/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
/x-pack/legacy/plugins/license_management/ @elastic/es-ui
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
Expand All @@ -202,7 +202,8 @@
# Endpoint
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/endpoint/ @elastic/endpoint-app-team
/x-pack/test/functional/apps/endpoint/ @elastic/endpoint-app-team
/x-pack/test/functional_endpoint/ @elastic/endpoint-app-team
/x-pack/test/functional_endpoint_ingest_failure/ @elastic/endpoint-app-team
/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team

# SIEM
Expand Down
3 changes: 2 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"src/legacy/core_plugins/management",
"src/plugins/management"
],
"indexPatternManagement": "src/plugins/index_pattern_management",
"advancedSettings": "src/plugins/advanced_settings",
"kibana_legacy": "src/plugins/kibana_legacy",
"kibana_react": "src/legacy/core_plugins/kibana_react",
Expand All @@ -43,7 +44,7 @@
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion", "src/plugins/timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/legacy/core_plugins/vis_default_editor",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/legacy/core_plugins/vis_type_markdown",
"visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
"visTypeTable": "src/legacy/core_plugins/vis_type_table",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/saved-objects/bulk_create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The API returns the following:
"type": "dashboard",
"error": {
"statusCode": 409,
"message": "version conflict, document already exists"
"message": "Saved object [dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab] conflict"
}
}
]
Expand Down
97 changes: 97 additions & 0 deletions docs/apm/apm-alerts.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[role="xpack"]
[[apm-alerts]]
=== Create an alert

beta::[]

The APM app is integrated with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature.
It provides a set of built-in **actions** and APM specific threshold **alerts** for you to use,
and allows all alerts to be centrally managed from <<management,Kibana Management>>.

[role="screenshot"]
image::apm/images/apm-alert.png[Create an alert in the APM app]

There are two different types of threshold alerts: transaction duration, and error rate.
Below, we'll create one of each.

[float]
[[apm-create-transaction-alert]]
=== Create a transaction duration alert

This guide creates an alert for the `opbeans-java` service based on the following criteria:

* Transaction type: `transaction.type:request`
* Average request is above `1500ms` for the last 5 minutes
* Check every 10 minutes, and repeat the alert every 30 minutes
* Send the alert via Slack

From the APM app, navigate to the `opbeans-java` service and select
**Alerts** > **Create threshold alert** > **Transaction duration**.

The name of your alert will automatically be set as `Transaction duration | opbeans-java`,
and the alert will be tagged with `apm` and `service.name:opbeans-java`.
Feel free to edit either of these defaults.

Based on the alert criteria, define the following alert details:

* **Check every** - `10 minutes`
* **Notify every** - `30 minutes`
* **TYPE** - `request`
* **WHEN** - `avg`
* **IS ABOVE** - `1500ms`
* **FOR THE LAST** - `5 minutes`

Select an action type.
Multiple action types can be selected, but in this example we want to post to a slack channel.
Select **Slack** > **Create a connector**.
Enter a name for the connector,
and paste the webhook URL.
See Slack's webhook documentation if you need to create one.

Select **Save**. The alert has been created and is now active!

[float]
[[apm-create-error-alert]]
=== Create an error rate alert

This guide creates an alert for the `opbeans-python` service based on the following criteria:

* Error rate is above 25 for the last minute
* Check every 1 minute, and repeat the alert every 10 minutes
* Send the alert via email to the `opbeans-python` team

From the APM app, navigate to the `opbeans-python` service and select
**Alerts** > **Create threshold alert** > **Error rate**.

The name of your alert will automatically be set as `Error rate | opbeans-python`,
and the alert will be tagged with `apm` and `service.name:opbeans-python`.
Feel free to edit either of these defaults.

Based on the alert criteria, define the following alert details:

* **Check every** - `1 minute`
* **Notify every** - `10 minutes`
* **IS ABOVE** - `25 errors`
* **FOR THE LAST** - `1 minute`

Select the **Email** action type and click **Create a connector**.
Fill out the required details: sender, host, port, etc., and click **save**.

Select **Save**. The alert has been created and is now active!

[float]
[[apm-alert-manage]]
=== Manage alerts and actions

From the APM app, select **Alerts** > **View active alerts** to be taken to the Kibana alerts and actions management page.
From this page, you can create, edit, disable, mute, and delete alerts, and create, edit, and disable connectors.

[float]
[[apm-alert-more-info]]
=== More information

See {kibana-ref}/alerting-getting-started.html[alerting and actions] for more information.

NOTE: If you are using an **on-premise** Elastic Stack deployment with security,
TLS must be configured for communication between Elasticsearch and Kibana.
More information is in the alerting {kibana-ref}/alerting-getting-started.html#alerting-setup-prerequisites[prerequisites].
Binary file added docs/apm/images/apm-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/apm/spans.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ which indicates the next transaction in the trace.
These transactions can be expanded and viewed in detail by clicking on them.

After exploring these traces,
you can return to the full trace by clicking *View full trace* in the upper right hand corner of the page.
you can return to the full trace by clicking *View full trace*.
1 change: 1 addition & 0 deletions docs/apm/transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ image::apm/images/apm-transaction-duration-dist.png[Example view of transactions

This graph shows a typical distribution, and indicates most of our requests were served quickly - awesome!
It's the requests on the right, the ones taking longer than average, that we probably want to focus on.

When you select one of these buckets,
you're presented with up to ten trace samples.
Each sample has a span timeline waterfall that shows what a typical request in that bucket was doing.
Expand Down
3 changes: 3 additions & 0 deletions docs/apm/using-the-apm-ui.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ APM is available via the navigation sidebar in {Kib}.
* <<spans>>
* <<errors>>
* <<metrics>>
* <<apm-alerts>>
* <<machine-learning-integration>>
* <<agent-configuration>>
* <<advanced-queries>>
Expand All @@ -37,6 +38,8 @@ include::errors.asciidoc[]

include::metrics.asciidoc[]

include::apm-alerts.asciidoc[]

include::agent-configuration.asciidoc[]

include::custom-links.asciidoc[]
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 @@ -76,7 +76,7 @@ After you've added the workpad to your website, you can change the autoplay and

To change the autoplay settings:

. In the lower right corner of the shareable workpad, click the settings icon.
. Click the settings icon.

. Click *Auto Play*, then change the settings.
+
Expand All @@ -85,7 +85,7 @@ image::images/canvas_share_autoplay_480.gif[Autoplay settings]

To change the toolbar settings:

. In the lower right corner, click the settings icon.
. Click the settings icon.

. Click *Toolbar*, then change the settings.
+
Expand Down
6 changes: 3 additions & 3 deletions docs/canvas/canvas-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Your first step to working with Canvas is to create a workpad.

. Click *Create workpad*.

. To add a *Name* for your workpad, use the editor on the right. For example, `My Canvas Workpad`.
. To add a *Name* for your workpad, use the editor. For example, `My Canvas Workpad`.

[float]
=== Customize your workpad with images
Expand All @@ -29,7 +29,7 @@ To customize your workpad to look the way you want, add your own images.
+
The default Elastic logo image appears on your page.

. To replace the Elastic logo with your own image, select the image, then use the editor on the right.
. To replace the Elastic logo with your own image, select the image, then use the editor.

. To move the image, click and drag it to your preferred location.

Expand Down Expand Up @@ -73,7 +73,7 @@ You'll notice that the error is gone, but the number could use some formatting.

. To format the number, use the Canvas expression language.

.. In the lower right corner, click *Expression editor*.
.. Click *Expression editor*.
+
You're now looking at the raw data syntax that Canvas uses to display the element.

Expand Down
2 changes: 1 addition & 1 deletion docs/canvas/canvas-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Organize your ideas onto separate pages by adding more pages.

. Click *Page 1*, then click *+*.

. On the *Page* editor panel on the right, select the page transition from the *Transition* dropdown.
. On the *Page* editor panel, select the page transition from the *Transition* dropdown.
+
[role="screenshot"]
image::images/canvas-add-pages.gif[Add pages]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/dev-tools/painlesslab/index.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[role="xpack"]
[[painlesslab]]
== Painless Lab

beta::[]

The Painless Lab is an interactive code editor that lets you test and
debug {ref}/modules-scripting-painless.html[Painless scripts] in real-time.
You can use the Painless scripting
language to create <<scripted-fields, {kib} scripted fields>>,
process {ref}/docs-reindex.html[reindexed data], define complex
<<watcher-create-advanced-watch, Watcher conditions>>,
and work with data in other contexts.

To get started, go to *Dev Tools > Painless Lab*.

image::dev-tools/painlesslab/images/painless-lab.png[Painless Lab]
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ Registering a feature consists of the following fields. For more information, co
|An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here.

|`privileges` (required)
|{repo}blob/{branch}/x-pack/plugins/features/server/feature.ts[`FeatureWithAllOrReadPrivileges`].
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|See <<example-1-canvas,Example 1>> and <<example-2-dev-tools,Example 2>>
|The set of privileges this feature requires to function.

|`subFeatures` (optional)
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|See <<example-3-discover,Example 3>>
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.

|`icon`
|`string`
|"discoverApp"
Expand Down Expand Up @@ -192,3 +197,78 @@ server.route({
}
});
-----------

[[example-3-discover]]
==== Example 3: Discover

Discover takes advantage of subfeature privileges to allow fine-grained access control. In this example,
a single "Create Short URLs" subfeature privilege is defined, which allows users to grant access to this feature without having to grant the `all` privilege to Discover. In other words, you can grant `read` access to Discover, and also grant the ability to create short URLs.

["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
{
id: 'discover',
name: i18n.translate('xpack.features.discoverFeatureName', {
defaultMessage: 'Discover',
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'kibana:discover',
app: ['kibana'],
catalogue: ['discover'],
privileges: {
all: {
app: ['kibana'],
catalogue: ['discover'],
savedObject: {
all: ['search', 'query'],
read: ['index-pattern'],
},
ui: ['show', 'save', 'saveQuery'],
},
read: {
app: ['kibana'],
catalogue: ['discover'],
savedObject: {
all: [],
read: ['index-pattern', 'search', 'query'],
},
ui: ['show'],
},
},
subFeatures: [
{
name: i18n.translate('xpack.features.ossFeatures.discoverShortUrlSubFeatureName', {
defaultMessage: 'Short URLs',
}),
privilegeGroups: [
{
groupType: 'independent',
privileges: [
{
id: 'url_create',
name: i18n.translate(
'xpack.features.ossFeatures.discoverCreateShortUrlPrivilegeName',
{
defaultMessage: 'Create Short URLs',
}
),
includeIn: 'all',
savedObject: {
all: ['url'],
read: [],
},
ui: ['createShortUrl'],
},
],
},
],
},
],
}
});
}
-----------
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface SavedObject<T = unknown>
| [error](./kibana-plugin-core-public.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
| [id](./kibana-plugin-core-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-core-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. |
| [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md) | <code>string[]</code> | Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types. |
| [references](./kibana-plugin-core-public.savedobject.references.md) | <code>SavedObjectReference[]</code> | A reference to another saved object. |
| [type](./kibana-plugin-core-public.savedobject.type.md) | <code>string</code> | The type of Saved Object. Each plugin can define it's own custom Saved Object types. |
| [updated\_at](./kibana-plugin-core-public.savedobject.updated_at.md) | <code>string</code> | Timestamp of the last time this document had been updated. |
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-core-public](./kibana-plugin-core-public.md) &gt; [SavedObject](./kibana-plugin-core-public.savedobject.md) &gt; [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md)

## SavedObject.namespaces property

Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types.

<b>Signature:</b>

```typescript
namespaces?: string[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface CoreSetup<TPluginsStart extends object = object, TStart = unkno
| [http](./kibana-plugin-core-server.coresetup.http.md) | <code>HttpServiceSetup</code> | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) |
| [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | <code>MetricsServiceSetup</code> | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) |
| [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | <code>SavedObjectsServiceSetup</code> | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) |
| [status](./kibana-plugin-core-server.coresetup.status.md) | <code>StatusServiceSetup</code> | [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) |
| [uiSettings](./kibana-plugin-core-server.coresetup.uisettings.md) | <code>UiSettingsServiceSetup</code> | [UiSettingsServiceSetup](./kibana-plugin-core-server.uisettingsservicesetup.md) |
| [uuid](./kibana-plugin-core-server.coresetup.uuid.md) | <code>UuidServiceSetup</code> | [UuidServiceSetup](./kibana-plugin-core-server.uuidservicesetup.md) |

Loading

0 comments on commit c106db9

Please sign in to comment.