diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 4a061d7415990..632f28efdc37e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -19,6 +19,7 @@
/src/plugins/dashboard/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/vis_type_timeseries/ @elastic/kibana-app
+/src/plugins/vis_type_metric/ @elastic/kibana-app
# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
@@ -130,7 +131,6 @@
/packages/kbn-config-schema/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
-/src/legacy/server/i18n/ @elastic/kibana-platform
/src/legacy/server/logging/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform
@@ -149,7 +149,10 @@
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
# Kibana Localization
-/src/dev/i18n/ @elastic/kibana-localization
+/src/dev/i18n/ @elastic/kibana-localization
+/src/legacy/server/i18n/ @elastic/kibana-localization
+/src/core/public/i18n/ @elastic/kibana-localization
+/packages/kbn-i18n/ @elastic/kibana-localization
# Pulse
/packages/kbn-analytics/ @elastic/pulse
diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml
index 3d35cd74e0718..544dd577313df 100644
--- a/.github/paths-labeller.yml
+++ b/.github/paths-labeller.yml
@@ -8,3 +8,6 @@
- "Feature:ExpressionLanguage":
- "src/plugins/expressions/**/*.*"
- "src/plugins/bfetch/**/*.*"
+ - "Team:uptime":
+ - "x-pack/plugins/uptime/**/*.*"
+ - "x-pack/legacy/plugins/uptime/**/*.*"
diff --git a/.i18nrc.json b/.i18nrc.json
index e18f529b92ac3..2edf178e37bd5 100644
--- a/.i18nrc.json
+++ b/.i18nrc.json
@@ -47,7 +47,7 @@
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/legacy/core_plugins/vis_type_markdown",
- "visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
+ "visTypeMetric": "src/plugins/vis_type_metric",
"visTypeTable": "src/legacy/core_plugins/vis_type_table",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": ["src/legacy/core_plugins/vis_type_timeseries", "src/plugins/vis_type_timeseries"],
diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.http.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.http.md
index dcc1d754feb7c..a8028827cc0a4 100644
--- a/docs/development/core/server/kibana-plugin-core-server.coresetup.http.md
+++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.http.md
@@ -9,5 +9,7 @@
Signature:
```typescript
-http: HttpServiceSetup;
+http: HttpServiceSetup & {
+ resources: HttpResources;
+ };
```
diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.md
index c10b460da8b4f..30c054345928b 100644
--- a/docs/development/core/server/kibana-plugin-core-server.coresetup.md
+++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.md
@@ -20,7 +20,7 @@ export interface CoreSetupContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) |
| [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) |
| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) |
-| [http](./kibana-plugin-core-server.coresetup.http.md) | HttpServiceSetup | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) |
+| [http](./kibana-plugin-core-server.coresetup.http.md) | HttpServiceSetup & { resources: HttpResources; } | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) |
| [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | MetricsServiceSetup | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) |
| [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) |
| [status](./kibana-plugin-core-server.coresetup.status.md) | StatusServiceSetup | [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) |
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresources.md b/docs/development/core/server/kibana-plugin-core-server.httpresources.md
new file mode 100644
index 0000000000000..cb3170e989e17
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresources.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResources](./kibana-plugin-core-server.httpresources.md)
+
+## HttpResources interface
+
+HttpResources service is responsible for serving static & dynamic assets for Kibana application via HTTP. Provides API allowing plug-ins to respond with: - a pre-configured HTML page bootstrapping Kibana client app - custom HTML page - custom JS script file.
+
+Signature:
+
+```typescript
+export interface HttpResources
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [register](./kibana-plugin-core-server.httpresources.register.md) | <P, Q, B>(route: RouteConfig<P, Q, B, 'get'>, handler: HttpResourcesRequestHandler<P, Q, B>) => void | To register a route handler executing passed function to form response. |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresources.register.md b/docs/development/core/server/kibana-plugin-core-server.httpresources.register.md
new file mode 100644
index 0000000000000..fe3803a6ffe52
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresources.register.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResources](./kibana-plugin-core-server.httpresources.md) > [register](./kibana-plugin-core-server.httpresources.register.md)
+
+## HttpResources.register property
+
+To register a route handler executing passed function to form response.
+
+Signature:
+
+```typescript
+register:
(route: RouteConfig
, handler: HttpResourcesRequestHandler
) => void;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.headers.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.headers.md
new file mode 100644
index 0000000000000..bb6dec504ff42
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.headers.md
@@ -0,0 +1,18 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesRenderOptions](./kibana-plugin-core-server.httpresourcesrenderoptions.md) > [headers](./kibana-plugin-core-server.httpresourcesrenderoptions.headers.md)
+
+## HttpResourcesRenderOptions.headers property
+
+HTTP Headers with additional information about response.
+
+Signature:
+
+```typescript
+headers?: ResponseHeaders;
+```
+
+## Remarks
+
+All HTML pages are already pre-configured with `content-security-policy` header that cannot be overridden.
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md
new file mode 100644
index 0000000000000..6563e3c636a99
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrenderoptions.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesRenderOptions](./kibana-plugin-core-server.httpresourcesrenderoptions.md)
+
+## HttpResourcesRenderOptions interface
+
+Allows to configure HTTP response parameters
+
+Signature:
+
+```typescript
+export interface HttpResourcesRenderOptions
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [headers](./kibana-plugin-core-server.httpresourcesrenderoptions.headers.md) | ResponseHeaders | HTTP Headers with additional information about response. |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesrequesthandler.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrequesthandler.md
new file mode 100644
index 0000000000000..20f930382955e
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesrequesthandler.md
@@ -0,0 +1,18 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesRequestHandler](./kibana-plugin-core-server.httpresourcesrequesthandler.md)
+
+## HttpResourcesRequestHandler type
+
+Extended version of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) having access to [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) to respond with HTML or JS resources.
+
+Signature:
+
+```typescript
+export declare type HttpResourcesRequestHandler
= RequestHandler
;
+```
+
+## Example
+
+\`\`\`typescript httpResources.register({ path: '/login', validate: { params: schema.object({ id: schema.string() }), }, }, async (context, request, response) => { //.. return response.renderCoreApp(); });
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesresponseoptions.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesresponseoptions.md
new file mode 100644
index 0000000000000..2ea3ea7e58c78
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesresponseoptions.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesResponseOptions](./kibana-plugin-core-server.httpresourcesresponseoptions.md)
+
+## HttpResourcesResponseOptions type
+
+HTTP Resources response parameters
+
+Signature:
+
+```typescript
+export declare type HttpResourcesResponseOptions = HttpResponseOptions;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md
new file mode 100644
index 0000000000000..1c221e13f534f
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.md
@@ -0,0 +1,23 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md)
+
+## HttpResourcesServiceToolkit interface
+
+Extended set of [KibanaResponseFactory](./kibana-plugin-core-server.kibanaresponsefactory.md) helpers used to respond with HTML or JS resource.
+
+Signature:
+
+```typescript
+export interface HttpResourcesServiceToolkit
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [renderAnonymousCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application without retrieving user-specific information. |
+| [renderCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md) | (options?: HttpResourcesRenderOptions) => Promise<IKibanaResponse> | To respond with HTML page bootstrapping Kibana application. |
+| [renderHtml](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom HTML page. |
+| [renderJs](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md) | (options: HttpResourcesResponseOptions) => IKibanaResponse | To respond with a custom JS script file. |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md
new file mode 100644
index 0000000000000..3dce9d88c8036
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) > [renderAnonymousCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md)
+
+## HttpResourcesServiceToolkit.renderAnonymousCoreApp property
+
+To respond with HTML page bootstrapping Kibana application without retrieving user-specific information.
+
+Signature:
+
+```typescript
+renderAnonymousCoreApp: (options?: HttpResourcesRenderOptions) => Promise;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md
new file mode 100644
index 0000000000000..eb4f095bc19be
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) > [renderCoreApp](./kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md)
+
+## HttpResourcesServiceToolkit.renderCoreApp property
+
+To respond with HTML page bootstrapping Kibana application.
+
+Signature:
+
+```typescript
+renderCoreApp: (options?: HttpResourcesRenderOptions) => Promise;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md
new file mode 100644
index 0000000000000..325d19625df44
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) > [renderHtml](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderhtml.md)
+
+## HttpResourcesServiceToolkit.renderHtml property
+
+To respond with a custom HTML page.
+
+Signature:
+
+```typescript
+renderHtml: (options: HttpResourcesResponseOptions) => IKibanaResponse;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md
new file mode 100644
index 0000000000000..f8d4418fc6cba
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) > [renderJs](./kibana-plugin-core-server.httpresourcesservicetoolkit.renderjs.md)
+
+## HttpResourcesServiceToolkit.renderJs property
+
+To respond with a custom JS script file.
+
+Signature:
+
+```typescript
+renderJs: (options: HttpResourcesResponseOptions) => IKibanaResponse;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.irouter.handlelegacyerrors.md b/docs/development/core/server/kibana-plugin-core-server.irouter.handlelegacyerrors.md
index 94cf3c94187b0..35d109975c83a 100644
--- a/docs/development/core/server/kibana-plugin-core-server.irouter.handlelegacyerrors.md
+++ b/docs/development/core/server/kibana-plugin-core-server.irouter.handlelegacyerrors.md
@@ -9,5 +9,5 @@ Wrap a router handler to catch and converts legacy boom errors to proper custom
Signature:
```typescript
-handleLegacyErrors:
(handler: RequestHandler
) => RequestHandler
;
+handleLegacyErrors: RequestHandlerWrapper;
```
diff --git a/docs/development/core/server/kibana-plugin-core-server.irouter.md b/docs/development/core/server/kibana-plugin-core-server.irouter.md
index 073f02f1a4191..4bade638a65a5 100644
--- a/docs/development/core/server/kibana-plugin-core-server.irouter.md
+++ b/docs/development/core/server/kibana-plugin-core-server.irouter.md
@@ -18,7 +18,7 @@ export interface IRouter
| --- | --- | --- |
| [delete](./kibana-plugin-core-server.irouter.delete.md) | RouteRegistrar<'delete'> | Register a route handler for DELETE request. |
| [get](./kibana-plugin-core-server.irouter.get.md) | RouteRegistrar<'get'> | Register a route handler for GET request. |
-| [handleLegacyErrors](./kibana-plugin-core-server.irouter.handlelegacyerrors.md) | <P, Q, B>(handler: RequestHandler<P, Q, B>) => RequestHandler<P, Q, B> | Wrap a router handler to catch and converts legacy boom errors to proper custom errors. |
+| [handleLegacyErrors](./kibana-plugin-core-server.irouter.handlelegacyerrors.md) | RequestHandlerWrapper | Wrap a router handler to catch and converts legacy boom errors to proper custom errors. |
| [patch](./kibana-plugin-core-server.irouter.patch.md) | RouteRegistrar<'patch'> | Register a route handler for PATCH request. |
| [post](./kibana-plugin-core-server.irouter.post.md) | RouteRegistrar<'post'> | Register a route handler for POST request. |
| [put](./kibana-plugin-core-server.irouter.put.md) | RouteRegistrar<'put'> | Register a route handler for PUT request. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.md b/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.md
deleted file mode 100644
index 0632b5e5e2297..0000000000000
--- a/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.md
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [IScopedRenderingClient](./kibana-plugin-core-server.iscopedrenderingclient.md)
-
-## IScopedRenderingClient interface
-
-
-Signature:
-
-```typescript
-export interface IScopedRenderingClient
-```
-
-## Methods
-
-| Method | Description |
-| --- | --- |
-| [render(options)](./kibana-plugin-core-server.iscopedrenderingclient.render.md) | Generate a KibanaResponse which renders an HTML page bootstrapped with the core bundle. Intended as a response body for HTTP route handlers. |
-
diff --git a/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.render.md b/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.render.md
deleted file mode 100644
index ca114bed21149..0000000000000
--- a/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.render.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [IScopedRenderingClient](./kibana-plugin-core-server.iscopedrenderingclient.md) > [render](./kibana-plugin-core-server.iscopedrenderingclient.render.md)
-
-## IScopedRenderingClient.render() method
-
-Generate a `KibanaResponse` which renders an HTML page bootstrapped with the `core` bundle. Intended as a response body for HTTP route handlers.
-
-Signature:
-
-```typescript
-render(options?: Pick): Promise;
-```
-
-## Parameters
-
-| Parameter | Type | Description |
-| --- | --- | --- |
-| options | Pick<IRenderOptions, 'includeUserSettings'> | |
-
-Returns:
-
-`Promise`
-
-## Example
-
-
-```ts
-router.get(
- { path: '/', validate: false },
- (context, request, response) =>
- response.ok({
- body: await context.core.rendering.render(),
- headers: {
- 'content-security-policy': context.core.http.csp.header,
- },
- })
-);
-
-```
-
diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.md b/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.md
index f037b7b3e7cb2..a5c1d59be06d3 100644
--- a/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.md
+++ b/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.md
@@ -20,4 +20,5 @@ export interface LegacyServiceSetupDeps
| --- | --- | --- |
| [core](./kibana-plugin-core-server.legacyservicesetupdeps.core.md) | LegacyCoreSetup | |
| [plugins](./kibana-plugin-core-server.legacyservicesetupdeps.plugins.md) | Record<string, unknown> | |
+| [uiPlugins](./kibana-plugin-core-server.legacyservicesetupdeps.uiplugins.md) | UiPlugins | |
diff --git a/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.uiplugins.md b/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.uiplugins.md
new file mode 100644
index 0000000000000..d19a7dfcbfcfa
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.legacyservicesetupdeps.uiplugins.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [LegacyServiceSetupDeps](./kibana-plugin-core-server.legacyservicesetupdeps.md) > [uiPlugins](./kibana-plugin-core-server.legacyservicesetupdeps.uiplugins.md)
+
+## LegacyServiceSetupDeps.uiPlugins property
+
+Signature:
+
+```typescript
+uiPlugins: UiPlugins;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md
index 5c0f10cac5179..5450e84417f89 100644
--- a/docs/development/core/server/kibana-plugin-core-server.md
+++ b/docs/development/core/server/kibana-plugin-core-server.md
@@ -80,6 +80,9 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [EnvironmentMode](./kibana-plugin-core-server.environmentmode.md) | |
| [ErrorHttpResponseOptions](./kibana-plugin-core-server.errorhttpresponseoptions.md) | HTTP response parameters |
| [FakeRequest](./kibana-plugin-core-server.fakerequest.md) | Fake request object created manually by Kibana plugins. |
+| [HttpResources](./kibana-plugin-core-server.httpresources.md) | HttpResources service is responsible for serving static & dynamic assets for Kibana application via HTTP. Provides API allowing plug-ins to respond with: - a pre-configured HTML page bootstrapping Kibana client app - custom HTML page - custom JS script file. |
+| [HttpResourcesRenderOptions](./kibana-plugin-core-server.httpresourcesrenderoptions.md) | Allows to configure HTTP response parameters |
+| [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) | Extended set of [KibanaResponseFactory](./kibana-plugin-core-server.kibanaresponsefactory.md) helpers used to respond with HTML or JS resource. |
| [HttpResponseOptions](./kibana-plugin-core-server.httpresponseoptions.md) | HTTP response parameters |
| [HttpServerInfo](./kibana-plugin-core-server.httpserverinfo.md) | |
| [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) | Kibana HTTP Service provides own abstraction for work with HTTP stack. Plugins don't have direct access to hapi server and its primitives anymore. Moreover, plugins shouldn't rely on the fact that HTTP Service uses one or another library under the hood. This gives the platform flexibility to upgrade or changing our internal HTTP stack without breaking plugins. If the HTTP Service lacks functionality you need, we are happy to discuss and support your needs. |
@@ -92,7 +95,6 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [IndexSettingsDeprecationInfo](./kibana-plugin-core-server.indexsettingsdeprecationinfo.md) | |
| [IRenderOptions](./kibana-plugin-core-server.irenderoptions.md) | |
| [IRouter](./kibana-plugin-core-server.irouter.md) | Registers route handlers for specified resource path and method. See [RouteConfig](./kibana-plugin-core-server.routeconfig.md) and [RequestHandler](./kibana-plugin-core-server.requesthandler.md) for more information about arguments to route registrations. |
-| [IScopedRenderingClient](./kibana-plugin-core-server.iscopedrenderingclient.md) | |
| [IUiSettingsClient](./kibana-plugin-core-server.iuisettingsclient.md) | Server-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. |
| [KibanaRequestEvents](./kibana-plugin-core-server.kibanarequestevents.md) | Request events. |
| [KibanaRequestRoute](./kibana-plugin-core-server.kibanarequestroute.md) | Request specific route information exposed to a handler. |
@@ -118,7 +120,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [PluginConfigDescriptor](./kibana-plugin-core-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. |
| [PluginInitializerContext](./kibana-plugin-core-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. |
| [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. |
-| [RequestHandlerContext](./kibana-plugin-core-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.Provides the following clients and services: - [rendering](./kibana-plugin-core-server.iscopedrenderingclient.md) - Rendering client which uses the data of the incoming request - [savedObjects.client](./kibana-plugin-core-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [savedObjects.typeRegistry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) - Type registry containing all the registered types. - [elasticsearch.dataClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-core-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request |
+| [RequestHandlerContext](./kibana-plugin-core-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.Provides the following clients and services: - [savedObjects.client](./kibana-plugin-core-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [savedObjects.typeRegistry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) - Type registry containing all the registered types. - [elasticsearch.dataClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-core-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request |
| [RouteConfig](./kibana-plugin-core-server.routeconfig.md) | Route specific configuration. |
| [RouteConfigOptions](./kibana-plugin-core-server.routeconfigoptions.md) | Additional route options. |
| [RouteConfigOptionsBody](./kibana-plugin-core-server.routeconfigoptionsbody.md) | Additional body options for a route |
@@ -216,6 +218,8 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-core-server.icontextcontainer.md) |
| [HandlerParameters](./kibana-plugin-core-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-core-server.handlerfunction.md), excluding the [HandlerContextType](./kibana-plugin-core-server.handlercontexttype.md). |
| [Headers](./kibana-plugin-core-server.headers.md) | Http request headers to read. |
+| [HttpResourcesRequestHandler](./kibana-plugin-core-server.httpresourcesrequesthandler.md) | Extended version of [RequestHandler](./kibana-plugin-core-server.requesthandler.md) having access to [HttpResourcesServiceToolkit](./kibana-plugin-core-server.httpresourcesservicetoolkit.md) to respond with HTML or JS resources. |
+| [HttpResourcesResponseOptions](./kibana-plugin-core-server.httpresourcesresponseoptions.md) | HTTP Resources response parameters |
| [HttpResponsePayload](./kibana-plugin-core-server.httpresponsepayload.md) | Data send to the client as a response payload. |
| [IBasePath](./kibana-plugin-core-server.ibasepath.md) | Access or manipulate the Kibana base path[BasePath](./kibana-plugin-core-server.basepath.md) |
| [IClusterClient](./kibana-plugin-core-server.iclusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-core-server.clusterclient.md). |
@@ -245,6 +249,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [RequestHandler](./kibana-plugin-core-server.requesthandler.md) | A function executed when route path matched requested resource path. Request handler is expected to return a result of one of [KibanaResponseFactory](./kibana-plugin-core-server.kibanaresponsefactory.md) functions. |
| [RequestHandlerContextContainer](./kibana-plugin-core-server.requesthandlercontextcontainer.md) | An object that handles registration of http request context providers. |
| [RequestHandlerContextProvider](./kibana-plugin-core-server.requesthandlercontextprovider.md) | Context provider for request handler. Extends request context object with provided functionality or data. |
+| [RequestHandlerWrapper](./kibana-plugin-core-server.requesthandlerwrapper.md) | Type-safe wrapper for [RequestHandler](./kibana-plugin-core-server.requesthandler.md) function. |
| [ResponseError](./kibana-plugin-core-server.responseerror.md) | Error message and optional data send to the client in case of error. |
| [ResponseErrorAttributes](./kibana-plugin-core-server.responseerrorattributes.md) | Additional data to provide error details. |
| [ResponseHeaders](./kibana-plugin-core-server.responseheaders.md) | Http response headers to set. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandler.md b/docs/development/core/server/kibana-plugin-core-server.requesthandler.md
index 156f38fab0983..cecef7c923568 100644
--- a/docs/development/core/server/kibana-plugin-core-server.requesthandler.md
+++ b/docs/development/core/server/kibana-plugin-core-server.requesthandler.md
@@ -9,7 +9,7 @@ A function executed when route path matched requested resource path. Request han
Signature:
```typescript
-export declare type RequestHandler
, response: ResponseFactory) => IKibanaResponse | Promise>;
```
## Example
diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md
index 3c6bee114b6ab..0d640e52c3a03 100644
--- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md
+++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md
@@ -8,7 +8,6 @@
```typescript
core: {
- rendering: IScopedRenderingClient;
savedObjects: {
client: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md
index b65ae47f0e0c1..0966b91a4ebf2 100644
--- a/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md
+++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md
@@ -6,7 +6,7 @@
Plugin specific context passed to a route handler.
-Provides the following clients and services: - [rendering](./kibana-plugin-core-server.iscopedrenderingclient.md) - Rendering client which uses the data of the incoming request - [savedObjects.client](./kibana-plugin-core-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [savedObjects.typeRegistry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) - Type registry containing all the registered types. - [elasticsearch.dataClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-core-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request
+Provides the following clients and services: - [savedObjects.client](./kibana-plugin-core-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [savedObjects.typeRegistry](./kibana-plugin-core-server.isavedobjecttyperegistry.md) - Type registry containing all the registered types. - [elasticsearch.dataClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-core-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-core-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request
Signature:
@@ -18,5 +18,5 @@ export interface RequestHandlerContext
| Property | Type | Description |
| --- | --- | --- |
-| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | { rendering: IScopedRenderingClient; savedObjects: { client: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; }; elasticsearch: { dataClient: IScopedClusterClient; adminClient: IScopedClusterClient; }; uiSettings: { client: IUiSettingsClient; }; } | |
+| [core](./kibana-plugin-core-server.requesthandlercontext.core.md) | { savedObjects: { client: SavedObjectsClientContract; typeRegistry: ISavedObjectTypeRegistry; }; elasticsearch: { dataClient: IScopedClusterClient; adminClient: IScopedClusterClient; }; uiSettings: { client: IUiSettingsClient; }; } | |
diff --git a/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md b/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md
new file mode 100644
index 0000000000000..a9fe188ee2bff
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.requesthandlerwrapper.md
@@ -0,0 +1,27 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [RequestHandlerWrapper](./kibana-plugin-core-server.requesthandlerwrapper.md)
+
+## RequestHandlerWrapper type
+
+Type-safe wrapper for [RequestHandler](./kibana-plugin-core-server.requesthandler.md) function.
+
+Signature:
+
+```typescript
+export declare type RequestHandlerWrapper =
(handler: RequestHandler
) => RequestHandler
;
+```
+
+## Example
+
+
+```typescript
+export const wrapper: RequestHandlerWrapper = handler => {
+ return async (context, request, response) => {
+ // do some logic
+ ...
+ };
+}
+
+```
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.responseheaders.md b/docs/development/core/server/kibana-plugin-core-server.responseheaders.md
index 4551d1cab8632..fb7d6a10c6b6c 100644
--- a/docs/development/core/server/kibana-plugin-core-server.responseheaders.md
+++ b/docs/development/core/server/kibana-plugin-core-server.responseheaders.md
@@ -9,9 +9,5 @@ Http response headers to set.
Signature:
```typescript
-export declare type ResponseHeaders = {
- [header in KnownHeaders]?: string | string[];
-} & {
- [header: string]: string | string[];
-};
+export declare type ResponseHeaders = Record | Record;
```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md
new file mode 100644
index 0000000000000..d1a1ee0905c6e
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md)
+
+## IndexPatternField.indexPattern property
+
+Signature:
+
+```typescript
+indexPattern?: IndexPattern;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
index 121ae80734dfd..df0de6ce0e541 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
@@ -27,6 +27,7 @@ export declare class Field implements IFieldType
| [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | |
| [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean | |
| [format](./kibana-plugin-plugins-data-public.indexpatternfield.format.md) | | any | |
+| [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md) | | IndexPattern | |
| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | |
| [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string | |
| [script](./kibana-plugin-plugins-data-public.indexpatternfield.script.md) | | string | |
diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc
index 02c09736e1fa0..2913bf28dd765 100644
--- a/docs/user/alerting/action-types.asciidoc
+++ b/docs/user/alerting/action-types.asciidoc
@@ -2,181 +2,46 @@
[[action-types]]
== Action and connector types
-{kib} provides the following types of actions:
+Actions are Kibana services or integrations with third-party systems that run as background tasks on the Kibana server when alert conditions are met. {kib} provides the following types of actions:
-* <>
-* <>
-* <>
-* <>
-* <>
-* <>
+[cols="2"]
+|===
-This section describes how to configure connectors and actions for each type.
+a| <>
-[NOTE]
-==============================================
-Some action types are paid commercial features, while others are free.
-For a comparison of the Elastic license levels,
-see https://www.elastic.co/subscriptions[the subscription page].
-==============================================
-
-[float]
-[[email-action-type]]
-=== Email
-
-The email action type uses the SMTP protocol to send mail message, using an integration of https://nodemailer.com/[Nodemailer]. Email message text is sent as both plain text and html text.
-
-[float]
-[[email-connector-configuration]]
-==== Connector configuration
-
-Email connectors have the following configuration properties:
-
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-Sender:: The from address for all emails sent with this connector, specified in `user@host-name` format.
-Host:: Host name of the service provider. If you are using the <> setting, make sure this hostname is whitelisted.
-Port:: The port to connect to on the service provider.
-Secure:: If true the connection will use TLS when connecting to the service provider. See https://nodemailer.com/smtp/#tls-options[nodemailer TLS documentation] for more information.
-Username:: username for 'login' type authentication.
-Password:: password for 'login' type authentication.
-
-[float]
-[[email-action-configuration]]
-==== Action configuration
-
-Email actions have the following configuration properties:
-
-To, CC, BCC:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry.
-Subject:: The subject line of the email.
-Message:: The message text of the email. Markdown format is supported.
-
-[float]
-[[index-action-type]]
-=== Index
-
-The index action type will index a document into {es}.
-
-[float]
-[[index-connector-configuration]]
-==== Connector configuration
-
-Index connectors have the following configuration properties:
-
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-Index:: The {es} index to be written to.
-Refresh:: Setting for the {ref}/docs-refresh.html[refresh] policy for the write request.
-Execution time field:: This field will be automatically set to the time the alert condition was detected.
-
-[float]
-[[index-action-configuration]]
-==== Action configuration
-
-Index actions have the following properties:
-
-Document:: The document to index in json format.
-
-[float]
-[[pagerduty-action-type]]
-=== PagerDuty
-
-The PagerDuty action type uses the https://v2.developer.pagerduty.com/docs/events-api-v2[v2 Events API] to trigger, acknowledge, and resolve PagerDuty alerts.
-
-[float]
-[[pagerduty-connector-configuration]]
-==== Connector configuration
+| Send email from your server.
-PagerDuty connectors have the following configuration properties:
+a| <>
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-API URL:: An optional PagerDuty event URL. Defaults to `https://events.pagerduty.com/v2/enqueue`. If you are using the <> setting, make sure the hostname is whitelisted.
-Routing Key:: A 32 character PagerDuty Integration Key for an integration on a service or on a global ruleset.
+| Index data into Elasticsearch.
-[float]
-[[pagerduty-action-configuration]]
-==== Action configuration
+a| <>
-PagerDuty actions have the following properties:
+| Send an event in PagerDuty.
-Severity:: The perceived severity of on the affected system. This can be one of `Critical`, `Error`, `Warning` or `Info`(default).
-Event action:: One of `Trigger` (default), `Resolve`, or `Acknowledge`. See https://v2.developer.pagerduty.com/docs/events-api-v2#event-action[event action] for more details.
-Dedup Key:: All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution. This value is *optional*, and if unset defaults to `action:`. The maximum length is *255* characters. See https://v2.developer.pagerduty.com/docs/events-api-v2#alert-de-duplication[alert deduplication] for details.
-Timestamp:: An *optional* https://v2.developer.pagerduty.com/v2/docs/types#datetime[ISO-8601 format date-time], indicating the time the event was detected or generated.
-Component:: An *optional* value indicating the component of the source machine that is responsible for the event, for example `mysql` or `eth0`.
-Group:: An *optional* value indicating the logical grouping of components of a service, for example `app-stack`.
-Source:: An *optional* value indicating the affected system, preferably a hostname or fully qualified domain name. Defaults to the {kib} saved object id of the action.
-Summary:: An *optional* text summary of the event, defaults to `No summary provided`. The maximum length is 1024 characters.
-Class:: An *optional* value indicating the class/type of the event, for example `ping failure` or `cpu load`.
+a| <>
-For more details on these properties, see https://v2.developer.pagerduty.com/v2/docs/send-an-event-events-api-v2[PagerDuty v2 event parameters].
+| Add a message to a Kibana log.
-[float]
-[[server-log-action-type]]
-=== Server log
+a| <>
-This action type writes and entry to the {kib} server log.
+| Send a message to a Slack channel or user.
-[float]
-[[server-log-connector-configuration]]
-==== Connector configuration
+a| <>
-Server log connectors have the following configuration properties:
+| Send a request to a web service.
+|===
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-
-[float]
-[[server-log-action-configuration]]
-==== Action configuration
-
-Server log actions have the following properties:
-
-Message:: The message to log.
-
-[float]
-[[slack-action-type]]
-=== Slack
-
-The Slack action type uses https://api.slack.com/incoming-webhooks[Slack Incoming Webhooks].
-
-[float]
-[[slack-connector-configuration]]
-==== Connector configuration
-
-Slack connectors have the following configuration properties:
-
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <> setting, make sure the hostname is whitelisted.
-
-[float]
-[[slack-action-configuration]]
-==== Action configuration
-
-Slack actions have the following properties:
-
-Message:: The message text, converted to the `text` field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported.
-
-[float]
-[[webhook-action-type]]
-=== Webhook
-
-The Webhook action type uses https://github.com/axios/axios[axios] to send a POST or PUT request to a web service.
-
-[float]
-[[webhook-connector-configuration]]
-==== Connector configuration
-
-Webhook connectors have the following configuration properties:
-
-Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
-URL:: The request URL. If you are using the <> setting, make sure the hostname is whitelisted.
-Method:: HTTP request method, either `post`(default) or `put`.
-Headers:: A set of key-value pairs sent as headers with the request
-User:: An optional username. If set, HTTP basic authentication is used. Currently only basic authentication is supported.
-Password:: An optional password. If set, HTTP basic authentication is used. Currently only basic authentication is supported.
-
-[float]
-[[webhook-action-configuration]]
-==== Action configuration
-
-Webhook actions have the following properties:
+[NOTE]
+==============================================
+Some action types are paid commercial features, while others are free.
+For a comparison of the Elastic subscription levels,
+see https://www.elastic.co/subscriptions[the subscription page].
+==============================================
-Body:: A json payload sent to the request URL.
\ No newline at end of file
+include::action-types/email.asciidoc[]
+include::action-types/index.asciidoc[]
+include::action-types/pagerduty.asciidoc[]
+include::action-types/server-log.asciidoc[]
+include::action-types/slack.asciidoc[]
+include::action-types/webhook.asciidoc[]
diff --git a/docs/user/alerting/action-types/email.asciidoc b/docs/user/alerting/action-types/email.asciidoc
new file mode 100644
index 0000000000000..be3623dd9e59c
--- /dev/null
+++ b/docs/user/alerting/action-types/email.asciidoc
@@ -0,0 +1,29 @@
+[role="xpack"]
+[[email-action-type]]
+== Email action type
+
+The email action type uses the SMTP protocol to send mail message, using an integration of https://nodemailer.com/[Nodemailer]. Email message text is sent as both plain text and html text.
+
+[float]
+[[email-connector-configuration]]
+==== Connector configuration
+
+Email connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+Sender:: The from address for all emails sent with this connector, specified in `user@host-name` format.
+Host:: Host name of the service provider. If you are using the <> setting, make sure this hostname is whitelisted.
+Port:: The port to connect to on the service provider.
+Secure:: If true the connection will use TLS when connecting to the service provider. See https://nodemailer.com/smtp/#tls-options[nodemailer TLS documentation] for more information.
+Username:: username for 'login' type authentication.
+Password:: password for 'login' type authentication.
+
+[float]
+[[email-action-configuration]]
+==== Action configuration
+
+Email actions have the following configuration properties:
+
+To, CC, BCC:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry.
+Subject:: The subject line of the email.
+Message:: The message text of the email. Markdown format is supported.
\ No newline at end of file
diff --git a/docs/user/alerting/action-types/index.asciidoc b/docs/user/alerting/action-types/index.asciidoc
new file mode 100644
index 0000000000000..75d9e57b1f212
--- /dev/null
+++ b/docs/user/alerting/action-types/index.asciidoc
@@ -0,0 +1,24 @@
+[role="xpack"]
+[[index-action-type]]
+== Index action type
+
+The index action type will index a document into {es}.
+
+[float]
+[[index-connector-configuration]]
+==== Connector configuration
+
+Index connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+Index:: The {es} index to be written to.
+Refresh:: Setting for the {ref}/docs-refresh.html[refresh] policy for the write request.
+Execution time field:: This field will be automatically set to the time the alert condition was detected.
+
+[float]
+[[index-action-configuration]]
+==== Action configuration
+
+Index actions have the following properties:
+
+Document:: The document to index in json format.
\ No newline at end of file
diff --git a/docs/user/alerting/action-types/pagerduty.asciidoc b/docs/user/alerting/action-types/pagerduty.asciidoc
new file mode 100644
index 0000000000000..50a1f31e4a9ae
--- /dev/null
+++ b/docs/user/alerting/action-types/pagerduty.asciidoc
@@ -0,0 +1,33 @@
+[role="xpack"]
+[[pagerduty-action-type]]
+== PagerDuty action type
+
+The PagerDuty action type uses the https://v2.developer.pagerduty.com/docs/events-api-v2[v2 Events API] to trigger, acknowledge, and resolve PagerDuty alerts.
+
+[float]
+[[pagerduty-connector-configuration]]
+==== Connector configuration
+
+PagerDuty connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+API URL:: An optional PagerDuty event URL. Defaults to `https://events.pagerduty.com/v2/enqueue`. If you are using the <> setting, make sure the hostname is whitelisted.
+Routing Key:: A 32 character PagerDuty Integration Key for an integration on a service or on a global ruleset.
+
+[float]
+[[pagerduty-action-configuration]]
+==== Action configuration
+
+PagerDuty actions have the following properties:
+
+Severity:: The perceived severity of on the affected system. This can be one of `Critical`, `Error`, `Warning` or `Info`(default).
+Event action:: One of `Trigger` (default), `Resolve`, or `Acknowledge`. See https://v2.developer.pagerduty.com/docs/events-api-v2#event-action[event action] for more details.
+Dedup Key:: All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution. This value is *optional*, and if unset defaults to `action:`. The maximum length is *255* characters. See https://v2.developer.pagerduty.com/docs/events-api-v2#alert-de-duplication[alert deduplication] for details.
+Timestamp:: An *optional* https://v2.developer.pagerduty.com/v2/docs/types#datetime[ISO-8601 format date-time], indicating the time the event was detected or generated.
+Component:: An *optional* value indicating the component of the source machine that is responsible for the event, for example `mysql` or `eth0`.
+Group:: An *optional* value indicating the logical grouping of components of a service, for example `app-stack`.
+Source:: An *optional* value indicating the affected system, preferably a hostname or fully qualified domain name. Defaults to the {kib} saved object id of the action.
+Summary:: An *optional* text summary of the event, defaults to `No summary provided`. The maximum length is 1024 characters.
+Class:: An *optional* value indicating the class/type of the event, for example `ping failure` or `cpu load`.
+
+For more details on these properties, see https://v2.developer.pagerduty.com/v2/docs/send-an-event-events-api-v2[PagerDuty v2 event parameters].
\ No newline at end of file
diff --git a/docs/user/alerting/action-types/server-log.asciidoc b/docs/user/alerting/action-types/server-log.asciidoc
new file mode 100644
index 0000000000000..4efbdf3bea099
--- /dev/null
+++ b/docs/user/alerting/action-types/server-log.asciidoc
@@ -0,0 +1,21 @@
+[role="xpack"]
+[[server-log-action-type]]
+== Server log action type
+
+This action type writes and entry to the {kib} server log.
+
+[float]
+[[server-log-connector-configuration]]
+==== Connector configuration
+
+Server log connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+
+[float]
+[[server-log-action-configuration]]
+==== Action configuration
+
+Server log actions have the following properties:
+
+Message:: The message to log.
\ No newline at end of file
diff --git a/docs/user/alerting/action-types/slack.asciidoc b/docs/user/alerting/action-types/slack.asciidoc
new file mode 100644
index 0000000000000..a4bacbf162e46
--- /dev/null
+++ b/docs/user/alerting/action-types/slack.asciidoc
@@ -0,0 +1,22 @@
+[role="xpack"]
+[[slack-action-type]]
+== Slack action type
+
+The Slack action type uses https://api.slack.com/incoming-webhooks[Slack Incoming Webhooks].
+
+[float]
+[[slack-connector-configuration]]
+==== Connector configuration
+
+Slack connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <> setting, make sure the hostname is whitelisted.
+
+[float]
+[[slack-action-configuration]]
+==== Action configuration
+
+Slack actions have the following properties:
+
+Message:: The message text, converted to the `text` field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported.
\ No newline at end of file
diff --git a/docs/user/alerting/action-types/webhook.asciidoc b/docs/user/alerting/action-types/webhook.asciidoc
new file mode 100644
index 0000000000000..8c211aa83af89
--- /dev/null
+++ b/docs/user/alerting/action-types/webhook.asciidoc
@@ -0,0 +1,26 @@
+[role="xpack"]
+[[webhook-action-type]]
+== Webhook action type
+
+The Webhook action type uses https://github.com/axios/axios[axios] to send a POST or PUT request to a web service.
+
+[float]
+[[webhook-connector-configuration]]
+==== Connector configuration
+
+Webhook connectors have the following configuration properties:
+
+Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
+URL:: The request URL. If you are using the <> setting, make sure the hostname is whitelisted.
+Method:: HTTP request method, either `post`(default) or `put`.
+Headers:: A set of key-value pairs sent as headers with the request
+User:: An optional username. If set, HTTP basic authentication is used. Currently only basic authentication is supported.
+Password:: An optional password. If set, HTTP basic authentication is used. Currently only basic authentication is supported.
+
+[float]
+[[webhook-action-configuration]]
+==== Action configuration
+
+Webhook actions have the following properties:
+
+Body:: A json payload sent to the request URL.
\ No newline at end of file
diff --git a/docs/user/reporting/chromium-sandbox.asciidoc b/docs/user/reporting/chromium-sandbox.asciidoc
index 5d4fbfb153a0b..bfef5b8b86c6b 100644
--- a/docs/user/reporting/chromium-sandbox.asciidoc
+++ b/docs/user/reporting/chromium-sandbox.asciidoc
@@ -11,12 +11,12 @@ sandboxing techniques differ for each operating system.
The Linux sandbox depends on user namespaces, which were introduced with the 3.8 Linux kernel. However, many
distributions don't have user namespaces enabled by default, or they require the CAP_SYS_ADMIN capability. {reporting}
will automatically disable the sandbox when it is running on Debian and CentOS as additional steps are required to enable
-unprivileged usernamespaces. In these situations, you'll see the following message in your {kib} logs:
-`Enabling the Chromium sandbox provides an additional layer of protection`.
+unprivileged usernamespaces. In these situations, you'll see the following message in your {kib} startup logs:
+`Chromium sandbox provides an additional layer of protection, but is not supported for your OS.
+Automatically setting 'xpack.reporting.capture.browser.chromium.disableSandbox: true'.`
-If your kernel is 3.8 or newer, it's
-recommended to enable usernamespaces and set `xpack.reporting.capture.browser.chromium.disableSandbox: false` in your
-`kibana.yml` to enable the sandbox.
+Reporting will automatically enable the Chromium sandbox at startup when a supported OS is detected. However, if your kernel is 3.8 or newer, it's
+recommended to set `xpack.reporting.capture.browser.chromium.disableSandbox: false` in your `kibana.yml` to explicitly enable usernamespaces.
==== Docker
When running {kib} in a Docker container, all container processes are run within a usernamespace with seccomp-bpf and
diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md
index 0f592d108c561..a82cc27839a1d 100644
--- a/src/core/CONVENTIONS.md
+++ b/src/core/CONVENTIONS.md
@@ -1,6 +1,6 @@
-# Kibana Conventions
-
-- [Kibana Conventions](#kibana-conventions)
+- [Organisational Conventions](#organisational-conventions)
+ - [Definition of done](#definition-of-done)
+- [Technical Conventions](#technical-conventions)
- [Plugin Structure](#plugin-structure)
- [The PluginInitializer](#the-plugininitializer)
- [The Plugin class](#the-plugin-class)
@@ -8,8 +8,34 @@
- [Services](#services)
- [Usage Collection](#usage-collection)
- [Saved Objects Types](#saved-objects-types)
-
-## Plugin Structure
+ - [Naming conventions](#naming-conventions)
+
+## Organisational Conventions
+### Definition of done
+Definition of done for a feature:
+- has a dedicated Github issue describing problem space
+- an umbrella task closed/updated with follow-ups
+- all code review comments are resolved
+- has been verified manually by at least one reviewer
+- can be used by first & third party plugins
+- there is no contradiction between client and server API
+- works for OSS version
+ - works with and without a `server.basePath` configured
+ - cannot crash the Kibana server when it fails
+- works for the commercial version with a license
+ - for a logged-in user
+ - for anonymous user
+ - compatible with Spaces
+- has unit & integration tests for public contracts
+- has functional tests for user scenarios
+- uses standard tooling:
+ - code - `TypeScript`
+ - UI - `React`
+ - tests - `jest` & `FTR`
+- has documentation for the public contract, provides a usage example
+
+## Technical Conventions
+### Plugin Structure
All Kibana plugins built at Elastic should follow the same structure.
@@ -60,7 +86,7 @@ my_plugin/
- More should be fleshed out here...
- Usage collectors for Telemetry should be defined in a separate `server/collectors/` directory.
-### The PluginInitializer
+#### The PluginInitializer
```ts
// my_plugin/public/index.ts
@@ -75,7 +101,7 @@ export {
}
```
-### The Plugin class
+#### The Plugin class
```ts
// my_plugin/public/plugin.ts
@@ -130,7 +156,7 @@ Difference between `setup` and `start`:
The bulk of your plugin logic will most likely live inside _handlers_ registered during `setup`.
-### Applications
+#### Applications
It's important that UI code is not included in the main bundle for your plugin. Our webpack configuration supports
dynamic async imports to split out imports into a separate bundle. Every app's rendering logic and UI code should
@@ -175,7 +201,7 @@ export class MyPlugin implements Plugin {
}
```
-### Services
+#### Services
Service structure should mirror the plugin lifecycle to make reasoning about how the service is executed more clear.
@@ -226,7 +252,7 @@ export class Plugin {
}
```
-### Usage Collection
+#### Usage Collection
For creating and registering a Usage Collector. Collectors should be defined in a separate directory `server/collectors/`. You can read more about usage collectors on `src/plugins/usage_collection/README.md`.
@@ -263,7 +289,7 @@ export function registerMyPluginUsageCollector(usageCollection?: UsageCollection
}
```
-### Saved Objects Types
+#### Saved Objects Types
Saved object type definitions should be defined in their own `server/saved_objects` directory.
diff --git a/src/core/MIGRATION.md b/src/core/MIGRATION.md
index 368d1f47e9c3f..80f12dd78214d 100644
--- a/src/core/MIGRATION.md
+++ b/src/core/MIGRATION.md
@@ -1252,26 +1252,27 @@ import { npStart: { plugins } } from 'ui/new_platform';
In server code, `core` can be accessed from either `server.newPlatform` or `kbnServer.newPlatform`. There are not currently very many services available on the server-side:
-| Legacy Platform | New Platform | Notes |
-| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `server.config()` | [`initializerContext.config.create()`](/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.config.md) | Must also define schema. See _[how to configure plugin](#configure-plugin)_ |
-| `server.route` | [`core.http.createRouter`](/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md) | [Examples](./MIGRATION_EXAMPLES.md#route-registration) |
-| `server.renderApp()` / `server.renderAppWithDefaultConfig()` | [`context.rendering.render()`](/docs/development/core/server/kibana-plugin-core-server.iscopedrenderingclient.render.md) | [Examples](./MIGRATION_EXAMPLES.md#render-html-content) |
-| `request.getBasePath()` | [`core.http.basePath.get`](/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.basepath.md) | |
+| Legacy Platform | New Platform | Notes |
+| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
+| `server.config()` | [`initializerContext.config.create()`](/docs/development/core/server/kibana-plugin-core-server.plugininitializercontext.config.md) | Must also define schema. See _[how to configure plugin](#configure-plugin)_ |
+| `server.route` | [`core.http.createRouter`](/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.createrouter.md) | [Examples](./MIGRATION_EXAMPLES.md#route-registration) |
+| `server.renderApp()` | [`response.renderCoreApp()`](docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.rendercoreapp.md) | [Examples](./MIGRATION_EXAMPLES.md#render-html-content) |
+| `server.renderAppWithDefaultConfig()` | [`response.renderAnonymousCoreApp()`](docs/development/core/server/kibana-plugin-core-server.httpresourcesservicetoolkit.renderanonymouscoreapp.md) | [Examples](./MIGRATION_EXAMPLES.md#render-html-content) |
+| `request.getBasePath()` | [`core.http.basePath.get`](/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.basepath.md) | |
| `server.plugins.elasticsearch.getCluster('data')` | [`context.core.elasticsearch.dataClient`](/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md) | |
| `server.plugins.elasticsearch.getCluster('admin')` | [`context.core.elasticsearch.adminClient`](/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md) | |
-| `server.plugins.elasticsearch.createCluster(...)` | [`core.elasticsearch.legacy.createClient`](/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | |
-| `server.savedObjects.setScopedSavedObjectsClientFactory` | [`core.savedObjects.setClientFactoryProvider`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.setclientfactoryprovider.md) | |
-| `server.savedObjects.addScopedSavedObjectsClientWrapperFactory` | [`core.savedObjects.addClientWrapper`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.addclientwrapper.md) | |
+| `server.plugins.elasticsearch.createCluster(...)` | [`core.elasticsearch.legacy.createClient`](/docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | |
+| `server.savedObjects.setScopedSavedObjectsClientFactory` | [`core.savedObjects.setClientFactoryProvider`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.setclientfactoryprovider.md) | |
+| `server.savedObjects.addScopedSavedObjectsClientWrapperFactory` | [`core.savedObjects.addClientWrapper`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.addclientwrapper.md) | |
| `server.savedObjects.getSavedObjectsRepository` | [`core.savedObjects.createInternalRepository`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md) [`core.savedObjects.createScopedRepository`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.createscopedrepository.md) | |
-| `server.savedObjects.getScopedSavedObjectsClient` | [`core.savedObjects.getScopedClient`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.getscopedclient.md) | |
-| `request.getSavedObjectsClient` | [`context.core.savedObjects.client`](/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md) | |
+| `server.savedObjects.getScopedSavedObjectsClient` | [`core.savedObjects.getScopedClient`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsservicestart.getscopedclient.md) | |
+| `request.getSavedObjectsClient` | [`context.core.savedObjects.client`](/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.core.md) | |
| `request.getUiSettingsService` | [`context.core.uiSettings.client`](/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md) | |
-| `kibana.Plugin.deprecations` | [Handle plugin configuration deprecations](#handle-plugin-config-deprecations) and [`PluginConfigDescriptor.deprecations`](docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md) | Deprecations from New Platform are not applied to legacy configuration |
-| `kibana.Plugin.savedObjectSchemas` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
-| `kibana.Plugin.mappings` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
-| `kibana.Plugin.migrations` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
-| `kibana.Plugin.savedObjectsManagement` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
+| `kibana.Plugin.deprecations` | [Handle plugin configuration deprecations](#handle-plugin-config-deprecations) and [`PluginConfigDescriptor.deprecations`](docs/development/core/server/kibana-plugin-core-server.pluginconfigdescriptor.md) | Deprecations from New Platform are not applied to legacy configuration |
+| `kibana.Plugin.savedObjectSchemas` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
+| `kibana.Plugin.mappings` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
+| `kibana.Plugin.migrations` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
+| `kibana.Plugin.savedObjectsManagement` | [`core.savedObjects.registerType`](docs/development/core/server/kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | [Examples](./MIGRATION_EXAMPLES.md#saved-objects-types) |
_See also: [Server's CoreSetup API Docs](/docs/development/core/server/kibana-plugin-core-server.coresetup.md)_
@@ -1494,8 +1495,9 @@ The above example looks in the new platform as
```
The [request handler context](/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md) exposed the next scoped **core** services:
-| Legacy Platform | New Platform |
-| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------|
+
+| Legacy Platform | New Platform |
+| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `request.getSavedObjectsClient` | [`context.savedObjects.client`](/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md) |
| `server.plugins.elasticsearch.getCluster('admin')` | [`context.elasticsearch.adminClient`](/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md) |
| `server.plugins.elasticsearch.getCluster('data')` | [`context.elasticsearch.dataClient`](/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md) |
diff --git a/src/core/MIGRATION_EXAMPLES.md b/src/core/MIGRATION_EXAMPLES.md
index 37d0b9297ed3c..8c5fe4875aaea 100644
--- a/src/core/MIGRATION_EXAMPLES.md
+++ b/src/core/MIGRATION_EXAMPLES.md
@@ -700,21 +700,15 @@ application.register({
## Render HTML Content
You can return a blank HTML page bootstrapped with the core application bundle from an HTTP route handler
-via the `rendering` context. You may wish to do this if you are rendering a chromeless application with a
+via the `httpResources` service. You may wish to do this if you are rendering a chromeless application with a
custom application route or have other custom rendering needs.
-```ts
-router.get(
+```typescript
+httpResources.register(
{ path: '/chromeless', validate: false },
(context, request, response) => {
- const { http, rendering } = context.core;
-
- return response.ok({
- body: await rendering.render(), // generates an HTML document
- headers: {
- 'content-security-policy': http.csp.header,
- },
- });
+ //... some logic
+ return response.renderCoreApp();
}
);
```
@@ -724,18 +718,12 @@ comprises all UI Settings that are *user provided*, then injected into the page.
You may wish to exclude fetching this data if not authorized or to slim the page
size.
-```ts
-router.get(
- { path: '/', validate: false },
+```typescript
+httpResources.register(
+ { path: '/', validate: false, options: { authRequired: false } },
(context, request, response) => {
- const { http, rendering } = context.core;
-
- return response.ok({
- body: await rendering.render({ includeUserSettings: false }),
- headers: {
- 'content-security-policy': http.csp.header,
- },
- });
+ //... some logic
+ return response.renderAnonymousCoreApp();
}
);
```
diff --git a/src/core/server/http/index.ts b/src/core/server/http/index.ts
index a75eb04fa0120..ca9dfde2e71dc 100644
--- a/src/core/server/http/index.ts
+++ b/src/core/server/http/index.ts
@@ -38,6 +38,7 @@ export {
LifecycleResponseFactory,
RedirectResponseOptions,
RequestHandler,
+ RequestHandlerWrapper,
ResponseError,
ResponseErrorAttributes,
ResponseHeaders,
diff --git a/src/core/server/http/lifecycle/on_pre_response.ts b/src/core/server/http/lifecycle/on_pre_response.ts
index 50d3d7b47bf8d..050881472bc80 100644
--- a/src/core/server/http/lifecycle/on_pre_response.ts
+++ b/src/core/server/http/lifecycle/on_pre_response.ts
@@ -148,7 +148,7 @@ function findHeadersIntersection(
log: Logger
) {
Object.keys(headers).forEach(headerName => {
- if (responseHeaders[headerName] !== undefined) {
+ if (Reflect.has(responseHeaders, headerName)) {
log.warn(`onPreResponseHandler rewrote a response header [${headerName}].`);
}
});
diff --git a/src/core/server/http/router/error_wrapper.ts b/src/core/server/http/router/error_wrapper.ts
index 8f895753c38c3..af99812eff4b3 100644
--- a/src/core/server/http/router/error_wrapper.ts
+++ b/src/core/server/http/router/error_wrapper.ts
@@ -18,20 +18,10 @@
*/
import Boom from 'boom';
-import { KibanaRequest } from './request';
-import { KibanaResponseFactory } from './response';
-import { RequestHandler } from './router';
-import { RequestHandlerContext } from '../../../server';
-import { RouteMethod } from './route';
+import { RequestHandlerWrapper } from './router';
-export const wrapErrors =
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.js
deleted file mode 100644
index 87bce06c1146c..0000000000000
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { uiModules } from 'ui/modules';
-import template from './index_header.html';
-uiModules.get('apps/management').directive('kbnManagementIndexPatternsHeader', function(config) {
- return {
- restrict: 'E',
- template,
- replace: true,
- scope: {
- indexPattern: '=',
- setDefault: '&',
- refreshFields: '&',
- delete: '&',
- },
- link: function($scope, $el, attrs) {
- $scope.delete = attrs.delete ? $scope.delete : null;
- $scope.setDefault = attrs.setDefault ? $scope.setDefault : null;
- $scope.refreshFields = attrs.refreshFields ? $scope.refreshFields : null;
- config.bindToScope($scope, 'defaultIndex');
- },
- };
-});
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.tsx b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.tsx
new file mode 100644
index 0000000000000..866d10ecb0e19
--- /dev/null
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/index_header/index_header.tsx
@@ -0,0 +1,134 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import React from 'react';
+import { i18n } from '@kbn/i18n';
+import {
+ EuiFlexGroup,
+ EuiToolTip,
+ EuiFlexItem,
+ EuiIcon,
+ EuiTitle,
+ EuiButtonIcon,
+} from '@elastic/eui';
+import { IIndexPattern } from '../../../../../../../../../plugins/data/public';
+
+interface IndexHeaderProps {
+ defaultIndex: string;
+ indexPattern: IIndexPattern;
+ setDefault?: () => void;
+ refreshFields?: () => void;
+ deleteIndexPattern?: () => void;
+}
+
+const setDefaultAriaLabel = i18n.translate('kbn.management.editIndexPattern.setDefaultAria', {
+ defaultMessage: 'Set as default index.',
+});
+
+const setDefaultTooltip = i18n.translate('kbn.management.editIndexPattern.setDefaultTooltip', {
+ defaultMessage: 'Set as default index.',
+});
+
+const refreshAriaLabel = i18n.translate('kbn.management.editIndexPattern.refreshAria', {
+ defaultMessage: 'Reload field list.',
+});
+
+const refreshTooltip = i18n.translate('kbn.management.editIndexPattern.refreshTooltip', {
+ defaultMessage: 'Refresh field list.',
+});
+
+const removeAriaLabel = i18n.translate('kbn.management.editIndexPattern.removeAria', {
+ defaultMessage: 'Remove index pattern.',
+});
+
+const removeTooltip = i18n.translate('kbn.management.editIndexPattern.removeTooltip', {
+ defaultMessage: 'Remove index pattern.',
+});
+
+export function IndexHeader({
+ defaultIndex,
+ indexPattern,
+ setDefault,
+ refreshFields,
+ deleteIndexPattern,
+}: IndexHeaderProps) {
+ return (
+
+
+
+ {defaultIndex === indexPattern.id && (
+
+
+
+ )}
+
+
+
{indexPattern.title}
+
+
+
+
+
+
+ {setDefault && (
+
+
+
+
+
+ )}
+
+ {refreshFields && (
+
+
+
+
+
+ )}
+
+ {deleteIndexPattern && (
+
+
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap
similarity index 90%
rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap
rename to src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap
index b38036a0c2bf0..db2a032b1e4d9 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__jest__/__snapshots__/indexed_fields_table.test.js.snap
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/__snapshots__/indexed_fields_table.test.tsx.snap
@@ -16,9 +16,10 @@ exports[`IndexedFieldsTable should filter based on the query bar 1`] = `
"excluded": false,
"format": undefined,
"indexPattern": undefined,
- "info": undefined,
+ "info": Array [],
"name": "Elastic",
"searchable": true,
+ "type": "name",
},
]
}
@@ -42,7 +43,7 @@ exports[`IndexedFieldsTable should filter based on the type filter 1`] = `
"excluded": false,
"format": undefined,
"indexPattern": undefined,
- "info": undefined,
+ "info": Array [],
"name": "timestamp",
"type": "date",
},
@@ -68,16 +69,17 @@ exports[`IndexedFieldsTable should render normally 1`] = `
"excluded": false,
"format": undefined,
"indexPattern": undefined,
- "info": undefined,
+ "info": Array [],
"name": "Elastic",
"searchable": true,
+ "type": "name",
},
Object {
"displayName": "timestamp",
"excluded": false,
"format": undefined,
"indexPattern": undefined,
- "info": undefined,
+ "info": Array [],
"name": "timestamp",
"type": "date",
},
@@ -86,7 +88,7 @@ exports[`IndexedFieldsTable should render normally 1`] = `
"excluded": false,
"format": undefined,
"indexPattern": undefined,
- "info": undefined,
+ "info": Array [],
"name": "conflictingField",
"type": "conflict",
},
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap
similarity index 92%
rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap
rename to src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap
index f3aa2c5da4b67..2d51b1722cfb2 100644
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__jest__/__snapshots__/table.test.js.snap
+++ b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/__snapshots__/table.test.tsx.snap
@@ -98,19 +98,26 @@ exports[`Table should render normally 1`] = `
Array [
Object {
"displayName": "Elastic",
- "info": Object {},
+ "excluded": false,
+ "format": "",
+ "info": Array [],
"name": "Elastic",
"searchable": true,
+ "type": "name",
},
Object {
"displayName": "timestamp",
- "info": Object {},
+ "excluded": false,
+ "format": "YYYY-MM-DD",
+ "info": Array [],
"name": "timestamp",
"type": "date",
},
Object {
"displayName": "conflictingField",
- "info": Object {},
+ "excluded": false,
+ "format": "",
+ "info": Array [],
"name": "conflictingField",
"type": "conflict",
},
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.ts
similarity index 100%
rename from src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.js
rename to src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/index.ts
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.js b/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.js
deleted file mode 100644
index 29e160cf1c182..0000000000000
--- a/src/legacy/core_plugins/kibana/public/management/sections/index_patterns/edit_index_pattern/indexed_fields_table/components/table/table.js
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import React, { PureComponent } from 'react';
-import PropTypes from 'prop-types';
-
-import { EuiIcon, EuiInMemoryTable, EuiIconTip } from '@elastic/eui';
-
-import { i18n } from '@kbn/i18n';
-
-export class Table extends PureComponent {
- static propTypes = {
- indexPattern: PropTypes.object.isRequired,
- items: PropTypes.array.isRequired,
- editField: PropTypes.func.isRequired,
- };
-
- renderBooleanTemplate(value, label) {
- return value ? : ;
- }
-
- renderFieldName(name, field) {
- const { indexPattern } = this.props;
-
- const infoLabel = i18n.translate(
- 'kbn.management.editIndexPattern.fields.table.additionalInfoAriaLabel',
- { defaultMessage: 'Additional field information' }
- );
- const timeLabel = i18n.translate(
- 'kbn.management.editIndexPattern.fields.table.primaryTimeAriaLabel',
- { defaultMessage: 'Primary time field' }
- );
- const timeContent = i18n.translate(
- 'kbn.management.editIndexPattern.fields.table.primaryTimeTooltip',
- { defaultMessage: 'This field represents the time that events occurred.' }
- );
-
- return (
-
- {name}
- {field.info && field.info.length ? (
-
-
- (
-