mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge remote-tracking branch 'origin/master' into feature/merge-code
This commit is contained in:
commit
f808112424
729 changed files with 14077 additions and 6520 deletions
|
@ -129,7 +129,7 @@ module.exports = {
|
|||
{
|
||||
files: ['x-pack/test/functional/apps/**/*', 'x-pack/plugins/apm/**/*'],
|
||||
rules: {
|
||||
'@kbn/eslint/no-default-export': 'off',
|
||||
'import/no-default-export': 'off',
|
||||
'import/no-named-as-default': 'off',
|
||||
},
|
||||
},
|
||||
|
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
**/__snapshots__/** linguist-generated=true
|
0
data/.empty
Normal file
0
data/.empty
Normal file
|
@ -43,7 +43,7 @@ PUT api/logstash/pipeline/hello-world
|
|||
{
|
||||
"pipeline": "input { stdin {} } output { stdout {} }",
|
||||
"settings": {
|
||||
"queue.type": "persistent"
|
||||
"queue.type": "persisted"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
|
|
@ -16,6 +16,8 @@ Note: You cannot access this endpoint via the Console in Kibana.
|
|||
(array|string) The saved object type(s) that the export should be limited to
|
||||
`objects` (optional)::
|
||||
(array) A list of objects to export
|
||||
`includeReferencesDeep`::
|
||||
(boolean) This will make the exported objects include all the referenced objects needed
|
||||
|
||||
Note: At least `type` or `objects` must be passed in.
|
||||
|
||||
|
|
|
@ -86,11 +86,58 @@ containing a JSON structure similar to the following example:
|
|||
{
|
||||
"id": "my-pattern",
|
||||
"type": "index-pattern",
|
||||
"title": "my-pattern-*",
|
||||
"error": {
|
||||
"statusCode": 409,
|
||||
"message": "version conflict, document already exists",
|
||||
"type": "conflict"
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
The following example imports a visualization and dashboard but the index pattern for the visualization reference doesn't exist.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
POST api/saved_objects/_import
|
||||
Content-Type: multipart/form-data; boundary=EXAMPLE
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="file"; filename="export.ndjson"
|
||||
Content-Type: application/ndjson
|
||||
|
||||
{"type":"visualization","id":"my-vis","attributes":{"title":"my-vis"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]}
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"}]}
|
||||
--EXAMPLE--
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The call returns a response code of `200` and a response body
|
||||
containing a JSON structure similar to the following example:
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
"success": false,
|
||||
"successCount": 0,
|
||||
"errors": [
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"title": "my-vis",
|
||||
"error": {
|
||||
"type": "missing_references",
|
||||
"references": [
|
||||
{
|
||||
"type": "index-pattern",
|
||||
"id": "my-pattern-*"
|
||||
}
|
||||
],
|
||||
"blocking": [
|
||||
{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
--------------------------------------------------
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
experimental[This functionality is *experimental* and may be changed or removed completely in a future release.]
|
||||
|
||||
The resolve import errors API enables you to resolve errors given by the import API by either overwriting specific saved objects or changing references to a newly created object.
|
||||
The resolve import errors API enables you to resolve errors given by the import API by either retrying certain saved objects, overwriting specific saved objects or changing references to different saved objects.
|
||||
|
||||
Note: You cannot access this endpoint via the Console in Kibana.
|
||||
|
||||
|
@ -16,27 +16,20 @@ Note: You cannot access this endpoint via the Console in Kibana.
|
|||
The request body must be of type multipart/form-data.
|
||||
|
||||
`file`::
|
||||
(ndjson) The same new line delimited JSON objects given to the import API.
|
||||
The same file given to the import API.
|
||||
|
||||
`overwrites` (optional)::
|
||||
(array) A list of `type` and `id` objects allowed to be overwritten on import.
|
||||
|
||||
`replaceReferences` (optional)::
|
||||
(array) A list of `type`, `from` and `to` used to change imported saved object references to.
|
||||
|
||||
`skips` (optional)::
|
||||
(array) A list of `type` and `id` objects to skip importing.
|
||||
`retries`::
|
||||
(array) A list of `type`, `id`, `replaceReferences` and `overwrite` objects to retry importing. The property `replaceReferences` is a list of `type`, `from` and `to` used to change the object's references.
|
||||
|
||||
==== Response body
|
||||
|
||||
The response body will have a top level `success` property that indicates
|
||||
if the import was successful or not as well as a `successCount` indicating how many records are successfully resolved.
|
||||
In the scenario the import wasn't successful a top level `errors` array will contain the objects that failed to import.
|
||||
if resolving errors was successful or not as well as a `successCount` indicating how many records are successfully resolved.
|
||||
In the scenario resolving errors wasn't successful, a top level `errors` array will contain the objects that failed to be resolved.
|
||||
|
||||
==== Examples
|
||||
|
||||
The following example resolves errors for an index pattern and dashboard but indicates to skip the index pattern.
|
||||
This will cause the index pattern to not be in the system and the dashboard to overwrite the existing saved object.
|
||||
The following example retries importing a dashboard.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
|
@ -46,14 +39,9 @@ Content-Type: multipart/form-data; boundary=EXAMPLE
|
|||
Content-Disposition: form-data; name="file"; filename="export.ndjson"
|
||||
Content-Type: application/ndjson
|
||||
|
||||
{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}}
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="skips"
|
||||
|
||||
[{"type":"index-pattern","id":"my-pattern"}]
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="overwrites"
|
||||
Content-Disposition: form-data; name="retries"
|
||||
|
||||
[{"type":"dashboard","id":"my-dashboard"}]
|
||||
--EXAMPLE--
|
||||
|
@ -71,8 +59,7 @@ containing a JSON structure similar to the following example:
|
|||
}
|
||||
--------------------------------------------------
|
||||
|
||||
The following example resolves errors for a visualization and dashboard but indicates
|
||||
to replace the dashboard references to another visualization.
|
||||
The following example resolves errors for a dashboard. This will cause the dashboard to overwrite the existing saved object.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
|
@ -82,12 +69,42 @@ Content-Type: multipart/form-data; boundary=EXAMPLE
|
|||
Content-Disposition: form-data; name="file"; filename="export.ndjson"
|
||||
Content-Type: application/ndjson
|
||||
|
||||
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"}}
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"panel_0","type":"visualization","id":"my-vis"}]}
|
||||
{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}}
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="replaceReferences"
|
||||
Content-Disposition: form-data; name="retries"
|
||||
|
||||
[{"type":"visualization","from":"my-vis","to":"my-vis-2"}]
|
||||
[{"type":"dashboard","id":"my-dashboard","overwrite":true}]
|
||||
--EXAMPLE--
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
A successful call returns a response code of `200` and a response body
|
||||
containing a JSON structure similar to the following example:
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
The following example resolves errors for a visualization by replacing the index pattern to another.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
POST api/saved_objects/_resolve_import_errors
|
||||
Content-Type: multipart/form-data; boundary=EXAMPLE
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="file"; filename="export.ndjson"
|
||||
Content-Type: application/ndjson
|
||||
|
||||
{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"missing"}]}
|
||||
--EXAMPLE
|
||||
Content-Disposition: form-data; name="retries"
|
||||
|
||||
[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"missing","to":"existing"}]}]
|
||||
--EXAMPLE--
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [BasePathSetup](./kibana-plugin-public.basepathsetup.md)
|
||||
|
||||
## BasePathSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type BasePathSetup = ReturnType<BasePathService['setup']>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md) > [logo](./kibana-plugin-public.chromebrand.logo.md)
|
||||
|
||||
## ChromeBrand.logo property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
logo?: string;
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md)
|
||||
|
||||
## ChromeBrand interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface ChromeBrand
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [logo](./kibana-plugin-public.chromebrand.logo.md) | <code>string</code> | |
|
||||
| [smallLogo](./kibana-plugin-public.chromebrand.smalllogo.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md) > [smallLogo](./kibana-plugin-public.chromebrand.smalllogo.md)
|
||||
|
||||
## ChromeBrand.smallLogo property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
smallLogo?: string;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [data-test-subj](./kibana-plugin-public.chromebreadcrumb.data-test-subj.md)
|
||||
|
||||
## ChromeBreadcrumb.data-test-subj property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
'data-test-subj'?: string;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [href](./kibana-plugin-public.chromebreadcrumb.href.md)
|
||||
|
||||
## ChromeBreadcrumb.href property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
href?: string;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md)
|
||||
|
||||
## ChromeBreadcrumb interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface ChromeBreadcrumb
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [data-test-subj](./kibana-plugin-public.chromebreadcrumb.data-test-subj.md) | <code>string</code> | |
|
||||
| [href](./kibana-plugin-public.chromebreadcrumb.href.md) | <code>string</code> | |
|
||||
| [text](./kibana-plugin-public.chromebreadcrumb.text.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [text](./kibana-plugin-public.chromebreadcrumb.text.md)
|
||||
|
||||
## ChromeBreadcrumb.text property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
text: string;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md)
|
||||
|
||||
## ChromeHelpExtension type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ChromeHelpExtension = (element: HTMLDivElement) => (() => void);
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeSetup](./kibana-plugin-public.chromesetup.md)
|
||||
|
||||
## ChromeSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ChromeSetup = ReturnType<ChromeService['setup']>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [basePath](./kibana-plugin-public.coresetup.basepath.md)
|
||||
|
||||
## CoreSetup.basePath property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
basePath: BasePathSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [chrome](./kibana-plugin-public.coresetup.chrome.md)
|
||||
|
||||
## CoreSetup.chrome property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
chrome: ChromeSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md)
|
||||
|
||||
## CoreSetup.fatalErrors property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatalErrors: FatalErrorsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [http](./kibana-plugin-public.coresetup.http.md)
|
||||
|
||||
## CoreSetup.http property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
http: HttpSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [i18n](./kibana-plugin-public.coresetup.i18n.md)
|
||||
|
||||
## CoreSetup.i18n property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
i18n: I18nSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md)
|
||||
|
||||
## CoreSetup.injectedMetadata property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
injectedMetadata: InjectedMetadataSetup;
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md)
|
||||
|
||||
## CoreSetup interface
|
||||
|
||||
Core services exposed to the start lifecycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CoreSetup
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [basePath](./kibana-plugin-public.coresetup.basepath.md) | <code>BasePathSetup</code> | |
|
||||
| [chrome](./kibana-plugin-public.coresetup.chrome.md) | <code>ChromeSetup</code> | |
|
||||
| [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md) | <code>FatalErrorsSetup</code> | |
|
||||
| [http](./kibana-plugin-public.coresetup.http.md) | <code>HttpSetup</code> | |
|
||||
| [i18n](./kibana-plugin-public.coresetup.i18n.md) | <code>I18nSetup</code> | |
|
||||
| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | <code>InjectedMetadataSetup</code> | |
|
||||
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | |
|
||||
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>UiSettingsSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [notifications](./kibana-plugin-public.coresetup.notifications.md)
|
||||
|
||||
## CoreSetup.notifications property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
notifications: NotificationsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [uiSettings](./kibana-plugin-public.coresetup.uisettings.md)
|
||||
|
||||
## CoreSetup.uiSettings property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
uiSettings: UiSettingsSetup;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md)
|
||||
|
||||
## FatalErrorsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type FatalErrorsSetup = ReturnType<FatalErrorsService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpSetup](./kibana-plugin-public.httpsetup.md)
|
||||
|
||||
## HttpSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type HttpSetup = ReturnType<HttpService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [I18nSetup](./kibana-plugin-public.i18nsetup.md)
|
||||
|
||||
## I18nSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type I18nSetup = ReturnType<I18nService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md)
|
||||
|
||||
## InjectedMetadataSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type InjectedMetadataSetup = ReturnType<InjectedMetadataService['setup']>;
|
||||
```
|
39
docs/development/core/public/kibana-plugin-public.md
Normal file
39
docs/development/core/public/kibana-plugin-public.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md)
|
||||
|
||||
## kibana-plugin-public package
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [ToastsSetup](./kibana-plugin-public.toastssetup.md) | |
|
||||
| [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) | |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [ChromeBrand](./kibana-plugin-public.chromebrand.md) | |
|
||||
| [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) | |
|
||||
| [CoreSetup](./kibana-plugin-public.coresetup.md) | Core services exposed to the start lifecycle |
|
||||
| [Plugin](./kibana-plugin-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
|
||||
| [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
|
||||
| [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) | The available core services passed to a plugin's <code>Plugin#setup</code> method. |
|
||||
| [UiSettingsState](./kibana-plugin-public.uisettingsstate.md) | |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [BasePathSetup](./kibana-plugin-public.basepathsetup.md) | |
|
||||
| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | |
|
||||
| [ChromeSetup](./kibana-plugin-public.chromesetup.md) | |
|
||||
| [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) | |
|
||||
| [HttpSetup](./kibana-plugin-public.httpsetup.md) | |
|
||||
| [I18nSetup](./kibana-plugin-public.i18nsetup.md) | |
|
||||
| [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md) | |
|
||||
| [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) | |
|
||||
| [PluginInitializer](./kibana-plugin-public.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>public</code> directory should conform to this interface. |
|
||||
| [ToastInput](./kibana-plugin-public.toastinput.md) | |
|
||||
| [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md) | |
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [NotificationsSetup](./kibana-plugin-public.notificationssetup.md)
|
||||
|
||||
## NotificationsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type NotificationsSetup = ReturnType<NotificationsService['setup']>;
|
||||
```
|
19
docs/development/core/public/kibana-plugin-public.plugin.md
Normal file
19
docs/development/core/public/kibana-plugin-public.plugin.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md)
|
||||
|
||||
## Plugin interface
|
||||
|
||||
The interface that should be returned by a `PluginInitializer`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Plugin<TSetup, TDependencies extends Record<string, unknown> =
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [setup](./kibana-plugin-public.plugin.setup.md) | <code>(core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise<TSetup></code> | |
|
||||
| [stop](./kibana-plugin-public.plugin.stop.md) | <code>() => void</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [setup](./kibana-plugin-public.plugin.setup.md)
|
||||
|
||||
## Plugin.setup property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
setup: (core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise<TSetup>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [stop](./kibana-plugin-public.plugin.stop.md)
|
||||
|
||||
## Plugin.stop property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
stop?: () => void;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializer](./kibana-plugin-public.plugininitializer.md)
|
||||
|
||||
## PluginInitializer type
|
||||
|
||||
The `plugin` export at the root of a plugin's `public` directory should conform to this interface.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type PluginInitializer<TSetup, TDependencies extends Record<string, unknown> = {}> = (core: PluginInitializerContext) => Plugin<TSetup, TDependencies>;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md)
|
||||
|
||||
## PluginInitializerContext interface
|
||||
|
||||
The available core services passed to a `PluginInitializer`
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginInitializerContext
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md)
|
||||
|
||||
## PluginSetupContext.basePath property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
basePath: BasePathSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md)
|
||||
|
||||
## PluginSetupContext.chrome property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
chrome: ChromeSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md)
|
||||
|
||||
## PluginSetupContext.fatalErrors property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatalErrors: FatalErrorsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md)
|
||||
|
||||
## PluginSetupContext.i18n property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
i18n: I18nSetup;
|
||||
```
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md)
|
||||
|
||||
## PluginSetupContext interface
|
||||
|
||||
The available core services passed to a plugin's `Plugin#setup` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginSetupContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md) | <code>BasePathSetup</code> | |
|
||||
| [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md) | <code>ChromeSetup</code> | |
|
||||
| [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md) | <code>FatalErrorsSetup</code> | |
|
||||
| [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md) | <code>I18nSetup</code> | |
|
||||
| [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md) | <code>NotificationsSetup</code> | |
|
||||
| [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md) | <code>UiSettingsSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md)
|
||||
|
||||
## PluginSetupContext.notifications property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
notifications: NotificationsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md)
|
||||
|
||||
## PluginSetupContext.uiSettings property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
uiSettings: UiSettingsSetup;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastInput](./kibana-plugin-public.toastinput.md)
|
||||
|
||||
## ToastInput type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ToastInput = string | Pick<Toast, Exclude<keyof Toast, 'id'>>;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [add](./kibana-plugin-public.toastssetup.add.md)
|
||||
|
||||
## ToastsSetup.add() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
add(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addDanger](./kibana-plugin-public.toastssetup.adddanger.md)
|
||||
|
||||
## ToastsSetup.addDanger() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addDanger(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addSuccess](./kibana-plugin-public.toastssetup.addsuccess.md)
|
||||
|
||||
## ToastsSetup.addSuccess() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addSuccess(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addWarning](./kibana-plugin-public.toastssetup.addwarning.md)
|
||||
|
||||
## ToastsSetup.addWarning() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addWarning(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [get$](./kibana-plugin-public.toastssetup.get$.md)
|
||||
|
||||
## ToastsSetup.get$() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get$(): Rx.Observable<Toast[]>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<Toast[]>`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md)
|
||||
|
||||
## ToastsSetup class
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class ToastsSetup
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [add(toastOrTitle)](./kibana-plugin-public.toastssetup.add.md) | | |
|
||||
| [addDanger(toastOrTitle)](./kibana-plugin-public.toastssetup.adddanger.md) | | |
|
||||
| [addSuccess(toastOrTitle)](./kibana-plugin-public.toastssetup.addsuccess.md) | | |
|
||||
| [addWarning(toastOrTitle)](./kibana-plugin-public.toastssetup.addwarning.md) | | |
|
||||
| [get$()](./kibana-plugin-public.toastssetup.get$.md) | | |
|
||||
| [remove(toast)](./kibana-plugin-public.toastssetup.remove.md) | | |
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [remove](./kibana-plugin-public.toastssetup.remove.md)
|
||||
|
||||
## ToastsSetup.remove() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
remove(toast: Toast): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toast | <code>Toast</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [get$](./kibana-plugin-public.uisettingsclient.get$.md)
|
||||
|
||||
## UiSettingsClient.get$() method
|
||||
|
||||
Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a `defaultOverride` argument behaves the same as it does in \#get()
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get$(key: string, defaultOverride?: any): Rx.Observable<any>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| defaultOverride | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<any>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [get](./kibana-plugin-public.uisettingsclient.get.md)
|
||||
|
||||
## UiSettingsClient.get() method
|
||||
|
||||
Gets the value for a specific uiSetting. If this setting has no user-defined value then the `defaultOverride` parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not defined by a uiSettingDefaults then an error is thrown, otherwise the default is read from the uiSettingDefaults.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get(key: string, defaultOverride?: any): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| defaultOverride | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`any`
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getAll](./kibana-plugin-public.uisettingsclient.getall.md)
|
||||
|
||||
## UiSettingsClient.getAll() method
|
||||
|
||||
Gets the metadata about all uiSettings, including the type, default value, and user value for each key.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getAll(): UiSettingsState;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`UiSettingsState`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getSaved$](./kibana-plugin-public.uisettingsclient.getsaved$.md)
|
||||
|
||||
## UiSettingsClient.getSaved$() method
|
||||
|
||||
Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getSaved$(): Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getUpdate$](./kibana-plugin-public.uisettingsclient.getupdate$.md)
|
||||
|
||||
## UiSettingsClient.getUpdate$() method
|
||||
|
||||
Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getUpdate$(): Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isCustom](./kibana-plugin-public.uisettingsclient.iscustom.md)
|
||||
|
||||
## UiSettingsClient.isCustom() method
|
||||
|
||||
Returns true if the setting is not a part of the uiSettingDefaults, but was either added directly via `set()`<!-- -->, or is an unknown setting found in the uiSettings saved object
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isCustom(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isDeclared](./kibana-plugin-public.uisettingsclient.isdeclared.md)
|
||||
|
||||
## UiSettingsClient.isDeclared() method
|
||||
|
||||
Returns true if the key is a "known" uiSetting, meaning it is either defined in the uiSettingDefaults or was previously added as a custom setting via the `set()` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isDeclared(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isDefault](./kibana-plugin-public.uisettingsclient.isdefault.md)
|
||||
|
||||
## UiSettingsClient.isDefault() method
|
||||
|
||||
Returns true if the setting has no user-defined value or is unknown
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isDefault(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isOverridden](./kibana-plugin-public.uisettingsclient.isoverridden.md)
|
||||
|
||||
## UiSettingsClient.isOverridden() method
|
||||
|
||||
Returns true if a settings value is overridden by the server. When a setting is overridden its value can not be changed via `set()` or `remove()`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isOverridden(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md)
|
||||
|
||||
## UiSettingsClient class
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class UiSettingsClient
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [params](./kibana-plugin-public.uisettingsclient.params.md) | | <code>UiSettingsClientParams</code> | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [get(key, defaultOverride)](./kibana-plugin-public.uisettingsclient.get.md) | | Gets the value for a specific uiSetting. If this setting has no user-defined value then the <code>defaultOverride</code> parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not defined by a uiSettingDefaults then an error is thrown, otherwise the default is read from the uiSettingDefaults. |
|
||||
| [get$(key, defaultOverride)](./kibana-plugin-public.uisettingsclient.get$.md) | | Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a <code>defaultOverride</code> argument behaves the same as it does in \#get() |
|
||||
| [getAll()](./kibana-plugin-public.uisettingsclient.getall.md) | | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. |
|
||||
| [getSaved$()](./kibana-plugin-public.uisettingsclient.getsaved$.md) | | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
|
||||
| [getUpdate$()](./kibana-plugin-public.uisettingsclient.getupdate$.md) | | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
|
||||
| [isCustom(key)](./kibana-plugin-public.uisettingsclient.iscustom.md) | | Returns true if the setting is not a part of the uiSettingDefaults, but was either added directly via <code>set()</code>, or is an unknown setting found in the uiSettings saved object |
|
||||
| [isDeclared(key)](./kibana-plugin-public.uisettingsclient.isdeclared.md) | | Returns true if the key is a "known" uiSetting, meaning it is either defined in the uiSettingDefaults or was previously added as a custom setting via the <code>set()</code> method. |
|
||||
| [isDefault(key)](./kibana-plugin-public.uisettingsclient.isdefault.md) | | Returns true if the setting has no user-defined value or is unknown |
|
||||
| [isOverridden(key)](./kibana-plugin-public.uisettingsclient.isoverridden.md) | | Returns true if a settings value is overridden by the server. When a setting is overridden its value can not be changed via <code>set()</code> or <code>remove()</code>. |
|
||||
| [overrideLocalDefault(key, newDefault)](./kibana-plugin-public.uisettingsclient.overridelocaldefault.md) | | Overrides the default value for a setting in this specific browser tab. If the page is reloaded the default override is lost. |
|
||||
| [remove(key)](./kibana-plugin-public.uisettingsclient.remove.md) | | Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling <code>set(key, null)</code>, including the synchronization, custom setting, and error behavior of that method. |
|
||||
| [set(key, val)](./kibana-plugin-public.uisettingsclient.set.md) | | Sets the value for a uiSetting. If the setting is not defined in the uiSettingDefaults it will be stored as a custom setting. The new value will be synchronously available via the <code>get()</code> method and sent to the server in the background. If the request to the server fails then a toast notification will be displayed and the setting will be reverted it its value before <code>set()</code> was called. |
|
||||
| [stop()](./kibana-plugin-public.uisettingsclient.stop.md) | | Prepares the uiSettingsClient to be discarded, completing any update$ observables that have been created. |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [overrideLocalDefault](./kibana-plugin-public.uisettingsclient.overridelocaldefault.md)
|
||||
|
||||
## UiSettingsClient.overrideLocalDefault() method
|
||||
|
||||
Overrides the default value for a setting in this specific browser tab. If the page is reloaded the default override is lost.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overrideLocalDefault(key: string, newDefault: any): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| newDefault | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [params](./kibana-plugin-public.uisettingsclient.params.md)
|
||||
|
||||
## UiSettingsClient.params property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
readonly params: UiSettingsClientParams;
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [remove](./kibana-plugin-public.uisettingsclient.remove.md)
|
||||
|
||||
## UiSettingsClient.remove() method
|
||||
|
||||
Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling `set(key, null)`<!-- -->, including the synchronization, custom setting, and error behavior of that method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
remove(key: string): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<boolean>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [set](./kibana-plugin-public.uisettingsclient.set.md)
|
||||
|
||||
## UiSettingsClient.set() method
|
||||
|
||||
Sets the value for a uiSetting. If the setting is not defined in the uiSettingDefaults it will be stored as a custom setting. The new value will be synchronously available via the `get()` method and sent to the server in the background. If the request to the server fails then a toast notification will be displayed and the setting will be reverted it its value before `set()` was called.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
set(key: string, val: any): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| val | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<boolean>`
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [stop](./kibana-plugin-public.uisettingsclient.stop.md)
|
||||
|
||||
## UiSettingsClient.stop() method
|
||||
|
||||
Prepares the uiSettingsClient to be discarded, completing any update$ observables that have been created.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
stop(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md)
|
||||
|
||||
## UiSettingsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type UiSettingsSetup = UiSettingsClient;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsState](./kibana-plugin-public.uisettingsstate.md)
|
||||
|
||||
## UiSettingsState interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface UiSettingsState
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [APICaller](./kibana-plugin-server.apicaller.md)
|
||||
|
||||
## APICaller type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type APICaller = (endpoint: string, clientParams: Record<string, unknown>, options?: CallAPIOptions) => Promise<unknown>;
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CallAPIOptions](./kibana-plugin-server.callapioptions.md)
|
||||
|
||||
## CallAPIOptions interface
|
||||
|
||||
The set of options that defines how API call should be made and result be processed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CallAPIOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [wrap401Errors](./kibana-plugin-server.callapioptions.wrap401errors.md) | <code>boolean</code> | Indicates whether <code>401 Unauthorized</code> errors returned from the Elasticsearch API should be wrapped into <code>Boom</code> error instances with properly set <code>WWW-Authenticate</code> header that could have been returned by the API itself. If API didn't specify that then <code>Basic realm="Authorization Required"</code> is used as <code>WWW-Authenticate</code>. |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CallAPIOptions](./kibana-plugin-server.callapioptions.md) > [wrap401Errors](./kibana-plugin-server.callapioptions.wrap401errors.md)
|
||||
|
||||
## CallAPIOptions.wrap401Errors property
|
||||
|
||||
Indicates whether `401 Unauthorized` errors returned from the Elasticsearch API should be wrapped into `Boom` error instances with properly set `WWW-Authenticate` header that could have been returned by the API itself. If API didn't specify that then `Basic realm="Authorization Required"` is used as `WWW-Authenticate`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
wrap401Errors: boolean;
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [asScoped](./kibana-plugin-server.clusterclient.asscoped.md)
|
||||
|
||||
## ClusterClient.asScoped() method
|
||||
|
||||
Creates an instance of `ScopedClusterClient` based on the configuration the current cluster client that exposes additional `callAsCurrentUser` method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
asScoped(req?: {
|
||||
headers?: Headers;
|
||||
}): ScopedClusterClient;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| req | <code>{`<p/>` headers?: Headers;`<p/>` }</code> | Request the <code>ScopedClusterClient</code> instance will be scoped to. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`ScopedClusterClient`
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [callAsInternalUser](./kibana-plugin-server.clusterclient.callasinternaluser.md)
|
||||
|
||||
## ClusterClient.callAsInternalUser property
|
||||
|
||||
Calls specified endpoint with provided clientParams on behalf of the Kibana internal user.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
callAsInternalUser: (endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any>;
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [close](./kibana-plugin-server.clusterclient.close.md)
|
||||
|
||||
## ClusterClient.close() method
|
||||
|
||||
Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
close(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md)
|
||||
|
||||
## ClusterClient class
|
||||
|
||||
Represents an Elasticsearch cluster API client and allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class ClusterClient
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [callAsInternalUser](./kibana-plugin-server.clusterclient.callasinternaluser.md) | | <code>(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any></code> | Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [asScoped(req)](./kibana-plugin-server.clusterclient.asscoped.md) | | Creates an instance of <code>ScopedClusterClient</code> based on the configuration the current cluster client that exposes additional <code>callAsCurrentUser</code> method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed. |
|
||||
| [close()](./kibana-plugin-server.clusterclient.close.md) | | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md)
|
||||
|
||||
## CoreSetup.elasticsearch property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
elasticsearch: ElasticsearchServiceSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [http](./kibana-plugin-server.coresetup.http.md)
|
||||
|
||||
## CoreSetup.http property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
http: HttpServiceSetup;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md)
|
||||
|
||||
## CoreSetup interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CoreSetup
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | <code>ElasticsearchServiceSetup</code> | |
|
||||
| [http](./kibana-plugin-server.coresetup.http.md) | <code>HttpServiceSetup</code> | |
|
||||
| [plugins](./kibana-plugin-server.coresetup.plugins.md) | <code>PluginsServiceSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [plugins](./kibana-plugin-server.coresetup.plugins.md)
|
||||
|
||||
## CoreSetup.plugins property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
plugins: PluginsServiceSetup;
|
||||
```
|
|
@ -0,0 +1,14 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md)
|
||||
|
||||
## ElasticsearchClientConfig type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ElasticsearchClientConfig = Pick<ConfigOptions, 'keepAlive' | 'log' | 'plugins'> & Pick<ElasticsearchConfig, 'apiVersion' | 'customHeaders' | 'logQueries' | 'requestHeadersWhitelist' | 'sniffOnStart' | 'sniffOnConnectionFault' | 'hosts' | 'username' | 'password'> & {
|
||||
pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout'];
|
||||
requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout'];
|
||||
sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval'];
|
||||
ssl?: Partial<ElasticsearchConfig['ssl']>;
|
||||
};
|
||||
```
|
10
docs/development/core/server/kibana-plugin-server.headers.md
Normal file
10
docs/development/core/server/kibana-plugin-server.headers.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Headers](./kibana-plugin-server.headers.md)
|
||||
|
||||
## Headers type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type Headers = Record<string, string | string[] | undefined>;
|
||||
```
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [debug](./kibana-plugin-server.logger.debug.md)
|
||||
|
||||
## Logger.debug() method
|
||||
|
||||
Log messages useful for debugging and interactive investigation
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
debug(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [error](./kibana-plugin-server.logger.error.md)
|
||||
|
||||
## Logger.error() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages that caused a failure in the application flow
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [fatal](./kibana-plugin-server.logger.fatal.md)
|
||||
|
||||
## Logger.fatal() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages that caused an unrecoverable failure
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatal(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [info](./kibana-plugin-server.logger.info.md)
|
||||
|
||||
## Logger.info() method
|
||||
|
||||
Logs messages related to general application flow
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
info(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
23
docs/development/core/server/kibana-plugin-server.logger.md
Normal file
23
docs/development/core/server/kibana-plugin-server.logger.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md)
|
||||
|
||||
## Logger interface
|
||||
|
||||
Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Logger
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [debug(message, meta)](./kibana-plugin-server.logger.debug.md) | Log messages useful for debugging and interactive investigation |
|
||||
| [error(errorOrMessage, meta)](./kibana-plugin-server.logger.error.md) | Logs abnormal or unexpected errors or messages that caused a failure in the application flow |
|
||||
| [fatal(errorOrMessage, meta)](./kibana-plugin-server.logger.fatal.md) | Logs abnormal or unexpected errors or messages that caused an unrecoverable failure |
|
||||
| [info(message, meta)](./kibana-plugin-server.logger.info.md) | Logs messages related to general application flow |
|
||||
| [trace(message, meta)](./kibana-plugin-server.logger.trace.md) | Log messages at the most detailed log level |
|
||||
| [warn(errorOrMessage, meta)](./kibana-plugin-server.logger.warn.md) | Logs abnormal or unexpected errors or messages |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [trace](./kibana-plugin-server.logger.trace.md)
|
||||
|
||||
## Logger.trace() method
|
||||
|
||||
Log messages at the most detailed log level
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
trace(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [warn](./kibana-plugin-server.logger.warn.md)
|
||||
|
||||
## Logger.warn() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
warn(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LoggerFactory](./kibana-plugin-server.loggerfactory.md) > [get](./kibana-plugin-server.loggerfactory.get.md)
|
||||
|
||||
## LoggerFactory.get() method
|
||||
|
||||
Returns a `Logger` instance for the specified context.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get(...contextParts: string[]): Logger;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| contextParts | <code>string[]</code> | Parts of the context to return logger for. For example get('plugins', 'pid') will return a logger for the <code>plugins.pid</code> context. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Logger`
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LoggerFactory](./kibana-plugin-server.loggerfactory.md)
|
||||
|
||||
## LoggerFactory interface
|
||||
|
||||
The single purpose of `LoggerFactory` interface is to define a way to retrieve a context-based logger instance.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface LoggerFactory
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [get(contextParts)](./kibana-plugin-server.loggerfactory.get.md) | Returns a <code>Logger</code> instance for the specified context. |
|
||||
|
11
docs/development/core/server/kibana-plugin-server.logmeta.md
Normal file
11
docs/development/core/server/kibana-plugin-server.logmeta.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LogMeta](./kibana-plugin-server.logmeta.md)
|
||||
|
||||
## LogMeta interface
|
||||
|
||||
Contextual metadata
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface LogMeta
|
||||
```
|
32
docs/development/core/server/kibana-plugin-server.md
Normal file
32
docs/development/core/server/kibana-plugin-server.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md)
|
||||
|
||||
## kibana-plugin-server package
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client and allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via <code>asScoped(...)</code>). |
|
||||
| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" <code>ClusterClient</code> but exposes additional <code>callAsCurrentUser</code> method that doesn't use credentials of the Kibana internal user (as <code>callAsInternalUser</code> does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. |
|
||||
| [CoreSetup](./kibana-plugin-server.coresetup.md) | |
|
||||
| [Logger](./kibana-plugin-server.logger.md) | Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins. |
|
||||
| [LoggerFactory](./kibana-plugin-server.loggerfactory.md) | The single purpose of <code>LoggerFactory</code> interface is to define a way to retrieve a context-based logger instance. |
|
||||
| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata |
|
||||
| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. |
|
||||
| [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md) | Context passed to the plugins <code>setup</code> method. |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [APICaller](./kibana-plugin-server.apicaller.md) | |
|
||||
| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | |
|
||||
| [Headers](./kibana-plugin-server.headers.md) | |
|
||||
| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. |
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [config](./kibana-plugin-server.plugininitializercontext.config.md)
|
||||
|
||||
## PluginInitializerContext.config property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
config: {
|
||||
create: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config>;
|
||||
createIfExists: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config | undefined>;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [env](./kibana-plugin-server.plugininitializercontext.env.md)
|
||||
|
||||
## PluginInitializerContext.env property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
env: {
|
||||
mode: EnvironmentMode;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [logger](./kibana-plugin-server.plugininitializercontext.logger.md)
|
||||
|
||||
## PluginInitializerContext.logger property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
logger: LoggerFactory;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md)
|
||||
|
||||
## PluginInitializerContext interface
|
||||
|
||||
Context that's available to plugins during initialization stage.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginInitializerContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [config](./kibana-plugin-server.plugininitializercontext.config.md) | <code>{`<p/>` create: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config>;`<p/>` createIfExists: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config | undefined>;`<p/>` }</code> | |
|
||||
| [env](./kibana-plugin-server.plugininitializercontext.env.md) | <code>{`<p/>` mode: EnvironmentMode;`<p/>` }</code> | |
|
||||
| [logger](./kibana-plugin-server.plugininitializercontext.logger.md) | <code>LoggerFactory</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginName](./kibana-plugin-server.pluginname.md)
|
||||
|
||||
## PluginName type
|
||||
|
||||
Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type PluginName = string;
|
||||
```
|
|
@ -0,0 +1,12 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md) > [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md)
|
||||
|
||||
## PluginSetupContext.elasticsearch property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
elasticsearch: {
|
||||
adminClient$: Observable<ClusterClient>;
|
||||
dataClient$: Observable<ClusterClient>;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md)
|
||||
|
||||
## PluginSetupContext interface
|
||||
|
||||
Context passed to the plugins `setup` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginSetupContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md) | <code>{`<p/>` adminClient$: Observable<ClusterClient>;`<p/>` dataClient$: Observable<ClusterClient>;`<p/>` }</code> | |
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue