Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into tooltip-sort
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Oct 7, 2019
2 parents c24b7ce + d0aa9f1 commit 39f256c
Show file tree
Hide file tree
Showing 782 changed files with 15,709 additions and 5,876 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'oss-ciGroup4': getOssCiGroupWorker(4),
'oss-ciGroup5': getOssCiGroupWorker(5),
'oss-ciGroup6': getOssCiGroupWorker(6),
]),
'kibana-oss-agent2': withWorkers('kibana-oss-tests2', { buildOss() }, [
'oss-ciGroup7': getOssCiGroupWorker(7),
'oss-ciGroup8': getOssCiGroupWorker(8),
'oss-ciGroup9': getOssCiGroupWorker(9),
Expand All @@ -32,6 +34,8 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'xpack-ciGroup3': getXpackCiGroupWorker(3),
'xpack-ciGroup4': getXpackCiGroupWorker(4),
'xpack-ciGroup5': getXpackCiGroupWorker(5),
]),
'kibana-xpack-agent2': withWorkers('kibana-xpack-tests2', { buildXpack() }, [
'xpack-ciGroup6': getXpackCiGroupWorker(6),
'xpack-ciGroup7': getXpackCiGroupWorker(7),
'xpack-ciGroup8': getXpackCiGroupWorker(8),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The list of common parameters:
- *responseHandler*: <string> one of the available response handlers or a <function> for a custom response handler
- *editor*: <string> one of the available editors or Editor class for custom one
- *editorConfig*: object holding editor parameters
- *options.showTimePicker*: <bool> show or hide time picker (defaults to true)
- *options.showTimePicker*: <bool> show or hide time filter (defaults to true)
- *options.showQueryBar*: <bool> show or hide query bar (defaults to true)
- *options.showFilterBar*: <bool> show or hide filter bar (defaults to true)
- *options.showIndexSelection*: <bool> show or hide index selection (defaults to true)
Expand Down Expand Up @@ -275,7 +275,7 @@ VisTypesRegistryProvider.register(MyNewVisType);
[[development-visualization-request-handlers]]
=== Visualization Request Handlers
Request handler gets called when one of the following keys on AppState change:
`vis`, `query`, `filters` or `uiState` and when timepicker is updated. On top
`vis`, `query`, `filters` or `uiState` and when the time filter is updated. On top
of that it will also get called on force refresh.

By default visualizations will use the `courier` request handler. They can also choose to use any of the other provided
Expand Down Expand Up @@ -417,7 +417,7 @@ The `vis` object holds the visualization state and is the window into kibana:
- *vis.getUiState()*: gets UI state of visualization
- *vis.uiStateVal(name, val)*: updates a property in UI state
- *vis.isEditorMode()*: returns true if in editor mode
- *vis.API.timeFilter*: allows you to access time picker
- *vis.API.timeFilter*: allows you to access time filter
- *vis.API.queryFilter*: gives you access to queryFilter
- *vis.API.events.click*: default click handler
- *vis.API.events.brush*: default brush handler
Expand All @@ -430,12 +430,12 @@ visualization's render method.
For the parameters that should not be saved with the visualization you should use the UI state.
These hold viewer-specific state, such as popup open/closed, custom colors applied to the series etc.

You can access filter bar and time picker through the objects defined on `vis.API`
You can access the filter bar and time filter through the objects defined on `vis.API`

[[development-vis-timefilter]]
==== timeFilter

Update the timefilter time values and call update() method on it to update time picker
Update the timefilter time values and call update() method on it to update the time filter

["source","js"]
-----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Register a context provider for application mounting. Will only be available to
<b>Signature:</b>

```typescript
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountContext, T>): void;
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<App['mount'], T>): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| contextName | <code>T</code> | The key of [AppMountContext](./kibana-plugin-public.appmountcontext.md) this provider's return value should be attached to. |
| provider | <code>IContextProvider&lt;AppMountContext, T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
| provider | <code>IContextProvider&lt;App['mount'], T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Register a context provider for application mounting. Will only be available to
<b>Signature:</b>

```typescript
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountContext, T>): void;
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<App['mount'], T>): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| contextName | <code>T</code> | The key of [AppMountContext](./kibana-plugin-public.appmountcontext.md) this provider's return value should be attached to. |
| provider | <code>IContextProvider&lt;AppMountContext, T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
| provider | <code>IContextProvider&lt;App['mount'], T&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function |
<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ core: {
notifications: NotificationsStart;
overlays: OverlayStart;
uiSettings: UiSettingsClientContract;
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface AppMountContext

| Property | Type | Description |
| --- | --- | --- |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: UiSettingsClientContract;</code><br/><code> }</code> | Core service APIs available to mounted applications. |
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick&lt;ApplicationStart, 'capabilities' &#124; 'navigateToApp'&gt;;</code><br/><code> chrome: ChromeStart;</code><br/><code> docLinks: DocLinksStart;</code><br/><code> http: HttpStart;</code><br/><code> i18n: I18nStart;</code><br/><code> notifications: NotificationsStart;</code><br/><code> overlays: OverlayStart;</code><br/><code> uiSettings: UiSettingsClientContract;</code><br/><code> injectedMetadata: {</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> };</code><br/><code> }</code> | Core service APIs available to mounted applications. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Creates a new [IContextContainer](./kibana-plugin-public.icontextcontainer.md) f
<b>Signature:</b>

