Skip to content

Commit

Permalink
Merge branch 'master' into lens/dnd_add_ghost_image_to_keyboard_navig…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
kibanamachine committed Feb 8, 2021
2 parents 20b5f37 + 3b3327d commit b085a7d
Show file tree
Hide file tree
Showing 154 changed files with 1,893 additions and 923 deletions.
12 changes: 5 additions & 7 deletions docs/developer/plugin/migrating-legacy-plugins-examples.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,20 @@ export function plugin(initializerContext: PluginInitializerContext) {
*plugins/my_plugin/(public|server)/plugin.ts*
[source,typescript]
----
import type { Observable } from 'rxjs';
import { first } from 'rxjs/operators';
import { CoreSetup, Logger, Plugin, PluginInitializerContext, PluginName } from 'kibana/server';
import type { MyPluginConfig } from './config';
export class MyPlugin implements Plugin {
private readonly config$: Observable<MyPluginConfig>;
private readonly config: MyPluginConfig;
private readonly log: Logger;
constructor(private readonly initializerContext: PluginInitializerContext) {
this.log = initializerContext.logger.get();
this.config$ = initializerContext.config.create();
this.config = initializerContext.config.get<MyPluginConfig>();
}
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const isEnabled = await this.config$.pipe(first()).toPromise();
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const { someConfigValue } = this.config;
}
}
----
Expand All @@ -96,7 +94,7 @@ Additionally, some plugins need to access the runtime env configuration.
[source,typescript]
----
export class MyPlugin implements Plugin {
public async setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
public setup(core: CoreSetup, deps: Record<PluginName, unknown>) {
const { mode: { dev }, packageInfo: { version } } = this.initializerContext.env
}
----
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md)

## AsyncPlugin interface

> Warning: This API is now obsolete.
>
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-public.plugin.md)
>
A plugin with asynchronous lifecycle methods.

<b>Signature:</b>

```typescript
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object>
```

## Methods

| Method | Description |
| --- | --- |
| [setup(core, plugins)](./kibana-plugin-core-public.asyncplugin.setup.md) | |
| [start(core, plugins)](./kibana-plugin-core-public.asyncplugin.start.md) | |
| [stop()](./kibana-plugin-core-public.asyncplugin.stop.md) | |

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

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [setup](./kibana-plugin-core-public.asyncplugin.setup.md)

## AsyncPlugin.setup() method

<b>Signature:</b>

```typescript
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreSetup&lt;TPluginsStart, TStart&gt;</code> | |
| plugins | <code>TPluginsSetup</code> | |

<b>Returns:</b>

`TSetup | Promise<TSetup>`

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

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [start](./kibana-plugin-core-public.asyncplugin.start.md)

## AsyncPlugin.start() method

<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreStart</code> | |
| plugins | <code>TPluginsStart</code> | |

<b>Returns:</b>

`TStart | Promise<TStart>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- 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; [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) &gt; [stop](./kibana-plugin-core-public.asyncplugin.stop.md)

## AsyncPlugin.stop() method

<b>Signature:</b>

