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 server rendering service to enable standalone route rendering (el…
…astic#52161) * Add server rendering service to enable standalone route rendering * Update renovate config * Move legacy rendering functionality to legacy service * Use config for exposed variable in new platform * Lint changes from rebase * Rebase artifact * Remove RenderingProvider, add tests for legacy vars implementation, review notes * Add UI app functionality to legacy service * Update rendering snapshots * Update docs * Fix up functional tests * Clean up legacy types * Revise types from reverting injected metadata changes * Update translations and broken tests * Mock legacy internals in legacy tests * Add missing doc types * Rename InternalRenderOptions to LegacyRenderOptions * Remove extraneous legacy exports, review nits * Functional tests fixes * Rebase, attempt CI test fixes * Only allow specified appIds in testbed rendering integration test * Update snapshot names * Review nits
- Loading branch information
1 parent
f27e050
commit deb1055
Showing
93 changed files
with
3,385 additions
and
1,381 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
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
26 changes: 13 additions & 13 deletions
26
docs/development/core/server/kibana-plugin-server.basepath.get.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [BasePath](./kibana-plugin-server.basepath.md) > [get](./kibana-plugin-server.basepath.get.md) | ||
|
||
## BasePath.get property | ||
|
||
returns `basePath` value, specific for an incoming request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
(request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest) => string; | ||
``` | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [BasePath](./kibana-plugin-server.basepath.md) > [get](./kibana-plugin-server.basepath.get.md) | ||
|
||
## BasePath.get property | ||
|
||
returns `basePath` value, specific for an incoming request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
get: (request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest) => string; | ||
``` |
26 changes: 13 additions & 13 deletions
26
docs/development/core/server/kibana-plugin-server.basepath.set.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [BasePath](./kibana-plugin-server.basepath.md) > [set](./kibana-plugin-server.basepath.set.md) | ||
|
||
## BasePath.set property | ||
|
||
sets `basePath` value, specific for an incoming request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
(request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest, requestSpecificBasePath: string) => void; | ||
``` | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [BasePath](./kibana-plugin-server.basepath.md) > [set](./kibana-plugin-server.basepath.set.md) | ||
|
||
## BasePath.set property | ||
|
||
sets `basePath` value, specific for an incoming request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
set: (request: KibanaRequest<unknown, unknown, unknown, any> | LegacyRequest, requestSpecificBasePath: string) => void; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...elopment/core/server/kibana-plugin-server.irenderoptions.includeusersettings.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-server](./kibana-plugin-server.md) > [IRenderOptions](./kibana-plugin-server.irenderoptions.md) > [includeUserSettings](./kibana-plugin-server.irenderoptions.includeusersettings.md) | ||
|
||
## IRenderOptions.includeUserSettings property | ||
|
||
Set whether to output user settings in the page metadata. `true` by default. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
includeUserSettings?: boolean; | ||
``` |
19 changes: 19 additions & 0 deletions
19
docs/development/core/server/kibana-plugin-server.irenderoptions.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,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [IRenderOptions](./kibana-plugin-server.irenderoptions.md) | ||
|
||
## IRenderOptions interface | ||
|
||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface IRenderOptions | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [includeUserSettings](./kibana-plugin-server.irenderoptions.includeusersettings.md) | <code>boolean</code> | Set whether to output user settings in the page metadata. <code>true</code> by default. | | ||
|
26 changes: 13 additions & 13 deletions
26
docs/development/core/server/kibana-plugin-server.irouter.handlelegacyerrors.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [IRouter](./kibana-plugin-server.irouter.md) > [handleLegacyErrors](./kibana-plugin-server.irouter.handlelegacyerrors.md) | ||
|
||
## IRouter.handleLegacyErrors property | ||
|
||
Wrap a router handler to catch and converts legacy boom errors to proper custom errors. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
<P, Q, B>(handler: RequestHandler<P, Q, B>) => RequestHandler<P, Q, B>; | ||
``` | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [IRouter](./kibana-plugin-server.irouter.md) > [handleLegacyErrors](./kibana-plugin-server.irouter.handlelegacyerrors.md) | ||
|
||
## IRouter.handleLegacyErrors property | ||
|
||
Wrap a router handler to catch and converts legacy boom errors to proper custom errors. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
handleLegacyErrors: <P, Q, B>(handler: RequestHandler<P, Q, B>) => RequestHandler<P, Q, B>; | ||
``` |
19 changes: 19 additions & 0 deletions
19
docs/development/core/server/kibana-plugin-server.iscopedrenderingclient.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,19 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [IScopedRenderingClient](./kibana-plugin-server.iscopedrenderingclient.md) | ||
|
||
## IScopedRenderingClient interface | ||
|
||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface IScopedRenderingClient | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [render(options)](./kibana-plugin-server.iscopedrenderingclient.render.md) | Generate a <code>KibanaResponse</code> which renders an HTML page bootstrapped with the <code>core</code> bundle. Intended as a response body for HTTP route handlers. | | ||
|
41 changes: 41 additions & 0 deletions
41
docs/development/core/server/kibana-plugin-server.iscopedrenderingclient.render.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,41 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [IScopedRenderingClient](./kibana-plugin-server.iscopedrenderingclient.md) > [render](./kibana-plugin-server.iscopedrenderingclient.render.md) | ||
|
||
## IScopedRenderingClient.render() method | ||
|
||
Generate a `KibanaResponse` which renders an HTML page bootstrapped with the `core` bundle. Intended as a response body for HTTP route handlers. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
render(options?: IRenderOptions): Promise<string>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| options | <code>IRenderOptions</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`Promise<string>` | ||
|
||
## Example | ||
|
||
|
||
```ts | ||
router.get( | ||
{ path: '/', validate: false }, | ||
(context, request, response) => | ||
response.ok({ | ||
body: await context.core.rendering.render(), | ||
headers: { | ||
'content-security-policy': context.core.http.csp.header, | ||
}, | ||
}) | ||
); | ||
|
||
``` | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.