```typescript
createContextContainer<TContext extends {}, THandlerReturn, THandlerParmaters extends any[] = []>(): IContextContainer<TContext, THandlerReturn, THandlerParmaters>;
createContextContainer<THandler extends HandlerFunction<any>>(): IContextContainer<THandler>;
```
<b>Returns:</b>
`IContextContainer<TContext, THandlerReturn, THandlerParmaters>`
`IContextContainer<THandler>`
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [CoreSetup](./kibana-plugin-public.coresetup.md) &gt; [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md)

## CoreSetup.injectedMetadata property

> Warning: This API is now obsolete.
>
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead.

<b>Signature:</b>

```typescript
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface CoreSetup
| [context](./kibana-plugin-public.coresetup.context.md) | <code>ContextSetup</code> | [ContextSetup](./kibana-plugin-public.contextsetup.md) |
| [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md) | <code>FatalErrorsSetup</code> | [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) |
| [http](./kibana-plugin-public.coresetup.http.md) | <code>HttpSetup</code> | [HttpSetup](./kibana-plugin-public.httpsetup.md) |
| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | <code>{</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> }</code> | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. |
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) |
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>UiSettingsClientContract</code> | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [CoreStart](./kibana-plugin-public.corestart.md) &gt; [injectedMetadata](./kibana-plugin-public.corestart.injectedmetadata.md)

## CoreStart.injectedMetadata property

> Warning: This API is now obsolete.
>
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead.

<b>Signature:</b>

```typescript
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface CoreStart
| [docLinks](./kibana-plugin-public.corestart.doclinks.md) | <code>DocLinksStart</code> | [DocLinksStart](./kibana-plugin-public.doclinksstart.md) |
| [http](./kibana-plugin-public.corestart.http.md) | <code>HttpStart</code> | [HttpStart](./kibana-plugin-public.httpstart.md) |
| [i18n](./kibana-plugin-public.corestart.i18n.md) | <code>I18nStart</code> | [I18nStart](./kibana-plugin-public.i18nstart.md) |
| [injectedMetadata](./kibana-plugin-public.corestart.injectedmetadata.md) | <code>{</code><br/><code> getInjectedVar: (name: string, defaultValue?: any) =&gt; unknown;</code><br/><code> }</code> | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. |
| [notifications](./kibana-plugin-public.corestart.notifications.md) | <code>NotificationsStart</code> | [NotificationsStart](./kibana-plugin-public.notificationsstart.md) |
| [overlays](./kibana-plugin-public.corestart.overlays.md) | <code>OverlayStart</code> | [OverlayStart](./kibana-plugin-public.overlaystart.md) |
| [savedObjects](./kibana-plugin-public.corestart.savedobjects.md) | <code>SavedObjectsStart</code> | [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HandlerContextType](./kibana-plugin-public.handlercontexttype.md)

## HandlerContextType type

Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-public.handlerfunction.md) to represent the type of the context.

<b>Signature:</b>

```typescript
export declare type HandlerContextType<T extends HandlerFunction<any>> = T extends HandlerFunction<infer U> ? U : never;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HandlerFunction](./kibana-plugin-public.handlerfunction.md)

## HandlerFunction type

A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-public.icontextcontainer.md)

<b>Signature:</b>

```typescript
export declare type HandlerFunction<T extends object> = (context: T, ...args: any[]) => any;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HandlerParameters](./kibana-plugin-public.handlerparameters.md)