```typescript
stop?(): void;
```
<b>Returns:</b>
`void`
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | |
| [AppMeta](./kibana-plugin-core-public.appmeta.md) | Input type for meta data for an application.<!-- -->Meta fields include <code>keywords</code> and <code>searchDeepLinks</code> Keywords is an array of string with which to associate the app, must include at least one unique string as an array. <code>searchDeepLinks</code> is an array of links that represent secondary in-app locations for the app. |
| [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) | |
| [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) | A plugin with asynchronous lifecycle methods. |
| [Capabilities](./kibana-plugin-core-public.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. |
| [ChromeBadge](./kibana-plugin-core-public.chromebadge.md) | |
| [ChromeBrand](./kibana-plugin-core-public.chromebrand.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup |

<b>Returns:</b>

`TSetup | Promise<TSetup>`
`TSetup`

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
start(core: CoreStart, plugins: TPluginsStart): TStart;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;

<b>Returns:</b>

`TStart | Promise<TStart>`
`TStart`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The `plugin` export at the root of a plugin's `public` directory should conform
<b>Signature:</b>

```typescript
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart> | AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md)

## AsyncPlugin interface

> Warning: This API is now obsolete.
>
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-server.plugin.md)
>
A plugin with asynchronous lifecycle methods.

<b>Signature:</b>

```typescript
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object>
```

## Methods

| Method | Description |
| --- | --- |
| [setup(core, plugins)](./kibana-plugin-core-server.asyncplugin.setup.md) | |
| [start(core, plugins)](./kibana-plugin-core-server.asyncplugin.start.md) | |
| [stop()](./kibana-plugin-core-server.asyncplugin.stop.md) | |

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [setup](./kibana-plugin-core-server.asyncplugin.setup.md)

## AsyncPlugin.setup() method

<b>Signature:</b>

```typescript
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreSetup</code> | |
| plugins | <code>TPluginsSetup</code> | |

<b>Returns:</b>

`TSetup | Promise<TSetup>`

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [start](./kibana-plugin-core-server.asyncplugin.start.md)

## AsyncPlugin.start() method

<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| core | <code>CoreStart</code> | |
| plugins | <code>TPluginsStart</code> | |

<b>Returns:</b>

`TStart | Promise<TStart>`

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

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) &gt; [stop](./kibana-plugin-core-server.asyncplugin.stop.md)

## AsyncPlugin.stop() method

<b>Signature:</b>

```typescript
stop?(): void;
```
<b>Returns:</b>
`void`
1 change: 1 addition & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [AppCategory](./kibana-plugin-core-server.appcategory.md) | A category definition for nav links to know where to sort them in the left hand nav |
| [AssistanceAPIResponse](./kibana-plugin-core-server.assistanceapiresponse.md) | |
| [AssistantAPIClientParams](./kibana-plugin-core-server.assistantapiclientparams.md) | |
| [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) | A plugin with asynchronous lifecycle methods. |
| [Authenticated](./kibana-plugin-core-server.authenticated.md) | |
| [AuthNotHandled](./kibana-plugin-core-server.authnothandled.md) | |
| [AuthRedirected](./kibana-plugin-core-server.authredirected.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;

<b>Returns:</b>

`TSetup | Promise<TSetup>`
`TSetup`

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;
start(core: CoreStart, plugins: TPluginsStart): TStart;
```

## Parameters
Expand All @@ -19,5 +19,5 @@ start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;

<b>Returns:</b>

`TStart | Promise<TStart>`
`TStart`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The `plugin` export at the root of a plugin's `server` directory should conform
<b>Signature:</b>

```typescript
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
export declare type PluginInitializer<TSetup, TStart, TPluginsSetup extends object = object, TPluginsStart extends object = object> = (core: PluginInitializerContext) => Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart> | AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
```
13 changes: 7 additions & 6 deletions docs/user/alerting/action-types/email.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name:: The name of the connector. The name is used to identify a connector
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 <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure this hostname is added to the allowed hosts.
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.
Secure:: If true, the connection will use TLS when connecting to the service provider. Refer to the https://nodemailer.com/smtp/#tls-options[Nodemailer TLS documentation] for more information. If not true, the connection will initially connect over TCP, then attempt to switch to TLS via the SMTP STARTTLS command.
Username:: username for 'login' type authentication.
Password:: password for 'login' type authentication.

Expand Down Expand Up @@ -92,6 +92,8 @@ systems, refer to:
* <<exchange>>
* <<amazon-ses>>

For other email servers, you can check the list of well-known services that Nodemailer supports in the JSON file https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json[well-known/services.json]. The properties of the objects in those files &mdash; `host`, `port`, and `secure` &mdash; correspond to the same email action configuration properties. A missing `secure` property in the "well-known/services.json" file is considered `false`. Typically, `port: 465` uses `secure: true`, and `port: 25` and `port: 587` use `secure: false`.

[float]
[[gmail]]
===== Sending email from Gmail
Expand All @@ -109,7 +111,6 @@ https://mail.google.com[Gmail] SMTP service:
user: <username>
password: <password>
--------------------------------------------------
// CONSOLE

If you get an authentication error that indicates that you need to continue the
sign-in process from a web browser when the action attempts to send email, you need
Expand All @@ -131,9 +132,9 @@ https://www.outlook.com/[Outlook.com] SMTP service:
[source,text]
--------------------------------------------------
config:
host: smtp-mail.outlook.com
port: 465
secure: true
host: smtp.office365.com
port: 587
secure: false
secrets:
user: <email.address>
password: <password>
Expand Down Expand Up @@ -163,7 +164,7 @@ secrets:
user: <username>
password: <password>
--------------------------------------------------
<1> `smtp.host` varies depending on the region
<1> `config.host` varies depending on the region

NOTE: You must use your Amazon SES SMTP credentials to send email through
Amazon SES. For more information, see
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-std/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export { get } from './get';
export { mapToObject } from './map_to_object';
export { merge } from './merge';
export { pick } from './pick';
export { withTimeout } from './promise';
export { withTimeout, isPromise } from './promise';
export { isRelativeUrl, modifyUrl, getUrlOrigin, URLMeaningfulParts } from './url';
export { unset } from './unset';
export { getFlattenedObject } from './get_flattened_object';
Expand Down
Loading

0 comments on commit b085a7d

Please sign in to comment.