forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ApplicationService Mounting (elastic#41007)
* Add core-only bundle * Add ApplicationService mounting * Add LegacyCore{Setup,Start} * Fix PR comments * Add functional tests * Fix PR comments * Fix PR comments * Remove other usages of rootRoute * Use state field notation * Add support for open in new tab * Fix PR comments * Fix pesky await from the dead * Update docs * Bump @types/history
- Loading branch information
Showing
104 changed files
with
2,539 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [App](./kibana-plugin-public.app.md) | ||
|
||
## App interface | ||
|
||
Extension of [common app properties](./kibana-plugin-public.appbase.md) with the mount function. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface App extends AppBase | ||
``` | ||
## Properties | ||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [mount](./kibana-plugin-public.app.mount.md) | <code>(context: AppMountContext, params: AppMountParameters) => AppUnmount | Promise<AppUnmount></code> | A mount function called when the user navigates to this app's route. | | ||
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.app.mount.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [App](./kibana-plugin-public.app.md) > [mount](./kibana-plugin-public.app.mount.md) | ||
|
||
## App.mount property | ||
|
||
A mount function called when the user navigates to this app's route. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
mount: (context: AppMountContext, params: AppMountParameters) => AppUnmount | Promise<AppUnmount>; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.capabilities.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [capabilities](./kibana-plugin-public.appbase.capabilities.md) | ||
|
||
## AppBase.capabilities property | ||
|
||
Custom capabilities defined by the app. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
capabilities?: Partial<Capabilities>; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.euiicontype.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [euiIconType](./kibana-plugin-public.appbase.euiicontype.md) | ||
|
||
## AppBase.euiIconType property | ||
|
||
A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
euiIconType?: string; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.icon.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [icon](./kibana-plugin-public.appbase.icon.md) | ||
|
||
## AppBase.icon property | ||
|
||
A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
icon?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/development/core/public/kibana-plugin-public.appbase.id.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [id](./kibana-plugin-public.appbase.id.md) | ||
|
||
## AppBase.id property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
id: string; | ||
``` |
25 changes: 25 additions & 0 deletions
25
docs/development/core/public/kibana-plugin-public.appbase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) | ||
|
||
## AppBase interface | ||
|
||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface AppBase | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [capabilities](./kibana-plugin-public.appbase.capabilities.md) | <code>Partial<Capabilities></code> | Custom capabilities defined by the app. | | ||
| [euiIconType](./kibana-plugin-public.appbase.euiicontype.md) | <code>string</code> | A EUI iconType that will be used for the app's icon. This icon takes precendence over the <code>icon</code> property. | | ||
| [icon](./kibana-plugin-public.appbase.icon.md) | <code>string</code> | A URL to an image file used as an icon. Used as a fallback if <code>euiIconType</code> is not provided. | | ||
| [id](./kibana-plugin-public.appbase.id.md) | <code>string</code> | | | ||
| [order](./kibana-plugin-public.appbase.order.md) | <code>number</code> | An ordinal used to sort nav links relative to one another for display. | | ||
| [title](./kibana-plugin-public.appbase.title.md) | <code>string</code> | The title of the application. | | ||
| [tooltip$](./kibana-plugin-public.appbase.tooltip$.md) | <code>Observable<string></code> | An observable for a tooltip shown when hovering over app link. | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.order.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [order](./kibana-plugin-public.appbase.order.md) | ||
|
||
## AppBase.order property | ||
|
||
An ordinal used to sort nav links relative to one another for display. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
order?: number; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.title.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [title](./kibana-plugin-public.appbase.title.md) | ||
|
||
## AppBase.title property | ||
|
||
The title of the application. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
title: string; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/development/core/public/kibana-plugin-public.appbase.tooltip$.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppBase](./kibana-plugin-public.appbase.md) > [tooltip$](./kibana-plugin-public.appbase.tooltip$.md) | ||
|
||
## AppBase.tooltip$ property | ||
|
||
An observable for a tooltip shown when hovering over app link. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
tooltip$?: Observable<string>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...in-public.applicationsetup.registerapp.md → ...lugin-public.applicationsetup.register.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...pment/core/public/kibana-plugin-public.applicationsetup.registermountcontext.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ApplicationSetup](./kibana-plugin-public.applicationsetup.md) > [registerMountContext](./kibana-plugin-public.applicationsetup.registermountcontext.md) | ||
|
||
## ApplicationSetup.registerMountContext() method | ||
|
||
Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountContext, 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<AppMountContext, T></code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function | | ||
<b>Returns:</b> | ||
`void` | ||
13 changes: 0 additions & 13 deletions
13
.../development/core/public/kibana-plugin-public.applicationstart.availableapps.md
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
docs/development/core/public/kibana-plugin-public.applicationstart.geturlforapp.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ApplicationStart](./kibana-plugin-public.applicationstart.md) > [getUrlForApp](./kibana-plugin-public.applicationstart.geturlforapp.md) | ||
|
||
## ApplicationStart.getUrlForApp() method | ||
|
||
Returns a relative URL to a given app, including the global base path. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getUrlForApp(appId: string, options?: { | ||
path?: string; | ||
}): string; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| appId | <code>string</code> | | | ||
| options | <code>{</code><br/><code> path?: string;</code><br/><code> }</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`string` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../development/core/public/kibana-plugin-public.applicationstart.navigatetoapp.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ApplicationStart](./kibana-plugin-public.applicationstart.md) > [navigateToApp](./kibana-plugin-public.applicationstart.navigatetoapp.md) | ||
|
||
## ApplicationStart.navigateToApp() method | ||
|
||
Navigiate to a given app | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
navigateToApp(appId: string, options?: { | ||
path?: string; | ||
state?: any; | ||
}): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| appId | <code>string</code> | | | ||
| options | <code>{</code><br/><code> path?: string;</code><br/><code> state?: any;</code><br/><code> }</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`void` | ||
|
25 changes: 25 additions & 0 deletions
25
...pment/core/public/kibana-plugin-public.applicationstart.registermountcontext.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ApplicationStart](./kibana-plugin-public.applicationstart.md) > [registerMountContext](./kibana-plugin-public.applicationstart.registermountcontext.md) | ||
|
||
## ApplicationStart.registerMountContext() method | ||
|
||
Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
registerMountContext<T extends keyof AppMountContext>(contextName: T, provider: IContextProvider<AppMountContext, 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<AppMountContext, T></code> | A [IContextProvider](./kibana-plugin-public.icontextprovider.md) function | | ||
<b>Returns:</b> | ||
`void` | ||
22 changes: 22 additions & 0 deletions
22
docs/development/core/public/kibana-plugin-public.appmountcontext.core.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppMountContext](./kibana-plugin-public.appmountcontext.md) > [core](./kibana-plugin-public.appmountcontext.core.md) | ||
|
||
## AppMountContext.core property | ||
|
||
Core service APIs available to mounted applications. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
core: { | ||
application: Pick<ApplicationStart, 'capabilities' | 'navigateToApp'>; | ||
chrome: ChromeStart; | ||
docLinks: DocLinksStart; | ||
http: HttpStart; | ||
i18n: I18nStart; | ||
notifications: NotificationsStart; | ||
overlays: OverlayStart; | ||
uiSettings: UiSettingsClientContract; | ||
}; | ||
``` |
20 changes: 20 additions & 0 deletions
20
docs/development/core/public/kibana-plugin-public.appmountcontext.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [AppMountContext](./kibana-plugin-public.appmountcontext.md) | ||
|
||
## AppMountContext interface | ||
|
||
The context object received when applications are mounted to the DOM. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface AppMountContext | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [core](./kibana-plugin-public.appmountcontext.core.md) | <code>{</code><br/><code> application: Pick<ApplicationStart, 'capabilities' | 'navigateToApp'>;</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. | | ||
|
Oops, something went wrong.