## HandlerParameters type

Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-public.handlerfunction.md)<!-- -->, excluding the [HandlerContextType](./kibana-plugin-public.handlercontexttype.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type HandlerParameters<T extends HandlerFunction<any>> = T extends (context: any, ...args: infer U) => any ? U : never;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Create a new handler function pre-wired to context for the plugin.
<b>Signature:</b>

```typescript
createHandler(pluginOpaqueId: PluginOpaqueId, handler: IContextHandler<TContext, THandlerReturn, THandlerParameters>): (...rest: THandlerParameters) => THandlerReturn extends Promise<any> ? THandlerReturn : Promise<THandlerReturn>;
createHandler(pluginOpaqueId: PluginOpaqueId, handler: THandler): (...rest: HandlerParameters<THandler>) => ShallowPromise<ReturnType<THandler>>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| pluginOpaqueId | <code>PluginOpaqueId</code> | The plugin opaque ID for the plugin that registers this handler. |
| handler | <code>IContextHandler&lt;TContext, THandlerReturn, THandlerParameters&gt;</code> | Handler function to pass context object to. |
| handler | <code>THandler</code> | Handler function to pass context object to. |

<b>Returns:</b>

`(...rest: THandlerParameters) => THandlerReturn extends Promise<any> ? THandlerReturn : Promise<THandlerReturn>`
`(...rest: HandlerParameters<THandler>) => ShallowPromise<ReturnType<THandler>>`

A function that takes `THandlerParameters`<!-- -->, calls `handler` with a new context, and returns a Promise of the `handler` return value.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An object that handles registration of context providers and configuring handler
<b>Signature:</b>

```typescript
export interface IContextContainer<TContext extends {}, THandlerReturn, THandlerParameters extends any[] = []>
export interface IContextContainer<THandler extends HandlerFunction<any>>
```

## Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Register a new context provider.
<b>Signature:</b>

```typescript
registerContext<TContextName extends keyof TContext>(pluginOpaqueId: PluginOpaqueId, contextName: TContextName, provider: IContextProvider<TContext, TContextName, THandlerParameters>): this;
registerContext<TContextName extends keyof HandlerContextType<THandler>>(pluginOpaqueId: PluginOpaqueId, contextName: TContextName, provider: IContextProvider<THandler, TContextName>): this;
```
## Parameters
Expand All @@ -18,7 +18,7 @@ registerContext<TContextName extends keyof TContext>(pluginOpaqueId: PluginOpaqu
| --- | --- | --- |
| pluginOpaqueId | <code>PluginOpaqueId</code> | The plugin opaque ID for the plugin that registers this context. |
| contextName | <code>TContextName</code> | The key of the <code>TContext</code> object this provider supplies the value for. |
| provider | <code>IContextProvider&lt;TContext, TContextName, THandlerParameters&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) to be called each time a new context is created. |
| provider | <code>IContextProvider&lt;THandler, TContextName&gt;</code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) to be called each time a new context is created. |
<b>Returns:</b>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A function that returns a context value for a specific key of given context type
<b>Signature:</b>

```typescript
export declare type IContextProvider<TContext extends Record<string, any>, TContextName extends keyof TContext, TProviderParameters extends any[] = []> = (context: Partial<TContext>, ...rest: TProviderParameters) => Promise<TContext[TContextName]> | TContext[TContextName];
export declare type IContextProvider<THandler extends HandlerFunction<any>, TContextName extends keyof HandlerContextType<THandler>> = (context: Partial<HandlerContextType<THandler>>, ...rest: HandlerParameters<THandler>) => Promise<HandlerContextType<THandler>[TContextName]> | HandlerContextType<THandler>[TContextName];
```

## Remarks
Expand Down
4 changes: 3 additions & 1 deletion docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [AppUnmount](./kibana-plugin-public.appunmount.md) | A function called when an application should be unmounted from the page. This function should be synchronous. |
| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | |
| [ChromeNavLinkUpdateableFields](./kibana-plugin-public.chromenavlinkupdateablefields.md) | |
| [HandlerContextType](./kibana-plugin-public.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-public.handlerfunction.md) to represent the type of the context. |
| [HandlerFunction](./kibana-plugin-public.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-public.icontextcontainer.md) |
| [HandlerParameters](./kibana-plugin-public.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-public.handlerfunction.md)<!-- -->, excluding the [HandlerContextType](./kibana-plugin-public.handlercontexttype.md)<!-- -->. |
| [HttpBody](./kibana-plugin-public.httpbody.md) | |
| [HttpHandler](./kibana-plugin-public.httphandler.md) | |
| [HttpSetup](./kibana-plugin-public.httpsetup.md) | |
| [HttpStart](./kibana-plugin-public.httpstart.md) | |
| [IContextHandler](./kibana-plugin-public.icontexthandler.md) | A function registered by a plugin to perform some action. |
| [IContextProvider](./kibana-plugin-public.icontextprovider.md) | A function that returns a context value for a specific key of given context type. |
| [OverlayBannerMount](./kibana-plugin-public.overlaybannermount.md) | A function that will mount the banner inside the provided element. |
| [OverlayBannerUnmount](./kibana-plugin-public.overlaybannerunmount.md) | A function that will unmount the banner from the element. |
Expand Down
Loading

0 comments on commit 39f256c

Please sign in to comment.